Skip to content

Commit

Permalink
FEM: ccx tools, delete duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach authored and wwmayer committed Mar 4, 2019
1 parent e8044ac commit 445f747
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Mod/Fem/femtools/ccxtools.py
Expand Up @@ -87,15 +87,11 @@ def __init__(self, analysis=None, solver=None, test_mode=False):
else:
raise Exception('FEM: Somthing went wront, the exception should have been raised earlier!')

## Removes all result objects
## Removes all result objects from an analysis group
# @param self The python object self
def purge_results(self):
for m in self.analysis.Group:
if (m.isDerivedFrom('Fem::FemResultObject')):
if m.Mesh and hasattr(m.Mesh, "Proxy") and m.Mesh.Proxy.Type == "Fem::FemMeshResult":
self.analysis.Document.removeObject(m.Mesh.Name)
self.analysis.Document.removeObject(m.Name)
FreeCAD.ActiveDocument.recompute()
from femresult.resulttools import purge_results as pr
pr(self.analysis)

## Resets mesh color, deformation and removes all result objects if preferences to keep them is not set
# @param self The python object self
Expand Down

0 comments on commit 445f747

Please sign in to comment.