axis_to_compas_vector
- compas_occ.conversions.axis_to_compas_vector(axis, cls=None)
Convert an OCC axis to a COMPAS vector.
- Parameters:
- axis
gp_Ax1
The OCC axis.
- clsType[
compas.geometry.Vector
], optional The type of COMPAS vector.
- axis
- Returns:
Examples
>>> from OCC.Core.gp import gp_Pnt, gp_Dir, gp_Ax1 >>> from compas_occ.conversions import axis_to_compas_vector >>> axis = gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(1, 0, 0)) >>> axis_to_compas_vector(axis) Vector(x=1.0, y=0.0, z=0.0)