compas_frame_from_occ_ax3

compas_occ.conversions.compas_frame_from_occ_ax3(position: OCC.Core.gp.gp_Ax3, cls: Optional[Type[compas.geometry.frame.Frame]] = None) compas.geometry.frame.Frame

Construct a COMPAS frame from an OCC position.

Parameters
positiongp_Ax3

The OCC position.

clsType[Frame], optional

The type of COMPAS frame.

Returns
Frame

Examples

>>> from OCC.Core.gp import gp_Pnt, gp_Dir, gp_Ax3
>>> from compas_occ.conversions import compas_frame_from_occ_ax3
>>> ax3 = gp_Ax3(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1), gp_Dir(1, 0, 0))
>>> compas_frame_from_occ_ax3(ax3)
Frame(point=Point(0.0, 0.0, z=0.0), xaxis=Vector(x=1.0, y=0.0, z=0.0), yaxis=Vector(x=0.0, y=1.0, z=0.0))