Bug 1589520 - Cura can not open a simple stl file generated by OpenSCAD
Summary: Cura can not open a simple stl file generated by OpenSCAD
Alias: None
Product: Fedora
Classification: Fedora
Component: cura
Version: 28
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
: 1644657 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2018-06-10 12:44 UTC by Tomi Leppänen
Modified: 2018-12-19 02:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-12-19 01:50:41 UTC
Type: Bug

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

Description Tomi Leppänen 2018-06-10 12:44:57 UTC
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 12:47:49 UTC
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 18:55:37 UTC
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 09:56:28 UTC
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 13:46:59 UTC
*** Bug 1644657 has been marked as a duplicate of this bug. ***

Comment 5 Miro Hrončok 2018-12-10 14:21:09 UTC
Fix ready.

Comment 6 Fedora Update System 2018-12-19 01:50:41 UTC
python-numpy-stl-2.8.0-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2018-12-19 02:28:08 UTC
python-numpy-stl-2.8.0-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

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