Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 1589520 - Cura can not open a simple stl file generated by OpenSCAD
Cura can not open a simple stl file generated by OpenSCAD
Status: NEW
Product: Fedora
Classification: Fedora
Component: cura (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miro Hrončok
Fedora Extras Quality Assurance
: 1644657 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2018-06-10 08:44 EDT by Tomi Leppänen
Modified: 2018-10-31 09:46 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Problematic stl file. (1.72 KB, text/plain)
2018-06-10 08:44 EDT, Tomi Leppänen
no flags Details
Terminal output for Cura (51.89 KB, text/plain)
2018-06-10 08:47 EDT, Tomi Leppänen
no flags Details

  None (edit)
Description Tomi Leppänen 2018-06-10 08:44:57 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):

How reproducible:

Steps to Reproduce:
1. Download the attached stl file (test.stl).
2. Open Cura.
3. Load the stl file to Cura.

Actual results:
I get error message:
"Invalid File
Failed to load .../test.stl"
and exceptions thrown to terminal output. (... is just a placeholder for file path)

Expected results:
Cura loads the file just fine.

Additional info:
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.
Comment 1 Tomi Leppänen 2018-06-10 08:47 EDT
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')")
Comment 2 Miro Hrončok 2018-06-10 14:55:37 EDT
Thanks for the report. 

I can reproduce with cura. Yet fail to reproduce with pure python-numpy-stl :(

This is very similar to:


Comment 3 Miro Hrončok 2018-06-12 05:56:28 EDT
Tomi, as a workaround please convert your file to binary STL (for example in ADMeshGUI or admesh CLI).
Comment 4 Miro Hrončok 2018-10-31 09:46:59 EDT
*** Bug 1644657 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.