Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
7f2d298b
Commit
7f2d298b
authored
Nov 29, 2011
by
untereiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deleteCC dans Map2
parent
89786538
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
100 additions
and
62 deletions
+100
-62
include/Algo/Modelisation/polyhedron.hpp
include/Algo/Modelisation/polyhedron.hpp
+10
-10
include/Topology/map/map2.h
include/Topology/map/map2.h
+5
-0
include/Topology/map/map3.h
include/Topology/map/map3.h
+6
-0
include/Topology/map/map3.hpp
include/Topology/map/map3.hpp
+36
-40
src/Topology/map/map2.cpp
src/Topology/map/map2.cpp
+38
-6
src/Topology/map/map3.cpp
src/Topology/map/map3.cpp
+5
-6
No files found.
include/Algo/Modelisation/polyhedron.hpp
View file @
7f2d298b
...
...
@@ -163,20 +163,20 @@ Polyhedron<PFP>::Polyhedron(const Polyhedron<PFP>& p1, const Polyhedron<PFP>& p2
template
<
typename
PFP
>
Dart
Polyhedron
<
PFP
>::
createTetra
(
typename
PFP
::
MAP
&
the_map
)
{
Dart
base
=
the_map
.
newFace
(
3
,
false
);
Dart
base
=
the_map
.
newFace
(
3
,
false
);
Dart
side1
=
the_map
.
newFace
(
3
,
false
);
the_map
.
sewFaces
(
base
,
side1
,
false
);
Dart
side1
=
the_map
.
newFace
(
3
,
false
);
the_map
.
sewFaces
(
base
,
side1
,
false
);
Dart
side2
=
the_map
.
newFace
(
3
,
false
);
the_map
.
sewFaces
(
the_map
.
phi1
(
base
),
side2
,
false
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
side1
),
the_map
.
phi1
(
side2
),
false
);
Dart
side2
=
the_map
.
newFace
(
3
,
false
);
the_map
.
sewFaces
(
the_map
.
phi1
(
base
),
side2
,
false
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
side1
),
the_map
.
phi1
(
side2
),
false
);
Dart
side3
=
the_map
.
newFace
(
3
,
false
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
base
),
side3
,
false
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
side2
),
the_map
.
phi1
(
side3
),
false
);
Dart
side3
=
the_map
.
newFace
(
3
,
false
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
base
),
side3
,
false
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
side2
),
the_map
.
phi1
(
side3
),
false
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
side3
),
the_map
.
phi1
(
side1
),
false
);
the_map
.
sewFaces
(
the_map
.
phi_1
(
side3
),
the_map
.
phi1
(
side1
),
false
);
return
base
;
}
...
...
include/Topology/map/map2.h
View file @
7f2d298b
...
...
@@ -113,6 +113,11 @@ public:
*/
virtual
void
deleteFace
(
Dart
d
)
;
//! Delete a connected component of the map
/*! @param d a dart of the connected component
*/
virtual
void
deleteCC
(
Dart
d
)
;
//! Fill a hole with a face
/*! \pre Dart d is boundary marked
* @param d a dart of the face to fill
...
...
include/Topology/map/map3.h
View file @
7f2d298b
...
...
@@ -110,6 +110,12 @@ public:
* @param d a dart of the volume
*/
virtual
void
deleteVolume
(
Dart
d
);
//! Fill a hole with a volume
/*! \pre Dart d is boundary marked
* @param d a dart of the volume to fill
*/
virtual
void
fillHole
(
Dart
d
)
;
//@}
/*! @name Topological Operators
...
...
include/Topology/map/map3.hpp
View file @
7f2d298b
...
...
@@ -111,57 +111,53 @@ inline Dart Map3::alpha0(Dart d)
*/
inline
Dart
Map3
::
alpha1
(
Dart
d
)
{
return
phi1
(
phi3
(
d
))
;
return
phi
_
1
(
phi3
(
d
))
;
}
#ifdef NO_BOUND_MAP
inline
Dart
Map3
::
alpha2
(
Dart
d
)
{
return
phi
2
(
phi3
(
d
));
return
phi
3
(
phi2
(
d
));
}
#else
inline
Dart
Map3
::
alpha2
(
Dart
d
)
{
Dart
e
=
phi2
(
d
);
Dart
f
=
phi3
(
e
);
if
(
f
!=
e
)
return
f
;
f
=
d
;
e
=
phi3
(
f
);
while
(
e
!=
f
)
{
f
=
phi2
(
e
);
e
=
phi3
(
f
);
}
return
f
;
}
#endif
//inline Dart Map3::alpha2(Dart d)
//{
// Dart e = phi2(d);
// Dart f = phi3(e);
//
// if (f != e)
// return f;
//
// f = d;
// e = phi3(f);
// while (e != f)
// {
// f = phi2(e);
// e = phi3(f);
// }
// return f;
//}
#ifdef NO_BOUND_MAP
inline
Dart
Map3
::
alpha_2
(
Dart
d
)
{
return
phi
3
(
phi2
(
d
));
return
phi
2
(
phi3
(
d
));
}
#else
inline
Dart
Map3
::
alpha_2
(
Dart
d
)
{
Dart
e
=
phi3
(
d
);
if
(
e
!=
d
)
return
phi2
(
e
);
e
=
d
;
Dart
f
=
phi2
(
d
);
while
(
phi3
(
f
)
!=
f
)
{
e
=
phi3
(
f
);
f
=
phi2
(
e
);
}
return
e
;
}
#endif
//inline Dart Map3::alpha_2(Dart d)
//{
// Dart e = phi3(d);
//
// if (e != d)
// return phi2(e);
//
// e = d;
// Dart f = phi2(d);
// while (phi3(f) != f)
// {
// e = phi3(f);
// f = phi2(e);
// }
// return e;
//}
inline
void
Map3
::
phi3sew
(
Dart
d
,
Dart
e
)
{
...
...
src/Topology/map/map2.cpp
View file @
7f2d298b
...
...
@@ -24,6 +24,7 @@
#include "Topology/map/map2.h"
#include "Topology/generic/traversorCell.h"
#include "Topology/generic/traversor2CC.h"
namespace
CGoGN
{
...
...
@@ -124,6 +125,37 @@ void Map2::deleteFace(Dart d)
Map1
::
deleteCycle
(
dd
)
;
}
void
Map2
::
deleteCC
(
Dart
d
)
{
DartMarkerStore
mark
(
*
this
);
std
::
vector
<
Dart
>
visited
;
visited
.
push_back
(
d
);
std
::
vector
<
Dart
>::
iterator
it
;
for
(
it
=
visited
.
begin
();
it
!=
visited
.
end
();
++
it
)
{
if
(
!
mark
.
isMarked
(
*
it
))
{
Dart
d1
=
phi1
(
*
it
)
;
if
(
!
mark
.
isMarked
(
d1
))
{
mark
.
mark
(
d1
);
visited
.
push_back
(
d1
)
;
}
Dart
d2
=
phi2
(
*
it
)
;
if
(
!
mark
.
isMarked
(
d2
))
{
mark
.
mark
(
d2
);
visited
.
push_back
(
d2
)
;
}
}
}
for
(
it
=
visited
.
begin
();
it
!=
visited
.
end
();
++
it
)
deleteDart
(
*
it
)
;
}
void
Map2
::
fillHole
(
Dart
d
)
{
assert
(
isBoundaryMarked
(
d
))
;
...
...
@@ -709,7 +741,7 @@ bool Map2::foreach_dart_of_edge(Dart d, FunctorType& fonct, unsigned int thread)
bool
Map2
::
foreach_dart_of_oriented_volume
(
Dart
d
,
FunctorType
&
f
,
unsigned
int
thread
)
{
DartMarkerStore
mark
(
*
this
,
thread
);
// Lock a marker
DartMarkerStore
mark
(
*
this
,
thread
);
// Lock a marker
bool
found
=
false
;
// Last functor return value
std
::
list
<
Dart
>
visitedFaces
;
// Faces that are traversed
...
...
@@ -728,15 +760,15 @@ bool Map2::foreach_dart_of_oriented_volume(Dart d, FunctorType& f, unsigned int
// and add non visited adjacent faces to the list of face
if
(
!
found
)
{
Dart
dNex
t
=
*
face
;
Dart
i
t
=
*
face
;
do
{
mark
.
mark
(
dNex
t
);
// Mark
Dart
adj
=
phi2
(
dNex
t
);
// Get adjacent face
mark
.
mark
(
i
t
);
// Mark
Dart
adj
=
phi2
(
i
t
);
// Get adjacent face
if
(
!
isBoundaryMarked
(
adj
)
&&
!
mark
.
isMarked
(
adj
))
visitedFaces
.
push_back
(
adj
);
// Add it
dNext
=
phi1
(
dNex
t
);
}
while
(
dNex
t
!=
*
face
);
it
=
phi1
(
i
t
);
}
while
(
i
t
!=
*
face
);
}
}
}
...
...
src/Topology/map/map3.cpp
View file @
7f2d298b
...
...
@@ -39,7 +39,7 @@ void Map3::deleteVolume(Dart d)
visitedFaces
.
reserve
(
512
);
visitedFaces
.
push_back
(
d
);
// Start with the face of d
mark
.
markOrbit
(
FACE
,
d
)
;
mark
.
markOrbit
InParent
(
FACE
,
d
)
;
for
(
std
::
vector
<
Dart
>::
iterator
face
=
visitedFaces
.
begin
();
face
!=
visitedFaces
.
end
();
++
face
)
{
...
...
@@ -53,16 +53,15 @@ void Map3::deleteVolume(Dart d)
if
(
!
mark
.
isMarked
(
ee
))
// not already marked
{
visitedFaces
.
push_back
(
ee
)
;
mark
.
markOrbit
(
FACE
,
ee
)
;
mark
.
markOrbit
InParent
(
FACE
,
ee
)
;
}
e
=
phi1
(
e
)
;
}
while
(
e
!=
*
face
)
;
}
// delete every visited face
for
(
std
::
vector
<
Dart
>::
iterator
face
=
visitedFaces
.
begin
();
face
!=
visitedFaces
.
end
();
++
face
)
deleteCycle
(
*
face
);
Dart
dd
=
phi3
(
d
)
;
Map2
::
deleteCC
(
d
)
;
Map2
::
deleteCC
(
dd
)
;
}
/*! @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