mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-03 21:30:35 +05:00
Update for bug 0019891 from Mantis.
This commit is contained in:
parent
01421722a7
commit
54dcca730e
@ -152,6 +152,13 @@ def TestMeasureOperations (geompy, math):
|
|||||||
if math.fabs(Angle - 45.0) > 1e-05:
|
if math.fabs(Angle - 45.0) > 1e-05:
|
||||||
print " Error: returned angle is", Angle, "while must be 45.0"
|
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
|
# not in one plane
|
||||||
OXY_shift = geompy.MakeTranslation(OXY,10,-10,20)
|
OXY_shift = geompy.MakeTranslation(OXY,10,-10,20)
|
||||||
Angle = geompy.GetAngle(OX, OXY_shift)
|
Angle = geompy.GetAngle(OX, OXY_shift)
|
||||||
|
@ -2432,7 +2432,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
def GetAngleRadians(self, theShape1, theShape2):
|
def GetAngleRadians(self, theShape1, theShape2):
|
||||||
# Example: see GEOM_TestMeasures.py
|
# Example: see GEOM_TestMeasures.py
|
||||||
anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
|
anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
|
||||||
RaiseIfFailed("GetAngleRadians", self.MeasuOp)
|
RaiseIfFailed("GetAngle", self.MeasuOp)
|
||||||
return anAngle
|
return anAngle
|
||||||
|
|
||||||
## @name Curve Curvature Measurement
|
## @name Curve Curvature Measurement
|
||||||
|
Loading…
Reference in New Issue
Block a user