From 78994da1995532c5f44e68e28b250e32a8f5eec4 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Wed, 19 Mar 2025 17:38:51 +0100 Subject: [PATCH] 1d occ meshes --- libsrc/meshing/basegeom.cpp | 7 +++++++ libsrc/meshing/meshclass.cpp | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/libsrc/meshing/basegeom.cpp b/libsrc/meshing/basegeom.cpp index c7aae2d5..05d683ff 100644 --- a/libsrc/meshing/basegeom.cpp +++ b/libsrc/meshing/basegeom.cpp @@ -1314,6 +1314,13 @@ namespace netgen if(multithread.terminate || mparam.perfstepsend <= MESHCONST_MESHEDGES) return 0; + if(dimension == 1) + { + FinalizeMesh(*mesh); + mesh->SetDimension(1); + return 0; + } + if (mparam.perfstepsstart <= MESHCONST_MESHSURFACE) { MeshSurface(*mesh, mparam); diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp index cecce6cd..f18261c8 100644 --- a/libsrc/meshing/meshclass.cpp +++ b/libsrc/meshing/meshclass.cpp @@ -4819,6 +4819,24 @@ namespace netgen for (auto & seg : LineSegments()) seg.si = seg.edgenr; } + if (dimension == 3 && dim == 1) + { + for(auto str : materials) + delete str; + materials.SetSize(0); + for(auto str : bcnames) + delete str; + bcnames.SetSize(0); + for(auto str: cd2names) + { + cout << "found material = " << *str << endl; + materials.Append(str); + } + cd2names.SetSize(0); + for(auto str : cd3names) + bcnames.Append(str); + cd3names.SetSize(0); + } dimension = dim; }