STL codec: should use binary file format
drayde opened this issue · comments
I suggest to use the binary format for STL generation, or make it configurable
We'll need to figure out how to add this option. For formats like gltf you can determine whether a binary or ASCII version is desired based on the file extension, but with STL that is not possible since the same file extension is used for both. Maybe there could be an --encoding
command line parameter that accepts binary
, ASCII
, utf-8
etc, which is then passed through to the codec, which can decide how to use that information.
I would opt for always saving binary STLs in a first step, as in most use cases this is what you would want
Arguments for keeping ASCII as the default, or at least giving the user the option to revert back to ASCII.
- Defaulting to binary would change existing behavior and could break existing systems that integrate cq-cli if they upgrade.
- When CQ changed from ASCII to binary as the default for STL, it broke some things downstream. Nothing major, but it did cause some confusion.
- cq-cli is designed to be used in pipelines for text transformations as well, which would be broken if defaulting to binary without a way to revert to ASCII.