curv3d / curv

a language for making art using mathematics
Apache License 2.0
1.14k stars 73 forks source link

GLTF export produces bad output #149

Open doug-moen opened 2 years ago

doug-moen commented 2 years ago

Describe the bug

  1. If you export a GLTF file with a large number of vertices, the output is corrupted. This appears to be caused by the fact that vertices in the GLTF file are represented using 16 bits, so the output is corrupt if there are more than 65536 vertices.
  2. The GLTF standard states that +Y is the vertical axis, while Curv (and 3MF, and the 3D printing industry) uses +Z as the vertical axis. So possibly the X/Z axes should be swapped when outputting GLTF.

To Reproduce

$ curv -o cube.gltf -Ovsize=0.01 -Ojit -x cube

CC: @lf94 @zeeyang

lf94 commented 1 year ago

Should we maybe reduce the scope of what formats curv should support due to small resources available to maintain it?