Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CGoGN
CGoGN
Commits
16b913c1
Commit
16b913c1
authored
Nov 16, 2011
by
Pierre Kraemer
Browse files
correctifs bijectiveOrbitEmbedding et closeHole
parent
1b28477f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Topology/generic/attribmap.cpp
View file @
16b913c1
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include
"Topology/generic/attribmap.h"
#include
"Topology/generic/attribmap.h"
#include
"Topology/generic/autoAttributeHandler.h"
#include
"Topology/generic/autoAttributeHandler.h"
#include
"Topology/generic/dartmarker.h"
#include
"Topology/generic/dartmarker.h"
namespace
CGoGN
namespace
CGoGN
{
{
...
@@ -54,7 +55,6 @@ void AttribMap::clear(bool removeAttrib)
...
@@ -54,7 +55,6 @@ void AttribMap::clear(bool removeAttrib)
init
()
;
init
()
;
}
}
/****************************************
/****************************************
* UTILITIES *
* UTILITIES *
****************************************/
****************************************/
...
@@ -72,8 +72,8 @@ void AttribMap::bijectiveOrbitEmbedding(unsigned int orbit)
...
@@ -72,8 +72,8 @@ void AttribMap::bijectiveOrbitEmbedding(unsigned int orbit)
{
{
assert
(
isOrbitEmbedded
(
orbit
)
||
!
"Invalid parameter: orbit not embedded"
)
;
assert
(
isOrbitEmbedded
(
orbit
)
||
!
"Invalid parameter: orbit not embedded"
)
;
AutoAttributeHandler
<
int
>
counter
(
*
this
,
VERTEX
)
;
AutoAttributeHandler
<
int
>
counter
(
*
this
,
orbit
)
;
counter
.
setAllValues
(
int
(
0
));
counter
.
setAllValues
(
int
(
0
))
;
DartMarker
mark
(
*
this
)
;
DartMarker
mark
(
*
this
)
;
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
...
@@ -81,19 +81,19 @@ void AttribMap::bijectiveOrbitEmbedding(unsigned int orbit)
...
@@ -81,19 +81,19 @@ void AttribMap::bijectiveOrbitEmbedding(unsigned int orbit)
if
(
!
mark
.
isMarked
(
d
))
if
(
!
mark
.
isMarked
(
d
))
{
{
mark
.
markOrbit
(
orbit
,
d
)
;
mark
.
markOrbit
(
orbit
,
d
)
;
unsigned
int
emb
=
getEmbedding
(
orbit
,
d
);
unsigned
int
emb
=
getEmbedding
(
orbit
,
d
)
;
if
(
emb
!=
EMBNULL
)
if
(
emb
!=
EMBNULL
)
{
{
if
(
counter
[
d
]
>
0
)
if
(
counter
[
d
]
>
0
)
{
{
unsigned
int
newEmb
=
embedNewCell
(
orbit
,
d
)
;
unsigned
int
newEmb
=
embedNewCell
(
orbit
,
d
)
;
copyCell
(
VERTEX
,
newEmb
,
emb
);
copyCell
(
orbit
,
newEmb
,
emb
)
;
}
}
counter
[
d
]
++
;
counter
[
d
]
++
;
}
}
}
}
}
}
}
}
}
// namespace CGoGN
}
// namespace CGoGN
src/Topology/map/map2.cpp
View file @
16b913c1
...
@@ -379,7 +379,7 @@ bool Map2::collapseDegeneratedFace(Dart d)
...
@@ -379,7 +379,7 @@ bool Map2::collapseDegeneratedFace(Dart d)
if
(
e2
!=
e
)
phi2unsew
(
e
);
if
(
e2
!=
e
)
phi2unsew
(
e
);
if
(
d2
!=
d
&&
e2
!=
e
)
if
(
d2
!=
d
&&
e2
!=
e
)
phi2sew
(
d2
,
e2
);
phi2sew
(
d2
,
e2
);
deleteCycle
(
d
);
// Delete the single edge or two edges of the loop
deleteCycle
(
d
);
// Delete the single edge or two edges of the loop
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -974,13 +974,16 @@ unsigned int Map2::closeHole(Dart d, bool forboundary)
...
@@ -974,13 +974,16 @@ unsigned int Map2::closeHole(Dart d, bool forboundary)
}
}
}
while
(
dPhi1
!=
d
);
}
while
(
dPhi1
!=
d
);
if
(
countEdges
==
2
)
if
(
countEdges
<
3
)
{
{
countEdges
=
0
;
countEdges
=
0
;
collapseDegeneratedFace
(
first
);
// if the closing face is 2-sided, collapse it
collapseDegeneratedFace
(
first
);
// if the closing face is 2-sided, collapse it
}
}
else
boundaryMarkOrbit
(
FACE
,
phi2
(
d
));
{
if
(
forboundary
)
boundaryMarkOrbit
(
FACE
,
phi2
(
d
));
}
return
countEdges
;
return
countEdges
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment