diff --git a/libsrc/gprim/geomobjects.hpp b/libsrc/gprim/geomobjects.hpp index 765565f0..f0f8edb4 100644 --- a/libsrc/gprim/geomobjects.hpp +++ b/libsrc/gprim/geomobjects.hpp @@ -406,6 +406,13 @@ namespace netgen } } + void Scale (double factor) + { + auto center = Center(); + pmin = center + factor*(pmin-center); + pmax = center + factor*(pmax-center); + } + void DoArchive(Archive& archive) { archive & pmin & pmax; } }; diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp index d678cc75..ca403d32 100644 --- a/libsrc/meshing/meshclass.cpp +++ b/libsrc/meshing/meshclass.cpp @@ -4881,8 +4881,8 @@ namespace netgen box.Add (points[pi]); auto & el = volelements[ei]; - if(el.IsCurved()) - box.Increase(1.2*box.Diam()); + if(el.IsCurved() && curvedelems->IsElementCurved(ei)) + box.Scale(1.2); elementsearchtree -> Insert (box, ei+1);