View Issue Details

IDProjectCategoryView StatusLast Update
0002420FreeCADBugpublic2016-02-17 18:40
Reporterjouke Assigned To 
Status closedResolutionfixed 
Fixed in Version0.16 
Summary0002420: error with ccx_2.9
DescriptionLaunching CalculiX does not work when using version ccx_2.9
Steps To Reproducelaunch ccx
Additional InformationThe problem is related to the line in the ccx file defining Material parameters. If I change f.write('{\n}, '.format(YM_in_MPa)) to f.write('{}, '.format(YM_in_MPa)) on line 204 in all is well.
Not sur if this would work with older versions of ccx.

TagsNo tags attached.
FreeCAD Information



2016-01-26 15:10

administrator   ~0006757

A line f.write('{\n}, '.format(YM_in_MPa)) never existed in Or do you mean you changed line 204 from:
 f.write('{}, '.format(YM_in_MPa))
 f.write('{\n}, '.format(YM_in_MPa))
But '{\n}'.format is invalid and raises a key error in Python.


2016-01-27 08:01

reporter   ~0006760

You're right, sorry, I commented by head. This is what I did to make it work:
diff --git a/src/Mod/Fem/ b/src/Mod/Fem/
index 2ca3258..dba8cf7 100644
--- a/src/Mod/Fem/
+++ b/src/Mod/Fem/
@@ -202,7 +202,7 @@ class inp_writer:
             # write material properties
             f.write('*MATERIAL, NAME=' + mat_name + '\n')
             f.write('*ELASTIC \n')
- f.write('{}, \n'.format(YM_in_MPa))
+ f.write('{}, '.format(YM_in_MPa))
             density = FreeCAD.Units.Quantity(mat_obj.Material['Density'])
             density_in_tone_per_mm3 = float(density.getValueAs('t/mm^3'))


2016-01-27 10:40

administrator   ~0006761

First the code was as you suggested and the newline was added later for no obvious reason.

The commit that changed this is:

Related Changesets

FreeCAD: master 2f2e6e8f

2016-02-17 17:52:29

Bernd Hahnebach

Committer: wmayer Details Diff
FEM: infile fix, youngs modulus and poisons ratio

have to be in one line for ccx 2.9
Affected Issues
mod - src/Mod/Fem/ Diff File

Issue History

Date Modified Username Field Change
2016-01-26 13:05 jouke New Issue
2016-01-26 15:10 wmayer Note Added: 0006757
2016-01-26 15:10 wmayer Status new => feedback
2016-01-27 08:01 jouke Note Added: 0006760
2016-01-27 08:01 jouke Status feedback => new
2016-01-27 10:40 wmayer Note Added: 0006761
2016-02-17 18:39 wmayer Changeset attached => FreeCAD Master master 2f2e6e8f
2016-02-17 18:40 wmayer Status new => closed
2016-02-17 18:40 wmayer Resolution open => fixed
2016-02-17 18:40 wmayer Fixed in Version => 0.16