-
-
Notifications
You must be signed in to change notification settings - Fork 402
Closed
Description
Here is the code:
from OCC.Core.gp import gp_Pnt
from OCC.Core.GeomAPI import GeomAPI_PointsToBSpline
from OCC.Core.TColgp import TColgp_Array1OfPnt
from OCC.Core.BRepBuilderAPI import BRepBuilderAPI_MakeEdge
from OCC.Core.BRepAdaptor import BRepAdaptor_Curve
# the bspline
array = TColgp_Array1OfPnt(1, 5)
array.SetValue(1, gp_Pnt(0,0,1))
array.SetValue(2, gp_Pnt(0,0,2))
array.SetValue(3, gp_Pnt(0,0,3))
array.SetValue(4, gp_Pnt(0,0,4))
array.SetValue(5, gp_Pnt(0,0,5))
bspline = GeomAPI_PointsToBSpline(array).Curve()
instance = BRepBuilderAPI_MakeEdge(bspline).Edge()
adap=BRepAdaptor_Curve(instance)
crv = adap.Curve()free(): invalid pointer
Aborted (core dumped)