From a51f8ed307a8820bd78d74043002ee168993bb73 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Mon, 14 Jun 2021 10:09:49 +0200 Subject: [PATCH] fix meshing empty meshes --- libsrc/meshing/meshfunc.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libsrc/meshing/meshfunc.cpp b/libsrc/meshing/meshfunc.cpp index 8bf85206..08f0b234 100644 --- a/libsrc/meshing/meshfunc.cpp +++ b/libsrc/meshing/meshfunc.cpp @@ -315,6 +315,9 @@ namespace netgen throw NgException ("Stop meshing since boundary mesh is overlapping"); + if(mesh3d.GetNDomains()==0) + return MESHING3_OK; + Array meshes(mesh3d.GetNDomains()-1); auto first_new_pi = mesh3d.Points().Range().Next();