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
KennethVanhoey
CGoGN
Commits
6087405d
Commit
6087405d
authored
Oct 27, 2011
by
Sylvain Thery
Committed by
Pierre Kraemer
Nov 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deleteOrientedFace: OK
parent
62612054
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
43 deletions
+68
-43
include/Topology/map/map2.h
include/Topology/map/map2.h
+8
-0
include/Topology/map/map2.hpp
include/Topology/map/map2.hpp
+36
-38
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+24
-5
No files found.
include/Topology/map/map2.h
View file @
6087405d
...
...
@@ -95,6 +95,14 @@ protected:
*/
void
phi2unsew
(
Dart
d
);
//! merge a face that has been tag as boundary with existing boundary if needed
/* @param d a dart of the face
*/
void
mergeFacewithBoundary
(
Dart
d
);
/*! @name Generator and Deletor
* To generate or delete faces in a 2-map
*************************************************************************/
...
...
include/Topology/map/map2.hpp
View file @
6087405d
...
...
@@ -96,57 +96,55 @@ inline Dart Map2::alpha0(Dart d)
return
phi2
(
d
)
;
}
#ifdef NO_BOUND_MAP
inline
Dart
Map2
::
alpha1
(
Dart
d
)
{
return
phi2
(
phi_1
(
d
))
;
}
#else
// alpha1 avec bord
inline
Dart
Map2
::
alpha1
(
Dart
d
)
{
Dart
e
=
phi_1
(
d
);
Dart
f
=
phi2
(
e
);
if
(
f
!=
e
)
return
f
;
// alpha1 avec bord: bye bye
//inline Dart Map2::alpha1(Dart d)
//{
// Dart e = phi_1(d);
// Dart f = phi2(e);
//
// if (f != e)
// return f;
//
// f = d;
// e = phi2(f);
// while (e != f)
// {
// f = phi1(e);
// e = phi2(f);
// }
// return f;
//}
f
=
d
;
e
=
phi2
(
f
);
while
(
e
!=
f
)
{
f
=
phi1
(
e
);
e
=
phi2
(
f
);
}
return
f
;
}
#endif
#ifdef NO_BOUND_MAP
inline
Dart
Map2
::
alpha_1
(
Dart
d
)
{
return
phi1
(
phi2
(
d
))
;
}
#else
// alpha_1 avec bord
inline
Dart
Map2
::
alpha_1
(
Dart
d
)
{
Dart
e
=
phi2
(
d
);
if
(
e
!=
d
)
return
phi1
(
e
);
// alpha_1 avec bord : bye bye !!
//inline Dart Map2::alpha_1(Dart d)
//{
// Dart e = phi2(d);
//
// if (e != d)
// return phi1(e);
//
// e = d;
// Dart f = phi_1(d);
// while (phi2(f) != f)
// {
// e = phi2(f);
// f = phi_1(e);
// }
// return e;
//}
e
=
d
;
Dart
f
=
phi_1
(
d
);
while
(
phi2
(
f
)
!=
f
)
{
e
=
phi2
(
f
);
f
=
phi_1
(
e
);
}
return
e
;
}
#endif
inline
void
Map2
::
phi2sew
(
Dart
d
,
Dart
e
)
{
...
...
src/Topology/map/map2.cpp
View file @
6087405d
...
...
@@ -31,15 +31,34 @@ namespace CGoGN
* To generate or delete faces in a 2-map
*************************************************************************/
void
Map2
::
deleteOrientedFace
(
Dart
d
)
void
Map2
::
mergeFacewithBoundary
(
Dart
d
)
{
Dart
e
=
d
;
do
do
// foreach edge of face
{
phi2unsew
(
e
)
;
// unsew the face of d
e
=
phi1
(
e
)
;
// from all its adjacent faces
Dart
f
=
phi2
(
e
);
if
(
isBoundaryMarked
(
f
))
// if sewed to boundary
{
phi2unsew
(
e
);
// ?? not necessary
Dart
ff
=
phi_1
(
f
);
if
(
e
!=
ff
)
phi1sew
(
e
,
ff
)
;
// merge with it
Dart
ee
=
phi_1
(
e
);
if
(
f
!=
ee
)
phi1sew
(
f
,
ee
)
;
deleteOrientedFace
(
e
)
;
}
e
=
phi1
(
e
)
;
}
while
(
e
!=
d
)
;
Map1
::
deleteOrientedFace
(
d
);
// delete the face
}
void
Map2
::
deleteOrientedFace
(
Dart
d
)
{
// tag face in boundary
boundaryMarkOrbit
(
FACE
,
d
);
mergeFacewithBoundary
(
d
);
}
/*! @name Topological Operators
...
...
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