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
KennethVanhoey
CGoGN
Commits
03e6495a
Commit
03e6495a
authored
Jan 11, 2013
by
Thery Sylvain
Browse files
resolve problems of boundary2/3
parent
db57adec
Changes
14
Hide whitespace changes
Inline
Side-by-side
include/Topology/gmap/gmap1.h
View file @
03e6495a
...
...
@@ -103,7 +103,7 @@ public:
/*! @param nbEdges the number of edges
* @return return a dart of the face
*/
Dart
newBoundaryCycle
(
unsigned
int
nbEdges
);
//
Dart newBoundaryCycle(unsigned int nbEdges);
//! Delete a face erasing all its darts
/*! @param d a dart of the face
...
...
include/Topology/gmap/gmap1.hpp
View file @
03e6495a
...
...
@@ -169,6 +169,12 @@ inline Dart GMap1::cutEdge(Dart d)
boundaryMark2
(
f
);
}
if
(
isBoundaryMarked3
(
d
))
{
boundaryMark3
(
e
);
boundaryMark3
(
f
);
}
return
f
;
}
...
...
include/Topology/gmap/gmap2.h
View file @
03e6495a
...
...
@@ -448,6 +448,11 @@ public:
*************************************************************************/
//@{
/**
* create a face of map1 marked as boundary
*/
Dart
newBoundaryCycle
(
unsigned
int
nbE
);
//! Close a topological hole (a sequence of connected fixed point of beta2). DO NOT USE, only for import/creation algorithm
/*! \pre dart d MUST be fixed point of beta2 relation
* Add a face to the map that closes the hole.
...
...
include/Topology/gmap/gmap3.h
View file @
03e6495a
...
...
@@ -57,7 +57,6 @@ public:
static
const
unsigned
int
EDGE_OF_PARENT2
=
EDGE
+
5
;
static
const
unsigned
int
DIMENSION
=
3
;
// enum { DIMENSION = 3 } ;
GMap3
();
...
...
@@ -359,6 +358,11 @@ public:
*************************************************************************/
//@{
/**
* create a face of map1 marked as boundary
*/
Dart
newBoundaryCycle
(
unsigned
int
nbE
);
//! Close a topological hole (a sequence of connected fixed point of phi3). DO NOT USE, only for import/creation algorithm
/*! \pre dart d MUST be fixed point of phi3 relation
* Add a volume to the map that closes the hole.
...
...
include/Topology/map/map1.h
View file @
03e6495a
...
...
@@ -115,7 +115,7 @@ public:
/*! @param nbEdges the number of edges
* @return return a dart of the face
*/
Dart
newBoundaryCycle
(
unsigned
int
nbEdges
);
//
Dart newBoundaryCycle(unsigned int nbEdges);
//! Delete an oriented face erasing all its darts
/*! @param d a dart of the face
...
...
include/Topology/map/map1.hpp
View file @
03e6495a
...
...
@@ -164,6 +164,9 @@ inline Dart Map1::cutEdge(Dart d)
if
(
isBoundaryMarked2
(
d
))
boundaryMark2
(
e
);
if
(
isBoundaryMarked3
(
d
))
boundaryMark3
(
e
);
return
e
;
}
...
...
include/Topology/map/map2.h
View file @
03e6495a
...
...
@@ -444,6 +444,11 @@ public:
*************************************************************************/
//@{
/**
* create a face of map1 marked as boundary
*/
Dart
newBoundaryCycle
(
unsigned
int
nbE
);
//! Close a topological hole (a sequence of connected fixed point of phi2). DO NOT USE, only for import/creation algorithm
/*! \pre dart d MUST be fixed point of phi2 relation
* Add a face to the map that closes the hole.
...
...
include/Topology/map/map3.h
View file @
03e6495a
...
...
@@ -426,7 +426,13 @@ public:
* These functions must be used with care, generally only by import algorithms
*************************************************************************/
//@{
/**
* create a face of map1 marked as boundary
*/
Dart
newBoundaryCycle
(
unsigned
int
nbE
);
//! Close a topological hole (a sequence of connected fixed point of phi3). DO NOT USE, only for import/creation algorithm
/*! \pre dart d MUST be fixed point of phi3 relation
* Add a volume to the map that closes the hole.
...
...
src/Topology/gmap/gmap1.cpp
View file @
03e6495a
...
...
@@ -66,25 +66,25 @@ Dart GMap1::newCycle(unsigned int nbEdges)
return
d0
;
}
Dart
GMap1
::
newBoundaryCycle
(
unsigned
int
nbEdges
)
{
assert
(
nbEdges
>
0
||
!
"Cannot create a face with no edge"
)
;
Dart
d0
=
GMap0
::
newEdge
();
// create the first edge
boundaryMark2
(
d0
);
boundaryMark2
(
beta0
(
d0
));
Dart
dp
=
beta0
(
d0
);
// store an extremity
for
(
unsigned
int
i
=
1
;
i
<
nbEdges
;
++
i
)
{
Dart
di
=
GMap0
::
newEdge
();
// create the next edge
boundaryMark2
(
di
);
boundaryMark2
(
beta0
(
di
));
beta1sew
(
dp
,
di
);
dp
=
beta0
(
di
);
// change the preceding
}
beta1sew
(
dp
,
d0
);
// sew the last with the first
return
d0
;
}
//
Dart GMap1::newBoundaryCycle(unsigned int nbEdges)
//
{
//
assert(nbEdges > 0 || !"Cannot create a face with no edge") ;
//
//
Dart d0 = GMap0::newEdge(); // create the first edge
//
boundaryMark2(d0);
//
boundaryMark2(beta0(d0));
//
Dart dp = beta0(d0); // store an extremity
//
for (unsigned int i = 1; i < nbEdges; ++i)
//
{
//
Dart di = GMap0::newEdge(); // create the next edge
//
boundaryMark2(di);
//
boundaryMark2(beta0(di));
//
beta1sew(dp,di);
//
dp = beta0(di); // change the preceding
//
}
//
beta1sew(dp,d0); // sew the last with the first
//
return d0;
//
}
void
GMap1
::
deleteCycle
(
Dart
d
)
{
...
...
src/Topology/gmap/gmap2.cpp
View file @
03e6495a
...
...
@@ -62,7 +62,7 @@ Dart GMap2::newFace(unsigned int nbEdges, bool withBoundary)
Dart
d
=
GMap1
::
newCycle
(
nbEdges
);
if
(
withBoundary
)
{
Dart
e
=
GMap1
::
newBoundaryCycle
(
nbEdges
);
Dart
e
=
newBoundaryCycle
(
nbEdges
);
Dart
it
=
d
;
do
...
...
@@ -378,7 +378,7 @@ void GMap2::unsewFaces(Dart d)
Dart
dd
=
phi2
(
d
);
Dart
e
=
GMap1
::
newBoundaryCycle
(
2
);
Dart
e
=
newBoundaryCycle
(
2
);
Dart
ee
=
phi1
(
e
)
;
Dart
f
=
findBoundaryEdgeOfVertex
(
d
)
;
...
...
@@ -883,6 +883,13 @@ bool GMap2::foreach_dart_of_oriented_cc(Dart d, FunctorType& f, unsigned int thr
* These functions must be used with care, generally only by import/creation algorithms
*************************************************************************/
Dart
GMap2
::
newBoundaryCycle
(
unsigned
int
nbE
)
{
Dart
d
=
GMap1
::
newCycle
(
nbE
);
boundaryMarkOrbit
<
FACE
,
2
>
(
d
);
return
d
;
}
unsigned
int
GMap2
::
closeHole
(
Dart
d
,
bool
forboundary
)
{
assert
(
beta2
(
d
)
==
d
);
// Nothing to close
...
...
src/Topology/gmap/gmap3.cpp
View file @
03e6495a
...
...
@@ -918,6 +918,13 @@ bool GMap3::foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread)
* These functions must be used with care, generally only by import/creation algorithms
*************************************************************************/
Dart
GMap3
::
newBoundaryCycle
(
unsigned
int
nbE
)
{
Dart
d
=
GMap1
::
newCycle
(
nbE
);
boundaryMarkOrbit
<
FACE
,
3
>
(
d
);
return
d
;
}
unsigned
int
GMap3
::
closeHole
(
Dart
d
,
bool
forboundary
)
{
assert
(
beta3
(
d
)
==
d
);
// Nothing to close
...
...
src/Topology/map/map1.cpp
View file @
03e6495a
...
...
@@ -68,15 +68,15 @@ Dart Map1::newCycle(unsigned int nbEdges)
return
d
;
}
Dart
Map1
::
newBoundaryCycle
(
unsigned
int
nbEdges
)
{
assert
(
nbEdges
>
0
||
!
"Cannot create a face with no edge"
)
;
Dart
d
=
newDart
()
;
// Create the first edge
boundaryMark2
(
d
);
for
(
unsigned
int
i
=
1
;
i
<
nbEdges
;
++
i
)
Map1
::
cutEdge
(
d
)
;
// Subdivide nbEdges-1 times this edge
return
d
;
}
//
Dart Map1::newBoundaryCycle(unsigned int nbEdges)
//
{
//
assert(nbEdges > 0 || !"Cannot create a face with no edge") ;
//
Dart d = newDart() ; // Create the first edge
//
boundaryMark2(d);
//
for (unsigned int i = 1 ; i < nbEdges ; ++i)
//
Map1::cutEdge(d) ; // Subdivide nbEdges-1 times this edge
//
return d ;
//
}
void
Map1
::
deleteCycle
(
Dart
d
)
{
...
...
src/Topology/map/map2.cpp
View file @
03e6495a
...
...
@@ -112,7 +112,7 @@ Dart Map2::newFace(unsigned int nbEdges, bool withBoundary)
Dart
d
=
Map1
::
newCycle
(
nbEdges
);
if
(
withBoundary
)
{
Dart
e
=
Map1
::
newBoundaryCycle
(
nbEdges
);
Dart
e
=
newBoundaryCycle
(
nbEdges
);
Dart
it
=
d
;
do
...
...
@@ -839,6 +839,13 @@ bool Map2::foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread)
* These functions must be used with care, generally only by import/creation algorithms
*************************************************************************/
Dart
Map2
::
newBoundaryCycle
(
unsigned
int
nbE
)
{
Dart
d
=
Map1
::
newCycle
(
nbE
);
boundaryMarkOrbit
<
FACE
,
2
>
(
d
);
return
d
;
}
unsigned
int
Map2
::
closeHole
(
Dart
d
,
bool
forboundary
)
{
assert
(
phi2
(
d
)
==
d
);
// Nothing to close
...
...
@@ -867,7 +874,7 @@ unsigned int Map2::closeHole(Dart d, bool forboundary)
}
}
while
(
dPhi1
!=
d
);
if
(
forboundary
)
if
(
forboundary
)
boundaryMarkOrbit
<
FACE
,
2
>
(
phi2
(
d
));
return
countEdges
;
...
...
src/Topology/map/map3.cpp
View file @
03e6495a
...
...
@@ -1074,6 +1074,13 @@ bool Map3::foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread)
* These functions must be used with care, generally only by import/creation algorithms
*************************************************************************/
Dart
Map3
::
newBoundaryCycle
(
unsigned
int
nbE
)
{
Dart
d
=
Map1
::
newCycle
(
nbE
);
boundaryMarkOrbit
<
FACE
,
3
>
(
d
);
return
d
;
}
unsigned
int
Map3
::
closeHole
(
Dart
d
,
bool
forboundary
)
{
assert
(
phi3
(
d
)
==
d
);
// Nothing to close
...
...
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