CalculiX documentation tells that maximum alowed material name length
is 80 characters, so we have to respect that. Also ccx quietly fails if
that limit is not honoured.
Reported-by: bernd
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>
Identification of selected result item is no longer based
on the item string, but on a separate userData. This method
is language agnostic.
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
ccx crashes when a force has too many digits like this:
FemConstraintForce,2,1.5966711853290134e-18
but it's OK with that format:
FemConstraintForce,2,1.5966711853e-18
An example of ccx error:
*ERROR reading *CLOAD. Card image:
FEMCONSTRAINTFORCE,3,1.5966711853290134E-18
This commits adds formatting to make sure the numbers are within ccx
limits.
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Printing FEM console message could fail if ccx was compiled in March
and standard output contained double dotted a.
"You are using an executable made on Mi 4. Mär 19:49:02 CET 2015"
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit moves checking prerequisites to function. The function
is called before writing .inp file to make sure all required objects
are included in the analysis. "open editor" and "run ccx" buttons are
if check_prerequisites runs successfully.
Reported-by: wmayer
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>
Previous method was prone to UnicodeDecodeError. The try-catch for
UnicodeDecodeError stays in as additional safety net.
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>