Commit 1db1b9af authored by Sylvain Thery's avatar Sylvain Thery

map2 ... OK ?

parent 109b3a6b
......@@ -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
*/
......
......@@ -101,6 +101,11 @@ protected:
*/
void mergeFacewithBoundary(Dart d);
/**
* merge two faces of boundary
*/
void mergeBoundaryFaces(Dart dd, Dart ee);
/*! @name Generator and Deletor
......@@ -118,6 +123,8 @@ public:
virtual void deleteFace(Dart d) ;
//@}
/*! @name Topological Operators
* Topological operations on 2-maps
*************************************************************************/
......@@ -209,13 +216,13 @@ public:
* @param d a dart of the first face
* @param e a dart of the second face
*/
virtual void sewFaces(Dart d, Dart e); //TODO modification for new boundary managing method
virtual void sewFaces(Dart d, Dart e);
//! Unsew two oriented faces along oriented edges
/*! @param d a dart of one face
*/
virtual void unsewFaces(Dart d); //TODO modification for new boundary managing method
virtual void unsewFaces(Dart d);
//! Delete an oriented face if and only if it has one or two edges
......@@ -224,7 +231,7 @@ public:
* @param d a dart of the face
* @return true if the collapse has been executed, false otherwise
*/
virtual bool collapseDegeneratedFace(Dart d); //TODO modification for new boundary managing method
virtual bool collapseDegeneratedFace(Dart d);
//! Split a face f between d and e inserting an edge between vertices d & e
......@@ -262,7 +269,7 @@ public:
* \warning Darts may have
* @param d a dart from the vertex
*/
void unsewAroundVertex(Dart d) ; //TODO modification for new boundary managing method ???
void unsewAroundVertex(Dart d) ;
/**
......@@ -270,7 +277,7 @@ public:
* create a symetric to construct a polyedron
* @param d a dart from the vertex
*/
void explodPolyhedron(Dart d); //TODO modification for new boundary managing method ???
// void explodPolyhedron(Dart d); //TODO modification for new boundary managing method ???
//! Merge two volumes along two faces.
......@@ -283,27 +290,7 @@ public:
* @param e a dart of the second face
* @return true if the merge has been executed, false otherwise
*/
virtual bool mergeVolumes(Dart d, Dart e); //TODO modification for new boundary managing method
//! Close a topological hole (a sequence of connected fixed point of phi2).
/*! \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); //TODO modification for new boundary managing method
//TODO a mettre en algo
//! Close the map removing topological holes.
/*! Add faces to the map that close every existing hole.
* These faces are marked.
* \warning The embeddings of vertices are not updated
* @param marker
*/
void closeMap(DartMarker& marker); //TODO modification for new boundary managing method
virtual bool mergeVolumes(Dart d, Dart e);
//@}
......@@ -339,6 +326,17 @@ public:
*/
bool isBoundaryVertex(Dart d) ; // OK boundary
/**
* 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.
......@@ -407,6 +405,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