Skip to content

Axis2D

Class full path: NemAll_Python_Geometry.Axis2D

Representation class for 2D Axis

Attributes

AxisPoint: Point2D property writable

Get axis point in world coordinate system.

AxisRefPoint: Point2D property writable

Get reference point.

AxisRelPoint: Point2D property writable

Get axis point in local coordinate system

AxisVector: Vector2D property writable

Get axis vector

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 axes.

Be careful, this method work without tolerance!

Parameters:

Name Type Description Default
axis Axis2D

axis to be compared.

required

Returns:

Type Description
bool

True when axes are equal, otherwise false.

__init__ overload

__init__()

Initialize

__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
__init__(element)

Copy constructor

Parameters:

Name Type Description Default
element Axis2D

Element to copy

required

__repr__()

Convert to string