From: eap Date: Wed, 5 Mar 2008 10:23:39 +0000 (+0000) Subject: + // find out side orientation, which is important if there are several wires... X-Git-Tag: V3_2_10~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e0479b4ff8ccbd33312f748a1c1fc23244f37676;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 3063577c0..d49ee92d9 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,8 +506,17 @@ 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; }