# How to add new dynamic modeler in source code?

**URL:** https://discourse.slicer.org/t/how-to-add-new-dynamic-modeler-in-source-code/18985
**Category:** Support
**Tags:** dynamic-modeler
**Created:** [July 30, 2021, 6:22am UTC](https://discourse.slicer.org/t/how-to-add-new-dynamic-modeler-in-source-code/18985 "2021-07-30T06:22:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![StephenLeePeng](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stephenleepeng/32/11892_2.png) [@StephenLeePeng](https://discourse.slicer.org/u/StephenLeePeng)
#### Post date: [July 30, 2021, 6:22am UTC](https://discourse.slicer.org/t/how-to-add-new-dynamic-modeler-in-source-code/18985/1 "2021-07-30T06:22:02Z")

</div>

Operating system: Ubuntu 18.04  
Slicer version: self-build, Slicer 4.13.0  
Expected behavior:  
As 3d Slicer’s “Dynamic Modeler” module don’t supply open surface cut function by now, If I want to develop a new tool named “surface cut”.  
But I found the related codes and classes(such as qSlicerDynamicModelerModuleWidget, vtkSlicerDynamicModelerPlaneCutTool, and so on) about Dynamic Modeler is in the “SurfaceToolbox” subdirectory of the SurfaceSlicer-SuperBuild-Debug.  
So where should I add new class and codes in the slicer source codes, rather than in the build direcotry?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/3/63a371d50abc38e0f45caf866334b77aa143c674.png)

---

<div class="post-metadata">

### Author: ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)
#### Post date: [July 30, 2021, 2:25pm UTC](https://discourse.slicer.org/t/how-to-add-new-dynamic-modeler-in-source-code/18985/2 "2021-07-30T14:25:31Z")

</div>

The SurfaceToolbox folder is a repository that is checked out from here: [GitHub - Slicer/SlicerSurfaceToolbox: Supports various cleanup and optimization processes on surface models](https://github.com/Slicer/SlicerSurfaceToolbox). If you want to add a new tool to the Slicer core, then you can contribute it there.

What functionality are you hoping to add with “surface cut”?

---

<div class="post-metadata">

### Author: ![StephenLeePeng](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stephenleepeng/32/11892_2.png) [@StephenLeePeng](https://discourse.slicer.org/u/StephenLeePeng)
#### Post date: [August 3, 2021, 8:08am UTC](https://discourse.slicer.org/t/how-to-add-new-dynamic-modeler-in-source-code/18985/3 "2021-08-03T08:08:11Z")

</div>

Thank you for reply.  
Now the surface cut function in the 3d Slicer is cut the model by the closed surface model. But I have to cut the model with the open surface generated by some surface control points. So existing surface cut func in the Dynamic Modeler module does not meet my requirement.
