diff --git a/src/Mod/Fem/FemGmshTools.py b/src/Mod/Fem/FemGmshTools.py index a528d4f295..7d2c50c1fc 100644 --- a/src/Mod/Fem/FemGmshTools.py +++ b/src/Mod/Fem/FemGmshTools.py @@ -231,7 +231,7 @@ class FemGmshTools(): # TODO: solids, faces, edges and vertexes don't seem to work together in one group, # some print or make them work together - # mesh groups and groups of analysis member + # mesh group objects if not self.mesh_obj.MeshGroupList: # print (' No mesh group objects.') pass @@ -244,8 +244,11 @@ class FemGmshTools(): self.group_elements[ge] = new_group_elements[ge] else: FreeCAD.Console.PrintError(" A group with this name exists already.\n") - if self.analysis: - print(' Group meshing.') + + # group meshing for analysis + analysis_group_meshing = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Fem/General").GetBool("AnalysisGroupMeshing", True) + if self.analysis and analysis_group_meshing: + print(' Group meshing for analysis.') self.group_nodes_export = True new_group_elements = FemMeshTools.get_analysis_group_elements(self.analysis, self.part_obj) for ge in new_group_elements: @@ -254,7 +257,8 @@ class FemGmshTools(): else: FreeCAD.Console.PrintError(" A group with this name exists already.\n") else: - print(' No anlysis members for group meshing.') + print(' No Group meshing for analysis.') + if self.group_elements: print(' {}'.format(self.group_elements)) diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui b/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui index 679ff4f126..1f20ad05f1 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui +++ b/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui @@ -23,7 +23,7 @@ - + 0 @@ -67,9 +67,6 @@ WorkingDir - - Gui::FileChooser::Directory - Mod/Fem/General @@ -99,7 +96,36 @@ - + + + Mesh + + + + + + + + Create mesh groups for analysis reference shpapes + + + true + + + AnalysisGroupMeshing + + + Mod/Fem/General + + + + + + + + + + Materials @@ -205,7 +231,7 @@ - + Results diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp index 1d6378a68c..f54a59163e 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp @@ -46,6 +46,8 @@ void DlgSettingsFemGeneralImp::saveSettings() { fc_analysis_working_directory->onSave(); + cb_analysis_group_meshing->onSave(); + cb_use_built_in_materials->onSave(); cb_use_mat_from_config_dir->onSave(); cb_use_mat_from_custom_dir->onSave(); @@ -60,6 +62,8 @@ void DlgSettingsFemGeneralImp::loadSettings() { fc_analysis_working_directory->onRestore(); + cb_analysis_group_meshing->onRestore(); + cb_use_built_in_materials->onRestore(); cb_use_mat_from_config_dir->onRestore(); cb_use_mat_from_custom_dir->onRestore();