# Need Support to display smooth Surface with Interactive Cutting through Model

**URL:** https://discourse.vtk.org/t/need-support-to-display-smooth-surface-with-interactive-cutting-through-model/14146
**Category:** Support
**Created:** [June 30, 2024, 4:48pm UTC](https://discourse.vtk.org/t/need-support-to-display-smooth-surface-with-interactive-cutting-through-model/14146 "2024-06-30T16:48:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Tom\_Schulcz](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/t/22d042/32.png) [@Tom\_Schulcz](https://discourse.vtk.org/u/Tom_Schulcz)
#### Post date: [June 30, 2024, 4:48pm UTC](https://discourse.vtk.org/t/need-support-to-display-smooth-surface-with-interactive-cutting-through-model/14146/1 "2024-06-30T16:48:47Z")

</div>

Hello together,

I wrote a small viewing application with vtk and now want to have a smooth display for curved surfaces of my dataset (UnstructuredGrid) which was loaded from a stl-file.  
I also want to be able to cut the model therefore i use vtkPlaneCutter to create the cutlines and vtkClipClosedSurface for the cutsurface.

 ![Smooth_cutdisplay_slow_on_interaction](https://discourse.vtk.org/uploads/default/original/2X/4/42e4f68fdb0b58d23738f2f49af21476b9376792.png)

Both works as I wanted but the normal extraction for the interactivly created cutsurface is to slow to work with it good (in an interactive way, by mouse move event).  
I discovered vtkTriangleMeshPointNormals which is way faster but with just exchanging the filter  
I get some strange view on the dataset.

 ![TriangleMeshPointNormals](https://discourse.vtk.org/uploads/default/original/2X/1/11a2bdae7e4f0ce4b06ad16c6e1d49b7f9604804.png)

Is there a step I missed out in order to display the dataset the same way as it was possible with vtkPolyDataNormals but using the faster vtkTriangleMeshPointNormals.

Is there a different way to achieve my goal?

Here is the code I used for the normals just exchanged the filter:  
 ![Data_TriangleMeshPointNormals](https://discourse.vtk.org/uploads/default/original/2X/3/30d52682dc5e83ce7edf72dd95f8c3214cf2fbe9.png)

 ![Cutsurface_code](https://discourse.vtk.org/uploads/default/original/2X/2/221bff181bdfd8b008e007407c96205ffe2634e9.png)

Looking forward to your response.  
Thank You

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [July 1, 2024, 12:24pm UTC](https://discourse.vtk.org/t/need-support-to-display-smooth-surface-with-interactive-cutting-through-model/14146/2 "2024-07-01T12:24:03Z")

</div>

Hello @Tom_Schulcz

> I discovered vtkTriangleMeshPointNormals which is way faster but with just exchanging the filter  
> I get some strange view on the dataset.

Are you certain the output of `vtkClipClosedSurface` contains only triangles?

Could you please share dataset?

---

<div class="post-metadata">

### Author: ![Tom\_Schulcz](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/t/22d042/32.png) [@Tom\_Schulcz](https://discourse.vtk.org/u/Tom_Schulcz)
#### Post date: [July 4, 2024, 10:09pm UTC](https://discourse.vtk.org/t/need-support-to-display-smooth-surface-with-interactive-cutting-through-model/14146/3 "2024-07-04T22:09:37Z")

</div>

Hello Jaswant,  
thank you for your reply. Yes they only contained triangles, but the dataset was indeed the cause. After your answer I tested with several other datasets from the standford site and all other datasets worked so that was the problem thank you for the hint.
