Opened 9 years ago
Closed 9 years ago
#452 closed defect (fixed)
STL bundle fails to correctly read written STL file
Reported by: | Greg Couch | Owned by: | Tom Goddard |
---|---|---|---|
Priority: | blocker | Milestone: | |
Component: | Input/Output | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
The STL bundle generates bad triangles when reading STL files ChimeraX has written. Meshlab has no problem reading them.
In bundles/stl/stl.py, if you comment out the line "from ._stl import stl_unpack" and use the Python version, then the file is read correctly. But numpy gives a deprecation warning:
stl.py:97: VisibleDeprecationWarning: converting an array with ndim > 0 to an index will result in an error in the future geom = input.read(tc*50) # 12 floats per triangle, plus 2 bytes padding.
So the bug appears to be in stl/_stl/stl.cpp. The testdata/two.stl file doesn't not exhibit this bug. So I've a attached a file that was generated from the surface of 1a0m.
Attachments (1)
Change History (2)
by , 9 years ago
comment:1 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed.
C++ code with 2 assignments on one line where one took the size of a map, and one add an element to the map. On Linux the map element was added before the size was take while on Mac the element was added after the size was taken.