From: eap Date: Wed, 5 Mar 2008 10:28:46 +0000 (+0000) Subject: + // find out side orientation, which is important if there are several wires... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7938a9e589a441324b40af3b39bd1a5b8eb7f92a;p=modules%2Fsmesh.git + // find out side orientation, which is important if there are several wires (PAL19080) + bool isForward = true; + if ( nbWires > 1 ) { ... + } + StdMeshers_FaceSide* wire = new StdMeshers_FaceSide( theFace, wireEdges, &theMesh, - true, theIgnoreMediumNodes); + isForward, theIgnoreMediumNodes); --- diff --git a/src/StdMeshers/StdMeshers_FaceSide.cxx b/src/StdMeshers/StdMeshers_FaceSide.cxx index 5850cb74e..eccc3f5af 100644 --- a/src/StdMeshers/StdMeshers_FaceSide.cxx +++ b/src/StdMeshers/StdMeshers_FaceSide.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -505,12 +506,20 @@ TSideVector StdMeshers_FaceSide::GetFaceWires(const TopoDS_Face& theFace, return TSideVector(0); } } + // find out side orientation, which is important if there are several wires (PAL19080) + bool isForward = true; + if ( nbWires > 1 ) { + TopExp_Explorer e( theFace, TopAbs_EDGE ); + while ( ! e.Current().IsSame( wireEdges.back() )) + e.Next(); + isForward = ( e.Current().Orientation() == wireEdges.back().Orientation() ); + } + StdMeshers_FaceSide* wire = new StdMeshers_FaceSide( theFace, wireEdges, &theMesh, - true, theIgnoreMediumNodes); + isForward, theIgnoreMediumNodes); wires[ iW ] = StdMeshers_FaceSidePtr( wire ); from = to; } return wires; } -