Update for bug 0019891 from Mantis.

This commit is contained in:
skl 2008-06-23 05:07:35 +00:00
parent 01421722a7
commit 54dcca730e
2 changed files with 8 additions and 1 deletions

View File

@ -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)

View File

@ -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