FEM: solver z88 object, move make def into make objects FEM modul

This commit is contained in:
Bernd Hahnebach 2017-02-20 17:55:20 +01:00 committed by wmayer
parent 4f0f3aa4fa
commit 99c5b57b42
5 changed files with 13 additions and 47 deletions

View File

@ -133,7 +133,6 @@ SET(FemScripts_SRCS
FemMeshGroup.py
FemMeshRegion.py
FemMeshTools.py
FemSolverZ88.py
FemTools.py
FemToolsCcx.py
FemToolsZ88.py

View File

@ -119,7 +119,6 @@ INSTALL(
importZ88O2Results.py
FemInputWriterZ88.py
FemToolsZ88.py
FemSolverZ88.py
_FemSolverZ88.py
_ViewProviderFemSolverZ88.py
_CommandSolverZ88.py

View File

@ -1,43 +0,0 @@
# ***************************************************************************
# * *
# * Copyright (c) 2016 - Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * 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
# @}

View File

@ -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'''

View File

@ -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())