Red Hat Bugzilla – Bug 1589520
Cura can not open a simple stl file generated by OpenSCAD
Last modified: 2018-10-31 09:46:59 EDT
Created attachment 1449667 [details]
Problematic stl file.
Description of problem:
I made a model using OpenSCAD and then tried to slice it in Cura but it can not load the model. I reduced the model to a simple test case that has the problem so it should be easy to reproduce.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Download the attached stl file (test.stl).
2. Open Cura.
3. Load the stl file to Cura.
I get error message:
Failed to load .../test.stl"
and exceptions thrown to terminal output. (... is just a placeholder for file path)
Cura loads the file just fine.
The stl is generated with following OpenSCAD source:
translate([0, 0, 10]) rotate([-90, 0, 0]) cube(10);
The rotation is the important part here and cube is just something simple to render. Translation is there to keep the model above 0 but it doesn't seem to make any difference. This stl file loads just fine with Cura 3.3.0 AppImage (and also versions 3.2.1 and 3.3.1) downloaded from Ultimaker Cura website so this is something specific to Fedora packaging of Cura.
Created attachment 1449668 [details]
Terminal output for Cura
Exception: Exception occurred while loading file /home/tomi/Dropbox/3D/test.stl
Traceback (most recent call last):
File "/usr/lib64/python3.6/site-packages/stl/stl.py", line 75, in load
fh, header, speedups=speedups)
File "/usr/lib64/python3.6/site-packages/stl/stl.py", line 218, in _load_ascii
return _speedups.ascii_read(fh, header)
File "stl/_speedups.pyx", line 129, in stl._speedups.ascii_read
RuntimeError: (0, "Can't read vertex (18:b'vertex 0 2.22045e-15 -10')")
Thanks for the report.
I can reproduce with cura. Yet fail to reproduce with pure python-numpy-stl :(
This is very similar to:
Tomi, as a workaround please convert your file to binary STL (for example in ADMeshGUI or admesh CLI).
*** Bug 1644657 has been marked as a duplicate of this bug. ***