From 05307758002229e3a062174b350d340b0bf68453 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Thu, 29 Jun 2023 12:23:19 +0200 Subject: [PATCH] [occ] restrict meshsize at vertices --- libsrc/occ/occgenmesh.cpp | 10 ++++++++++ libsrc/occ/occgeom.hpp | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libsrc/occ/occgenmesh.cpp b/libsrc/occ/occgenmesh.cpp index 517e1ebb..eef3feb1 100644 --- a/libsrc/occ/occgenmesh.cpp +++ b/libsrc/occ/occgenmesh.cpp @@ -507,6 +507,16 @@ namespace netgen for(auto layer : Range(1, maxlayer+1)) mesh.SetLocalH (bb.PMin(), bb.PMax(), mparam.grading, layer); + for(const auto& v : GetVertices(geom.GetShape())) + { + if(OCCGeometry::HaveProperties(v)) + { + auto& props = OCCGeometry::GetProperties(v); + if(props.maxh < 1e99) + mesh.GetLocalH(props.layer)->SetH(occ2ng(BRep_Tool::Pnt(TopoDS::Vertex(v))), props.maxh); + } + } + int nedges = geom.emap.Extent(); double mincurvelength = IGNORECURVELENGTH; diff --git a/libsrc/occ/occgeom.hpp b/libsrc/occ/occgeom.hpp index 1162fab3..6734b851 100644 --- a/libsrc/occ/occgeom.hpp +++ b/libsrc/occ/occgeom.hpp @@ -530,7 +530,7 @@ namespace netgen { bool have_identifications = false; - for (auto typ : { TopAbs_SOLID, TopAbs_FACE, TopAbs_EDGE }) + for (auto typ : { TopAbs_SOLID, TopAbs_FACE, TopAbs_EDGE, TopAbs_VERTEX }) for (TopExp_Explorer e(shape, typ); e.More(); e.Next()) { auto s = e.Current();