diff --git a/src/Mod/Fem/App/CMakeLists.txt b/src/Mod/Fem/App/CMakeLists.txt index 3cf0de1fa..344b1efe8 100644 --- a/src/Mod/Fem/App/CMakeLists.txt +++ b/src/Mod/Fem/App/CMakeLists.txt @@ -133,7 +133,6 @@ SET(FemScripts_SRCS FemMeshGroup.py FemMeshRegion.py FemMeshTools.py - FemSolverZ88.py FemTools.py FemToolsCcx.py FemToolsZ88.py diff --git a/src/Mod/Fem/CMakeLists.txt b/src/Mod/Fem/CMakeLists.txt index 4359fd695..94753a47d 100755 --- a/src/Mod/Fem/CMakeLists.txt +++ b/src/Mod/Fem/CMakeLists.txt @@ -119,7 +119,6 @@ INSTALL( importZ88O2Results.py FemInputWriterZ88.py FemToolsZ88.py - FemSolverZ88.py _FemSolverZ88.py _ViewProviderFemSolverZ88.py _CommandSolverZ88.py diff --git a/src/Mod/Fem/FemSolverZ88.py b/src/Mod/Fem/FemSolverZ88.py deleted file mode 100644 index 70c483b49..000000000 --- a/src/Mod/Fem/FemSolverZ88.py +++ /dev/null @@ -1,43 +0,0 @@ -# *************************************************************************** -# * * -# * Copyright (c) 2016 - Bernd Hahnebach * -# * * -# * This program is free software; you can redistribute it and/or modify * -# * it under the terms of the GNU Lesser General Public License (LGPL) * -# * as published by the Free Software Foundation; either version 2 of * -# * the License, or (at your option) any later version. * -# * for detail see the LICENCE text file. * -# * * -# * This program is distributed in the hope that it will be useful, * -# * but WITHOUT ANY WARRANTY; without even the implied warranty of * -# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# * GNU Library General Public License for more details. * -# * * -# * You should have received a copy of the GNU Library General Public * -# * License along with this program; if not, write to the Free Software * -# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -# * USA * -# * * -# *************************************************************************** - -__title__ = "FemSolverZ88" -__author__ = "Bernd Hahnebach" -__url__ = "http://www.freecadweb.org" - -## \addtogroup FEM -# @{ - -import FreeCAD -import _FemSolverZ88 - - -def makeFemSolverZ88(name="Z88"): - '''makeSolverZ88(name): makes a Z88 solver object''' - obj = FreeCAD.ActiveDocument.addObject("Fem::FemSolverObjectPython", name) - _FemSolverZ88._FemSolverZ88(obj) - if FreeCAD.GuiUp: - import _ViewProviderFemSolverZ88 - _ViewProviderFemSolverZ88._ViewProviderFemSolverZ88(obj.ViewObject) - return obj - -# @} diff --git a/src/Mod/Fem/ObjectsFem.py b/src/Mod/Fem/ObjectsFem.py index 99f3174ae..f6bd0c941 100644 --- a/src/Mod/Fem/ObjectsFem.py +++ b/src/Mod/Fem/ObjectsFem.py @@ -49,6 +49,17 @@ def makeSolverCalculix(name="CalculiX"): return obj +def makeSolverZ88(name="Z88"): + '''makeSolverZ88(name): makes a Z88 solver object''' + obj = FreeCAD.ActiveDocument.addObject("Fem::FemSolverObjectPython", name) + import _FemSolverZ88 + _FemSolverZ88._FemSolverZ88(obj) + if FreeCAD.GuiUp: + import _ViewProviderFemSolverZ88 + _ViewProviderFemSolverZ88._ViewProviderFemSolverZ88(obj.ViewObject) + return obj + + ########## element geometry definitions ########## def makeBeamSection(sectiontype='Rectangular', width=10.0, height=25.0, name="BeamSection"): '''makeBeamSection([width], [height], [name]): creates an beamsection object to define a cross section''' diff --git a/src/Mod/Fem/_CommandSolverZ88.py b/src/Mod/Fem/_CommandSolverZ88.py index 11cd10e94..0ae79d339 100644 --- a/src/Mod/Fem/_CommandSolverZ88.py +++ b/src/Mod/Fem/_CommandSolverZ88.py @@ -45,8 +45,8 @@ class _CommandSolverZ88(FemCommands): def Activated(self): FreeCAD.ActiveDocument.openTransaction("Create SolverZ88") - FreeCADGui.addModule("FemSolverZ88") - FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [FemSolverZ88.makeFemSolverZ88()]") + FreeCADGui.addModule("ObjectsFem") + FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeSolverZ88()]") FreeCADGui.addCommand('Fem_SolverZ88', _CommandSolverZ88())