Skip to content

free(): invalid pointer #1176

@sfornengo

Description

@sfornengo

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)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions