add onlySurface to generate only surface mesh

This commit is contained in:
Christopher Lackner 2016-12-02 19:00:34 +01:00
parent 0d36c69c25
commit ee833ff362
4 changed files with 8 additions and 4 deletions

View File

@ -138,8 +138,7 @@ namespace netgen
{
return CSGGenerateMesh (*this, mesh, mparam, perfstepsstart, perfstepsend);
}
const Refinement & CSGeometry :: GetRefinement () const
{
// cout << "get CSGeometry - Refinement" << endl;

View File

@ -794,6 +794,8 @@ namespace netgen
if (multithread.terminate || perfstepsend <= MESHCONST_OPTSURFACE)
return TCL_OK;
if(mparam.onlySurface)
return TCL_OK;
if (perfstepsstart <= MESHCONST_MESHVOLUME)
{

View File

@ -1112,6 +1112,7 @@ namespace netgen
bool check_impossible = 0;
int only3D_domain_nr = -1;
bool onlySurface = false;
///
int secondorder = 0;

View File

@ -591,7 +591,7 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
.def(py::init<>())
.def("__init__",
[](MP *instance, double maxh, bool quad_dominated, int optsteps2d, int optsteps3d,
int only3D_domain)
int only3D_domain, bool onlySurface)
{
new (instance) MeshingParameters;
instance->maxh = maxh;
@ -599,12 +599,14 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
instance->optsteps2d = optsteps2d;
instance->optsteps3d = optsteps3d;
instance->only3D_domain_nr = only3D_domain;
instance->onlySurface = onlySurface;
},
py::arg("maxh")=1000,
py::arg("quad_dominated")=false,
py::arg("optsteps2d") = 3,
py::arg("optsteps3d") = 3,
py::arg("only3D_domain") = 0
py::arg("only3D_domain") = 0,
py::arg("onlySurface") = false
,
"create meshing parameters"
)