Commit a99355d0 authored by Pierre Kraemer's avatar Pierre Kraemer

correction mergeFaceWithBoundary

parent f74cc581
...@@ -404,7 +404,6 @@ public: ...@@ -404,7 +404,6 @@ public:
*/ */
void viewAttributesTables(); void viewAttributesTables();
protected: protected:
/// boundary marker /// boundary marker
Mark m_boundaryMarker; Mark m_boundaryMarker;
...@@ -438,7 +437,6 @@ protected: ...@@ -438,7 +437,6 @@ protected:
* clear all boundary markers * clear all boundary markers
*/ */
void boundaryUnmarkAll(); void boundaryUnmarkAll();
} ; } ;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#define __TRAVERSOR_CELL_H__ #define __TRAVERSOR_CELL_H__
#include "Topology/generic/dart.h" #include "Topology/generic/dart.h"
#include "Topology/generic/dartmarker.h"
namespace CGoGN namespace CGoGN
{ {
......
...@@ -39,7 +39,6 @@ namespace CGoGN ...@@ -39,7 +39,6 @@ namespace CGoGN
* - Faces may have arbitrary size. * - Faces may have arbitrary size.
* - Faces with only one edge (sometime called loops) are accepted. * - Faces with only one edge (sometime called loops) are accepted.
* - Degenerated faces with only two edges are accepted. * - Degenerated faces with only two edges are accepted.
* @param DART the type of dart used in the class
*/ */
class Map1 : public AttribMap class Map1 : public AttribMap
{ {
......
...@@ -98,7 +98,7 @@ protected: ...@@ -98,7 +98,7 @@ protected:
//! merge a face that has been tag as boundary with existing boundary if needed //! merge a face that has been tag as boundary with existing boundary if needed
/* @param d a dart of the face /* @param d a dart of the face
*/ */
void mergeFacewithBoundary(Dart d); void mergeFaceWithBoundary(Dart d);
/** /**
* merge two faces of boundary * merge two faces of boundary
...@@ -114,7 +114,7 @@ protected: ...@@ -114,7 +114,7 @@ protected:
/*! The phi2-links around the face are removed /*! The phi2-links around the face are removed
* @param d a dart of the face * @param d a dart of the face
*/ */
void deleteOrientedFace(Dart d) ; // OK boundary void deleteOrientedFace(Dart d) ;
public: public:
......
...@@ -143,7 +143,6 @@ inline Dart Map2::alpha_1(Dart d) ...@@ -143,7 +143,6 @@ inline Dart Map2::alpha_1(Dart d)
// return e; // return e;
//} //}
inline void Map2::phi2sew(Dart d, Dart e) inline void Map2::phi2sew(Dart d, Dart e)
{ {
assert((*m_phi2)[d.index] == d) ; assert((*m_phi2)[d.index] == d) ;
......
...@@ -646,8 +646,6 @@ void GenericMap::viewAttributesTables() ...@@ -646,8 +646,6 @@ void GenericMap::viewAttributesTables()
} }
void GenericMap::boundaryMark(Dart d) void GenericMap::boundaryMark(Dart d)
{ {
m_markTables[DART][0]->operator[](d.index).setMark(m_boundaryMarker); m_markTables[DART][0]->operator[](d.index).setMark(m_boundaryMarker);
......
...@@ -50,7 +50,6 @@ Dart Map1::newBoundaryFace(unsigned nbEdges) ...@@ -50,7 +50,6 @@ Dart Map1::newBoundaryFace(unsigned nbEdges)
return d ; return d ;
} }
void Map1::deleteOrientedFace(Dart d) void Map1::deleteOrientedFace(Dart d)
{ {
Dart e = phi1(d) ; Dart e = phi1(d) ;
......
...@@ -61,29 +61,31 @@ void Map2::mergeBoundaryFaces(Dart dd, Dart ee) ...@@ -61,29 +61,31 @@ void Map2::mergeBoundaryFaces(Dart dd, Dart ee)
// } while (e != d) ; // } while (e != d) ;
//} //}
void Map2::mergeFacewithBoundary(Dart d) void Map2::mergeFaceWithBoundary(Dart d)
{ {
std::vector<Dart> storeForLinkVertex; std::vector<Dart> storeForLinkVertex;
std::vector<Dart> storeForLinkFace; std::vector<Dart> storeForLinkFace;
Dart e = d ; Dart it = d ;
do // foreach vertex/edge of face do // foreach vertex/edge of face
{ {
Dart f = findBoundaryVertex(alpha1(e)); // check if connexion by vertex Dart e = phi2(it) ;
if (f != e) if(isBoundaryMarked(e)) // check if connection by edge
{ {
storeForLinkVertex.push_back(phi_1(e)); storeForLinkFace.push_back(it);
storeForLinkVertex.push_back(phi_1(f)); storeForLinkFace.push_back(e);
} }
else
Dart g = phi2(f); {
if (isBoundaryMarked(g)) // check if connexion by a face Dart f = findBoundaryVertex(alpha1(it)); // check if connection by vertex
if (f != it)
{ {
storeForLinkFace.push_back(f); storeForLinkVertex.push_back(phi_1(it));
storeForLinkFace.push_back(g); storeForLinkVertex.push_back(phi_1(f));
}
} }
e = phi1(e) ; it = phi1(it) ;
} while (e != d) ; } while (it != d) ;
// merge by vertices // merge by vertices
while (!storeForLinkVertex.empty()) while (!storeForLinkVertex.empty())
...@@ -108,9 +110,8 @@ void Map2::mergeFacewithBoundary(Dart d) ...@@ -108,9 +110,8 @@ void Map2::mergeFacewithBoundary(Dart d)
void Map2::deleteOrientedFace(Dart d) void Map2::deleteOrientedFace(Dart d)
{ {
// tag face in boundary // tag face in boundary
boundaryMarkOrbit(FACE,d); boundaryMarkOrbit(FACE, d);
mergeFacewithBoundary(d); mergeFaceWithBoundary(d);
} }
void Map2::sewOrientedFaces(Dart d, Dart e) void Map2::sewOrientedFaces(Dart d, Dart e)
......
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