mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-27 13:20:34 +05:00
Merge branch 'occ_fix_maxh' into 'master'
OCC fix maxh settings See merge request jschoeberl/netgen!411
This commit is contained in:
commit
992b47a561
@ -1095,6 +1095,10 @@ namespace netgen
|
|||||||
maxhdom.SetSize (geom.NrSolids());
|
maxhdom.SetSize (geom.NrSolids());
|
||||||
maxhdom = mparam.maxh;
|
maxhdom = mparam.maxh;
|
||||||
|
|
||||||
|
int dom = 0;
|
||||||
|
for (TopExp_Explorer e(geom.GetShape(), TopAbs_SOLID); e.More(); e.Next(), dom++)
|
||||||
|
maxhdom[dom] = min2(maxhdom[dom], OCCGeometry::global_shape_properties[e.Current().TShape()].maxh);
|
||||||
|
|
||||||
mesh.SetMaxHDomain (maxhdom);
|
mesh.SetMaxHDomain (maxhdom);
|
||||||
|
|
||||||
Box<3> bb = geom.GetBoundingBox();
|
Box<3> bb = geom.GetBoundingBox();
|
||||||
|
@ -792,7 +792,12 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
|
|||||||
},
|
},
|
||||||
[](TopoDS_Shape& self, double val)
|
[](TopoDS_Shape& self, double val)
|
||||||
{
|
{
|
||||||
OCCGeometry::global_shape_properties[self.TShape()].maxh = val;
|
for (auto typ : { TopAbs_SOLID, TopAbs_FACE, TopAbs_EDGE })
|
||||||
|
for (TopExp_Explorer e(self, typ); e.More(); e.Next())
|
||||||
|
{
|
||||||
|
auto & maxh = OCCGeometry::global_shape_properties[e.Current().TShape()].maxh;
|
||||||
|
maxh = min2(val, maxh);
|
||||||
|
}
|
||||||
}, "maximal mesh-size for shape")
|
}, "maximal mesh-size for shape")
|
||||||
|
|
||||||
.def_property("col", [](const TopoDS_Shape & self) {
|
.def_property("col", [](const TopoDS_Shape & self) {
|
||||||
|
Loading…
Reference in New Issue
Block a user