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
Thomas Pitiot
CGoGN
Commits
6087405d
Commit
6087405d
authored
Oct 27, 2011
by
Sylvain Thery
Committed by
Pierre Kraemer
Nov 04, 2011
Browse files
deleteOrientedFace: OK
parent
62612054
Changes
3
Hide whitespace changes
Inline
Side-by-side
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
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