Commit 73b5f3f3 authored by Thomas's avatar Thomas

embeddedGMap3 mise à jour

parent 9416a673
......@@ -26,39 +26,55 @@
#include "Utils/GLSLShader.h"
#include "Algo/Geometry/boundingbox.h"
#include "Algo/Modelisation/primitives3d.h"
#include "Algo/Modelisation/subdivision3map.h"
SimpleGMap3::SimpleGMap3()
{
position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position");
Algo::Modelisation::Primitive3D<PFP> prim(myMap,position);
Dart d = prim.hexaGrid_topo(2,2,1);
prim.embedHexaGrid(1,1,1);
Algo::Modelisation::Primitive3D<PFP> primCat(myMap,position);
Dart d = primCat.hexaGrid_topo(2,2,2);
primCat.embedHexaGrid(1,1,1);
Dart d1 = myMap.phi1(myMap.phi1(myMap.phi2(myMap.phi1(myMap.phi1(d)))));
VEC3 mid0 = (position[d1]+position[myMap.phi1(d1)])/2.0f;
myMap.cutEdge(d1);
position[myMap.phi1(d1)] = mid0;
myMap.check();
VEC3 mid1 = (position[d]+position[myMap.phi1(d)])/2.0f;
myMap.cutEdge(d);
position[myMap.phi1(d)] = mid1;
d = myMap.phi1(myMap.phi1(myMap.phi2(myMap.phi1(myMap.phi1(d)))));
VEC3 mid = (position[d]+position[myMap.phi1(d)])/2.0f;
myMap.cutEdge(d);
position[myMap.phi1(d)] = mid;
Algo::Modelisation::catmullClarkVol<PFP,PFP::TVEC3,PFP::VEC3>(myMap,position);
for(unsigned int i = position.begin() ; i != position.end() ; position.next(i))
position[i] += VEC3(2,0,0);
Algo::Modelisation::Primitive3D<PFP> prim2(myMap,position);
d = prim2.hexaGrid_topo(2,1,1);
prim2.embedHexaGrid(1,1,1);
d = myMap.phi2(myMap.phi1(myMap.phi1(myMap.phi2(d))));
myMap.unsewVolumes(d);
// Algo::Modelisation::Primitive3D<PFP> prim(myMap,position);
// d = prim.hexaGrid_topo(2,2,1);
// prim.embedHexaGrid(1,1,1);
//
// Dart d1 = myMap.phi1(myMap.phi1(myMap.phi2(myMap.phi1(myMap.phi1(d)))));
// VEC3 mid0 = (position[d1]+position[myMap.phi1(d1)])/2.0f;
// myMap.cutEdge(d1);
// position[myMap.phi1(d1)] = mid0;
//
// VEC3 mid1 = (position[d]+position[myMap.phi1(d)])/2.0f;
// myMap.cutEdge(d);
// position[myMap.phi1(d)] = mid1;
//
// d = myMap.phi1(myMap.phi1(myMap.phi2(myMap.phi1(myMap.phi1(d)))));
// VEC3 mid = (position[d]+position[myMap.phi1(d)])/2.0f;
// myMap.cutEdge(d);
// position[myMap.phi1(d)] = mid;
//
// for(unsigned int i = position.begin() ; i != position.end() ; position.next(i))
// position[i] += VEC3(0,2,0);
myMap.check();
// Algo::Modelisation::Primitive3D<PFP> prim2(myMap,position);
// d = prim2.hexaGrid_topo(2,1,1);
// prim2.embedHexaGrid(1,1,1);
//
// d = myMap.phi2(myMap.phi1(myMap.phi1(myMap.phi2(d))));
// myMap.unsewVolumes(d);
//
// myMap.check();
}
void SimpleGMap3::initGUI()
......
......@@ -119,8 +119,6 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec
}
}
// mv.unmarkAll();
// first pass: cut edges
for (Dart d = map.begin(); d != map.end(); map.next(d))
{
......@@ -128,23 +126,15 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec
if(selected(d) && !mv.isMarked(d))
{
l_vertices.push_back(d);
Dart dd = d;
do {
mv.mark(dd);
dd = map.phi1(map.phi2(dd));
} while(dd!=d);
mv.markOrbitInParent<typename PFP::MAP>(VERTEX,d);
}
//cut edges
if (selected(d) && !me.isMarked(d))
{
std::cout << "edge to cut " << d << std::endl;
std::cout << "edge degree " << map.edgeDegree(d) << std::endl;
Dart f = map.phi1(d);
map.cutEdge(d);
Dart e = map.phi1(d) ;
std::cout << "cut cut cut " << std::endl;
attributs[e] = attributs[d];
attributs[e] += attributs[f];
......@@ -166,8 +156,6 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec
}
}
std::cout << "edge cut" << std::endl;
// second pass: quandrangule faces
std::map<Dart,Dart> toSew;
for (Dart d = map.begin(); d != map.end(); map.next(d))
......@@ -200,8 +188,6 @@ void catmullClarkVol(typename PFP::MAP& map, EMBV& attributs, const FunctorSelec
}
}
std::cout << "nb vertices " << l_vertices.size() << std::endl;
//third pass : create the inner faces
for (std::vector<Dart>::iterator it = l_vertices.begin(); it != l_vertices.end(); ++it)
{
......
......@@ -104,8 +104,6 @@ void EmbeddedMap3<MAP3>::unsewVolumes(Dart d)
if (MAP3::isOrbitEmbedded(FACE))
{
std::cout << "newCell f" << std::endl;
MAP3::embedNewCell(FACE, dd);
MAP3::copyCell(FACE, dd, d);
}
......
......@@ -41,6 +41,8 @@ protected:
void init() ;
public:
typedef GMap0 ParentMap;
GMap1();
virtual std::string mapTypeName();
......
......@@ -204,7 +204,7 @@ inline void GMap1::collapseEdge(Dart d)
inline void GMap1::splitFace(Dart d, Dart e)
{
assert(d != e && sameOrientedFace(d, e)) ;
assert(d != e && sameFace(d, e)) ;
Dart d1 = beta1(d) ;
Dart e1 = beta1(e) ;
Dart dd = newEdge() ;
......
......@@ -41,6 +41,8 @@ protected:
void init() ;
public:
typedef GMap1 ParentMap;
GMap2();
virtual std::string mapTypeName();
......
......@@ -41,6 +41,8 @@ protected:
void init() ;
public:
typedef GMap2 ParentMap;
GMap3();
virtual std::string mapTypeName();
......@@ -201,11 +203,18 @@ public:
*/
unsigned int vertexDegree(Dart d) ;
/**
* compute the number of volumes around the edge of d
*/
virtual unsigned int edgeDegree(Dart d);
/**
* compute the number of faces in the volume of d
*/
unsigned int volumeDegree(Dart d);
virtual bool check();
/*! @name Cell Functors
* Apply functors to all darts of a cell
*************************************************************************/
......
......@@ -40,7 +40,9 @@ void EmbeddedGMap2::splitVertex(Dart d, Dart e)
if (isOrbitEmbedded(VERTEX))
{
copyDartEmbedding(VERTEX, phi1(dd), d) ;
copyDartEmbedding(VERTEX, beta2(phi1(dd)), beta2(d)) ;
copyDartEmbedding(VERTEX, phi1(ee), e) ;
copyDartEmbedding(VERTEX, beta2(phi1(ee)), beta2(e)) ;
embedNewCell(VERTEX, e) ;
copyCell(VERTEX, e, d) ;
}
......@@ -48,7 +50,9 @@ void EmbeddedGMap2::splitVertex(Dart d, Dart e)
if(isOrbitEmbedded(FACE))
{
copyDartEmbedding(FACE, phi1(dd), dd) ;
copyDartEmbedding(FACE, beta0(phi1(dd)), beta0(dd)) ;
copyDartEmbedding(FACE, phi1(ee), ee) ;
copyDartEmbedding(FACE, beta0(phi1(ee)), beta0(ee)) ;
}
}
......@@ -93,15 +97,19 @@ void EmbeddedGMap2::cutEdge(Dart d)
if (isOrbitEmbedded(EDGE))
{
embedNewCell(EDGE, nd) ;
copyDartEmbedding(EDGE, phi2(d), d) ;
copyCell(EDGE, nd, d) ;
}
if(isOrbitEmbedded(FACE))
{
copyDartEmbedding(FACE, phi1(d), d) ;
copyDartEmbedding(FACE, beta0(phi1(d)), beta0(d)) ;
Dart e = phi2(nd) ;
if(e != nd)
{
copyDartEmbedding(FACE, phi1(e), e) ;
copyDartEmbedding(FACE, beta0(phi1(e)), beta0(e)) ;
}
}
}
......@@ -197,12 +205,16 @@ bool EmbeddedGMap2::flipEdge(Dart d)
if (isOrbitEmbedded(VERTEX))
{
copyDartEmbedding(VERTEX, d, phi1(e)) ;
copyDartEmbedding(VERTEX, beta2(d), beta2(phi1(e))) ;
copyDartEmbedding(VERTEX, e, phi1(d)) ;
copyDartEmbedding(VERTEX, beta2(e), beta2(phi1(d))) ;
}
if (isOrbitEmbedded(FACE))
{
copyDartEmbedding(FACE, phi_1(d), d) ;
copyDartEmbedding(FACE, beta0(phi_1(d)), beta0(d)) ;
copyDartEmbedding(FACE, phi_1(e), e) ;
copyDartEmbedding(FACE, beta0(phi_1(e)), beta0(e)) ;
}
return true ;
}
......@@ -218,12 +230,17 @@ bool EmbeddedGMap2::flipBackEdge(Dart d)
if (isOrbitEmbedded(VERTEX))
{
copyDartEmbedding(VERTEX, d, phi1(e)) ;
copyDartEmbedding(VERTEX, beta2(d), beta2(phi1(e))) ;
copyDartEmbedding(VERTEX, e, phi1(d)) ;
copyDartEmbedding(VERTEX, beta2(e), beta2(phi1(d))) ;
}
if (isOrbitEmbedded(FACE))
{
copyDartEmbedding(FACE, phi1(d), d) ;
copyDartEmbedding(FACE, beta0(phi1(d)), beta0(d)) ;
copyDartEmbedding(FACE, phi1(e), e) ;
copyDartEmbedding(FACE, beta0(phi1(e)), beta0(e)) ;
}
return true ;
}
......@@ -299,7 +316,8 @@ void EmbeddedGMap2::sewFaces(Dart d, Dart e)
if (isOrbitEmbedded(EDGE))
{
copyDartEmbedding(EDGE, e, d) ;
vEmb1 = getEmbedding(EDGE, d) ;
embedOrbit(EDGE, e, vEmb1) ;
}
}
......@@ -355,6 +373,7 @@ bool EmbeddedGMap2::collapseDegeneratedFace(Dart d)
if (isOrbitEmbedded(EDGE))
{
copyDartEmbedding(EDGE, phi2(e), e) ;
copyDartEmbedding(EDGE, beta0(phi2(e)), beta0(e)) ;
}
return true ;
}
......@@ -368,7 +387,9 @@ void EmbeddedGMap2::splitFace(Dart d, Dart e)
if (isOrbitEmbedded(VERTEX))
{
copyDartEmbedding(VERTEX, phi_1(e), d) ;
copyDartEmbedding(VERTEX, beta2(phi_1(e)), beta2(d)) ;
copyDartEmbedding(VERTEX, phi_1(d), e) ;
copyDartEmbedding(VERTEX, beta2(phi_1(d)), beta2(e)) ;
}
if (isOrbitEmbedded(FACE))
{
......@@ -444,10 +465,12 @@ unsigned int EmbeddedGMap2::closeHole(Dart d)
if (isOrbitEmbedded(VERTEX))
{
copyDartEmbedding(VERTEX, f, alpha1(f)) ;
copyDartEmbedding(VERTEX, beta2(f), beta2(alpha1(f))) ;
}
if (isOrbitEmbedded(EDGE))
{
copyDartEmbedding(EDGE, f, phi2(f)) ;
copyDartEmbedding(EDGE, beta0(f), beta0(phi2(f))) ;
}
f = phi1(f) ;
} while(dd != f) ;
......
......@@ -63,42 +63,53 @@ void EmbeddedGMap3::sewVolumes(Dart d, Dart e)
//embed the face orbit from the volume sewn
if (isOrbitEmbedded(FACE))
copyDartEmbedding(FACE, e, d) ;
{
unsigned int vEmb = getEmbedding(FACE, d);
embedOrbit(FACE, e, vEmb) ;
}
}
void EmbeddedGMap3::unsewVolumes(Dart d)
{
// Dart d3 = phi3(d);
//
// bool boundaryD = false;
// bool boundaryE = false;
//
// if(isOrbitEmbedded(VERTEX))
// {
// if(isBoundaryVertex(d))
// boundaryD = true;
// if(isBoundaryVertex(phi1(d)))
// boundaryE = true;
// }
//
GMap3::unsewVolumes(d);
//
// Dart dd = d;
// Dart dd3 = d3;
//
// do
// {
// if(isOrbitEmbedded(VERTEX))
// copyCell(VERTEX, dd3, phi1(dd));
//
// if(isOrbitEmbedded(EDGE))
//
//
// if(isOrbitEmbedded(FACE))
//
//
// dd = phi1(dd) ;
// }while( dd != d );
Dart dd = phi1(phi3(d));
if(phi3(d)!=d)
{
GMap3::unsewVolumes(d);
Dart ddd = d;
do
{
if(isOrbitEmbedded(VERTEX))
{
if(!sameVertex(ddd,dd))
{
embedNewCell(VERTEX, ddd);
copyCell(VERTEX, ddd, dd);
}
}
dd = phi_1(dd);
if(isOrbitEmbedded(EDGE))
{
if(!sameEdge(ddd,dd))
{
embedNewCell(EDGE, dd);
copyCell(VERTEX, dd, ddd);
}
}
ddd = phi1(ddd);
} while(ddd!=d);
if (isOrbitEmbedded(FACE))
{
embedNewCell(FACE, dd);
copyCell(FACE, dd, d);
}
}
}
bool EmbeddedGMap3::mergeVolumes(Dart d)
......@@ -124,36 +135,40 @@ void EmbeddedGMap3::splitFace(Dart d, Dart e)
if(isOrbitEmbedded(VERTEX))
{
copyDartEmbedding(VERTEX, phi2(phi_1(d)), d);
copyDartEmbedding(VERTEX, phi2(phi_1(e)), e);
if(phi3(d) != d)
{
Dart d3 = phi3(d);
Dart e3 = phi3(e);
unsigned int vEmb = getEmbedding(VERTEX, d);
embedOrbit(VERTEX,phi2(phi_1(d)),vEmb);
copyDartEmbedding(VERTEX, phi1(d3), phi1(phi2(phi1(d3))));
copyDartEmbedding(VERTEX, phi1(e3), phi1(phi2(phi1(e3))));
}
vEmb = getEmbedding(VERTEX, e);
embedOrbit(VERTEX,phi2(phi_1(e)),vEmb);
}
if(isOrbitEmbedded(FACE))
{
embedNewCell(FACE, phi2(phi_1(d)));
copyCell(FACE, phi2(phi_1(d)), d);
copyDartEmbedding(FACE, phi_1(d), d);
copyDartEmbedding(FACE, beta0(phi_1(d)), beta0(d));
copyDartEmbedding(FACE, beta3(phi_1(d)), beta3(d));
copyDartEmbedding(FACE, beta3(beta0(phi_1(d))), beta3(beta0(d)));
}
if(isOrbitEmbedded(VOLUME))
{
copyDartEmbedding(VOLUME, phi_1(d), d);
copyDartEmbedding(VOLUME, beta0(phi_1(d)), beta0(d));
copyDartEmbedding(VOLUME, phi2(phi_1(d)), d);
copyDartEmbedding(VOLUME, beta0(phi2(phi_1(d))), beta0(d));
if(phi3(d) != d)
{
Dart d3 = phi3(d);
copyDartEmbedding(VOLUME, phi1(d3), d3);
copyDartEmbedding(VOLUME, beta0(phi1(d3)), beta0(d3));
copyDartEmbedding(VOLUME, phi2(phi1(d3)), d3);
copyDartEmbedding(VOLUME, beta0(phi2(phi1(d3))), beta0(d3));
}
}
}
......@@ -164,13 +179,13 @@ void EmbeddedGMap3::cutEdge(Dart d)
if(isOrbitEmbedded(EDGE))
{
Dart nd = phi1(d) ;
Dart nd = phi1(d);
embedNewCell(EDGE, nd) ;
copyCell(EDGE, nd, d) ;
embedNewCell(EDGE, nd);
copyCell(EDGE, nd, d);
unsigned int vEmb = getEmbedding(EDGE, d);
embedOrbit(EDGE, d, vEmb) ;
embedOrbit(EDGE, d, vEmb);
}
if(isOrbitEmbedded(FACE))
......@@ -178,14 +193,16 @@ void EmbeddedGMap3::cutEdge(Dart d)
Dart f = d;
do
{
Dart nd = phi1(f) ;
copyDartEmbedding(FACE, nd, f);
Dart nd = phi1(f);
unsigned int fEmb = getEmbedding(FACE, f);
embedOrbit(FACE, nd, fEmb);
Dart f2 = phi2(nd);
if(f2!=nd)
{
Dart nd2 = phi2(f);
copyDartEmbedding(FACE, nd2, f2);
unsigned int fEmb2 = getEmbedding(FACE, f2);
embedOrbit(FACE, nd2, fEmb2);
}
f = alpha2(f);
......@@ -194,15 +211,29 @@ void EmbeddedGMap3::cutEdge(Dart d)
if(isOrbitEmbedded(VOLUME))
{
// Dart f = d;
// do
// {
// unsigned int fEmb2 = getEmbedding(VOLUME, d);
// embedOrbit(VOLUME, d, fEmb2);
// f = alpha2(f);
// } while(f != d);
Dart f = d;
do
{
Dart nd = phi1(f) ;
Dart nd = phi1(f);
copyDartEmbedding(VOLUME, nd, f);
copyDartEmbedding(VOLUME, beta0(nd), f);
copyDartEmbedding(VOLUME, beta2(nd), f);
copyDartEmbedding(VOLUME, beta3(nd), f);
Dart nd2 = phi2(f);
if(f!=nd2)
copyDartEmbedding(VOLUME, nd2, f);
// Dart nd2 = beta2(nd);
// if(f!=nd2)
// {
// copyDartEmbedding(VOLUME, nd2, f);
// copyDartEmbedding(VOLUME, beta0(nd2), f);
// }
f = alpha2(f);
} while(f != d);
......@@ -212,14 +243,6 @@ void EmbeddedGMap3::cutEdge(Dart d)
//int EmbeddedGMap3::collapseEdge(Dart d, bool delDegenerateFaces,
// bool delDegenerateVolumes)
//{
// unsigned int vEmb = EMBNULL ;
// if(isOrbitEmbedded(VERTEX))
// {
// vEmb = getEmbedding(VERTEX, d) ;
// embedOrbit(VERTEX,d,vEmb);
// embedOrbit(VERTEX,phi2(d),vEmb);
// }
//
// int nbCol = GMap3::collapseEdge(d,delDegenerateFaces,delDegenerateVolumes);
//
// return nbCol;
......@@ -228,31 +251,6 @@ void EmbeddedGMap3::cutEdge(Dart d)
//void EmbeddedGMap3::collapseFace(Dart d, bool delDegenerateFaces,
// bool delDegenerateVolumes)
//{
// //unsigned int degree = faceDegree(d);
// //Dart dsave;
//
//// //si degree face = 3
//// if(degree == 3)
//// {
//// dsave = phi3(phi2(phi1(d)));
//// dsave = phi3(phi2(phi1(dsave)));
//// //ATTENTION : il faut trouver un brin de l'orbite sommet de d non modifie par l'operation !!
//// }
//// else if(degree > 3)
//// {
//// dsave = phi1(phi2(phi1(d)));
//// dsave = phi1(phi2(phi1(dsave)));
//// }
//// else
//// return;
//
//
//// unsigned int vEmb = EMBNULL ;
//// if(isOrbitEmbedded(VERTEX))
//// {
//// vEmb = getEmbedding(d, VERTEX) ;
//// }
//
// GMap3::collapseFace(d,delDegenerateFaces,delDegenerateVolumes);
//
//// if(isOrbitEmbedded(VERTEX))
......@@ -263,12 +261,6 @@ void EmbeddedGMap3::cutEdge(Dart d)
//TODO collapseVolume
//Dart EmbeddedGMap3::cutSpike(Dart d)
//{
// Dart e = GMap3::cutSpike(d);
// return e;
//}
unsigned int EmbeddedGMap3::closeHole(Dart d)
{
unsigned int nbE = GMap3::closeHole(d);
......@@ -278,11 +270,20 @@ unsigned int EmbeddedGMap3::closeHole(Dart d)
do
{
if(isOrbitEmbedded(VERTEX))
{
copyDartEmbedding(VERTEX,f, phi1(phi2(f)));
copyDartEmbedding(VERTEX,beta1(f), beta1(phi1(phi2(f))));
}
if(isOrbitEmbedded(EDGE))
{
copyDartEmbedding(EDGE, f, phi2(f));
copyDartEmbedding(EDGE, beta0(f), beta0(phi2(f)));
}
if(isOrbitEmbedded(VOLUME))
{
copyDartEmbedding(VOLUME, f, phi2(f));
copyDartEmbedding(VOLUME, beta0(f), beta0(phi2(f)));
}
f = phi1(f);
}
......@@ -302,6 +303,7 @@ void EmbeddedGMap3::closeMap(DartMarker &marker)
if(isOrbitEmbedded(VERTEX))
{
copyDartEmbedding(VERTEX, d, phi1(phi3(d)));
copyDartEmbedding(VERTEX, beta0(d), beta0(phi1(phi3(d))));
}
}
}
......@@ -318,40 +320,81 @@ bool EmbeddedGMap3::check()
{
if (isOrbitEmbedded(VERTEX))
{
if (phi2(phi_1(d)) != phi_1(d) && getEmbedding(VERTEX, d) != getEmbedding(VERTEX, phi2(phi_1(d))))
if (getEmbedding(VERTEX, d) != getEmbedding(VERTEX, beta1(d)))
{
CGoGNout << "Check: different embeddings on vertex" << CGoGNendl ;
return false ;
}
if(phi3(d) != d && getEmbedding(VERTEX, d) != getEmbedding(VERTEX, phi1(phi3(d))))
{
CGoGNout << "Check: different embeddings on vertex in the 2 oriented faces" << CGoGNendl ;
std::cout << "Dart #" << d << std::endl;
std::cout << "Emb(d) = " << getEmbedding(VERTEX, d) << std::endl;
std::cout << "Emb(phi32(d)) = " << getEmbedding(VERTEX, phi3(phi2(d))) << std::endl;
return false ;
}
if (getEmbedding(VERTEX, d) != getEmbedding(VERTEX, beta2(d)))
{
CGoGNout << "Check: different embeddings on vertex" << CGoGNendl ;
return false ;
}
if (getEmbedding(VERTEX, d) != getEmbedding(VERTEX, beta3(d)))
{
CGoGNout << "Check: different embeddings on vertex" << CGoGNendl ;
return false ;
}
}
// if (isOrbitEmbedded(EDGE))
// {
// if (getEmbedding(EDGE, d) != getEmbedding(EDGE, phi2(d)))
// {
// CGoGNout << "Check: different embeddings on edge" << CGoGNendl ;
// return false ;
// }
// }
//
// if (isOrbitEmbedded(FACE))
// {
// if (getEmbedding(FACE, d) != getEmbedding(FACE, phi1(d)))
// {
// CGoGNout << "Check: different embeddings on face" << CGoGNendl ;
// return false ;
// }
// }
if (isOrbitEmbedded(EDGE))
{
if (getEmbedding(EDGE, d) != getEmbedding(EDGE, beta0(d)))
{
CGoGNout << "Check: different embeddings on edge" << CGoGNendl ;
return false ;
}
if (getEmbedding(EDGE, d) != getEmbedding(EDGE, beta2(d)))
{
CGoGNout << "Check: different embeddings on edge" << CGoGNendl ;
return false ;
}
if (getEmbedding(EDGE, d) != getEmbedding(EDGE, beta3(d)))
{
CGoGNout << "Check: different embeddings on edge" << CGoGNendl ;
return false ;
}
}
if (isOrbitEmbedded(FACE))
{
if (getEmbedding(FACE, d) != getEmbedding(FACE, beta0(d)))
{
CGoGNout << "Check: different embeddings on face" << CGoGNendl ;
return false ;
}
if (getEmbedding(FACE, d) != getEmbedding(FACE, beta1(d)))
{
CGoGNout << "Check: different embeddings on face" << CGoGNendl ;
return false ;
}
}
if (isOrbitEmbedded(VOLUME))
{
if (getEmbedding(VOLUME, d) != getEmbedding(VOLUME, beta0(d)))
{
CGoGNout << "Check: different embeddings in volume" << CGoGNendl ;
return false ;
}
if (getEmbedding(VOLUME, d) != getEmbedding(VOLUME, beta1(d)))
{
CGoGNout << "Check: different embeddings in volume" << CGoGNendl ;
return false ;
}
if (getEmbedding(VOLUME, d) != getEmbedding(VOLUME, beta2(d)))
{
CGoGNout << "Check: different embeddings in volume" << CGoGNendl ;
return false ;
}
}
}
CGoGNout << "Check: embedding ok" << CGoGNendl ;
return true ;
......
......@@ -49,16 +49,14 @@ Dart GMap1::newFace(unsigned int n)
void GMap1::deleteFace(Dart d)
{
Dart e = phi1(d) ;
Dart e = phi1(d);
while (e != d)
{
Dart f = phi1(e) ;
deleteDart(beta0(e)) ;
deleteDart(e) ;
e = f ;
Dart f = phi1(e);
deleteEdge(e);
e = f;
}