Skip to content

Commit

Permalink
FEM: mesh region, on edit hide all meshes and shapes, show the part t…
Browse files Browse the repository at this point in the history
…o mesh
  • Loading branch information
berndhahnebach authored and yorikvanhavre committed Dec 21, 2016
1 parent 6822d09 commit 8629370
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Mod/Fem/_ViewProviderFemMeshRegion.py
Expand Up @@ -59,6 +59,15 @@ def onChanged(self, vobj, prop):
return

def setEdit(self, vobj, mode=0):
# hide all meshes and shapes, show part to mesh
for o in FreeCAD.ActiveDocument.Objects:
if o.isDerivedFrom("Fem::FemMeshObject") or hasattr(o, "Shape"):
o.ViewObject.hide()
if len(self.Object.InList) == 1:
self.Object.InList[0].Part.ViewObject.show()
else:
FreeCAD.Console.PrintError(self.Object.Name + ' seam to belong to more than one mesh object. This is not supported.\n')
# show task panel
import _TaskPanelFemMeshRegion
taskd = _TaskPanelFemMeshRegion._TaskPanelFemMeshRegion(self.Object)
taskd.obj = vobj.Object
Expand Down

0 comments on commit 8629370

Please sign in to comment.