compas_vector_from_occ_axis
- compas_occ.conversions.compas_vector_from_occ_axis(axis: OCC.Core.gp.gp_Ax1, cls: Optional[Type[compas.geometry.vector.Vector]] = None) compas.geometry.vector.Vector
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
See also
compas_vector_from_occ_direction()
compas_vector_from_occ_vector()
compas_vector_from_occ_vector2d()
Examples
>>> from OCC.Core.gp import gp_Pnt, gp_Dir, gp_Ax1 >>> from compas_occ.conversions import compas_vector_from_occ_axis >>> axis = gp_Ax1(gp_Pnt(0, 0, 0), gp_Dir(1, 0, 0)) >>> compas_vector_from_occ_axis(axis) Vector(x=1.0, y=0.0, z=0.0)