Salome HOME
Mantis issue 0021453: EDF GEOM: (regression). A fix by PKV.
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IMeasureOperations.cxx
index 5007e4835c47a0388685d2f6fb4f7e84bb773b58..1559dd62b90aa19e65bbd9790fcbaa7f5800e92d 100644 (file)
@@ -2017,6 +2017,10 @@ void GEOMImpl_IMeasureOperations::PointCoordinates (Handle(GEOM_Object) theShape
 Standard_Real GEOMImpl_IMeasureOperations::GetAngle (Handle(GEOM_Object) theLine1,
                                                      Handle(GEOM_Object) theLine2)
 {
+  if (theLine1->GetType() == GEOM_VECTOR &&
+      theLine2->GetType() == GEOM_VECTOR)
+    return GetAngleBtwVectors(theLine1, theLine2);
+
   SetErrorCode(KO);
 
   Standard_Real anAngle = -1.0;
@@ -2065,7 +2069,7 @@ Standard_Real GEOMImpl_IMeasureOperations::GetAngle (Handle(GEOM_Object) theLine
     gp_Lin aLin2 = L2->Lin();
 
     anAngle = aLin1.Angle(aLin2);
-    anAngle /= PI180; // convert radians into degrees
+    anAngle *= 180. / M_PI; // convert radians into degrees
 
     if (anAngle > 90.0) {
       anAngle = 180.0 - anAngle;
@@ -2131,7 +2135,7 @@ Standard_Real GEOMImpl_IMeasureOperations::GetAngleBtwVectors (Handle(GEOM_Objec
     gp_Vec aV2 (BRep_Tool::Pnt(aP21), BRep_Tool::Pnt(aP22)) ;
 
     anAngle = aV1.Angle(aV2);
-    anAngle /= PI180; // convert radians into degrees
+    anAngle *= 180. / M_PI; // convert radians into degrees
 
     SetErrorCode(OK);
   }
@@ -2625,7 +2629,7 @@ void GEOMImpl_IMeasureOperations::StructuralDump (const BRepCheck_Analyzer& theA
   }
   count = NbProblems->Value((Standard_Integer)BRepCheck_SubshapeNotInShape);
   if (count > 0) {
-    theDump += "  Subshape not in Shape .................... ";
+    theDump += "  Sub-shape not in Shape .................... ";
     theDump += TCollection_AsciiString(count) + "\n";
   }
   count = NbProblems->Value((Standard_Integer)BRepCheck_BadOrientation);
@@ -2635,7 +2639,7 @@ void GEOMImpl_IMeasureOperations::StructuralDump (const BRepCheck_Analyzer& theA
   }
   count = NbProblems->Value((Standard_Integer)BRepCheck_BadOrientationOfSubshape);
   if (count > 0) {
-    theDump += "  Bad Orientation of Subshape .............. ";
+    theDump += "  Bad Orientation of Sub-shape .............. ";
     theDump += TCollection_AsciiString(count) + "\n";
   }
   count = NbProblems->Value((Standard_Integer)BRepCheck_CheckFail);