For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

BRepOffsetAPI_ThruSections crashes when lofting through similar profiles

Martin Siggel's picture

BRepOffsetAPI_ThruSections::build crashes, when trying to loft through 3 similar profiles. An exception StandardConstructionError is thrown from Geom_BSplineSurface::InsertUKnots.

The profiles are circles, generated with GeomAPI_Interpolate through a set of points. All 3 profiles are the same, but shifted in z-Direction. The crash only occurs for a specific number of points per circle. For this minimal example, these numbers are 7,13,14,19,22 ... Also, the crash only occurs, if ruled = false (No ruled surface).

Please see attached the source code for the example, the generated brep file with the profiles and a core dump + the executable.

Here, the short version of the code:

int numPoints =14;

TopoDS_Wire w1 = makeWire(makeEllipse(1.,1.,0.,numPoints, 0., false, true));
TopoDS_Wire w2 = makeWire(makeEllipse(1.,1.,3.,numPoints, 0., false, true));
TopoDS_Wire w3 = makeWire(makeEllipse(1.,1.,6.,numPoints, 0., false, true));

BRepOffsetAPI_ThruSections generator(Standard_True, Standard_False, Precision::Confusion());


// this triggers the crash

Please see the attached code for makeEllipse and makeWire.

Interestingly, the code doesn't crash, if one circle is slightly changed, i.e. if we set on ellipse parameter to e.g. 1.1.

This bug is probably the same as #0022981 from the Mantis bugtracker.

Please tell me, if you need more information.