]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fixed a bug that the Local Coordiante Systems normal was wrong when they were built...
authorrnc <rnc@opencascade.com>
Tue, 21 Feb 2012 10:54:15 +0000 (10:54 +0000)
committerrnc <rnc@opencascade.com>
Tue, 21 Feb 2012 10:54:15 +0000 (10:54 +0000)
src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx

index 1559dd62b90aa19e65bbd9790fcbaa7f5800e92d..1d04c284491ae45b4be72dfa59ec4684c25a418f 100644 (file)
@@ -788,6 +788,15 @@ gp_Ax3 GEOMImpl_IMeasureOperations::GetPosition (const TopoDS_Shape& theShape)
       Handle(Geom_Plane) aGPlane = Handle(Geom_Plane)::DownCast(aGS);
       gp_Pln aPln = aGPlane->Pln();
       aResult = aPln.Position();
+      // In case of reverse orinetation of the face invert the plane normal
+      // (the face's normal does not mathc the plane's normal in this case)
+      if(theShape.Orientation() == TopAbs_REVERSED)
+      {
+        gp_Dir Vx =  aResult.XDirection();
+        gp_Dir N  =  aResult.Direction().Mirrored(Vx); 
+        gp_Pnt P  =  aResult.Location();
+        aResult = gp_Ax3(P, N, Vx);
+      }       
     }
   }