From: eap Date: Fri, 31 May 2013 11:56:32 +0000 (+0000) Subject: check orientation when re-loading points from a proxy mesh X-Git-Tag: V7_3_0a1~364 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=083e873dfe0759311086494f492597f0349b68e5;p=modules%2Fsmesh.git check orientation when re-loading points from a proxy mesh --- diff --git a/src/StdMeshers/StdMeshers_FaceSide.cxx b/src/StdMeshers/StdMeshers_FaceSide.cxx index 4d72e2f68..d83208167 100644 --- a/src/StdMeshers/StdMeshers_FaceSide.cxx +++ b/src/StdMeshers/StdMeshers_FaceSide.cxx @@ -358,13 +358,18 @@ const vector& StdMeshers_FaceSide::GetUVPtStruct(bool isXConst, { const UVPtStructVec& edgeUVPtStruct = proxySubMesh[iE]->GetUVPtStructVec(); std::copy( edgeUVPtStruct.begin(), edgeUVPtStruct.end(), & points[iPt] ); + // check orientation + double du1 = edgeUVPtStruct.back().param - edgeUVPtStruct[0].param; + double du2 = myLast[iE] - myFirst[iE]; + if ( du1 * du2 < 0 ) + std::reverse( & points[iPt], & points[iPt + edgeUVPtStruct.size()]); // update normalized params if ( myEdge.size() > 1 ) { for ( size_t i = 0; i < edgeUVPtStruct.size(); ++i, ++iPt ) { UVPtStruct & uvPt = points[iPt]; - uvPt.normParam = prevNormPar + uvPt.normParam * paramSize; - uvPt.x = uvPt.y = uvPt.normParam; + uvPt.normParam = prevNormPar + uvPt.normParam * paramSize; + uvPt.x = uvPt.y = uvPt.normParam; } --iPt; // to point to the 1st VERTEX of the next EDGE }