diff --git a/libsrc/csg/csgeom.cpp b/libsrc/csg/csgeom.cpp index 82102118..8eb82ce7 100644 --- a/libsrc/csg/csgeom.cpp +++ b/libsrc/csg/csgeom.cpp @@ -949,6 +949,7 @@ namespace netgen { int inv; int nsurf = GetNSurf(); + identicsurfaces.DeleteData(); isidenticto.SetSize(nsurf); diff --git a/libsrc/csg/python_csg.cpp b/libsrc/csg/python_csg.cpp index 12545eee..f66f61c6 100644 --- a/libsrc/csg/python_csg.cpp +++ b/libsrc/csg/python_csg.cpp @@ -676,6 +676,7 @@ However, when r = 0, the top part becomes a point(tip) and meshing fails! .def("Draw", FunctionPointer ([] (shared_ptr self) { + self->FindIdenticSurfaces(1e-8 * self->MaxSize()); self->CalcTriangleApproximation(0.01, 20); ng_geometry = self; }) @@ -705,8 +706,8 @@ However, when r = 0, the top part becomes a point(tip) and meshing fails! auto surf = csg_geo->GetSurface(i); surfnames.push_back(surf->GetBCName()); } - csg_geo->FindIdenticSurfaces(1e-6); - csg_geo->CalcTriangleApproximation(0.01,100); + csg_geo->FindIdenticSurfaces(1e-8 * csg_geo->MaxSize()); + csg_geo->CalcTriangleApproximation(0.01,20); auto nto = csg_geo->GetNTopLevelObjects(); size_t np = 0; size_t ntrig = 0;