In general I found some more bugs. Here is a list:
Using a locally installed OpenSCAD (version 2021.01)
Errors:
1. whole object is rotated 90° around X-Axis
2. extra "lines" of Text (in Model)
3. extra "Layers (in Model)
Workaround:
1 Rotate Object after importing
2-3 can be eliminated by deleting these parts from Model-View
Using an AppImage of OpenScad (version 2022.02.25.ai11146 (git fb10c5dbf))
Errors:
1-3 as above
4 When used "linear_extrude( ... center = false ... )" or without parameter "center" inside the scad file:
Workaround:Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/.mount_FreeCADfpAec/usr/Mod/OpenSCAD/importCSG.py", line 130, in open
processcsg(tmpfile)
File "/tmp/.mount_FreeCADfpAec/usr/Mod/OpenSCAD/importCSG.py", line 192, in processcsg
result = parser.parse(f.read())
File "/tmp/.mount_FreeCADfpAec/usr/lib/python3.10/site-packages/ply/yacc.py", line 333, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File "/tmp/.mount_FreeCADfpAec/usr/lib/python3.10/site-packages/ply/yacc.py", line 1120, in parseopt_notrack
p.callable(pslice)
File "/tmp/.mount_FreeCADfpAec/usr/Mod/OpenSCAD/importCSG.py", line 835, in p_linear_extrude_with_transform
if p[3]['center']=='true' :
<class 'KeyError'>: 'center'
1-3 as above
4 Use only "linear_extrude( ... center = true ... )" in SCAD-file
Bugfix:
1-3 I have no idea where so search inside the source code to fix this
4 in Generell it should be sufficient to use
p[3].get('center','false')
instead of
p[3]['center']
For this I already had created a pull request (see https://github.com/FreeCAD/FreeCAD/pull/7301)
For reference I attached the scad-file that produces the Error(s) the line that produces the error 4 is marked.