Skip to content

Commit

Permalink
FEM: command modules, add Fem to file and class name
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach authored and yorikvanhavre committed Mar 3, 2017
1 parent f5c717b commit 8411d03
Show file tree
Hide file tree
Showing 24 changed files with 144 additions and 143 deletions.
42 changes: 21 additions & 21 deletions src/Mod/Fem/App/CMakeLists.txt
Expand Up @@ -106,27 +106,27 @@ SET(FemObjectsScripts_SRCS
SET(FemGuiScripts_SRCS
PyGui/FemCommands.py
PyGui/__init__.py
PyGui/_CommandAnalysis.py
PyGui/_CommandBeamSection.py
PyGui/_CommandConstraintSelfWeight.py
PyGui/_CommandFEMMesh2Mesh.py
PyGui/_CommandFluidSection.py
PyGui/_CommandMaterialMechanicalNonlinear.py
PyGui/_CommandMaterialSolid.py
PyGui/_CommandMaterialFluid.py
PyGui/_CommandMeshGmshFromShape.py
PyGui/_CommandMeshNetgenFromShape.py
PyGui/_CommandMeshClear.py
PyGui/_CommandMeshGroup.py
PyGui/_CommandMeshPrintInfo.py
PyGui/_CommandMeshRegion.py
PyGui/_CommandResultShow.py
PyGui/_CommandResultsPurge.py
PyGui/_CommandShellThickness.py
PyGui/_CommandSolverCalculix.py
PyGui/_CommandSolverControl.py
PyGui/_CommandSolverRun.py
PyGui/_CommandSolverZ88.py
PyGui/_CommandFemAnalysis.py
PyGui/_CommandFemBeamSection.py
PyGui/_CommandFemConstraintSelfWeight.py
PyGui/_CommandFemFluidSection.py
PyGui/_CommandFemMaterialMechanicalNonlinear.py
PyGui/_CommandFemMaterialSolid.py
PyGui/_CommandFemMaterialFluid.py
PyGui/_CommandFemMesh2Mesh.py
PyGui/_CommandFemMeshGmshFromShape.py
PyGui/_CommandFemMeshNetgenFromShape.py
PyGui/_CommandFemMeshClear.py
PyGui/_CommandFemMeshGroup.py
PyGui/_CommandFemMeshPrintInfo.py
PyGui/_CommandFemMeshRegion.py
PyGui/_CommandFemResultShow.py
PyGui/_CommandFemResultsPurge.py
PyGui/_CommandFemShellThickness.py
PyGui/_CommandFemSolverCalculix.py
PyGui/_CommandFemSolverControl.py
PyGui/_CommandFemSolverRun.py
PyGui/_CommandFemSolverZ88.py
PyGui/_TaskPanelFemBeamSection.py
PyGui/_TaskPanelFemFluidSection.py
PyGui/_TaskPanelFemMeshGmsh.py
Expand Down
42 changes: 21 additions & 21 deletions src/Mod/Fem/CMakeLists.txt
Expand Up @@ -67,27 +67,27 @@ INSTALL(
FILES
PyGui/FemCommands.py
PyGui/__init__.py
PyGui/_CommandAnalysis.py
PyGui/_CommandBeamSection.py
PyGui/_CommandConstraintSelfWeight.py
PyGui/_CommandFEMMesh2Mesh.py
PyGui/_CommandFluidSection.py
PyGui/_CommandMaterialMechanicalNonlinear.py
PyGui/_CommandMaterialSolid.py
PyGui/_CommandMaterialFluid.py
PyGui/_CommandMeshClear.py
PyGui/_CommandMeshGmshFromShape.py
PyGui/_CommandMeshGroup.py
PyGui/_CommandMeshNetgenFromShape.py
PyGui/_CommandMeshPrintInfo.py
PyGui/_CommandMeshRegion.py
PyGui/_CommandResultShow.py
PyGui/_CommandResultsPurge.py
PyGui/_CommandShellThickness.py
PyGui/_CommandSolverCalculix.py
PyGui/_CommandSolverControl.py
PyGui/_CommandSolverRun.py
PyGui/_CommandSolverZ88.py
PyGui/_CommandFemAnalysis.py
PyGui/_CommandFemBeamSection.py
PyGui/_CommandFemConstraintSelfWeight.py
PyGui/_CommandFemFluidSection.py
PyGui/_CommandFemMaterialMechanicalNonlinear.py
PyGui/_CommandFemMaterialSolid.py
PyGui/_CommandFemMaterialFluid.py
PyGui/_CommandFemMesh2Mesh.py
PyGui/_CommandFemMeshClear.py
PyGui/_CommandFemMeshGmshFromShape.py
PyGui/_CommandFemMeshGroup.py
PyGui/_CommandFemMeshNetgenFromShape.py
PyGui/_CommandFemMeshPrintInfo.py
PyGui/_CommandFemMeshRegion.py
PyGui/_CommandFemResultShow.py
PyGui/_CommandFemResultsPurge.py
PyGui/_CommandFemShellThickness.py
PyGui/_CommandFemSolverCalculix.py
PyGui/_CommandFemSolverControl.py
PyGui/_CommandFemSolverRun.py
PyGui/_CommandFemSolverZ88.py
PyGui/_TaskPanelFemBeamSection.py
PyGui/_TaskPanelFemFluidSection.py
PyGui/_TaskPanelFemMeshGmsh.py
Expand Down
43 changes: 22 additions & 21 deletions src/Mod/Fem/InitGui.py
Expand Up @@ -45,27 +45,28 @@ def Initialize(self):
import Fem
import FemGui

import PyGui._CommandFEMMesh2Mesh
import PyGui._CommandAnalysis
import PyGui._CommandShellThickness
import PyGui._CommandBeamSection
import PyGui._CommandFluidSection
import PyGui._CommandMaterialSolid
import PyGui._CommandMaterialFluid
import PyGui._CommandMaterialMechanicalNonlinear
import PyGui._CommandMeshClear
import PyGui._CommandMeshGmshFromShape
import PyGui._CommandMeshGroup
import PyGui._CommandMeshNetgenFromShape
import PyGui._CommandMeshPrintInfo
import PyGui._CommandMeshRegion
import PyGui._CommandResultShow
import PyGui._CommandResultsPurge
import PyGui._CommandSolverCalculix
import PyGui._CommandSolverControl
import PyGui._CommandSolverRun
import PyGui._CommandSolverZ88
import PyGui._CommandConstraintSelfWeight
import PyGui._CommandFemAnalysis
import PyGui._CommandFemConstraintSelfWeight
import PyGui._CommandFemMaterialSolid
import PyGui._CommandFemMaterialFluid
import PyGui._CommandFemMaterialMechanicalNonlinear
import PyGui._CommandFemMesh2Mesh
import PyGui._CommandFemMeshClear
import PyGui._CommandFemMeshGmshFromShape
import PyGui._CommandFemMeshGroup
import PyGui._CommandFemMeshNetgenFromShape
import PyGui._CommandFemMeshPrintInfo
import PyGui._CommandFemMeshRegion
import PyGui._CommandFemResultShow
import PyGui._CommandFemResultsPurge
import PyGui._CommandFemSolverCalculix
import PyGui._CommandFemSolverControl
import PyGui._CommandFemSolverRun
import PyGui._CommandFemSolverZ88

import PyGui._CommandFemShellThickness
import PyGui._CommandFemBeamSection
import PyGui._CommandFemFluidSection

def GetClassName(self):
return "FemGui::Workbench"
Expand Down
Expand Up @@ -24,7 +24,7 @@
__author__ = "Juergen Riegel"
__url__ = "http://www.freecadweb.org"

## @package CommandAnalysis
## @package CommandFemAnalysis
# \ingroup FEM

import FreeCAD
Expand All @@ -33,10 +33,10 @@
from PySide import QtCore


class _CommandAnalysis(FemCommands):
class _CommandFemAnalysis(FemCommands):
"the FEM_Analysis command definition"
def __init__(self):
super(_CommandAnalysis, self).__init__()
super(_CommandFemAnalysis, self).__init__()
self.resources = {'Pixmap': 'fem-analysis',
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_Analysis", "Analysis container"),
'Accel': "N, A",
Expand All @@ -57,4 +57,4 @@ def Activated(self):
FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [App.activeDocument()." + sel[0].Name + "]")
FreeCADGui.Selection.clearSelection()

FreeCADGui.addCommand('FEM_Analysis', _CommandAnalysis())
FreeCADGui.addCommand('FEM_Analysis', _CommandFemAnalysis())
Expand Up @@ -24,7 +24,7 @@
__author__ = "Bernd Hahnebach"
__url__ = "http://www.freecadweb.org"

## @package CommandBeamSection
## @package CommandFemBeamSection
# \ingroup FEM

import FreeCAD
Expand All @@ -33,10 +33,10 @@
from PySide import QtCore


class _CommandBeamSection(FemCommands):
class _CommandFemBeamSection(FemCommands):
"The FEM_BeamSection command definition"
def __init__(self):
super(_CommandBeamSection, self).__init__()
super(_CommandFemBeamSection, self).__init__()
self.resources = {'Pixmap': 'fem-beam-section',
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_BeamSection", "Beam cross section"),
'Accel': "C, B",
Expand All @@ -49,4 +49,4 @@ def Activated(self):
FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeBeamSection()]")


FreeCADGui.addCommand('FEM_BeamSection', _CommandBeamSection())
FreeCADGui.addCommand('FEM_BeamSection', _CommandFemBeamSection())
Expand Up @@ -24,7 +24,7 @@
__author__ = "Bernd Hahnebach"
__url__ = "http://www.freecadweb.org"

## @package CommandConstraintSelfWeight
## @package CommandFemConstraintSelfWeight
# \ingroup FEM

import FreeCAD
Expand All @@ -33,10 +33,10 @@
from PySide import QtCore


class _CommandConstraintSelfWeight(FemCommands):
class _CommandFemConstraintSelfWeight(FemCommands):
"The FEM_ConstraintSelfWeight command definition"
def __init__(self):
super(_CommandConstraintSelfWeight, self).__init__()
super(_CommandFemConstraintSelfWeight, self).__init__()
self.resources = {'Pixmap': 'fem-constraint-selfweight',
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_ConstraintSelfWeight", "Constraint self weigt"),
'Accel': "C, W",
Expand All @@ -49,4 +49,4 @@ def Activated(self):
FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeConstraintSelfWeight()]")


FreeCADGui.addCommand('FEM_ConstraintSelfWeight', _CommandConstraintSelfWeight())
FreeCADGui.addCommand('FEM_ConstraintSelfWeight', _CommandFemConstraintSelfWeight())
Expand Up @@ -25,7 +25,7 @@
__author__ = "Ofentse Kgoa"
__url__ = "http://www.freecadweb.org"

## @package CommandFluidSection
## @package CommandFemFluidSection
# \ingroup FEM

import FreeCAD
Expand All @@ -34,10 +34,10 @@
from PySide import QtCore


class _CommandFluidSection(FemCommands):
class _CommandFemFluidSection(FemCommands):
"The FEM_FluidSection command definition"
def __init__(self):
super(_CommandFluidSection, self).__init__()
super(_CommandFemFluidSection, self).__init__()
self.resources = {'Pixmap': 'fem-fluid-section',
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_FluidSection", "Fluid section for 1D flow"),
'Accel': "C, B",
Expand All @@ -50,4 +50,4 @@ def Activated(self):
FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [ObjectsFem.makeFemFluidSection()]")


FreeCADGui.addCommand('FEM_FluidSection', _CommandFluidSection())
FreeCADGui.addCommand('FEM_FluidSection', _CommandFemFluidSection())
Expand Up @@ -24,7 +24,7 @@
__author__ = "Juergen Riegel, Bernd Hahnebach"
__url__ = "http://www.freecadweb.org"

## @package CommandMaterial
## @package CommandFemMaterialFluid
# \ingroup FEM

import FreeCAD
Expand All @@ -34,10 +34,10 @@
from PySide import QtCore


class _CommandMaterialFluid(FemCommands):
class _CommandFemMaterialFluid(FemCommands):
"the FEM_MaterialFluid command definition"
def __init__(self):
super(_CommandMaterialFluid, self).__init__()
super(_CommandFemMaterialFluid, self).__init__()
self.resources = {'Pixmap': 'fem-material-fluid',
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_MaterialFluid", "FEM material for Fluid"),
'Accel': "M, M",
Expand All @@ -55,4 +55,4 @@ def Activated(self):
FreeCADGui.doCommand("Gui.activeDocument().setEdit(App.ActiveDocument.ActiveObject.Name)")


FreeCADGui.addCommand('FEM_MaterialFluid', _CommandMaterialFluid())
FreeCADGui.addCommand('FEM_MaterialFluid', _CommandFemMaterialFluid())
Expand Up @@ -24,7 +24,7 @@
__author__ = "Bernd Hahnebach"
__url__ = "http://www.freecadweb.org"

## @package CommandMaterialMechanicalNonLinear
## @package CommandFemMaterialMechanicalNonLinear
# \ingroup FEM

import FreeCAD
Expand All @@ -34,10 +34,10 @@
from PySide import QtCore


class _CommandMaterialMechanicalNonlinear(FemCommands):
class _CommandFemMaterialMechanicalNonlinear(FemCommands):
"The FEM_MaterialMechanicalNonlinear command definition"
def __init__(self):
super(_CommandMaterialMechanicalNonlinear, self).__init__()
super(_CommandFemMaterialMechanicalNonlinear, self).__init__()
self.resources = {'Pixmap': 'fem-material-nonlinear',
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_MaterialMechanicalNonlinear", "Nonlinear mechanical material"),
'Accel': "C, W",
Expand Down Expand Up @@ -74,4 +74,4 @@ def Activated(self):
if solver_object and solver_object.SolverType == 'FemSolverCalculix':
solver_object.MaterialNonlinearity = "nonlinear"

FreeCADGui.addCommand('FEM_MaterialMechanicalNonlinear', _CommandMaterialMechanicalNonlinear())
FreeCADGui.addCommand('FEM_MaterialMechanicalNonlinear', _CommandFemMaterialMechanicalNonlinear())
Expand Up @@ -24,7 +24,7 @@
__author__ = "Juergen Riegel, Bernd Hahnebach"
__url__ = "http://www.freecadweb.org"

## @package CommandMaterial
## @package CommandFemMaterialSolid
# \ingroup FEM

import FreeCAD
Expand All @@ -34,10 +34,10 @@
from PySide import QtCore


class _CommandMaterialSolid(FemCommands):
class _CommandFemMaterialSolid(FemCommands):
"the FEM_MaterialSolid command definition"
def __init__(self):
super(_CommandMaterialSolid, self).__init__()
super(_CommandFemMaterialSolid, self).__init__()
self.resources = {'Pixmap': 'fem-material',
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_MaterialSolid", "FEM material for solid"),
'Accel': "M, M",
Expand All @@ -55,4 +55,4 @@ def Activated(self):
FreeCADGui.doCommand("Gui.activeDocument().setEdit(App.ActiveDocument.ActiveObject.Name)")


FreeCADGui.addCommand('FEM_MaterialSolid', _CommandMaterialSolid())
FreeCADGui.addCommand('FEM_MaterialSolid', _CommandFemMaterialSolid())
File renamed without changes.
Expand Up @@ -24,7 +24,7 @@
__author__ = "Bernd Hahnebach"
__url__ = "http://www.freecadweb.org"

## @package CommandMeshClear
## @package CommandFemMeshClear
# \ingroup FEM

import FreeCAD
Expand All @@ -33,10 +33,10 @@
from PySide import QtCore


class _CommandMeshClear(FemCommands):
class _CommandFemMeshClear(FemCommands):
"the FEM_MeshClear command definition"
def __init__(self):
super(_CommandMeshClear, self).__init__()
super(_CommandFemMeshClear, self).__init__()
self.resources = {'Pixmap': 'fem-femmesh-clear-mesh',
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_MeshClear", "Clear FEM mesh"),
# 'Accel': "Z, Z",
Expand All @@ -53,4 +53,4 @@ def Activated(self):

FreeCADGui.Selection.clearSelection()

FreeCADGui.addCommand('FEM_MeshClear', _CommandMeshClear())
FreeCADGui.addCommand('FEM_MeshClear', _CommandFemMeshClear())
Expand Up @@ -24,7 +24,7 @@
__author__ = "Bernd Hahnebach"
__url__ = "http://www.freecadweb.org"

## @package CommandMeshGmshFromShape
## @package CommandFemMeshGmshFromShape
# \ingroup FEM

import FreeCAD
Expand All @@ -34,10 +34,10 @@
from PySide import QtCore


class _CommandMeshGmshFromShape(FemCommands):
class _CommandFemMeshGmshFromShape(FemCommands):
# the FEM_MeshGmshFromShape command definition
def __init__(self):
super(_CommandMeshGmshFromShape, self).__init__()
super(_CommandFemMeshGmshFromShape, self).__init__()
self.resources = {'Pixmap': 'fem-femmesh-gmsh-from-shape',
'MenuText': QtCore.QT_TRANSLATE_NOOP("FEM_MeshGmshFromShape", "FEM mesh from shape by GMSH"),
'ToolTip': QtCore.QT_TRANSLATE_NOOP("FEM_MeshGmshFromShape", "Create a FEM mesh from a shape by GMSH mesher")}
Expand All @@ -61,4 +61,4 @@ def Activated(self):
FreeCADGui.Selection.clearSelection()


FreeCADGui.addCommand('FEM_MeshGmshFromShape', _CommandMeshGmshFromShape())
FreeCADGui.addCommand('FEM_MeshGmshFromShape', _CommandFemMeshGmshFromShape())

0 comments on commit 8411d03

Please sign in to comment.