Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Hurstel
CGoGN
Commits
d7cd1625
Commit
d7cd1625
authored
Nov 17, 2011
by
Pierre Kraemer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'no_boundary' of cgogn:CGoGN into no_boundary
parents
623c59a0
16b913c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
src/Topology/generic/attribmap.cpp
src/Topology/generic/attribmap.cpp
+8
-8
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+7
-4
No files found.
src/Topology/generic/attribmap.cpp
View file @
d7cd1625
...
...
@@ -25,6 +25,7 @@
#include "Topology/generic/attribmap.h"
#include "Topology/generic/autoAttributeHandler.h"
#include "Topology/generic/dartmarker.h"
namespace
CGoGN
{
...
...
@@ -54,7 +55,6 @@ void AttribMap::clear(bool removeAttrib)
init
()
;
}
/****************************************
* UTILITIES *
****************************************/
...
...
@@ -72,8 +72,8 @@ void AttribMap::bijectiveOrbitEmbedding(unsigned int orbit)
{
assert
(
isOrbitEmbedded
(
orbit
)
||
!
"Invalid parameter: orbit not embedded"
)
;
AutoAttributeHandler
<
int
>
counter
(
*
this
,
VERTEX
)
;
counter
.
setAllValues
(
int
(
0
));
AutoAttributeHandler
<
int
>
counter
(
*
this
,
orbit
)
;
counter
.
setAllValues
(
int
(
0
))
;
DartMarker
mark
(
*
this
)
;
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
...
...
@@ -81,19 +81,19 @@ void AttribMap::bijectiveOrbitEmbedding(unsigned int orbit)
if
(
!
mark
.
isMarked
(
d
))
{
mark
.
markOrbit
(
orbit
,
d
)
;
unsigned
int
emb
=
getEmbedding
(
orbit
,
d
);
unsigned
int
emb
=
getEmbedding
(
orbit
,
d
)
;
if
(
emb
!=
EMBNULL
)
{
if
(
counter
[
d
]
>
0
)
if
(
counter
[
d
]
>
0
)
{
unsigned
int
newEmb
=
embedNewCell
(
orbit
,
d
)
;
copyCell
(
VERTEX
,
newEmb
,
emb
);
copyCell
(
orbit
,
newEmb
,
emb
)
;
}
counter
[
d
]
++
;
counter
[
d
]
++
;
}
}
}
}
}
// namespace CGoGN
src/Topology/map/map2.cpp
View file @
d7cd1625
...
...
@@ -379,7 +379,7 @@ bool Map2::collapseDegeneratedFace(Dart d)
if
(
e2
!=
e
)
phi2unsew
(
e
);
if
(
d2
!=
d
&&
e2
!=
e
)
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
false
;
...
...
@@ -974,13 +974,16 @@ unsigned int Map2::closeHole(Dart d, bool forboundary)
}
}
while
(
dPhi1
!=
d
);
if
(
countEdges
==
2
)
if
(
countEdges
<
3
)
{
countEdges
=
0
;
collapseDegeneratedFace
(
first
);
// if the closing face is 2-sided, collapse it
}
boundaryMarkOrbit
(
FACE
,
phi2
(
d
));
else
{
if
(
forboundary
)
boundaryMarkOrbit
(
FACE
,
phi2
(
d
));
}
return
countEdges
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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