Frame#

class ansys.geometry.core.math.frame.Frame(origin: beartype.typing.Union[numpy.ndarray, ansys.geometry.core.typing.RealSequence, ansys.geometry.core.math.point.Point3D] = ZERO_POINT3D, direction_x: beartype.typing.Union[numpy.ndarray, ansys.geometry.core.typing.RealSequence, ansys.geometry.core.math.vector.UnitVector3D, ansys.geometry.core.math.vector.Vector3D] = UNITVECTOR3D_X, direction_y: beartype.typing.Union[numpy.ndarray, ansys.geometry.core.typing.RealSequence, ansys.geometry.core.math.vector.UnitVector3D, ansys.geometry.core.math.vector.Vector3D] = UNITVECTOR3D_Y)#

Primitive representation of a frame (an origin and three fundamental directions).

Parameters:
originUnion[ndarray, RealSequence, Point3D], default: ZERO_POINT3D

Centered origin of the`frame. The default is ZERO_POINT3D, which is the Cartesian origin.

direction_xUnion[ndarray, RealSequence, UnitVector3D, Vector3D], default: UNITVECTOR3D_X

X-axis direction.

direction_yUnion[ndarray, RealSequence, UnitVector3D, Vector3D], default: UNITVECTOR3D_Y

Y-axis direction.

Overview#

transform_point2d_local_to_global

Transform a 2D point to a global 3D point.

origin

Origin of the frame.

direction_x

X-axis direction of the frame.

direction_y

Y-axis direction of the frame.

direction_z

Z-axis direction of the frame.

global_to_local_rotation

Global to local space transformation matrix.

local_to_global_rotation

Local to global space transformation matrix.

transformation_matrix

Full 4x4 transformation matrix.

__eq__

Equals operator for the Frame class.

__ne__

Not equals operator for the Frame class.

Import detail#

from ansys.geometry.core.math.frame import Frame

Property detail#

property Frame.origin: ansys.geometry.core.math.point.Point3D#

Origin of the frame.

property Frame.direction_x: ansys.geometry.core.math.vector.UnitVector3D#

X-axis direction of the frame.

property Frame.direction_y: ansys.geometry.core.math.vector.UnitVector3D#

Y-axis direction of the frame.

property Frame.direction_z: ansys.geometry.core.math.vector.UnitVector3D#

Z-axis direction of the frame.

property Frame.global_to_local_rotation: ansys.geometry.core.math.matrix.Matrix33#

Global to local space transformation matrix.

Returns:
Matrix33

3x3 matrix representing the transformation from global to local coordinate space, excluding origin translation.

property Frame.local_to_global_rotation: ansys.geometry.core.math.matrix.Matrix33#

Local to global space transformation matrix.

Returns:
Matrix33

3x3 matrix representing the transformation from local to global coordinate space.

property Frame.transformation_matrix: ansys.geometry.core.math.matrix.Matrix44#

Full 4x4 transformation matrix.

Returns:
Matrix44

4x4 matrix representing the transformation from global to local coordinate space.

Method detail#

Frame.transform_point2d_local_to_global(point: ansys.geometry.core.math.point.Point2D) ansys.geometry.core.math.point.Point3D#

Transform a 2D point to a global 3D point.

This method transforms a local, plane-contained Point2D object in the global coordinate system, thus representing it as a Point3D object.

Parameters:
pointPoint2D

Point2D local object to express in global coordinates.

Returns:
Point3D

Global coordinates for the 3D point.

Frame.__eq__(other: Frame) bool#

Equals operator for the Frame class.

Frame.__ne__(other: Frame) bool#

Not equals operator for the Frame class.