From 4932f17dc57eec8a91767add5c21a760138a7ac8 Mon Sep 17 00:00:00 2001 From: marioalexis84 <53127171+marioalexis84@users.noreply.github.com> Date: Sat, 24 Feb 2024 13:29:00 -0300 Subject: [PATCH] Fem: Enable checkbox for references mesh groups - fixes #10071 (#12437) --- src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui | 4 ++-- src/Mod/Fem/femmesh/meshtools.py | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui b/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui index ea264c56f8..0ec652f2ea 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui +++ b/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui @@ -273,13 +273,13 @@ - false + true Create mesh groups for analysis reference shapes (highly experimental) - true + false AnalysisGroupMeshing diff --git a/src/Mod/Fem/femmesh/meshtools.py b/src/Mod/Fem/femmesh/meshtools.py index d8ff9133f7..f694f1d3c6 100644 --- a/src/Mod/Fem/femmesh/meshtools.py +++ b/src/Mod/Fem/femmesh/meshtools.py @@ -1666,10 +1666,12 @@ def get_pressure_obj_faces( # How to find the orientation of a FEM mesh face? # https://forum.freecad.org/viewtopic.php?f=18&t=51898 else: - FreeCAD.Console.PrintError( - "Pressure on shell mesh at the moment only " - "supported for meshes with appropriate group data.\n" - ) + for sh, elems in femobj["Object"].References: + for e in elems: + meshfaces = femmesh.getFacesByFace(sh.getSubObject(e)) + for mf in meshfaces: + pressure_faces.append([mf, -1]) + return pressure_faces