Axis Placement3D
Class full path: NemAll_Python_Geometry.AxisPlacement3D
Representation class for orthogonal axis placement in 3D space
Placement is given by Origin and 2 direction vectors - local x-axis and local z-axis. y-axis is computed on demand
Attributes
Origin: Point3D
property
writable
Get origin
XDirection: Vector3D
property
writable
Get x-direction
ZDirection: Vector3D
property
writable
Get z-direction
Functions
CalcGlobalPoint(point)
Calculate global point from local coordinate system of placement 3D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point
|
Point3D
|
local point 3D |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Point3D instance |
CalcLocalPoint(point)
Calculate local point in coordinate system of placement 3D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point
|
Point3D
|
global point 3D |
required |
Returns:
Type | Description |
---|---|
Point3D
|
Point3D instance |
GetOrigin()
Get origin
Returns:
Type | Description |
---|---|
Point3D
|
Origin |
GetRotationMatrix()
Get Rotation matrix given by placement 3D
Returns:
Type | Description |
---|---|
Matrix3D
|
Matrix3D const reference |
GetTransformationMatrix()
Get Transformation matrix given by placement 3D
Returns:
Type | Description |
---|---|
Matrix3D
|
Matrix3D const reference |
GetXDirection()
Get x-direction
Returns:
Type | Description |
---|---|
Vector3D
|
Vector3D const reference |
GetYDirection()
Get direction of local y-axis
Returns:
Type | Description |
---|---|
Vector3D
|
Vector3D const reference |
GetZDirection()
Get z-direction
Returns:
Type | Description |
---|---|
Vector3D
|
Vector3D const reference |
IsValid()
Check if the placement is valid
Returns:
Type | Description |
---|---|
bool
|
True if it is a valid placement |
RotateAroundLocalZAxis(angle)
Rotate the placement around it's Z-axis
Parameters:
Name | Type | Description | Default |
---|---|---|---|
angle
|
Angle
|
rotation angle |
required |
Set(origin, xDir, zDir)
Set the placement
Parameters:
Name | Type | Description | Default |
---|---|---|---|
origin
|
Point3D
|
New origin |
required |
xDir
|
Vector3D
|
New X-direction |
required |
zDir
|
Vector3D
|
New Z-direction |
required |
SetOrigin(origin)
Set origin
Parameters:
Name | Type | Description | Default |
---|---|---|---|
origin
|
Point3D
|
New origin |
required |
SetXDirection(dir)
Set x-direction
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dir
|
Vector3D
|
Vector3D const reference |
required |
SetZDirection(dir)
Set z-direction
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dir
|
Vector3D
|
Vector3D const reference |
required |
__eq__(axisPlacement)
Comparison of axis placements without tolerance.
Be careful, this method work without tolerance!
Parameters:
Name | Type | Description | Default |
---|---|---|---|
axisPlacement
|
AxisPlacement3D
|
Compared axis placement. |
required |
Returns:
Type | Description |
---|---|
object
|
True when axis placements are equal, otherwise false. |
__init__
overload
__init__()
initialize
__init__(placement)
Copy constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
placement
|
AxisPlacement3D
|
Placement to be copied |
required |
__init__(refPoint)
Constructor with only reference point
Parameters:
Name | Type | Description | Default |
---|---|---|---|
refPoint
|
Point3D
|
reference point |
required |
__init__(refPoint, xvector, zvector)
Constructor which fully constructs the element.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
refPoint
|
Point3D
|
reference point |
required |
xvector
|
Vector3D
|
direction vector X |
required |
zvector
|
Vector3D
|
direction vector Z |
required |
__init__(rotationAxis, rotationStart)
Constructor from rotation axis and start point of rotation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rotationAxis
|
Axis3D
|
rotation axis |
required |
rotationStart
|
Point3D
|
starting point of rotation, have not to be on axis |
required |
__init__(matrix)
Constructor from Matrix3D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
matrix
|
Matrix3D
|
matrix |
required |
__repr__()
Convert to string