That function won't be used as there is a plan to merge material
handling with Arch wb and Arch wb already has material editor.
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
That commit fixes inconsistent behaviour of Young's modulus input field
units in FEM material dialog window.
Reported-by: sgrogan
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
ConfigParser changes option capital letters in keys to small letters.
That commit changes it to generate verbatim keys as read from FCMat
files. Also Section names are no longer used to generate material
dictionary.
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Adding material was using by default transient None material that
has no properties assigned. If use accepted that type of material
an attempt to write CalculiX input file was ending up with a crash.
Using built-in None material prevents that situation.
Reported-by: wmayer
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Defaulting to False was causing problems during migration. The default
checkbox of linked FEM preferences is True, but for the first time users
there was nothing stored in UseBuiltInMaterials, UseMaterialsFromConfigDir
and UseMaterialsFromCustomDir, so the materials were not showing up in
the material ComboBox.
Reported-by: wmayer
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
get_material_name provides material name in a safe way, so there is
no need to check in General_name exists in material definition
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
It doesn't make sense to pull preferences in __init__ for later use as
they change dependin on user action.
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
On-demand import is no longer good enough as we have 3 different
material directories and materials may have non-unique names.
A material is now identified by a full file path.
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Add icons to distinguish where the material is from. FreeCAD icon for
build-in materials, notmal material icon for materials from user
preferences directory which is "~/.FreeCAD/Materials" on linux or
from an user defined location defined in FEM preferences.
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
The "-->choose Material" has been replaced with a not defined material.
That makes setting/retrieving material to/from the object much easier
and allows user to have a "not defined" material. Previously it wasn't
possible to change i.e. form Steel to "not defined".
Signed-off-by: Przemo Firszt <przemo@firszt.eu>