mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-23 11:20:34 +05:00
Scaling of bounding box (instead of increasing size in all directions)
This commit is contained in:
parent
65c5e2d244
commit
a89cf0089a
@ -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; }
|
||||
};
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user