Merge branch 'occ_face_meshsize' into 'master'

set meshsize for occ face from python

See merge request jschoeberl/netgen!197
This commit is contained in:
Joachim Schöberl 2019-08-14 13:24:34 +00:00
commit dd8029379d
2 changed files with 12 additions and 0 deletions

View File

@ -319,6 +319,14 @@ namespace netgen
}
}
void SetFaceMaxH(size_t facenr, double faceh)
{
if(facenr >= fmap.Extent())
throw RangeException("OCCGeometry faces", facenr, 0, fmap.Extent());
face_maxh[facenr] = faceh;
face_maxh_modified[facenr] = true;
}
// Philippose - 15/01/2009
// Returns the local mesh size of a given face
double GetFaceMaxH(int facenr)

View File

@ -48,6 +48,10 @@ DLL_HEADER void ExportNgOCC(py::module &m)
self.HealGeometry();
self.BuildFMap();
},py::arg("tolerance")=1e-3, py::arg("fixsmalledges")=true, py::arg("fixspotstripfaces")=true, py::arg("sewfaces")=true, py::arg("makesolids")=true, py::arg("splitpartitions")=false,R"raw_string(Heal the OCCGeometry.)raw_string",py::call_guard<py::gil_scoped_release>())
.def("SetFaceMeshsize", [](OCCGeometry& self, size_t fnr, double meshsize)
{
self.SetFaceMaxH(fnr, meshsize);
}, "Set maximum meshsize for face fnr. Face numbers are 0 based.")
.def("_visualizationData", [] (shared_ptr<OCCGeometry> occ_geo)
{
std::vector<float> vertices;