From: skl Date: Mon, 23 Jun 2008 05:07:35 +0000 (+0000) Subject: Update for bug 0019891 from Mantis. X-Git-Tag: V4_1_4a1~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=54dcca730ecd667c6265c0494de6517c128ba3a4;p=modules%2Fgeom.git Update for bug 0019891 from Mantis. --- diff --git a/src/GEOM_SWIG/GEOM_TestMeasures.py b/src/GEOM_SWIG/GEOM_TestMeasures.py index d552abf06..3cb4e9c3c 100644 --- a/src/GEOM_SWIG/GEOM_TestMeasures.py +++ b/src/GEOM_SWIG/GEOM_TestMeasures.py @@ -152,6 +152,13 @@ def TestMeasureOperations (geompy, math): if math.fabs(Angle - 45.0) > 1e-05: print " Error: returned angle is", Angle, "while must be 45.0" + Angle = geompy.GetAngleRadians(OX, OXY) + + print "\nAngle between OX and OXY in radians = ", Angle + if math.fabs(Angle - math.pi/4) > 1e-05: + print " Error: returned angle is", Angle, "while must be pi/4" + pass + # not in one plane OXY_shift = geompy.MakeTranslation(OXY,10,-10,20) Angle = geompy.GetAngle(OX, OXY_shift) diff --git a/src/GEOM_SWIG/geompyDC.py b/src/GEOM_SWIG/geompyDC.py index 29d14debf..b91591f97 100644 --- a/src/GEOM_SWIG/geompyDC.py +++ b/src/GEOM_SWIG/geompyDC.py @@ -2432,7 +2432,7 @@ class geompyDC(GEOM._objref_GEOM_Gen): def GetAngleRadians(self, theShape1, theShape2): # Example: see GEOM_TestMeasures.py anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180. - RaiseIfFailed("GetAngleRadians", self.MeasuOp) + RaiseIfFailed("GetAngle", self.MeasuOp) return anAngle ## @name Curve Curvature Measurement