Fem: Add option to create conformal mesh from Netgen

This commit is contained in:
marioalexis
2025-08-12 20:40:58 -03:00
committed by Chris Hennes
parent dc967cdb1c
commit f8367d263e
2 changed files with 13 additions and 0 deletions

View File

@@ -106,6 +106,7 @@ class NetgenTools:
"brep_file": self.brep_file,
"threads": self.param_grp.GetInt("NumOfThreads", QThread.idealThreadCount()),
"heal": self.obj.HealShape,
"glue": self.obj.Glue,
"params": self.get_meshing_parameters(),
"second_order": self.obj.SecondOrder,
"second_order_linear": self.obj.SecondOrderLinear,
@@ -143,6 +144,7 @@ def run_netgen(
brep_file,
threads,
heal,
glue,
params,
second_order,
second_order_linear,
@@ -179,6 +181,8 @@ def run_netgen(
geom = occ.OCCGeometry(shape)
if heal:
geom.Heal()
if glue:
geom.Glue()
mesh = geom.GenerateMesh(mp=meshing.MeshingParameters(**params))
if zrefine == "Regular":

View File

@@ -515,6 +515,15 @@ class MeshNetgen(base_fempythonobject.BaseFemPythonObject):
value=False,
)
)
prop.append(
_PropHelper(
type="App::PropertyBool",
name="Glue",
group="Mesh Parameters",
doc="Glue shapes to get a conformal mesh",
value=True,
)
)
prop.append(
_PropHelper(
type="App::PropertyEnumeration",