osresearch / plotter-vision

Hidden Wireframe removal demo in p5.js
GNU General Public License v2.0
83 stars 17 forks source link

ASCII STL files are not handled #1

Closed osresearch closed 3 years ago

osresearch commented 3 years ago

Only binary STL files are currently supported, so the output from OpenSCAD is not always usable. It should be fairly easy to add a parser:

solid OpenSCAD_Model
  facet normal -0.0727553 -0.948536 -0.308198
    outer loop
      vertex -3.89628 -11.9915 -2.40803
      vertex -2.92811 -10.8633 -6.10875
      vertex -3.2793 -11.9442 -2.69932
    endloop
  endfacet
osresearch commented 3 years ago

Looks like recent openscad can provide binary output: https://github.com/openscad/openscad/pull/3381

osresearch commented 3 years ago

Tested with some random ones. Seems to work, but YMMV.