Segfault during mesh generation 1D

Hello, I am meshing a very big and complex geometry, ca 600`000 edges, many many faces, one volume and I’m hitting a segfault during the 1D mesh generation.

I run it through a debugger and the stacktrace is

// ng/ngpkg.cpp:1389
if(optstring)
  mparam.optimize3d = *optstring;
int res = ng_geometry -> GenerateMesh (mesh, mparam);
// libsrc/meshing/basegeom.cpp:1258
if(mparam.perfstepsstart <= MESHCONST_MESHEDGES)
  FindEdges(*mesh, mparam);
// libsrc/meshing/basegeom.cpp:646
if(is_identified_edge)
{
    params.SetSize(2);
    params[0] = 0.;
    params[1] = 1.;
}
else
{
    edge->Divide(mparam, mesh, edge_points, params);

// libsrc/meshing/basegeom.cpp:498
double safety = 0.5*(1.-mparam.grading);

double lam = 0.0;
Point<3> p = GetPoint(0.0);
// libsrc/occ/occ_edge.cpp:48
Point<3> OCCEdge::GetPoint(double t) const
{
    return occ2ng( curve->Value(s0+t*(s1-s0)) );

and I can see in the debugger that curve is 0x0, id est, nullptr.

Can anyone share help? :slight_smile:

Massimiliano

Can you identifiy the edge in the geometry and have a look at it? Do you know does it have some kind of “speciality”? I didn’t know that there could be edges without a curve in occ (which contains its parametrization), except maybe from degenerated ones but these we remove (but maybe not fully correctly)?

What you can also try is the geometry.Heal function (in cpp HealGeometry). it removes degenerated faces and fixes small gaps and stuff like that. If it is afterwards fine, there was just some broken part in the geometry.

If you can share the geometry I can have a look sometime later this week you can DM me.

I tried the healing procedure but it took forever so I stopped it at some point. I haven’t tried to identify the edge in question but there are no special edges.

I tried with other similar geometries coming from the same pipeline and I get the same result.