View Issue Details

IDProjectCategoryView StatusLast Update
0004005FreeCADBugpublic2019-06-11 09:46
Reporterberndhahnebach Assigned Toberndhahnebach  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0004005: Material, self edited material cards could break importer and thus all material system
Descriptionif the first card line is the following the import breaks ...

# This is a FreeCAD material-card file

related code: https://github.com/FreeCAD/FreeCAD/blob/39e748229e67fa93e924e355c0ce0897c870d756/src/Mod/Material/importFCMat.py#L117-L136

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16878 (Git)
Build type: Release
Branch: master
Hash: 50f91840d677ba77d3a938d9ac0aa73f6a9f12d4
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Switzerland (de_CH)

such a line above is added if the card is exported with the depretiated exporter ... https://github.com/FreeCAD/FreeCAD/blob/39e748229e67fa93e924e355c0ce0897c870d756/src/Mod/Material/Material.py#L108
TagsNo tags attached.
FreeCAD Information

Activities

berndhahnebach

2019-06-06 07:59

developer   ~0013147

https://github.com/FreeCAD/FreeCAD/blob/39e748229e67fa93e924e355c0ce0897c870d756/src/Mod/Material/materialtools/cardutils.py#L149

if reading a card does not work all mat card path set up fails. Ther should be some check if reading fails, a warning will be printed and this card is just ignorded

berndhahnebach

2019-06-06 08:03

developer   ~0013148

If one of the materials directory is empty, a warning would be good too.


BTW: if one of the material directories does not exist, a error is printed. May be add the path to the error message and say that this path is ignored while the path does not exist.

berndhahnebach

2019-06-11 09:45

developer   ~0013182

https://github.com/FreeCAD/FreeCAD/commit/f68958cd07324b853c6614e3e6d965e87ddb0a31

https://github.com/FreeCAD/FreeCAD/commit/53010138733ae50ebd206ba6dbf6d40e54973824

Issue History

Date Modified Username Field Change
2019-06-06 07:55 berndhahnebach New Issue
2019-06-06 07:55 berndhahnebach Status new => assigned
2019-06-06 07:55 berndhahnebach Assigned To => berndhahnebach
2019-06-06 07:59 berndhahnebach Note Added: 0013147
2019-06-06 08:03 berndhahnebach Note Added: 0013148
2019-06-06 08:07 berndhahnebach Description Updated
2019-06-11 09:45 berndhahnebach Note Added: 0013182
2019-06-11 09:46 berndhahnebach Status assigned => closed
2019-06-11 09:46 berndhahnebach Resolution open => fixed