FEM: GUI: pref: move CalculiX related preferences to CalculiX tab
This commit is contained in:
parent
4ea7fc6e89
commit
9aa9664c1a
|
@ -103,6 +103,11 @@ class FemCommands(object):
|
|||
for acnstrmesh in FemGui.getActiveAnalysis().Member:
|
||||
# if "Constraint" in acnstrmesh.TypeId:
|
||||
# acnstrmesh.ViewObject.Visibility = False
|
||||
fem_prefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem")
|
||||
hide_constraints = fem_prefs.GetBool("HideConstraint", False)
|
||||
if hide_constraints:
|
||||
if "Constraint" in acnstrmesh.TypeId:
|
||||
acnstrmesh.ViewObject.Visibility = False
|
||||
if "Mesh" in acnstrmesh.TypeId:
|
||||
aparttoshow = acnstrmesh.Name.replace("_Mesh", "")
|
||||
for apart in FreeCAD.activeDocument().Objects:
|
||||
|
|
|
@ -110,8 +110,8 @@ class FemToolsCcx(FemTools.FemTools):
|
|||
def setup_ccx(self, ccx_binary=None, ccx_binary_sig="CalculiX"):
|
||||
from platform import system
|
||||
if not ccx_binary:
|
||||
self.fem_prefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem")
|
||||
ccx_binary = self.fem_prefs.GetString("ccxBinaryPath", "")
|
||||
self.ccx_prefs = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Ccx")
|
||||
ccx_binary = self.ccx_prefs.GetString("ccxBinaryPath", "")
|
||||
if not ccx_binary:
|
||||
if system() == "Linux":
|
||||
ccx_binary = "ccx"
|
||||
|
|
|
@ -14,7 +14,16 @@
|
|||
<string>FEM</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout1">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
|
@ -95,133 +104,6 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_calculix">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>CalculiX</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetNoConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="cb_int_editor">
|
||||
<property name="text">
|
||||
<string>Use internal editor for .inp files</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>UseInternalEditor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gl_calculix">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="l_ext_editor">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>External editor:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="Gui::PrefFileChooser" name="fc_ext_editor" native="true">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ExternalEditorPath</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="Gui::PrefFileChooser" name="fc_ccx_binary" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="sizeIncrement">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Leave blank to use default CalculiX ccx binary file</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ccxBinaryPath</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="l_ccx_binary">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ccx binary</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_z88">
|
||||
<property name="sizePolicy">
|
||||
|
@ -304,170 +186,6 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_solver_params">
|
||||
<property name="title">
|
||||
<string>Default solver settings</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefComboBox" name="cb_analysis_type">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>148</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Default type on analysis</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>AnalysisType</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Static</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="Resources/Fem.qrc">
|
||||
<normaloff>:/icons/fem-new-analysis.svg</normaloff>:/icons/fem-new-analysis.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Frequency</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="Resources/Fem.qrc">
|
||||
<normaloff>:/icons/fem-frequency-analysis.svg</normaloff>:/icons/fem-frequency-analysis.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Thermomech</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="Resources/Fem.qrc">
|
||||
<normaloff>:/icons/fem-new-analysis.svg</normaloff>:/icons/fem-new-analysis.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="l_eigenmode_number">
|
||||
<property name="text">
|
||||
<string>Eigenmode number</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="l_type">
|
||||
<property name="text">
|
||||
<string>Type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="sb_eigenmode_number">
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>NumberOfEigenmode</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="l_eigenmode_high_limit">
|
||||
<property name="text">
|
||||
<string>High frequency limit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::PrefDoubleSpinBox" name="dsb_eigenmode_high_limit">
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>10000.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>EigenmodeHighLimit</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="l_eigenmode_low_limit">
|
||||
<property name="text">
|
||||
<string>Low frequency limit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="Gui::PrefDoubleSpinBox" name="dsb_eigenmode_low_limit">
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>10000.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>EigenmodeLowLimit</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="l_hz_1">
|
||||
<property name="text">
|
||||
<string>Hz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLabel" name="l_hz_2">
|
||||
<property name="text">
|
||||
<string>Hz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_materials">
|
||||
<property name="title">
|
||||
|
@ -617,6 +335,28 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="cb_hide_constraint">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide Constraints when plotting results</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>HideConstraint</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -641,6 +381,11 @@
|
|||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>Gui::PrefCheckBox</class>
|
||||
<extends>QCheckBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::FileChooser</class>
|
||||
<extends>QWidget</extends>
|
||||
|
@ -651,95 +396,11 @@
|
|||
<extends>Gui::FileChooser</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefSpinBox</class>
|
||||
<extends>QSpinBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefCheckBox</class>
|
||||
<extends>QCheckBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefDoubleSpinBox</class>
|
||||
<extends>QDoubleSpinBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="Resources/Fem.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>cb_int_editor</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>l_ext_editor</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>100</x>
|
||||
<y>47</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>99</x>
|
||||
<y>76</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cb_int_editor</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>fc_ext_editor</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>327</x>
|
||||
<y>54</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>323</x>
|
||||
<y>79</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cb_int_editor</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>l_ext_editor</receiver>
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>125</x>
|
||||
<y>49</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>120</x>
|
||||
<y>74</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cb_int_editor</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>fc_ext_editor</receiver>
|
||||
<slot>setDisabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>409</x>
|
||||
<y>50</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>406</x>
|
||||
<y>78</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cb_use_mat_from_custom_dir</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>555</width>
|
||||
<height>518</height>
|
||||
<height>628</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -16,21 +16,141 @@
|
|||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_calculix">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>CalculiX</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetNoConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="cb_int_editor">
|
||||
<property name="text">
|
||||
<string>Use internal editor for .inp files</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>UseInternalEditor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gl_calculix">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="l_ext_editor">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>External editor:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="Gui::PrefFileChooser" name="fc_ext_editor" native="true">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ExternalEditorPath</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="Gui::PrefFileChooser" name="fc_ccx_binary" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="sizeIncrement">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Leave blank to use default CalculiX ccx binary file</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>ccxBinaryPath</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="l_ccx_binary">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ccx binary</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_calculix_anpreferences">
|
||||
<property name="title">
|
||||
<string>Solver preferences</string>
|
||||
<string>Solver defaults</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_1">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gl_ccx_solver">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="l_ccx_numcpu">
|
||||
<property name="text">
|
||||
<string>Number of CPU's to use (Spooles only)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="sb_ccx_numcpu">
|
||||
<property name="minimum">
|
||||
|
@ -127,27 +247,64 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="l_hide_constraint">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="l_ccx_numcpu">
|
||||
<property name="text">
|
||||
<string>Hide Constraints when plotting results</string>
|
||||
<string>Number of CPU's to use (Spooles only)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="l_type">
|
||||
<property name="text">
|
||||
<string>Type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="Gui::PrefCheckBox" name="cb_hide_constraint">
|
||||
<property name="text">
|
||||
<string>Hide</string>
|
||||
<widget class="Gui::PrefComboBox" name="cb_analysis_type">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>148</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
<property name="toolTip">
|
||||
<string>Default type on analysis</string>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>HideConstraint</cstring>
|
||||
<cstring>AnalysisType</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem/Ccx</cstring>
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Static</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/icons/fem-new-analysis.svg</normaloff>:/icons/fem-new-analysis.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Frequency</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="Resources/Fem.qrc">
|
||||
<normaloff>:/icons/fem-frequency-analysis.svg</normaloff>:/icons/fem-frequency-analysis.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Thermomech</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>:/icons/fem-new-analysis.svg</normaloff>:/icons/fem-new-analysis.svg</iconset>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -158,7 +315,7 @@
|
|||
<item>
|
||||
<widget class="QGroupBox" name="thermal_analysis_params">
|
||||
<property name="title">
|
||||
<string>Thermo mechanical analysis settings</string>
|
||||
<string>Thermo mechanical defaults</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
|
@ -284,6 +441,117 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_solver_params">
|
||||
<property name="title">
|
||||
<string>Frequency defaults</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="1">
|
||||
<widget class="Gui::PrefSpinBox" name="sb_eigenmode_number">
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>NumberOfEigenmode</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="l_eigenmode_number">
|
||||
<property name="text">
|
||||
<string>Eigenmode number</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="l_eigenmode_high_limit">
|
||||
<property name="text">
|
||||
<string>High frequency limit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="Gui::PrefDoubleSpinBox" name="dsb_eigenmode_high_limit">
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>10000.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>EigenmodeHighLimit</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="l_eigenmode_low_limit">
|
||||
<property name="text">
|
||||
<string>Low frequency limit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="Gui::PrefDoubleSpinBox" name="dsb_eigenmode_low_limit">
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>10000.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
<property name="prefEntry" stdset="0">
|
||||
<cstring>EigenmodeLowLimit</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>Mod/Fem</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="l_hz_2">
|
||||
<property name="text">
|
||||
<string>Hz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLabel" name="l_hz">
|
||||
<property name="text">
|
||||
<string>Hz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -323,6 +591,16 @@
|
|||
<extends>QDoubleSpinBox</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::FileChooser</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>Gui/FileDialog.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Gui::PrefFileChooser</class>
|
||||
<extends>Gui::FileChooser</extends>
|
||||
<header>Gui/PrefWidgets.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="Resources/Fem.qrc"/>
|
||||
|
|
|
@ -47,36 +47,53 @@ void DlgSettingsFemCcxImp::saveSettings()
|
|||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath
|
||||
("User parameter:BaseApp/Preferences/Mod/Fem/Ccx");
|
||||
hGrp->SetInt("Solver", cmb_solver->currentIndex());
|
||||
|
||||
//OvG: Solver settings
|
||||
hGrp->SetInt("AnalysisType", cb_analysis_type->currentIndex());
|
||||
|
||||
sb_ccx_numcpu->onSave(); //Number of CPUs
|
||||
cmb_solver->onSave();
|
||||
cb_ccx_non_lin_geom->onSave();
|
||||
cb_hide_constraint->onSave();
|
||||
|
||||
|
||||
cb_static->onSave();
|
||||
sb_ccx_max_iterations->onSave(); //Max number of iterations
|
||||
dsb_ccx_initial_time_step->onSave(); //Initial time step
|
||||
dsb_ccx_analysis_time->onSave(); //Analysis time
|
||||
|
||||
cb_analysis_type->onSave();
|
||||
sb_eigenmode_number->onSave();
|
||||
dsb_eigenmode_high_limit->onSave();
|
||||
dsb_eigenmode_low_limit->onSave();
|
||||
|
||||
cb_int_editor->onSave();
|
||||
fc_ext_editor->onSave();
|
||||
fc_ccx_binary->onSave();
|
||||
}
|
||||
|
||||
void DlgSettingsFemCcxImp::loadSettings()
|
||||
{
|
||||
//OvG: Solver settings
|
||||
sb_ccx_numcpu->onRestore(); //Number of CPUs
|
||||
cmb_solver->onRestore();
|
||||
cb_ccx_non_lin_geom->onRestore();
|
||||
cb_hide_constraint->onRestore();
|
||||
|
||||
|
||||
cb_static->onRestore();
|
||||
sb_ccx_max_iterations->onRestore(); //Max number of iterations
|
||||
dsb_ccx_initial_time_step->onRestore(); //Initial time step
|
||||
dsb_ccx_analysis_time->onRestore(); //Analysis time
|
||||
|
||||
cb_analysis_type->onRestore();
|
||||
sb_eigenmode_number->onRestore();
|
||||
dsb_eigenmode_high_limit->onRestore();
|
||||
dsb_eigenmode_low_limit->onRestore();
|
||||
|
||||
cb_int_editor->onRestore();
|
||||
fc_ext_editor->onRestore();
|
||||
fc_ccx_binary->onRestore();
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath
|
||||
("User parameter:BaseApp/Preferences/Mod/Fem/Ccx");
|
||||
int index = hGrp->GetInt("Solver", 0);
|
||||
int index = hGrp->GetInt("Solver", 0);
|
||||
if (index > -1) cmb_solver->setCurrentIndex(index);
|
||||
index = hGrp->GetInt("AnalysisType", 0);
|
||||
if (index > -1) cb_analysis_type->setCurrentIndex(index);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,6 +102,9 @@ void DlgSettingsFemCcxImp::loadSettings()
|
|||
void DlgSettingsFemCcxImp::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
int c_index = cb_analysis_type->currentIndex();
|
||||
retranslateUi(this);
|
||||
cb_analysis_type->setCurrentIndex(c_index);
|
||||
}
|
||||
else {
|
||||
QWidget::changeEvent(e);
|
||||
|
|
|
@ -44,49 +44,34 @@ DlgSettingsFemImp::~DlgSettingsFemImp()
|
|||
|
||||
void DlgSettingsFemImp::saveSettings()
|
||||
{
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath
|
||||
("User parameter:BaseApp/Preferences/Mod/Fem");
|
||||
hGrp->SetInt("AnalysisType", cb_analysis_type->currentIndex());
|
||||
|
||||
fc_analysis_working_directory->onSave();
|
||||
cb_int_editor->onSave();
|
||||
fc_ext_editor->onSave();
|
||||
fc_ccx_binary->onSave();
|
||||
|
||||
fc_z88_binary->onSave();
|
||||
cb_analysis_type->onSave();
|
||||
sb_eigenmode_number->onSave();
|
||||
dsb_eigenmode_high_limit->onSave();
|
||||
dsb_eigenmode_low_limit->onSave();
|
||||
|
||||
cb_use_built_in_materials->onSave();
|
||||
cb_use_mat_from_config_dir->onSave();
|
||||
cb_use_mat_from_custom_dir->onSave();
|
||||
fc_custom_mat_dir->onSave();
|
||||
|
||||
cb_restore_result_dialog->onSave();
|
||||
cb_keep_results_on_rerun->onSave();
|
||||
cb_hide_constraint->onSave();
|
||||
}
|
||||
|
||||
void DlgSettingsFemImp::loadSettings()
|
||||
{
|
||||
fc_analysis_working_directory->onRestore();
|
||||
cb_int_editor->onRestore();
|
||||
fc_ext_editor->onRestore();
|
||||
fc_ccx_binary->onRestore();
|
||||
|
||||
fc_z88_binary->onRestore();
|
||||
cb_analysis_type->onRestore();
|
||||
sb_eigenmode_number->onRestore();
|
||||
dsb_eigenmode_high_limit->onRestore();
|
||||
dsb_eigenmode_low_limit->onRestore();
|
||||
|
||||
cb_use_built_in_materials->onRestore();
|
||||
cb_use_mat_from_config_dir->onRestore();
|
||||
cb_use_mat_from_custom_dir->onRestore();
|
||||
fc_custom_mat_dir->onRestore();
|
||||
|
||||
cb_restore_result_dialog->onRestore();
|
||||
cb_keep_results_on_rerun->onRestore();
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath
|
||||
("User parameter:BaseApp/Preferences/Mod/Fem");
|
||||
int index = hGrp->GetInt("AnalysisType", 0);
|
||||
if (index > -1) cb_analysis_type->setCurrentIndex(index);
|
||||
cb_hide_constraint->onRestore();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -95,9 +80,6 @@ void DlgSettingsFemImp::loadSettings()
|
|||
void DlgSettingsFemImp::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
int c_index = cb_analysis_type->currentIndex();
|
||||
retranslateUi(this);
|
||||
cb_analysis_type->setCurrentIndex(c_index);
|
||||
}
|
||||
else {
|
||||
QWidget::changeEvent(e);
|
||||
|
|
|
@ -47,7 +47,7 @@ class _FemSolverCalculix():
|
|||
|
||||
obj.addProperty("App::PropertyEnumeration", "AnalysisType", "Fem", "Type of the analysis")
|
||||
obj.AnalysisType = FemToolsCcx.FemToolsCcx.known_analysis_types
|
||||
analysis_type = fem_prefs.GetInt("AnalysisType", 0)
|
||||
analysis_type = ccx_prefs.GetInt("AnalysisType", 0)
|
||||
obj.AnalysisType = FemToolsCcx.FemToolsCcx.known_analysis_types[analysis_type]
|
||||
|
||||
known_geom_nonlinear_types = ["linear", "nonlinear"]
|
||||
|
@ -60,16 +60,16 @@ class _FemSolverCalculix():
|
|||
obj.GeometricalNonlinearity = known_geom_nonlinear_types[0] # linear
|
||||
|
||||
obj.addProperty("App::PropertyIntegerConstraint", "NumberOfEigenmodes", "Fem", "Number of modes for frequency calculations")
|
||||
noe = fem_prefs.GetInt("NumberOfEigenmodes", 10)
|
||||
noe = ccx_prefs.GetInt("NumberOfEigenmodes", 10)
|
||||
obj.NumberOfEigenmodes = (noe, 1, 100, 1)
|
||||
|
||||
obj.addProperty("App::PropertyFloatConstraint", "EigenmodeLowLimit", "Fem", "Low frequency limit for eigenmode calculations")
|
||||
# Not yet in prefs, so it will always default to 0.0
|
||||
ell = fem_prefs.GetFloat("EigenmodeLowLimit", 0.0)
|
||||
ell = ccx_prefs.GetFloat("EigenmodeLowLimit", 0.0)
|
||||
obj.EigenmodeLowLimit = (ell, 0.0, 1000000.0, 10000.0)
|
||||
|
||||
obj.addProperty("App::PropertyFloatConstraint", "EigenmodeHighLimit", "Fem", "High frequency limit for eigenmode calculations")
|
||||
ehl = fem_prefs.GetFloat("EigenmodeHighLimit", 1000000.0)
|
||||
ehl = ccx_prefs.GetFloat("EigenmodeHighLimit", 1000000.0)
|
||||
obj.EigenmodeHighLimit = (ehl, 0.0, 1000000.0, 10000.0)
|
||||
|
||||
def execute(self, obj):
|
||||
|
|
Loading…
Reference in New Issue
Block a user