WM_Geometry Operator
Quick Facts
| Property | Value |
|---|---|
| Class | CENPyOlpWM_GeometryOperator |
| Module | cenpylib.CENPyOlpWM_GeometryOperator |
| Package | cenpylib |
| Release | R2025.2.4 |
| Methods | 4 |
Quick Start
# Boilerplate Example
wM_GeometryOperator = ... # obtained from the runtime context
result = wM_GeometryOperator.GetIncludedAngle(v0, v1, normal, 0)Method Index
| Method | Returns | Summary |
|---|---|---|
CreateVector | CENPyOlpVector | Create a vector by specifying direction values. |
GetIncludedAngle | float | Get the absolute included angle between the two input vectors in the specified direction about the given normal. |
ToRadian | float | Convert the given value from degrees to radians. |
ToDegrees | float | Convert the given value from radians to degrees. |
Lifecycle
CreateVector
def CreateVector(x: float, y: float, z: float) -> CENPyOlpVectorCreate a vector by specifying direction values.
Parameters:
| Name | Type | Description |
|---|---|---|
x | float | X-direction. |
y | float | Y-direction. |
z | float | Z-direction. |
Returns: CENPyOlpVector — Newly created vector.
Query Methods
GetIncludedAngle
def GetIncludedAngle(v0: CENPyOlpVector, v1: CENPyOlpVector, normal: CENPyOlpVector, dir: int) -> floatGet the absolute included angle between the two input vectors in the specified direction about the given normal.
Parameters:
| Name | Type | Description |
|---|---|---|
v0 | CENPyOlpVector | The first vector to calculate angle. |
v1 | CENPyOlpVector | The second vector to calculate angle. |
normal | CENPyOlpVector | The normal to the rotational plane |
dir | int | The direction for angle measurement (dir=1:anticlockwise dir=-1:clockwise). |
Returns: float — Angle between the two vectors in radians from 0 to 2*Pi.
Conversion & Serialization
ToRadian
def ToRadian(degrees: float) -> floatConvert the given value from degrees to radians.
Parameters:
| Name | Type | Description |
|---|---|---|
degrees | float | Value in degrees. |
Returns: float — Value in radians.
ToDegrees
def ToDegrees(radians: float) -> floatConvert the given value from radians to degrees.
Parameters:
| Name | Type | Description |
|---|---|---|
radians | float | Value in radians. |
Returns: float — Value in degrees.
Related Types
Version Notes
This class is documented as of release R2025.2.4.
Was this page helpful?