FEM: 1DFlow, gui command
This commit is contained in:
parent
5c0660dbdd
commit
1e1b9a8726
|
@ -110,6 +110,7 @@ SET(FemGuiScripts_SRCS
|
|||
PyGui/_CommandControlSolver.py
|
||||
PyGui/_CommandConstraintSelfWeight.py
|
||||
PyGui/_CommandFEMMesh2Mesh.py
|
||||
PyGui/_CommandFluidSection.py
|
||||
PyGui/_CommandMaterialMechanicalNonlinear.py
|
||||
PyGui/_CommandMaterialSolid.py
|
||||
PyGui/_CommandMaterialFluid.py
|
||||
|
|
|
@ -71,6 +71,7 @@ INSTALL(
|
|||
PyGui/_CommandControlSolver.py
|
||||
PyGui/_CommandConstraintSelfWeight.py
|
||||
PyGui/_CommandFEMMesh2Mesh.py
|
||||
PyGui/_CommandFluidSection.py
|
||||
PyGui/_CommandMaterialMechanicalNonlinear.py
|
||||
PyGui/_CommandMaterialSolid.py
|
||||
PyGui/_CommandMaterialFluid.py
|
||||
|
|
|
@ -79,6 +79,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
|||
<< "Fem_MaterialMechanicalNonlinear"
|
||||
<< "Fem_BeamSection"
|
||||
<< "Fem_ShellThickness"
|
||||
<< "Fem_FluidSection"
|
||||
<< "Separator"
|
||||
<< "Fem_ConstraintFixed"
|
||||
<< "Fem_ConstraintDisplacement"
|
||||
|
@ -153,6 +154,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
|||
<< "Fem_MaterialMechanicalNonlinear"
|
||||
<< "Fem_BeamSection"
|
||||
<< "Fem_ShellThickness"
|
||||
<< "Fem_FluidSection"
|
||||
<< "Separator"
|
||||
<< "Fem_ConstraintFixed"
|
||||
<< "Fem_ConstraintDisplacement"
|
||||
|
|
|
@ -59,6 +59,7 @@ class FemWorkbench (Workbench):
|
|||
import PyGui._CommandAnalysis
|
||||
import PyGui._CommandShellThickness
|
||||
import PyGui._CommandBeamSection
|
||||
import PyGui._CommandFluidSection
|
||||
import PyGui._CommandMaterialSolid
|
||||
import PyGui._CommandMaterialFluid
|
||||
import PyGui._CommandMaterialMechanicalNonlinear
|
||||
|
|
53
src/Mod/Fem/PyGui/_CommandFluidSection.py
Normal file
53
src/Mod/Fem/PyGui/_CommandFluidSection.py
Normal file
|
@ -0,0 +1,53 @@
|
|||
# ***************************************************************************
|
||||
# * *
|
||||
# * Copyright (c) 2016 - Ofentse Kgoa <kgoaot@eskom.co.za> *
|
||||
# * Based on the FemBeamSection by 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__ = "_CommandFluidSection"
|
||||
__author__ = "Ofentse Kgoa"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
## @package CommandFluidSection
|
||||
# \ingroup FEM
|
||||
|
||||
import FreeCAD
|
||||
from FemCommands import FemCommands
|
||||
import FreeCADGui
|
||||
from PySide import QtCore
|
||||
|
||||
|
||||
class _CommandFluidSection(FemCommands):
|
||||
"The Fem_FluidSection command definition"
|
||||
def __init__(self):
|
||||
super(_CommandFluidSection, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-fluid-section',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_FluidSection", "Fluid section for 1D flow"),
|
||||
'Accel': "C, B",
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_FluidSection", "Creates a FEM Fluid section for 1D flow")}
|
||||
self.is_active = 'with_analysis'
|
||||
|
||||
def Activated(self):
|
||||
FreeCAD.ActiveDocument.openTransaction("Create FemFluidSection")
|
||||
FreeCADGui.addModule("ObjectsFem")
|
||||
FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeFemFluidSection()]")
|
||||
|
||||
|
||||
FreeCADGui.addCommand('Fem_FluidSection', _CommandFluidSection())
|
Loading…
Reference in New Issue
Block a user