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