bezier_to_compas
- compas_occ.conversions.bezier_to_compas(bezier)
Construct a COMPAS Bezier curve from an OCC Bezier curve.
- Parameters:
- bezier
Geom_BezierCurve
The OCC Bezier curve.
- bezier
- Returns:
Examples
>>> from OCC.Core.gp import gp_Pnt, gp_Dir, gp_Ax2, gp_Parab >>> from compas_occ.conversions import bezier_to_compas >>> from OCC.Core.Geom import Geom_BezierCurve >>> from OCC.Core.TColgp import TColgp_Array1OfPnt >>> from OCC.Core.gp import gp_Pnt >>> array = TColgp_Array1OfPnt(1, 4) >>> array.SetValue(1, gp_Pnt(0, 0, 0)) >>> array.SetValue(2, gp_Pnt(1, 0, 0)) >>> array.SetValue(3, gp_Pnt(1, 1, 0)) >>> array.SetValue(4, gp_Pnt(0, 1, 0)) >>> bezier = Geom_BezierCurve(array) >>> bezier_to_compas(bezier) Bezier(points=[...])