Mitering Profiles with Solid Difference?

I am facing issue while performing the Solid Difference operation in Grasshopper.

Test.gh (135.8 KB)

In some cases, the operation removes the portion that I intend to keep and leaves the unwanted geometry, as shown in the attached screenshots. In other cases, the subtraction does not occur at all., I have attached the Grasshopper file I would appreciate your guidance on the correct workflow or any settings that may need to be checked.

Use Split Brep and pay attention to your data structure, i.e. don’t flatten everything.

Also, just sweep the profile around a rectangle?

Solid Difference will keep the portion that is on the side of the cutting surface for which the normal vector is positive.

This means that you a) have to be careful about the orientation of your cutters and b) you cannot use the same cutter on both horizontal and vertical pieces in a single operation (I’m assuming your intent is to mitre these pieces so they fit together).

This creates the mitered profiles with Ruled Surface:

Mitering Profiles with Solid Difference VR 1.gh (273.3 KB)