Commit e7511757 authored by untereiner's avatar untereiner

mise a jour embedding importTet + tetrahedra flips

parent 4e02c829
......@@ -186,8 +186,8 @@ bool importTet(typename PFP::MAP& map, const std::string& filename, std::vector<
bool sewn = false;
for(typename std::vector<Dart>::iterator itnext = it+1; itnext != vec.end() && !sewn; ++itnext)
{
if(map.getDartEmbedding(VERTEX,map.phi1(*it))==map.getDartEmbedding(VERTEX,map.phi_1(*itnext))
&& map.getDartEmbedding(VERTEX,map.phi_1(*it))==map.getDartEmbedding(VERTEX,map.phi1(*itnext)))
if(map.getEmbedding(VERTEX,map.phi1(*it))==map.getEmbedding(VERTEX,map.phi_1(*itnext))
&& map.getEmbedding(VERTEX,map.phi_1(*it))==map.getEmbedding(VERTEX,map.phi1(*itnext)))
{
map.sewVolumes(*it, map.phi_1(*itnext));
sewn = true;
......
......@@ -116,8 +116,8 @@ Dart linkIntoEdge(typename PFP::MAP& map, Dart d, Dart e)
map.sewFaces(e2,d3);
map.sewFaces(e,d);
map.setDartEmbedding(VERTEX, d, map.getEmbedding(e2,VERTEX)) ;
map.setDartEmbedding(VERTEX, d3, map.getEmbedding(e,VERTEX)) ;
map.setDartEmbedding(VERTEX, d, map.getEmbedding(VERTEX, e2)) ;
map.setDartEmbedding(VERTEX, d3, map.getEmbedding(VERTEX, e)) ;
return e2;
}
......@@ -133,14 +133,14 @@ void unlinkFromEdge(typename PFP::MAP& map, Dart d)
// //Si la face n'est pas libre en phi2
// if(map.phi2(d) != d && map.phi2(d3) != d3)
// {
// unsigned int dVEmb = map.getDartEmbedding(VERTEX, d) ;
// unsigned int dVEmb = map.getEmbedding(VERTEX, d) ;
// if(dVEmb != EMBNULL)
// {
// map.embedOrbit(VERTEX, d, dVEmb) ;
// map.setDartEmbedding(VERTEX, d, EMBNULL) ;
// }
//
// unsigned int d3VEmb = map.getDartEmbedding(VERTEX, d3) ;
// unsigned int d3VEmb = map.getEmbedding(VERTEX, d3) ;
// if(d3VEmb != EMBNULL)
// {
// map.embedOrbit(VERTEX, d3, d3VEmb) ;
......@@ -187,8 +187,8 @@ void insertFace(typename PFP::MAP& map, Dart d, Dart nF)
map.sewFaces(dd,nFd);
map.sewFaces(d2,map.phi3(nFd));
map.setDartEmbedding(VERTEX, nFd, map.getEmbedding(d2,VERTEX)) ;
map.setDartEmbedding(VERTEX, map.phi3(nFd), map.getEmbedding(dd,VERTEX)) ;
map.setDartEmbedding(VERTEX, nFd, map.getEmbedding(VERTEX, d2)) ;
map.setDartEmbedding(VERTEX, map.phi3(nFd), map.getEmbedding(VERTEX, dd)) ;
dd = map.phi_1(map.phi2(map.phi_1(dd)));
nFd = map.phi1(nFd);
......@@ -213,14 +213,14 @@ void swap2To2(typename PFP::MAP& map, Dart d)
map.flipEdge(r);
Dart e = map.phi2(r);
unsigned int dVEmb = map.getDartEmbedding(VERTEX, r) ;
unsigned int dVEmb = map.getEmbedding(VERTEX, r) ;
if(dVEmb != EMBNULL)
{
map.setDartEmbedding(VERTEX, map.phi_1(r), dVEmb) ;
map.setDartEmbedding(VERTEX, r, EMBNULL) ;
}
unsigned int eVEmb = map.getDartEmbedding(VERTEX, e) ;
unsigned int eVEmb = map.getEmbedding(VERTEX, e) ;
if(eVEmb != EMBNULL)
{
map.setDartEmbedding(VERTEX, map.phi_1(e), eVEmb) ;
......@@ -235,8 +235,8 @@ void swap2To2(typename PFP::MAP& map, Dart d)
Dart e = map.phi2(dd);
Dart e2= map.phi2(map.phi3(dd));
map.setDartEmbedding(VERTEX, dd, map.getEmbedding(e2,VERTEX)) ;
map.setDartEmbedding(VERTEX, map.phi3(dd), map.getEmbedding(e,VERTEX)) ;
map.setDartEmbedding(VERTEX, dd, map.getEmbedding(VERTEX, e2)) ;
map.setDartEmbedding(VERTEX, map.phi3(dd), map.getEmbedding(VERTEX, e)) ;
dd = map.phi1(dd);
......@@ -322,8 +322,8 @@ void swap3To2(typename PFP::MAP& map, Dart d)
do {
Dart e = map.phi2(map.phi3(map.phi2(dd)));
unsigned int eVEmb = map.getDartEmbedding(VERTEX, e) ;
unsigned int ddVEmb = map.getDartEmbedding(VERTEX, dd) ;
unsigned int eVEmb = map.getEmbedding(VERTEX, e) ;
unsigned int ddVEmb = map.getEmbedding(VERTEX, dd) ;
map.setDartEmbedding(VERTEX, map.phi2(dd), eVEmb) ;
map.setDartEmbedding(VERTEX, map.phi2(e), ddVEmb) ;
......@@ -342,8 +342,8 @@ Dart swap2To3(typename PFP::MAP& map, Dart d)
{
Dart e = map.phi1(map.phi2(map.phi3(d)));
unsigned int p1 = map.getDartEmbedding(VERTEX, map.phi_1(map.phi2(d))) ;
unsigned int p2 = map.getDartEmbedding(VERTEX, map.phi2(map.phi1(map.phi2(map.phi3(d))))) ;
unsigned int p1 = map.getEmbedding(VERTEX, map.phi_1(map.phi2(d))) ;
unsigned int p2 = map.getEmbedding(VERTEX, map.phi2(map.phi1(map.phi2(map.phi3(d))))) ;
//détachement des demi-faces du milieu
//garde la relation volumique qui les lies
......
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