compas_vector_from_occ_vector
- compas_occ.conversions.compas_vector_from_occ_vector(vector: OCC.Core.gp.gp_Vec, cls: Optional[Type[compas.geometry.vector.Vector]] = None) compas.geometry.vector.Vector
Construct a COMPAS vector from an OCC vector.
- Parameters
- vector
gp_Vec
The OCC vector.
- clsType[
Vector
], optional The type of COMPAS vector.
- vector
- Returns
See also
compas_vector_from_occ_vector2d()
compas_vector_from_occ_direction()
compas_vector_from_occ_axis()
Examples
>>> from OCC.Core.gp import gp_Vec >>> from compas_occ.conversions import compas_vector_from_occ_vector >>> vector = gp_Vec(1, 0, 0) >>> compas_vector_from_occ_vector(vector) Vector(x=1.0, y=0.0, z=0.0)