vector_to_compas

compas_occ.conversions.vector_to_compas(vector, cls=None)

Construct a COMPAS vector from an OCC vector.

Parameters:
vectorgp_Vec

The OCC vector.

clsType[Vector], optional

The type of COMPAS vector.

Returns:
Vector

Examples

>>> from OCC.Core.gp import gp_Vec
>>> from compas_occ.conversions import vector_to_compas
>>> vector = gp_Vec(1, 0, 0)
>>> vector_to_compas(vector)
Vector(x=1.0, y=0.0, z=0.0)