From 1030e1cc64dd8ffc02ea0c858c8950b56e8da7bc Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Thu, 20 Dec 2018 22:31:07 +0100 Subject: [PATCH] FEM: print some error if only one material object but this one has a reference shape --- src/Mod/Fem/femtools/ccxtools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mod/Fem/femtools/ccxtools.py b/src/Mod/Fem/femtools/ccxtools.py index 4341945f23..35d6ace65b 100644 --- a/src/Mod/Fem/femtools/ccxtools.py +++ b/src/Mod/Fem/femtools/ccxtools.py @@ -292,6 +292,10 @@ class FemToolsCcx(QtCore.QRunnable, QtCore.QObject): message += "Thermomechanical analysis: No ThermalExpansionCoefficient defined for at least one material.\n" # allowed to be 0.0 (in ccx) if 'SpecificHeat' not in mat_map: message += "Thermomechanical analysis: No SpecificHeat defined for at least one material.\n" # allowed to be 0.0 (in ccx) + if len(self.materials_linear) == 1: + mobj = self.materials_linear[0]['Object'] + if hasattr(mobj, 'References') and mobj.References: + FreeCAD.Console.PrintError('Only one material object, but this one has a reference shape. The reference shape will be ignored.\n') for m in self.materials_linear: has_nonlinear_material = False for nlm in self.materials_nonlinear: