vector2d_to_compas
- compas_occ.conversions.vector2d_to_compas(vector, cls=None)
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:
Examples
>>> from OCC.Core.gp import gp_Vec2d >>> from compas_occ.conversions import vector2d_to_compas >>> vector = gp_Vec2d(1, 0) >>> vector2d_to_compas(vector) Vector(x=1.0, y=0.0, z=0.0)