FEM: constraint selfweight object, move make def into make objects FEM module
This commit is contained in:
parent
99c5b57b42
commit
b03b0800ea
|
@ -121,7 +121,6 @@ SET(FemScripts_SRCS
|
|||
Init.py
|
||||
InitGui.py
|
||||
FemCommands.py
|
||||
FemConstraintSelfWeight.py
|
||||
FemGmshTools.py
|
||||
FemInputWriter.py
|
||||
FemInputWriterCcx.py
|
||||
|
|
|
@ -84,7 +84,6 @@ INSTALL(
|
|||
_TaskPanelFemShellThickness.py
|
||||
TaskPanelFemShellThickness.ui
|
||||
|
||||
FemConstraintSelfWeight.py
|
||||
_FemConstraintSelfWeight.py
|
||||
_ViewProviderFemConstraintSelfWeight.py
|
||||
_CommandConstraintSelfWeight.py
|
||||
|
|
|
@ -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__ = "FemConstraintSelfWeight"
|
||||
__author__ = "Bernd Hahnebach"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
## \addtogroup FEM
|
||||
# @{
|
||||
|
||||
import FreeCAD
|
||||
import _FemConstraintSelfWeight
|
||||
|
||||
|
||||
def makeFemConstraintSelfWeight(name="FemConstraintSelfWeight"):
|
||||
'''makeFemFemConstraintSelfWeight([name]): creates an self weight object to define a gravity load'''
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name)
|
||||
_FemConstraintSelfWeight._FemConstraintSelfWeight(obj)
|
||||
if FreeCAD.GuiUp:
|
||||
import _ViewProviderFemConstraintSelfWeight
|
||||
_ViewProviderFemConstraintSelfWeight._ViewProviderFemConstraintSelfWeight(obj.ViewObject)
|
||||
return obj
|
||||
|
||||
# @}
|
|
@ -168,6 +168,17 @@ def makeConstraintPulley(name):
|
|||
return obj
|
||||
|
||||
|
||||
def makeConstraintSelfWeight(name="FemConstraintSelfWeight"):
|
||||
'''makeConstraintSelfWeight([name]): creates an self weight object to define a gravity load'''
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::FeaturePython", name)
|
||||
import _FemConstraintSelfWeight
|
||||
_FemConstraintSelfWeight._FemConstraintSelfWeight(obj)
|
||||
if FreeCAD.GuiUp:
|
||||
import _ViewProviderFemConstraintSelfWeight
|
||||
_ViewProviderFemConstraintSelfWeight._ViewProviderFemConstraintSelfWeight(obj.ViewObject)
|
||||
return obj
|
||||
|
||||
|
||||
def makeConstraintTemperature(name):
|
||||
'''makeConstraintTemperature(name): makes a Fem ConstraintTemperature object'''
|
||||
obj = FreeCAD.ActiveDocument.addObject("Fem::ConstraintTemperature", name)
|
||||
|
|
|
@ -45,8 +45,8 @@ class _CommandConstraintSelfWeight(FemCommands):
|
|||
|
||||
def Activated(self):
|
||||
FreeCAD.ActiveDocument.openTransaction("Create FemConstraintSelfWeight")
|
||||
FreeCADGui.addModule("FemConstraintSelfWeight")
|
||||
FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [FemConstraintSelfWeight.makeFemConstraintSelfWeight()]")
|
||||
FreeCADGui.addModule("ObjectsFem")
|
||||
FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeConstraintSelfWeight()]")
|
||||
|
||||
|
||||
FreeCADGui.addCommand('Fem_ConstraintSelfWeight', _CommandConstraintSelfWeight())
|
||||
|
|
Loading…
Reference in New Issue
Block a user