# New experimental feature: Boolean operations (union, intersection, difference) on meshes

**URL:** <https://discourse.slicer.org/t/new-experimental-feature-boolean-operations-union-intersection-difference-on-meshes/16048>\
**Category:** Support\
**Tags:** feature\
**Created:** [February 17, 2021, 11:56pm UTC](https://discourse.slicer.org/t/new-experimental-feature-boolean-operations-union-intersection-difference-on-meshes/16048 "2021-02-17T23:56:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 17, 2021, 11:56pm UTC](https://discourse.slicer.org/t/new-experimental-feature-boolean-operations-union-intersection-difference-on-meshes/16048/1 "2021-02-17T23:56:37Z")

</div>

We have added a new module - **Combine models** - to _Sandbox extension_ to compute union, intersection, or subtraction operations on models (surface meshes).

This can be used to construct surgical guides and various other patient-specific devices by combining patient-specific meshes with CAD-designed parts.

See short demo here:

[![](https://img.youtube.com/vi/2MOAk2oNbKw/maxresdefault.jpg "Combine patient and CAD models in 3D Slicer using union/intersection/difference operations") ](https://www.youtube.com/watch?v=2MOAk2oNbKw)

Although Segment Editor can also combine models using Logical operators effect, this effect requires conversion of the mesh to a labelmap representation. Meshes that contain small, sharp features requires very fine resolution labelmap, resulting in high memory usage and long computation times.

The module relies on [vtkbool](https://github.com/zippy84/vtkbool) package instead of VTK’s built-in Boolean operations filter, because vtkbool appears to be much more stable.

We would like to hear from users if these operations work well. If they do, then the feature will be made available in Slice core (as a new tool in Dynamic modeler module).

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 18, 2021, 12:03am UTC](https://discourse.slicer.org/t/new-experimental-feature-boolean-operations-union-intersection-difference-on-meshes/16048/2 "2021-02-18T00:03:09Z")

</div>

@mikebind and other 3D printing folks - we would like to hear from you. Do you find this feature useful? What can we do further improve your workflows?

---

<div class="post-metadata">

**Author:** ![mikebind](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@mikebind](https://discourse.slicer.org/u/mikebind)\
**Post date:** [February 23, 2021, 10:06pm UTC](https://discourse.slicer.org/t/new-experimental-feature-boolean-operations-union-intersection-difference-on-meshes/16048/3 "2021-02-23T22:06:27Z")

</div>

Thanks for tagging, I’ve passed this on to my 3D printer colleague.

---

<div class="post-metadata">

**Author:** ![Selva](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@Selva](https://discourse.slicer.org/u/Selva)\
**Post date:** [February 24, 2021, 4:47am UTC](https://discourse.slicer.org/t/new-experimental-feature-boolean-operations-union-intersection-difference-on-meshes/16048/4 "2021-02-24T04:47:17Z")

</div>

@lassoan where can I install this pls

It does not come up with extensions?

Thanks

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 24, 2021, 5:39am UTC](https://discourse.slicer.org/t/new-experimental-feature-boolean-operations-union-intersection-difference-on-meshes/16048/5 "2021-02-24T05:39:09Z")

</div>

Sandbox extension shows up in the Examples category (you can also search for its name).

---

<div class="post-metadata">

**Author:** ![Selva](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@Selva](https://discourse.slicer.org/u/Selva)\
**Post date:** [February 24, 2021, 7:51am UTC](https://discourse.slicer.org/t/new-experimental-feature-boolean-operations-union-intersection-difference-on-meshes/16048/6 "2021-02-24T07:51:48Z")

</div>

This is really helpful for custom designed implants

And even studying deformity cotrrection surgery

But I cannot visualise the output model

---

<div class="post-metadata">

**Author:** ![John\_Moore](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/john_moore/32/8402_2.png) [@John\_Moore](https://discourse.slicer.org/u/John_Moore)\
**Post date:** [March 1, 2021, 12:43am UTC](https://discourse.slicer.org/t/new-experimental-feature-boolean-operations-union-intersection-difference-on-meshes/16048/7 "2021-03-01T00:43:31Z")

</div>

I’ve only used it a few times so far, but this is a very helpful feature for combining multiple segments, or adding labels to parts created in Slicer.

Prior to this functionality, I had to train people in using something like Meshmixer or Blender, in addition to Slicer. This simplifies the rapid prototyping workflow quite a lot. Thanks.

---

<div class="post-metadata">

**Author:** ![Dexter777](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dexter777/32/6118_2.png) [@Dexter777](https://discourse.slicer.org/u/Dexter777)\
**Post date:** [March 3, 2021, 2:48am UTC](https://discourse.slicer.org/t/new-experimental-feature-boolean-operations-union-intersection-difference-on-meshes/16048/8 "2021-03-03T02:48:30Z")

</div>

Thank you. I found a Perk Lab video 3D Slicer: Dynamic Modeler - Parametric Surface Editing for Biomedical Applications that will be helpful as well. And I installed the Sandbox extension. This should streamline our process. I’ll let you know how it works. Thanks.
