FEM: visibility, do not hide parts which depends on mesh name
- since the mesh object depend on a part and the part can change this can mess up visibiliy
This commit is contained in:
@@ -175,10 +175,6 @@ std::string ViewProviderFemConstraint::gethideMeshShowPartStr(const std::string
|
||||
if \""+showConstr+"\" == amesh.Name:\n\
|
||||
amesh.ViewObject.Visibility = True\n\
|
||||
elif \"Mesh\" in amesh.TypeId:\n\
|
||||
aparttoshow = amesh.Name.replace(\"_Mesh\",\"\")\n\
|
||||
for apart in App.activeDocument().Objects:\n\
|
||||
if aparttoshow == apart.Name:\n\
|
||||
apart.ViewObject.Visibility = True\n\
|
||||
amesh.ViewObject.Visibility = False\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -170,10 +170,6 @@ class FemCommands(object):
|
||||
if "Constraint" in acnstrmesh.TypeId:
|
||||
acnstrmesh.ViewObject.Visibility = True
|
||||
if "Mesh" in acnstrmesh.TypeId:
|
||||
aparttoshow = acnstrmesh.Name.replace("_Mesh", "")
|
||||
for apart in FreeCAD.activeDocument().Objects:
|
||||
if aparttoshow == apart.Name:
|
||||
apart.ViewObject.Visibility = True
|
||||
acnstrmesh.ViewObject.Visibility = False # OvG: Hide meshes and show constraints and meshed part e.g. on purging results
|
||||
|
||||
## @}
|
||||
|
||||
@@ -434,8 +434,3 @@ def hide_parts_constraints():
|
||||
for acnstrmesh in FemGui.getActiveAnalysis().Member:
|
||||
if "Constraint" in acnstrmesh.TypeId:
|
||||
acnstrmesh.ViewObject.Visibility = False
|
||||
if "Mesh" in acnstrmesh.TypeId:
|
||||
aparttoshow = acnstrmesh.Name.replace("_Mesh", "")
|
||||
for apart in FreeCAD.activeDocument().Objects:
|
||||
if aparttoshow == apart.Name:
|
||||
apart.ViewObject.Visibility = False
|
||||
|
||||
Reference in New Issue
Block a user