Skip to content

Axis Placement2D

Class full path: NemAll_Python_Geometry.AxisPlacement2D

Representation class for orthogonal axis placement

Placement is given by reference point and direction vector of local x-axis

Attributes

Direction: Vector2D property writable

Get direction

RefPoint: Point2D property writable

Get the reference point

Functions

GetDirection()

Get direction

Returns:

Type Description
Vector2D

Vector2D const reference

GetRefPoint()

Get the reference point

Returns:

Type Description
Point2D

Reference point

GetYDirection()

Get direction of local y-axis

Returns:

Type Description
Vector2D

Vector2D const reference

IsValid()

Check if the placement is valid

Returns:

Type Description
bool

True if it is a valid placement

SetDirection(dir)

Set direction

Parameters:

Name Type Description Default
dir Vector2D

Vector2D const reference

required

SetRefPoint(refPoint)

Set reference point

Parameters:

Name Type Description Default
refPoint Point2D

New reference point

required

__eq__(axis_placement)

Comparison of axis placements.

Be careful, this method work without tolerance!

Parameters:

Name Type Description Default
axis_placement AxisPlacement2D

axis placement to be compared.

required

Returns:

Type Description
bool

True when axis placements are equal, otherwise false.

__init__ overload

__init__()

Initialize

__init__(refPoint, dirvector)

Constructor which fully constructs the element.

Parameters:

Name Type Description Default
refPoint Point2D

reference point

required
dirvector Vector2D

direction vector

required
__init__(element)

Copy constructor

Parameters:

Name Type Description Default
element AxisPlacement2D

Element to copy

required

__repr__()

Convert to string