Axis2D
Class full path: NemAll_Python_Geometry.Axis2D
Representation class for Axis2D.
The Axis2D is a represantation of an infinitely long geometrical object with no curvature. Axis 2D is given by axis point and direction vector.
Attributes
AxisPoint: Point2D
property
Get and set the axis point as property
AxisRefPoint: Point2D
property
Get and set the axis ref point as property
AxisRelPoint: Point2D
property
Get and set the axis point in local coordinate system as property
AxisVector: Vector2D
property
Get and set the vector as property
Functions
GetAxisPoint()
Get axis point in world coordinate system.
Returns:
Type | Description |
---|---|
Point2D
|
Axis point in world coordinates |
GetAxisPoint2()
Get second axis point. Used world coordinate system.
Returns:
Type | Description |
---|---|
Point2D
|
Second axis point in world coordinates |
GetAxisRelPoint()
Get axis point in local coordinate system
Returns:
Type | Description |
---|---|
Point2D
|
Axis point in local coordinates |
GetAxisRelPoint2()
Get second axis point. Used local coordinate system
Returns:
Type | Description |
---|---|
Point2D
|
Second axis point in local coordinates |
GetRefPoint()
Get reference point.
Returns:
Type | Description |
---|---|
Point2D
|
Reference point |
GetVector()
Get axis vector
Returns:
Type | Description |
---|---|
Vector2D
|
Axis vector |
Set
overload
Set(axis)
Set axis
Parameters:
Name | Type | Description | Default |
---|---|---|---|
axis
|
Axis2D
|
Axis which will be copied |
required |
Set(refPoint, axisPoint, vector)
Set axis
Used local coordinate system for axisPoint
Parameters:
Name | Type | Description | Default |
---|---|---|---|
refPoint
|
Point2D
|
Reference point |
required |
axisPoint
|
Point2D
|
Axis point |
required |
vector
|
Vector2D
|
Axis vector |
required |
SetAxisPoint(point)
Set axis point, used world coordinate system.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point
|
Point2D
|
Axis point in world coordinates |
required |
SetAxisRelPoint(axisPoint)
Set axis point, used local coordinate system.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
axisPoint
|
Point2D
|
Axis point in local coordinates |
required |
SetRefPoint(refPoint)
Set reference point
Parameters:
Name | Type | Description | Default |
---|---|---|---|
refPoint
|
Point2D
|
New reference point |
required |
SetVector(vector)
Set axis vector
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vector
|
Vector2D
|
New axis vector |
required |
__eq__(axis)
Comparison of axis objects without tolerance.
Be careful, this method work without tolerance!
Parameters:
Name | Type | Description | Default |
---|---|---|---|
axis
|
Axis2D
|
Compared axis. |
required |
Returns:
Type | Description |
---|---|
object
|
True when axis objects are equal, otherwise false. |
__init__
overload
__init__()
initialize
__init__(axis)
Copy constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
axis
|
Axis2D
|
Axis which will be copied |
required |
__init__(axisPoint, vector)
Constructor.
Reference point is initialized to [0.,0.] Used world coordinate system for AxisPoint
Parameters:
Name | Type | Description | Default |
---|---|---|---|
axisPoint
|
Point2D
|
Axis point |
required |
vector
|
Vector2D
|
Axis vector |
required |
__init__(refPoint, axisPoint, vector)
Constructor.
Used local coordinate system for AxisPoint
Parameters:
Name | Type | Description | Default |
---|---|---|---|
refPoint
|
Point2D
|
Reference point |
required |
axisPoint
|
Point2D
|
Axis point |
required |
vector
|
Vector2D
|
Axis vector |
required |
__init__(line)
Explicit constructor from Line2D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
line
|
Line2D
|
2D line |
required |
__repr__()
convert the list to a string