The object of the CENPyOlpWM_GeometryOperator class may be obtained with the CENPyOlpWM_POAttribOperator.
[Example]
def PostProcessOperationAttributes(poa):
# parser
geometryOperator = poa.GetGeometryOperator()
vector0 = geometryOperator.CreateVector(0, 1, 1)
vector1 = geometryOperator.CreateVector(0, 0, 1)
vectorN = geometryOperator.CreateVector(0, 0, 1)
angle = GetIncludedAngle = geometryOperator.GetIncludedAngle(vector0, vector1, vectorN, 0)
rad = geometryOperator.ToRadian(180)
deg180 = geometryOperator.ToDegrees(rad)
pass
[Example]
vector0 = geometryOperator.CreateVector(0, 1, 1)
|
|
The first vector to calculate angle.
|
|
|
The second vector to calculate angle.
|
|
|
The normal to the rotational plane.
|
|
|
The direction for angle measurement (dir=1:anticlockwise dir=-1:clockwise).
|
|
|
Angle between the two vectors @v0 and @v1 in radians.
|
This method returns the absolute included angle between the two input vectors in the specified direction about the given normal. Returns radian values from 0 to 2*Pi.
[Example]
angle = GetIncludedAngle = geometryOperator.GetIncludedAngle(vector0, vector1, vectorN, 0)
•
|
ToRadian(degrees : float): float
|
|
|
given degree value
|
|
|
returns the value in radians
|
Converts the given value from degrees to radians.
[Example]
rad = geometryOperator.ToRadian(180)
•
|
ToDegrees(radians : float): float
|
|
|
given radian value
|
|
|
returns the value in degrees
|
Converts the given value from radians to degrees.
[Example]
deg180 = geometryOperator.ToDegrees(rad)
|