Commit 7c1c5c11 authored by Sylvain Thery's avatar Sylvain Thery Committed by Pierre Kraemer
Browse files

modif import (sewOrientedFaces)

simplif collapseEdge
parent a79af175
...@@ -108,7 +108,7 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts) ...@@ -108,7 +108,7 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
{ {
if (good_dart == map.phi2(good_dart)) if (good_dart == map.phi2(good_dart))
{ {
map.sewFaces(d, good_dart); map.sewOrientedFaces(d, good_dart);
m.unmarkOrbit(EDGE, d); m.unmarkOrbit(EDGE, d);
} }
} }
......
...@@ -227,64 +227,35 @@ Dart Map2::collapseEdge(Dart d, bool delDegenerateFaces) ...@@ -227,64 +227,35 @@ Dart Map2::collapseEdge(Dart d, bool delDegenerateFaces)
Dart e = phi2(d); Dart e = phi2(d);
phi2unsew(d); // Unlink the opposite edges phi2unsew(d); // Unlink the opposite edges
if (isBoundaryMarked(e)) Dart f = phi1(e) ;
Dart h = alpha1(e);
if (h != e)
resV=h;
if (f != e && delDegenerateFaces)
{ {
Dart f = phi1(e) ;
Map1::collapseEdge(e) ; // Collapse edge e Map1::collapseEdge(e) ; // Collapse edge e
if (f != e) collapseDegeneratedFace(f) ;// and collapse its face if degenerated
collapseDegeneratedFace(f) ;// and collapse its face if degenerated
} }
else else
{ Map1::collapseEdge(e) ; // Just collapse edge e
Dart f = phi1(e) ;
Dart g = phi_1(e) ;
if(f != d && !isFaceTriangle(e)) f = phi1(d) ;
resV = f ; if(resV == NIL)
else if(phi2(g) != g) {
resV = phi2(g) ; h = alpha1(d);
else if(f != d && phi2(f) != f) if (h != d)
resV = phi1(phi2(f)) ; resV=h;
if (f != e && delDegenerateFaces)
{
Map1::collapseEdge(e) ; // Collapse edge e
collapseDegeneratedFace(f) ;// and collapse its face if degenerated
}
else
Map1::collapseEdge(e) ; // Just collapse edge e
} }
if (isBoundaryMarked(d)) if (f != d && delDegenerateFaces)
{ {
Dart f = phi1(d) ;
Map1::collapseEdge(d) ; // Collapse edge d Map1::collapseEdge(d) ; // Collapse edge d
if (f != d) collapseDegeneratedFace(f) ;// and collapse its face if degenerated
collapseDegeneratedFace(f) ;// and collapse its face if degenerated
} }
else else
{ Map1::collapseEdge(d) ; // Just collapse edge d
Dart f = phi1(d) ;
Dart g = phi_1(d) ;
if(resV == NIL)
{
if(f != e && !isFaceTriangle(d))
resV = f ;
else if(phi2(g) != g)
resV = phi2(g) ;
else if(f != e && phi2(f) != f)
resV = phi1(phi2(f)) ;
}
if (f != d && delDegenerateFaces)
{
Map1::collapseEdge(d) ; // Collapse edge d
collapseDegeneratedFace(f) ;// and collapse its face if degenerated
}
else
Map1::collapseEdge(d) ; // Just collapse edge d
}
return resV ; return resV ;
} }
......
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