Skip to content

Volumetric Subtraction unsupported? Shape::cut() function does not do the same thing as union() #1982

Description

@EnnFour

I want to make a volumetric subtraction (object B occupies some space in Object A: make Object B into air instead of material).
The Shape::cut() function just gives me a bunch of random looking shapes?
However, when I do the following:

        box = cadquery.Workplane().box(x_mm, y_mm, z_mm, centered=False)
       
        assembly = cadquery.Assembly()
        assembly.add(box, name="box")

        for index, cutout_location in enumerate(cutout_locations):
            cutout = MagazineCutout.create(spec.cutout)
            cutout.loc = cutout_location
            assembly.add(cutout, name=f"cut_{index}", color=cadquery.Color("red"))

        assembly.save("28jan.step")

All the wireframes show that my cutouts are in the correct position.
Modifying the code slightly to use the function box = box.cut(cutout) leaves me with garbage that sorta resembles the shape of the cutout but not quite.

I can't find reference to any other functions which permit volumetric subtraction. Is this not a supported feature?

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions