direction_to_compas
- compas_occ.conversions.direction_to_compas(vector, cls=None)
Construct a COMPAS vector from an OCC direction.
- Parameters:
- vector
gp_Dir
The OCC direction.
- clsType[
Vector
], optional The type of COMPAS vector.
- vector
- Returns:
Examples
>>> from OCC.Core.gp import gp_Dir >>> from compas_occ.conversions import direction_to_compas >>> vector = gp_Dir(1, 0, 0) >>> direction_to_compas(vector) Vector(x=1.0, y=0.0, z=0.0)