# Trimming normal to boundary

**URL:** <https://discourse.slicer.org/t/trimming-normal-to-boundary/34791>\
**Category:** VMTK\
**Created:** [March 8, 2024, 8:11pm UTC](https://discourse.slicer.org/t/trimming-normal-to-boundary/34791 "2024-03-08T20:11:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beth\_Thompson](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/beth_thompson/32/69582_2.png) [@Beth\_Thompson](https://discourse.slicer.org/u/Beth_Thompson)\
**Post date:** [March 8, 2024, 8:11pm UTC](https://discourse.slicer.org/t/trimming-normal-to-boundary/34791/1 "2024-03-08T20:11:50Z")

</div>

Hi,

I have a 3D model of a pulmonary artery generated in SimVascular. I am trying to add extensions to it, but first I need to clip the ends to open it. I would like to trim the ends just the tiniest bit to open them, and it would be ideal if this were done perpendicular to the inlet/outlet face. I’ve done this manually but I find it rather tedious (can do this if necessary, but it seems like VMTK would have the functionality to clip a small distance perpendicular to normal).

I’ve tried using the tutorial here: [Prepare a surface for mesh generation | vmtk - the Vascular Modelling Toolkit](http://www.vmtk.org/tutorials/SurfaceForMeshing.html)  
to automatically clip, but I cannot figure out its behavior as it seems to clip randomly. I’ve changed the numberofendpointspheres from 1 to 3, but vmtk freezes when I try to do 4 or more endpoint spheres.

I’ve also tried using “vmtksurfaceendclipper,” but it freezes too.

Another method I tried was to delete the caps in SimVascular, and then add flow extensions to that model in VMTK. However, the resulting vtp ended up with non-triangular elements, somehow? Which made simvascular crash.

Does anyone have advice for how to make this work? Experience with adding flow extensions and re-importing into Simvascular?

Thank you!

---

<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:** [March 8, 2024, 8:16pm UTC](https://discourse.slicer.org/t/trimming-normal-to-boundary/34791/2 "2024-03-08T20:16:44Z")

</div>

Maybe @chir.set can help. He has exposed several VMTK features in 3D Slicer’s VMTK extension - even a [vessel clipping module](https://github.com/vmtk/SlicerExtension-VMTK/blob/master/Docs/BranchClipper.md) recently (although you need end clipping not branch clipping).

Alternatively, you can also try Dynamic Modeler module in 3D Slicer. It has a number of clipping tools that may be usable. If the mesh integrity is good then automatically aligning the clipping plane could be automated easily.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [March 8, 2024, 8:49pm UTC](https://discourse.slicer.org/t/trimming-normal-to-boundary/34791/3 "2024-03-08T20:49:08Z")

</div>

> [@lassoan](#):
>
> Maybe @chir.set can help.

Please check [this thread](https://discourse.slicer.org/t/vmtk-surface-clipping-contribution/30456/7) throughout.

@DavidM wrote a [module](https://github.com/dmolony3/ClipVessel) that does just that.

Alternatively, other manual methods are suggested in the [thread](https://discourse.slicer.org/t/vmtk-surface-clipping-contribution/30456) pointed to.
