Exported GLB is too large #1625
Replies: 2 comments
-
It is hard to say without seeing the STEP file. However, glTF/glb is a mesh-based format, and for a complex shape the mesh can get fairly large. You could try adjusting the https://github.com/CadQuery/cadquery/blob/master/cadquery/assembly.py#L468 |
Beta Was this translation helpful? Give feedback.
-
Hi everybody, im a bit late to the party. We faced the same issue and have no simple solution yet. @MenachemBerkovich When i came to the same line of code, i noticed that the GLB files were significant larger than our export based on the OCP stubs. In our first implementation we set the mergeFaces flag to true on the RWGltf_CafWriter, which gaves us the smaller glb files. OCCT API call for setting up the writer: cadquery implementation of the writer setup: So we noticed, that there is no parameter for forcing the writer to call SetMergeFaces true on the cadquery implementation. This could help to decrease the file sizes of GLTF/GLB if desired. @jmwright Wouldn't it be good to provide a additonal boolean parameter specifc for the GLTF/GLB conversion? As i understand there are already type specific parameters in the save method: Or am i missing something to "enable" the writer on the cadquery site to get to the desired behaviour? Were also in the need to get smaller files, this could be a nice feature 😊 |
Beta Was this translation helpful? Give feedback.
-
I have simple script to load some step file, and export it into glb file.
But the exported file is about one GB (!!!) While source step file is 77.2 MB only.
Why?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions