Commit a99355d0 authored by Pierre Kraemer's avatar Pierre Kraemer

correction mergeFaceWithBoundary

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