Fem: Add suppressible extension to mesh element objects
This commit is contained in:
committed by
Yorik van Havre
parent
3d830b5b2e
commit
9e6f3660e5
@@ -400,6 +400,8 @@ class GmshTools:
|
||||
else:
|
||||
Console.PrintMessage(" Mesh group objects, we need to get the elements.\n")
|
||||
for mg in self.mesh_obj.MeshGroupList:
|
||||
if mg.Suppressed:
|
||||
continue
|
||||
new_group_elements = meshtools.get_mesh_group_elements(mg, self.part_obj)
|
||||
for ge in new_group_elements:
|
||||
if ge not in self.group_elements:
|
||||
@@ -479,6 +481,8 @@ class GmshTools:
|
||||
):
|
||||
self.outputCompoundWarning
|
||||
for mr_obj in self.mesh_obj.MeshRegionList:
|
||||
if mr_obj.Suppressed:
|
||||
continue
|
||||
# print(mr_obj.Name)
|
||||
# print(mr_obj.CharacteristicLength)
|
||||
# print(Units.Quantity(mr_obj.CharacteristicLength).Value)
|
||||
@@ -564,6 +568,8 @@ class GmshTools:
|
||||
# https://forum.freecad.org/viewtopic.php?f=18&t=18780&p=149520#p149520
|
||||
self.outputCompoundWarning
|
||||
for mr_obj in self.mesh_obj.MeshBoundaryLayerList:
|
||||
if mr_obj.Suppressed:
|
||||
continue
|
||||
if mr_obj.MinimumThickness and Units.Quantity(mr_obj.MinimumThickness).Value > 0:
|
||||
if mr_obj.References:
|
||||
belem_list = []
|
||||
|
||||
@@ -366,6 +366,8 @@ run_netgen(**{kwds})
|
||||
|
||||
result = []
|
||||
for reg in self.obj.MeshRegionList:
|
||||
if reg.Suppressed:
|
||||
continue
|
||||
for s, sub_list in reg.References:
|
||||
if s.isDerivedFrom("App::GeoFeature") and isinstance(
|
||||
s.getPropertyOfGeometry(), PartShape
|
||||
|
||||
@@ -46,6 +46,8 @@ class BaseFemMeshElement(base_fempythonobject.BaseFemPythonObject):
|
||||
for prop in self._get_properties():
|
||||
prop.add_to_object(obj)
|
||||
|
||||
obj.addExtension("App::SuppressibleExtensionPython")
|
||||
|
||||
def _get_properties(self):
|
||||
prop = []
|
||||
|
||||
@@ -72,3 +74,6 @@ class BaseFemMeshElement(base_fempythonobject.BaseFemPythonObject):
|
||||
if prop.name == "References":
|
||||
# change References to App::PropertyLinkSubListGlobal
|
||||
prop.handle_change_type(obj, old_type="App::PropertyLinkSubList")
|
||||
|
||||
if not obj.hasExtension("App::SuppressibleExtensionPython"):
|
||||
obj.addExtension("App::SuppressibleExtensionPython")
|
||||
|
||||
@@ -35,5 +35,9 @@ from femviewprovider import view_base_femobject
|
||||
class VPBaseFemMeshElement(view_base_femobject.VPBaseFemObject):
|
||||
"""Proxy View Provider for Python base mesh element."""
|
||||
|
||||
def __init__(self, vobj):
|
||||
super().__init__(vobj)
|
||||
vobj.addExtension("Gui::ViewProviderSuppressibleExtensionPython")
|
||||
|
||||
def isShow(self):
|
||||
return self.ViewObject.Visibility
|
||||
|
||||
Reference in New Issue
Block a user