From e30daf42322ec69cd7a9c4e1e1894c5388a7f610 Mon Sep 17 00:00:00 2001 From: Matthias Rambausek Date: Thu, 18 Nov 2021 09:25:17 +0100 Subject: [PATCH] solid2d gets its own maxh parameter such that maxh is also respected inside the domain --- libsrc/geom2d/csg2d.cpp | 1 + libsrc/geom2d/csg2d.hpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/libsrc/geom2d/csg2d.cpp b/libsrc/geom2d/csg2d.cpp index dfee7fba..357d6582 100644 --- a/libsrc/geom2d/csg2d.cpp +++ b/libsrc/geom2d/csg2d.cpp @@ -2185,6 +2185,7 @@ shared_ptr CSG2d :: GenerateSplineGeometry() if(!is_solid_degenerated) { geo->SetMaterial(dom, s.name); + geo->SetDomainMaxh(dom, s.maxh); if(s.layer != 1) geo->SetDomainLayer(dom, s.layer); } diff --git a/libsrc/geom2d/csg2d.hpp b/libsrc/geom2d/csg2d.hpp index fbe705a9..dcc06132 100644 --- a/libsrc/geom2d/csg2d.hpp +++ b/libsrc/geom2d/csg2d.hpp @@ -632,6 +632,7 @@ struct Solid2d int layer = 1; string name = MAT_DEFAULT; + double maxh = MAXH_DEFAULT; Solid2d() = default; Solid2d(string name_) : name(name_) {} @@ -697,6 +698,7 @@ struct Solid2d Solid2d & Maxh(double maxh) { + this->maxh = maxh; for(auto & p : polys) for(auto v : p.Vertices(ALL)) v->info.maxh = maxh;