jscad / OpenJSCAD.org

JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
https://openjscad.xyz/
MIT License
2.58k stars 505 forks source link

stl-deserializer having issues with some STLs #1333

Open tsdexter opened 3 months ago

tsdexter commented 3 months ago

Expected Behavior

STL should import fine

Actual Behavior

Importing some STLs is resulting in many bad triangle vertice coords/normal logs and error: point XX must be an array of X, Y, Z values

Steps to Reproduce the Problem

  1. visit example with file imports: https://codesandbox.io/p/sandbox/jscad-react-js-demo-forked-hfgxh8
  2. import JSCAD logo (exported from jscad.app) - this imports fine: jscad.zip
  3. import STL from non-working-stl.stl and see errors - STL comes from thingiverse 4inParachuteClip_femaleClip_2.stl non-working-stl.stl.zip

Specifications

z3dev commented 3 months ago

@tsdexter thanks for the detailed information.

i tried the STL files (from thingiverse), and both loaded into openjscad.xyz

so there may be some other issue with the loading of the file contents, etc.

tsdexter commented 3 months ago

@z3dev how do you load files into openjscad.xyz? That could be helpful for me when debugging further

z3dev commented 3 months ago

Just drag and drop the STL file to the website.

I'll try a few other examples tomorrow.

tsdexter commented 2 months ago

@z3dev easy enough... I'll also take a look through the web UI stuff to see what I'm doing differently