Skip to content

Exported GLB is too large #1624

Closed
Closed

Description

@MenachemBerkovich

I have simple script to load some step file, and export it into glb file.

file = cadquery.importers.importStep("E:\Inabbeet\Front 315_360 M9967.stp")
final_assembly = cadquery.Assembly(file)
final_assembly.save(path="expGlb.glb", exportType="GLB")

But the exported file is about one GB (!!!) While source step file is 77.2 MB only.
Why?
Thank you.

Activity

  1. jmwright commented on Jul 11, 2024

    @jmwright
    Member

    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 tolerance and angularTolerance parameters to see if you can decrease the size.

    https://github.com/CadQuery/cadquery/blob/master/cadquery/assembly.py#L468

  2. added
    question
    on Jul 11, 2024
  3. locked and limited conversation to collaborators on Jul 11, 2024
  4. converted this issue into a discussion #1625 on Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions