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
Thomas Pitiot
CGoGN
Commits
c321941f
Commit
c321941f
authored
Jan 05, 2012
by
Thery Sylvain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add possiblity of delete face and leave fixed points
parent
b19178f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
10 deletions
+30
-10
include/Topology/map/map2.h
include/Topology/map/map2.h
+8
-1
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+22
-9
No files found.
include/Topology/map/map2.h
View file @
c321941f
...
...
@@ -100,6 +100,12 @@ protected:
void
phi2unsew
(
Dart
d
);
public:
/**
* FOR TEST
*/
void
forceFixedPoint
(
Dart
d
)
{
(
*
m_phi2
)[
d
.
index
]
=
d
;}
/*! @name Generator and Deletor
* To generate or delete faces in a 2-map
*************************************************************************/
...
...
@@ -114,8 +120,9 @@ public:
//! Delete the face of d
/*! @param d a dart of the face
* @param withBoudary create or extend boundary face instead of fixed points (default true)
*/
virtual
void
deleteFace
(
Dart
d
)
;
virtual
void
deleteFace
(
Dart
d
,
bool
withBoundary
=
true
)
;
//! Delete a connected component of the map
/*! @param d a dart of the connected component
...
...
src/Topology/map/map2.cpp
View file @
c321941f
...
...
@@ -75,19 +75,31 @@ Dart Map2::newFace(unsigned int nbEdges, bool withBoundary)
return
d
;
}
void
Map2
::
deleteFace
(
Dart
d
)
void
Map2
::
deleteFace
(
Dart
d
,
bool
withBoundary
)
{
assert
(
!
isBoundaryMarked
(
d
))
;
if
(
withBoundary
)
{
Dart
it
=
d
;
do
{
if
(
!
isBoundaryEdge
(
it
))
unsewFaces
(
it
)
;
it
=
phi1
(
it
)
;
}
while
(
it
!=
d
)
;
Dart
dd
=
phi2
(
d
)
;
Map1
::
deleteCycle
(
d
)
;
Map1
::
deleteCycle
(
dd
)
;
return
;
}
//else with remove the face and create fixed points
Dart
it
=
d
;
do
{
if
(
!
isBoundaryEdge
(
it
))
unsewFaces
(
it
)
;
phi2unsew
(
it
);
it
=
phi1
(
it
)
;
}
while
(
it
!=
d
)
;
Dart
dd
=
phi2
(
d
)
;
Map1
::
deleteCycle
(
d
)
;
Map1
::
deleteCycle
(
dd
)
;
Map1
::
deleteCycle
(
d
);
}
void
Map2
::
deleteCC
(
Dart
d
)
...
...
@@ -316,12 +328,13 @@ void Map2::unsewFaces(Dart d)
Dart
ee
=
phi1
(
e
)
;
Dart
f
=
findBoundaryEdgeOfVertex
(
d
)
;
Dart
ff
=
findBoundaryEdgeOfVertex
(
dd
)
;
if
(
f
!=
NIL
)
phi1sew
(
e
,
phi_1
(
f
))
;
f
=
findBoundaryEdgeOfVertex
(
dd
)
;
if
(
f
!=
NIL
)
phi1sew
(
ee
,
phi_1
(
f
))
;
if
(
ff
!=
NIL
)
phi1sew
(
ee
,
phi_1
(
ff
))
;
phi2unsew
(
d
)
;
...
...
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