FEM: some renameing for multiple solver:
- module names vs multiple solver - stick with python command class names in Fem - rename commands for new objects from _CommandFemSomeObjName to _CommandSomeObjName - rename commands for do something to _CommandDoSomething - change tool names to have a consistent naming in all FEM for menue tools and tool tipps
This commit is contained in:
parent
676b73f3b5
commit
004f757ab7
|
@ -70,16 +70,16 @@ SET(Mod_SRCS
|
|||
SOURCE_GROUP("Module" FILES ${Mod_SRCS})
|
||||
|
||||
SET(FemScripts_SRCS
|
||||
_CommandFemBeamSection.py
|
||||
_CommandFemFromShape.py
|
||||
_CommandFemShellThickness.py
|
||||
_CommandFemSolverCalculix.py
|
||||
_CommandAnalysis.py
|
||||
_CommandBeamSection.py
|
||||
_CommandControlSolver.py
|
||||
_CommandMechanicalMaterial.py
|
||||
_CommandMechanicalShowResult.py
|
||||
_CommandNewMechanicalAnalysis.py
|
||||
_CommandPurgeFemResults.py
|
||||
_CommandQuickAnalysis.py
|
||||
_CommandSolverJobControl.py
|
||||
_CommandShowResult.py
|
||||
_CommandMeshFromShape.py
|
||||
_CommandPurgeResults.py
|
||||
_CommandRunSolver.py
|
||||
_CommandShellThickness.py
|
||||
_CommandSolverCalculix.py
|
||||
_FemAnalysis.py
|
||||
_FemBeamSection.py
|
||||
_FemShellThickness.py
|
||||
|
@ -89,7 +89,7 @@ SET(FemScripts_SRCS
|
|||
_TaskPanelFemShellThickness.py
|
||||
_TaskPanelFemSolverCalculix.py
|
||||
_TaskPanelMechanicalMaterial.py
|
||||
_TaskPanelResultControl.py
|
||||
_TaskPanelShowResult.py
|
||||
_ViewProviderFemAnalysis.py
|
||||
_ViewProviderFemBeamSection.py
|
||||
_ViewProviderFemShellThickness.py
|
||||
|
@ -111,14 +111,14 @@ SET(FemScripts_SRCS
|
|||
FemTools.py
|
||||
FemToolsCcx.py
|
||||
MechanicalMaterial.py
|
||||
SelectionObserverFem.py
|
||||
FemSelectionObserver.py
|
||||
TestFem.py
|
||||
|
||||
TaskPanelFemBeamSection.ui
|
||||
TaskPanelFemShellThickness.ui
|
||||
TaskPanelFemSolverCalculix.ui
|
||||
TaskPanelMechanicalMaterial.ui
|
||||
TaskPanelShowDisplacement.ui
|
||||
TaskPanelShowResult.ui
|
||||
)
|
||||
#SOURCE_GROUP("Scripts" FILES ${FemScripts_SRCS})
|
||||
|
||||
|
|
|
@ -13,45 +13,38 @@ INSTALL(
|
|||
|
||||
convert2TetGen.py
|
||||
|
||||
SelectionObserverFem.py
|
||||
TestFem.py
|
||||
FemSelectionObserver.py
|
||||
FemMeshTools.py
|
||||
FemTools.py
|
||||
FemInputWriter.py
|
||||
|
||||
ccxDatReader.py
|
||||
ccxFrdReader.py
|
||||
FemToolsCcx.py
|
||||
FemInputWriterCcx.py
|
||||
TestFem.py
|
||||
|
||||
FemCommands.py
|
||||
_CommandFemFromShape.py
|
||||
_CommandPurgeFemResults.py
|
||||
_CommandQuickAnalysis.py
|
||||
_CommandSolverJobControl.py
|
||||
_CommandMeshFromShape.py
|
||||
_CommandPurgeResults.py
|
||||
_CommandRunSolver.py
|
||||
_CommandControlSolver.py
|
||||
|
||||
_CommandMechanicalShowResult.py
|
||||
_TaskPanelResultControl.py
|
||||
|
||||
TaskPanelShowDisplacement.ui
|
||||
|
||||
_FemAnalysis.py
|
||||
_ViewProviderFemAnalysis.py
|
||||
_CommandShowResult.py
|
||||
_TaskPanelShowResult.py
|
||||
TaskPanelShowResult.ui
|
||||
|
||||
FemAnalysis.py
|
||||
_CommandNewMechanicalAnalysis.py
|
||||
_FemAnalysis.py
|
||||
_ViewProviderFemAnalysis.py
|
||||
_CommandAnalysis.py
|
||||
|
||||
FemBeamSection.py
|
||||
_FemBeamSection.py
|
||||
_ViewProviderFemBeamSection.py
|
||||
_CommandFemBeamSection.py
|
||||
_CommandBeamSection.py
|
||||
_TaskPanelFemBeamSection.py
|
||||
TaskPanelFemBeamSection.ui
|
||||
|
||||
FemShellThickness.py
|
||||
_FemShellThickness.py
|
||||
_ViewProviderFemShellThickness.py
|
||||
_CommandFemShellThickness.py
|
||||
_CommandShellThickness.py
|
||||
_TaskPanelFemShellThickness.py
|
||||
TaskPanelFemShellThickness.ui
|
||||
|
||||
|
@ -62,10 +55,15 @@ INSTALL(
|
|||
_TaskPanelMechanicalMaterial.py
|
||||
TaskPanelMechanicalMaterial.ui
|
||||
|
||||
# solver CalculiX ccx
|
||||
ccxDatReader.py
|
||||
ccxFrdReader.py
|
||||
FemInputWriterCcx.py
|
||||
FemToolsCcx.py
|
||||
FemSolverCalculix.py
|
||||
_FemSolverCalculix.py
|
||||
_ViewProviderFemSolverCalculix.py
|
||||
_CommandFemSolverCalculix.py
|
||||
_CommandSolverCalculix.py
|
||||
_TaskPanelFemSolverCalculix.py
|
||||
TaskPanelFemSolverCalculix.ui
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
__title__ = "SelectionObserverFem"
|
||||
__title__ = "Selection Observer"
|
||||
__author__ = "Bernd Hahnebach"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
|
@ -29,8 +29,8 @@ import FreeCAD
|
|||
import FreeCADGui
|
||||
|
||||
|
||||
class SelectionObserverFem:
|
||||
'''SelectionObserverFem'''
|
||||
class FemSelectionObserver:
|
||||
'''FemSelectionObserver'''
|
||||
def __init__(self, parseSelectionFunction, print_message=''):
|
||||
self.parseSelectionFunction = parseSelectionFunction
|
||||
FreeCADGui.Selection.addObserver(self)
|
|
@ -272,8 +272,8 @@ CmdFemConstraintBearing::CmdFemConstraintBearing()
|
|||
{
|
||||
sAppModule = "Fem";
|
||||
sGroup = QT_TR_NOOP("Fem");
|
||||
sMenuText = QT_TR_NOOP("Create FEM bearing constraint");
|
||||
sToolTipText = QT_TR_NOOP("Create FEM constraint for a bearing");
|
||||
sMenuText = QT_TR_NOOP("Constraint bearing");
|
||||
sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a bearing");
|
||||
sWhatsThis = "Fem_ConstraintBearing";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "fem-constraint-bearing";
|
||||
|
@ -313,8 +313,8 @@ CmdFemConstraintFixed::CmdFemConstraintFixed()
|
|||
{
|
||||
sAppModule = "Fem";
|
||||
sGroup = QT_TR_NOOP("Fem");
|
||||
sMenuText = QT_TR_NOOP("Create FEM fixed constraint");
|
||||
sToolTipText = QT_TR_NOOP("Create FEM constraint for a fixed geometric entity");
|
||||
sMenuText = QT_TR_NOOP("Constraint fixed");
|
||||
sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a fixed geometric entity");
|
||||
sWhatsThis = "Fem_ConstraintFixed";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "fem-constraint-fixed";
|
||||
|
@ -355,8 +355,8 @@ CmdFemConstraintForce::CmdFemConstraintForce()
|
|||
{
|
||||
sAppModule = "Fem";
|
||||
sGroup = QT_TR_NOOP("Fem");
|
||||
sMenuText = QT_TR_NOOP("Create FEM force constraint");
|
||||
sToolTipText = QT_TR_NOOP("Create FEM constraint for a force acting on a geometric entity");
|
||||
sMenuText = QT_TR_NOOP("constraint force");
|
||||
sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a force acting on a geometric entity");
|
||||
sWhatsThis = "Fem_ConstraintForce";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "fem-constraint-force";
|
||||
|
@ -399,8 +399,8 @@ CmdFemConstraintPressure::CmdFemConstraintPressure()
|
|||
{
|
||||
sAppModule = "Fem";
|
||||
sGroup = QT_TR_NOOP("Fem");
|
||||
sMenuText = QT_TR_NOOP("Create FEM pressure constraint");
|
||||
sToolTipText = QT_TR_NOOP("Create FEM constraint for a pressure acting on a face");
|
||||
sMenuText = QT_TR_NOOP("Constraint pressure");
|
||||
sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a pressure acting on a face");
|
||||
sWhatsThis = "Fem_ConstraintPressure";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "fem-constraint-pressure";
|
||||
|
@ -444,8 +444,8 @@ CmdFemConstraintGear::CmdFemConstraintGear()
|
|||
{
|
||||
sAppModule = "Fem";
|
||||
sGroup = QT_TR_NOOP("Fem");
|
||||
sMenuText = QT_TR_NOOP("Create FEM gear constraint");
|
||||
sToolTipText = QT_TR_NOOP("Create FEM constraint for a gear");
|
||||
sMenuText = QT_TR_NOOP("Constraint gear");
|
||||
sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a gear");
|
||||
sWhatsThis = "Fem_ConstraintGear";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "fem-constraint-gear";
|
||||
|
@ -485,8 +485,8 @@ CmdFemConstraintPulley::CmdFemConstraintPulley()
|
|||
{
|
||||
sAppModule = "Fem";
|
||||
sGroup = QT_TR_NOOP("Fem");
|
||||
sMenuText = QT_TR_NOOP("Create FEM pulley constraint");
|
||||
sToolTipText = QT_TR_NOOP("Create FEM constraint for a pulley");
|
||||
sMenuText = QT_TR_NOOP("Constraint pulley");
|
||||
sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a pulley");
|
||||
sWhatsThis = "Fem_ConstraintPulley";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "fem-constraint-pulley";
|
||||
|
@ -530,8 +530,8 @@ CmdFemConstraintDisplacement::CmdFemConstraintDisplacement()
|
|||
{
|
||||
sAppModule = "Fem";
|
||||
sGroup = QT_TR_NOOP("Fem");
|
||||
sMenuText = QT_TR_NOOP("Create FEM displacement constraint");
|
||||
sToolTipText = QT_TR_NOOP("Create FEM constraint for a displacement acting on a face");
|
||||
sMenuText = QT_TR_NOOP("Constraint displacement");
|
||||
sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a displacement acting on a face");
|
||||
sWhatsThis = "Fem_ConstraintDisplacement";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "fem-constraint-displacement";
|
||||
|
@ -718,8 +718,8 @@ CmdFemCreateNodesSet::CmdFemCreateNodesSet()
|
|||
{
|
||||
sAppModule = "Fem";
|
||||
sGroup = QT_TR_NOOP("Fem");
|
||||
sMenuText = QT_TR_NOOP("Define/create a nodes set...");
|
||||
sToolTipText = QT_TR_NOOP("Define/create a nodes set...");
|
||||
sMenuText = QT_TR_NOOP("Nodes set");
|
||||
sToolTipText = QT_TR_NOOP("Create a FEM mesh nodes set");
|
||||
sWhatsThis = "Fem_CreateNodesSet";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "fem-fem-mesh-create-node-by-poly";
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
<file>icons/fem-add-part.svg</file>
|
||||
<file>icons/fem-inp-editor.svg</file>
|
||||
<file>icons/fem-material.svg</file>
|
||||
<file>icons/fem-new-analysis.svg</file>
|
||||
<file>icons/fem-control-solver.svg</file>
|
||||
<file>icons/fem-purge-results.svg</file>
|
||||
<file>icons/fem-quick-analysis.svg</file>
|
||||
<file>icons/fem-run-solver.svg</file>
|
||||
<file>icons/fem-frequency-analysis.svg</file>
|
||||
<file>icons/fem-result.svg</file>
|
||||
<file>icons/fem-shell-thickness.svg</file>
|
||||
|
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
@ -55,9 +55,9 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
|||
Gui::ToolBarItem* root = StdWorkbench::setupToolBars();
|
||||
Gui::ToolBarItem* fem = new Gui::ToolBarItem(root);
|
||||
fem->setCommand("FEM");
|
||||
*fem << "Fem_NewMechanicalAnalysis"
|
||||
*fem << "Fem_Analysis"
|
||||
<< "Fem_SolverCalculix"
|
||||
<< "Fem_CreateFromShape"
|
||||
<< "Fem_MeshFromShape"
|
||||
<< "Fem_MechanicalMaterial"
|
||||
<< "Fem_BeamSection"
|
||||
<< "Fem_ShellThickness"
|
||||
|
@ -73,8 +73,8 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
|||
<< "Fem_ConstraintGear"
|
||||
<< "Fem_ConstraintPulley"
|
||||
<< "Separator"
|
||||
<< "Fem_SolverJobControl"
|
||||
<< "Fem_Quick_Analysis"
|
||||
<< "Fem_ControlSolver"
|
||||
<< "Fem_RunSolver"
|
||||
<< "Fem_PurgeResults"
|
||||
<< "Fem_ShowResult";
|
||||
return root;
|
||||
|
@ -87,9 +87,9 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
|||
Gui::MenuItem* fem = new Gui::MenuItem;
|
||||
root->insertItem(item, fem);
|
||||
fem->setCommand("&FEM");
|
||||
*fem << "Fem_NewMechanicalAnalysis"
|
||||
*fem << "Fem_Analysis"
|
||||
<< "Fem_SolverCalculix"
|
||||
<< "Fem_CreateFromShape"
|
||||
<< "Fem_MeshFromShape"
|
||||
<< "Fem_MechanicalMaterial"
|
||||
<< "Fem_BeamSection"
|
||||
<< "Fem_ShellThickness"
|
||||
|
@ -105,8 +105,8 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
|||
<< "Fem_ConstraintGear"
|
||||
<< "Fem_ConstraintPulley"
|
||||
<< "Separator"
|
||||
<< "Fem_SolverJobControl"
|
||||
<< "Fem_Quick_Analysis"
|
||||
<< "Fem_ControlSolver"
|
||||
<< "Fem_RunSolver"
|
||||
<< "Fem_PurgeResults"
|
||||
<< "Fem_ShowResult";
|
||||
|
||||
|
|
|
@ -46,16 +46,17 @@ class FemWorkbench (Workbench):
|
|||
import Fem
|
||||
import FemGui
|
||||
|
||||
import _CommandMechanicalShowResult
|
||||
import _CommandQuickAnalysis
|
||||
import _CommandPurgeFemResults
|
||||
import _CommandSolverJobControl
|
||||
import _CommandFemFromShape
|
||||
import _CommandNewMechanicalAnalysis
|
||||
import _CommandFemShellThickness
|
||||
import _CommandFemBeamSection
|
||||
import _CommandShowResult
|
||||
import _CommandRunSolver
|
||||
import _CommandPurgeResults
|
||||
import _CommandControlSolver
|
||||
|
||||
import _CommandMeshFromShape
|
||||
import _CommandAnalysis
|
||||
import _CommandShellThickness
|
||||
import _CommandBeamSection
|
||||
import _CommandMechanicalMaterial
|
||||
import _CommandFemSolverCalculix
|
||||
import _CommandSolverCalculix
|
||||
|
||||
import subprocess
|
||||
from platform import system
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#* *
|
||||
#***************************************************************************
|
||||
|
||||
__title__ = "Command New Mechanical Analysis"
|
||||
__title__ = "Command New Analysis"
|
||||
__author__ = "Juergen Riegel"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
|
@ -32,14 +32,14 @@ if FreeCAD.GuiUp:
|
|||
from PySide import QtCore
|
||||
|
||||
|
||||
class _CommandNewMechanicalAnalysis(FemCommands):
|
||||
"the Fem Analysis command definition"
|
||||
class _CommandAnalysis(FemCommands):
|
||||
"the Fem_Analysis command definition"
|
||||
def __init__(self):
|
||||
super(_CommandNewMechanicalAnalysis, self).__init__()
|
||||
super(_CommandAnalysis, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-analysis',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_NewMechanicalAnalysis", "New mechanical analysis"),
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_Analysis", "Analysis container"),
|
||||
'Accel': "N, A",
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_NewMechanicalAnalysis", "Create a new mechanical analysis")}
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_Analysis", "Creates a analysis container with standard solver CalculiX")}
|
||||
self.is_active = 'with_document'
|
||||
|
||||
def Activated(self):
|
||||
|
@ -47,7 +47,7 @@ class _CommandNewMechanicalAnalysis(FemCommands):
|
|||
FreeCADGui.addModule("FemGui")
|
||||
FreeCADGui.addModule("FemAnalysis")
|
||||
FreeCADGui.addModule("FemSolverCalculix")
|
||||
FreeCADGui.doCommand("FemAnalysis.makeFemAnalysis('MechanicalAnalysis')")
|
||||
FreeCADGui.doCommand("FemAnalysis.makeFemAnalysis('Analysis')")
|
||||
FreeCADGui.doCommand("FemGui.setActiveAnalysis(App.activeDocument().ActiveObject)")
|
||||
FreeCADGui.doCommand("FemSolverCalculix.makeFemSolverCalculix('CalculiX')")
|
||||
FreeCADGui.doCommand("FemGui.getActiveAnalysis().Member = FemGui.getActiveAnalysis().Member + [App.activeDocument().ActiveObject]")
|
||||
|
@ -63,4 +63,4 @@ class _CommandNewMechanicalAnalysis(FemCommands):
|
|||
FreeCADGui.Selection.clearSelection()
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
FreeCADGui.addCommand('Fem_NewMechanicalAnalysis', _CommandNewMechanicalAnalysis())
|
||||
FreeCADGui.addCommand('Fem_Analysis', _CommandAnalysis())
|
|
@ -20,7 +20,7 @@
|
|||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
__title__ = "_CommandFemBeamSection"
|
||||
__title__ = "_CommandBeamSection"
|
||||
__author__ = "Bernd Hahnebach"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
|
@ -33,14 +33,14 @@ if FreeCAD.GuiUp:
|
|||
from PySide import QtCore
|
||||
|
||||
|
||||
class _CommandFemBeamSection(FemCommands):
|
||||
class _CommandBeamSection(FemCommands):
|
||||
"The Fem_BeamSection command definition"
|
||||
def __init__(self):
|
||||
super(_CommandFemBeamSection, self).__init__()
|
||||
super(_CommandBeamSection, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-beam-section',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_BeamSection", "FEM Beam Cross Section Definition ..."),
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_BeamSection", "Beam cross section"),
|
||||
'Accel': "C, B",
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_BeamSection", "Creates a FEM Beam Cross Section")}
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_BeamSection", "Creates a FEM beam cross section")}
|
||||
self.is_active = 'with_analysis'
|
||||
|
||||
def Activated(self):
|
||||
|
@ -50,4 +50,4 @@ class _CommandFemBeamSection(FemCommands):
|
|||
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
FreeCADGui.addCommand('Fem_BeamSection', _CommandFemBeamSection())
|
||||
FreeCADGui.addCommand('Fem_BeamSection', _CommandBeamSection())
|
|
@ -20,7 +20,7 @@
|
|||
#* *
|
||||
#***************************************************************************
|
||||
|
||||
__title__ = "Command Mechanical Job Control"
|
||||
__title__ = "Command Control Solver"
|
||||
__author__ = "Juergen Riegel"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
|
@ -32,14 +32,14 @@ if FreeCAD.GuiUp:
|
|||
from PySide import QtCore
|
||||
|
||||
|
||||
class _CommandSolverJobControl(FemCommands):
|
||||
"the Fem JobControl command definition"
|
||||
class _CommandControlSolver(FemCommands):
|
||||
"the Fem_ControlSolver command definition"
|
||||
def __init__(self):
|
||||
super(_CommandSolverJobControl, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-new-analysis',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_SolverJobControl", "Start solver job control"),
|
||||
super(_CommandControlSolver, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-control-solver',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_ControlSolver", "Solver job control"),
|
||||
'Accel': "S, C",
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_SolverJobControl", "Dialog to start the calculation of the selected solver")}
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_ControlSolver", "Changes solver attributes and runs the calculations for the selected solver")}
|
||||
self.is_active = 'with_solver'
|
||||
|
||||
def Activated(self):
|
||||
|
@ -51,4 +51,4 @@ class _CommandSolverJobControl(FemCommands):
|
|||
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
FreeCADGui.addCommand('Fem_SolverJobControl', _CommandSolverJobControl())
|
||||
FreeCADGui.addCommand('Fem_ControlSolver', _CommandControlSolver())
|
|
@ -35,13 +35,13 @@ if FreeCAD.GuiUp:
|
|||
|
||||
|
||||
class _CommandMechanicalMaterial(FemCommands):
|
||||
"the Fem Material command definition"
|
||||
"the Fem_MechanicalMaterial command definition"
|
||||
def __init__(self):
|
||||
super(_CommandMechanicalMaterial, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-material',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_MechanicalMaterial", "Mechanical material..."),
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_MechanicalMaterial", "Mechanical material"),
|
||||
'Accel': "M, M",
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_MechanicalMaterial", "Creates or edit the mechanical material definition.")}
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_MechanicalMaterial", "Creates a mechanical material")}
|
||||
self.is_active = 'with_analysis'
|
||||
|
||||
def Activated(self):
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#* *
|
||||
#***************************************************************************
|
||||
|
||||
__title__ = "Commend Fem From Shape"
|
||||
__title__ = "Command Mesh From Shape"
|
||||
__author__ = "Juergen Riegel"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
|
@ -32,12 +32,13 @@ if FreeCAD.GuiUp:
|
|||
from PySide import QtCore
|
||||
|
||||
|
||||
class _CommandFemFromShape(FemCommands):
|
||||
class _CommandMeshFromShape(FemCommands):
|
||||
# the Fem_MeshFromShape command definition
|
||||
def __init__(self):
|
||||
super(_CommandFemFromShape, self).__init__()
|
||||
super(_CommandMeshFromShape, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-fem-mesh-from-shape',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_CreateFromShape", "Create FEM mesh"),
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_CreateFromShape", "Create FEM mesh from shape")}
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_MeshFromShape", "FEM mesh from shape"),
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_MeshFromShape", "Create a FEM volume mesh from a solid shape")}
|
||||
self.is_active = 'with_part_feature'
|
||||
|
||||
def Activated(self):
|
||||
|
@ -54,4 +55,4 @@ class _CommandFemFromShape(FemCommands):
|
|||
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
FreeCADGui.addCommand('Fem_CreateFromShape', _CommandFemFromShape())
|
||||
FreeCADGui.addCommand('Fem_MeshFromShape', _CommandMeshFromShape())
|
|
@ -33,13 +33,14 @@ if FreeCAD.GuiUp:
|
|||
from PySide import QtCore
|
||||
|
||||
|
||||
class _CommandPurgeFemResults(FemCommands):
|
||||
class _CommandPurgeResults(FemCommands):
|
||||
# the Fem_PurgeResults command definition
|
||||
def __init__(self):
|
||||
super(_CommandPurgeFemResults, self).__init__()
|
||||
super(_CommandPurgeResults, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-purge-results',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_PurgeResults", "Purge results"),
|
||||
'Accel': "S, S",
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_PurgeResults", "Purge results from an analysis")}
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_PurgeResults", "Purges all results from active analysis")}
|
||||
self.is_active = 'with_results'
|
||||
|
||||
def Activated(self):
|
||||
|
@ -49,4 +50,4 @@ class _CommandPurgeFemResults(FemCommands):
|
|||
self.hide_meshes_show_parts_constraints()
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
FreeCADGui.addCommand('Fem_PurgeResults', _CommandPurgeFemResults())
|
||||
FreeCADGui.addCommand('Fem_PurgeResults', _CommandPurgeResults())
|
|
@ -20,7 +20,7 @@
|
|||
#* *
|
||||
#***************************************************************************
|
||||
|
||||
__title__ = "Command Quick Analysis"
|
||||
__title__ = "Command Run Solver"
|
||||
__author__ = "Juergen Riegel"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
|
@ -32,13 +32,14 @@ if FreeCAD.GuiUp:
|
|||
from PySide import QtCore, QtGui
|
||||
|
||||
|
||||
class _CommandQuickAnalysis(FemCommands):
|
||||
class _CommandRunSolver(FemCommands):
|
||||
# the Fem_RunSolver command definition
|
||||
def __init__(self):
|
||||
super(_CommandQuickAnalysis, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-quick-analysis',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_Quick_Analysis", "Run CalculiX ccx"),
|
||||
super(_CommandRunSolver, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-run-solver',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_RunAnalysis", "Run solver calculations"),
|
||||
'Accel': "R, C",
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_Quick_Analysis", "Write .inp file and run CalculiX ccx")}
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_RunAnalysis", "Runs the calculations for the selected solver")}
|
||||
self.is_active = 'with_solver'
|
||||
|
||||
def Activated(self):
|
||||
|
@ -67,10 +68,10 @@ class _CommandQuickAnalysis(FemCommands):
|
|||
#FIXME proprer mesh refreshing as per FreeCAD.FEM_dialog settings required
|
||||
# or confirmation that it's safe to call restore_result_dialog
|
||||
#FIXME if an analysis has multiple results (frequence) the first result object found is restored
|
||||
import _TaskPanelResultControl
|
||||
tp = _TaskPanelResultControl._TaskPanelResultControl()
|
||||
import _TaskPanelShowResult
|
||||
tp = _TaskPanelShowResult._TaskPanelShowResult()
|
||||
tp.restore_result_dialog()
|
||||
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
FreeCADGui.addCommand('Fem_Quick_Analysis', _CommandQuickAnalysis())
|
||||
FreeCADGui.addCommand('Fem_RunSolver', _CommandRunSolver())
|
|
@ -20,7 +20,7 @@
|
|||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
__title__ = "_CommandFemShellThickness"
|
||||
__title__ = "_CommandShellThickness"
|
||||
__author__ = "Bernd Hahnebach"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
|
@ -33,14 +33,14 @@ if FreeCAD.GuiUp:
|
|||
from PySide import QtCore
|
||||
|
||||
|
||||
class _CommandFemShellThickness(FemCommands):
|
||||
class _CommandShellThickness(FemCommands):
|
||||
"The Fem_ShellThickness command definition"
|
||||
def __init__(self):
|
||||
super(_CommandFemShellThickness, self).__init__()
|
||||
super(_CommandShellThickness, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-shell-thickness',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_ShellThickness", "FEM Shell Plate Thickness Definition ..."),
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_ShellThickness", "Shell plate thickness"),
|
||||
'Accel': "C, S",
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_ShellThickness", "Creates a FEM Shell Thickness")}
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_ShellThickness", "Creates a FEM shell plate thickness")}
|
||||
self.is_active = 'with_analysis'
|
||||
|
||||
def Activated(self):
|
||||
|
@ -50,4 +50,4 @@ class _CommandFemShellThickness(FemCommands):
|
|||
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
FreeCADGui.addCommand('Fem_ShellThickness', _CommandFemShellThickness())
|
||||
FreeCADGui.addCommand('Fem_ShellThickness', _CommandShellThickness())
|
|
@ -20,7 +20,7 @@
|
|||
#* *
|
||||
#***************************************************************************
|
||||
|
||||
__title__ = "Command Mechanical Show Result"
|
||||
__title__ = "Command Show Result"
|
||||
__author__ = "Juergen Riegel"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
|
@ -32,14 +32,14 @@ if FreeCAD.GuiUp:
|
|||
from PySide import QtCore, QtGui
|
||||
|
||||
|
||||
class _CommandMechanicalShowResult(FemCommands):
|
||||
"the Fem JobControl command definition"
|
||||
class _CommandShowResult(FemCommands):
|
||||
"the Fem show reslult command definition"
|
||||
def __init__(self):
|
||||
super(_CommandMechanicalShowResult, self).__init__()
|
||||
super(_CommandShowResult, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-result',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_ShowResult", "Show result"),
|
||||
'Accel': "S, R",
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_ShowResult", "Show result information of an analysis")}
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_ShowResult", "Shows and visualizes selected result data")}
|
||||
self.is_active = 'with_results'
|
||||
|
||||
def Activated(self):
|
||||
|
@ -51,8 +51,8 @@ class _CommandMechanicalShowResult(FemCommands):
|
|||
|
||||
self.hide_parts_constraints_show_meshes()
|
||||
|
||||
import _TaskPanelResultControl
|
||||
taskd = _TaskPanelResultControl._TaskPanelResultControl()
|
||||
import _TaskPanelShowResult
|
||||
taskd = _TaskPanelShowResult._TaskPanelShowResult()
|
||||
FreeCADGui.Control.showDialog(taskd)
|
||||
|
||||
|
||||
|
@ -69,4 +69,4 @@ def get_results_object(sel):
|
|||
return None
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
FreeCADGui.addCommand('Fem_ShowResult', _CommandMechanicalShowResult())
|
||||
FreeCADGui.addCommand('Fem_ShowResult', _CommandShowResult())
|
|
@ -20,7 +20,7 @@
|
|||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
__title__ = "_CommandFemSolverCalculix"
|
||||
__title__ = "_CommandSolverCalculix"
|
||||
__author__ = "Bernd Hahnebach"
|
||||
__url__ = "http://www.freecadweb.org"
|
||||
|
||||
|
@ -33,14 +33,14 @@ if FreeCAD.GuiUp:
|
|||
from PySide import QtCore
|
||||
|
||||
|
||||
class _CommandFemSolverCalculix(FemCommands):
|
||||
class _CommandSolverCalculix(FemCommands):
|
||||
"The Fem_SolverCalculix command definition"
|
||||
def __init__(self):
|
||||
super(_CommandFemSolverCalculix, self).__init__()
|
||||
super(_CommandSolverCalculix, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-solver',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_SolverCalculix", "Create FEM Solver CalculiX ..."),
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_SolverCalculix", "Solver CalculiX"),
|
||||
'Accel': "S, C",
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_SolverCalculix", "Creates FEM Solver CalculiX")}
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_SolverCalculix", "Creates a FEM solver CalculiX")}
|
||||
self.is_active = 'with_analysis_without_solver'
|
||||
|
||||
def Activated(self):
|
||||
|
@ -50,4 +50,4 @@ class _CommandFemSolverCalculix(FemCommands):
|
|||
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
FreeCADGui.addCommand('Fem_SolverCalculix', _CommandFemSolverCalculix())
|
||||
FreeCADGui.addCommand('Fem_SolverCalculix', _CommandSolverCalculix())
|
|
@ -87,8 +87,8 @@ class _TaskPanelFemBeamSection:
|
|||
FreeCADGui.Selection.clearSelection()
|
||||
# start SelectionObserver and parse the function to add the References to the widget
|
||||
print_message = "Select Edges by single click on them to add them to the list"
|
||||
import SelectionObserverFem
|
||||
self.sel_server = SelectionObserverFem.SelectionObserverFem(self.selectionParser, print_message)
|
||||
import FemSelectionObserver
|
||||
self.sel_server = FemSelectionObserver.FemSelectionObserver(self.selectionParser, print_message)
|
||||
|
||||
def selectionParser(self, selection):
|
||||
# print('selection: ', selection[0].Shape.ShapeType, ' ', selection[0].Name, ' ', selection[1])
|
||||
|
|
|
@ -87,8 +87,8 @@ class _TaskPanelFemShellThickness:
|
|||
FreeCADGui.Selection.clearSelection()
|
||||
# start SelectionObserver and parse the function to add the References to the widget
|
||||
print_message = "Select Faces by single click on them to add them to the list"
|
||||
import SelectionObserverFem
|
||||
self.sel_server = SelectionObserverFem.SelectionObserverFem(self.selectionParser, print_message)
|
||||
import FemSelectionObserver
|
||||
self.sel_server = FemSelectionObserver.FemSelectionObserver(self.selectionParser, print_message)
|
||||
|
||||
def selectionParser(self, selection):
|
||||
# print('selection: ', selection[0].Shape.ShapeType, ' ', selection[0].Name, ' ', selection[1])
|
||||
|
|
|
@ -260,8 +260,8 @@ class _TaskPanelMechanicalMaterial:
|
|||
# start SelectionObserver and parse the function to add the References to the widget
|
||||
# TODO add a ToolTip with print_message if the mouse pointer is over addReference button
|
||||
print_message = "Select Edges and Faces by single click on them or Solids by double click on a Vertex to add them to the list"
|
||||
import SelectionObserverFem
|
||||
self.sel_server = SelectionObserverFem.SelectionObserverFem(self.selectionParser, print_message)
|
||||
import FemSelectionObserver
|
||||
self.sel_server = FemSelectionObserver.FemSelectionObserver(self.selectionParser, print_message)
|
||||
|
||||
def selectionParser(self, selection):
|
||||
# print('selection: ', selection[0].Shape.ShapeType, ' ', selection[0].Name, ' ', selection[1])
|
||||
|
|
|
@ -36,10 +36,10 @@ if FreeCAD.GuiUp:
|
|||
from PySide.QtGui import QApplication
|
||||
|
||||
|
||||
class _TaskPanelResultControl:
|
||||
'''The control for the displacement post-processing'''
|
||||
class _TaskPanelShowResult:
|
||||
'''The task panel for the post-processing'''
|
||||
def __init__(self):
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/TaskPanelShowDisplacement.ui")
|
||||
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/TaskPanelShowResult.ui")
|
||||
self.fem_prefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem")
|
||||
self.restore_result_settings_in_dialog = self.fem_prefs.GetBool("RestoreResultDialog", True)
|
||||
|
Loading…
Reference in New Issue
Block a user