How can I subtract one Model3D object from another using HelixToolkit or 3D WPF?

1.4k Views Asked by At

I am using the HelixToolkit.Wpf library to create some graphics for my application. I know that Helix provides a CuttingPlanesGroup that gives you the ability to create images like this one: https://i.stack.imgur.com/VFQBC.jpg

But, the issue I am running into is that the CuttingPlanesGroup is a ModelVisual3D object, and I can't use that since I am already setting the content of my control to another ModelVisual3D.

So, is there a way, either with Helix or with general 3D WPF to subtract one 3D shape from another one? That way, I could just make a cylinder and a 3D rectangle, and subtract one from the other.

1

There are 1 best solutions below

0
On

If I understood correctly what you are looking for is "Constructive Solid Geometry" or simply how to perform boolean operations on solid 3D models. As far as I know helix-toolkit doesn't provide such functionality.

In this link Objo says they are not planning to add boolean ops. But this was 4 years ago. https://helixtoolkit.userecho.com/communities/1/topics/559-3d-boolean-operations

I needed similar functionality years ago ended up porting CSG.js to C#

https://evanw.github.io/csg.js/

There is a port on github now.

https://github.com/praeclarum/Csg