Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

BRepOffsetAPI_ThruSections crashes when lofting through similar profiles

BRepOffsetAPI_ThruSections crashes when lofting through similar profiles
Martin Siggel 2012/08/30 16:33
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());
generator.AddWire(w1);
generator.AddWire(w2);
generator.AddWire(w3);

generator.CheckCompatibility(Standard_False);

// this triggers the crash
generator.Build();

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.
You have to be logged in to download the attached file
 
 
Latest news
  • OCCT Applications
  • Open CASCADE Technology 6.8.0 is available for download!
  • New features to enhance the development process

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map