View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002420 | FreeCAD | Bug | public | 2016-01-26 13:05 | 2016-02-17 18:40 |
Reporter | jouke | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 0.16 | ||||
Summary | 0002420: error with ccx_2.9 | ||||
Description | Launching CalculiX does not work when using version ccx_2.9 | ||||
Steps To Reproduce | launch ccx | ||||
Additional Information | The 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 ccxInpWriter.py all is well. Not sur if this would work with older versions of ccx. Cheers | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
|
A line f.write('{\n}, '.format(YM_in_MPa)) never existed in ccxInpWriter.py. Or do you mean you changed line 204 from: f.write('{}, '.format(YM_in_MPa)) to f.write('{\n}, '.format(YM_in_MPa)) ? But '{\n}'.format is invalid and raises a key error in Python. |
|
You're right, sorry, I commented by head. This is what I did to make it work: diff --git a/src/Mod/Fem/ccxInpWriter.py b/src/Mod/Fem/ccxInpWriter.py index 2ca3258..dba8cf7 100644 --- a/src/Mod/Fem/ccxInpWriter.py +++ b/src/Mod/Fem/ccxInpWriter.py @@ -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)) f.write('{0:.3f}\n'.format(PR)) density = FreeCAD.Units.Quantity(mat_obj.Material['Density']) density_in_tone_per_mm3 = float(density.getValueAs('t/mm^3')) |
|
First the code was as you suggested and the newline was added later for no obvious reason. The commit that changed this is: https://github.com/FreeCAD/FreeCAD/commit/d380187ef319d5475d97f3f627e1647e4612c3b6#diff-11a4664f2e3b82ce921288e8c5fe9708L125 |
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 |