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.67k stars 516 forks source link

AMF serializer : should compress zip the XML for export #910

Open z3dev opened 3 years ago

z3dev commented 3 years ago

Expected Behavior

AMF by design is compressed (zip), with XML content. The AMF serializer should do this by default, and support an option to skip compression if requested.

Actual Behavior

AMF content is not compressed, only XML content.

Steps to Reproduce the Problem

  1. Create any 3D shape
  2. Select AMF from export formats
  3. Export
  4. Results are XML only

Specifications

hrgdavor commented 3 years ago

I would recommend fflate instead of jszip as it is much smaller and seems to be working well, supports multithreading.

multithreading is less important for 3mf or amf or svg as usually there is only one big main file to compress, and multi threading is only for when there are multiple files to compress.