Skip to content

Assembly save mode=default vs mode=fused #1457

Closed
@ZTThomasOberthanner

Description

@ZTThomasOberthanner

My goal is to export objects into a stl-file. Afterwards these objects are processed using blender split by loose parts.

When reading the docs cadquery.Assembly.save it is possible to fuse all parts into a single one using mode=fused. But even using mode=default all objects are fused into a single part. Is this a bug or my misunderstanding?

These are 3 different assemblies, all made of two boxes:
image

import cadquery as cq

box = cq.Workplane().box(1, 1, 1)

assy_default = cq.Assembly(name="toplevel")
assy_default.add(box, name="box1")
assy_default.add(box, name="box2", loc=cq.Location((1, 0, 0)))
assy_default.save("boxes_default.stl", exportType='STL', mode='default')

assy_fused = cq.Assembly(name="toplevel")
assy_fused.add(box, name="box1", loc=cq.Location((0, 5, 0)))
assy_fused.add(box, name="box2", loc=cq.Location((1, 5, 0)))
assy_fused.save("boxes_fused.stl", exportType='STL', mode='fused')

assy_split = cq.Assembly(name="toplevel")
assy_split.add(box, name="box1", loc=cq.Location((0, 10, 0)))
assy_split.add(box, name="box2", loc=cq.Location((2, 10, 0)))
assy_split.save("boxes_split.stl", exportType='STL')

PS: I wanted to paste the output using CQ-editor, but got a ValueError: Unknown Format: STL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions