Commit b0022134 authored by Sylvain Thery's avatar Sylvain Thery Committed by Pierre Kraemer

map2 ... OK ?

parent 41a22040
......@@ -114,6 +114,12 @@ public:
*/
Dart newFace(unsigned int nbEdges) ;
//! Create an new face for boundary (marked)
/*! @param nbEdges the number of edges
* @return return a dart of the face
*/
Dart newBoundaryFace(unsigned nbEdges);
//! Delete an oriented face erasing all its darts
/*! @param d a dart of the face
*/
......
......@@ -95,13 +95,15 @@ 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);
/**
* merge two faces of boundary
*/
void mergeBoundaryFaces(Dart dd, Dart ee);
/*! @name Generator and Deletor
* To generate or delete faces in a 2-map
......@@ -256,7 +258,7 @@ public:
* create a symetric to construct a polyedron
* @param d a dart from the vertex
*/
void explodPolyhedron(Dart d);
// void explodPolyhedron(Dart d); //TODO modification for new boundary managing method ???
//! Merge two volumes along two faces.
/*! Works only if the two faces have the same number of edges.
......@@ -328,6 +330,17 @@ public:
*/
bool isBoundaryVertex(Dart d) ;
/**
* find the dart of vertex that belong to the boundary
*/
Dart findBoundaryVertex(Dart d);
/**
* tell if the vertex of d is on the boundary of the map
*/
bool isBoundaryEdge(Dart d) ; // OK boundary
//! Follow the boundary of a surface as if it was a oriented face.
/*! This operation alternate phi1 and phi2 operator until another
* boudary dart is reached.
......@@ -396,6 +409,31 @@ public:
bool foreach_dart_of_link(Dart d, unsigned int orbit, FunctorType& f, unsigned int thread=0);
//@}
//@{
//! Close a topological hole (a sequence of connected fixed point of phi2). DO NO USE, only for import algorithm
/*! \pre dart d MUST be fixed point of phi2 relation
* Add a face to the map that closes the hole.
* The darts of this face are marked with holeMarker.
* @param d a dart of the hole (with phi2(d)==d)
* @return the degree of the created face
*/
virtual unsigned int closeHole(Dart d);
//! Close the map removing topological holes: DO NO USE, only for import algorithm
/*! Add faces to the map that close every existing hole.
* These faces are marked.
* \warning The embeddings of vertices are not updated
*/
void closeMap();
// void closeMap(DartMarker& marker);
/**
* sew oriented face, DO NO USE, only for import algorithm
*/
void sewOrientedFaces(Dart d, Dart e);
//@}
};
} // namespace CGoGN
......
......@@ -40,6 +40,17 @@ Dart Map1::newOrientedFace(unsigned nbEdges)
return d ;
}
Dart Map1::newBoundaryFace(unsigned nbEdges)
{
assert(nbEdges > 0 || !"Cannot create a face with no edge") ;
Dart d = newDart() ; // Create the first edge
boundaryMark(d);
for (unsigned int i = 1 ; i < nbEdges ; ++i)
Map1::cutEdge(d) ; // Subdivide nbEdges-1 times this edge
return d ;
}
void Map1::deleteOrientedFace(Dart d)
{
Dart e = phi1(d) ;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment