# vtkDataSetSurfaceFilter and NonlinearSubdivisionLevel

**URL:** https://discourse.vtk.org/t/vtkdatasetsurfacefilter-and-nonlinearsubdivisionlevel/8646
**Category:** Development
**Created:** [June 2, 2022, 2:05pm UTC](https://discourse.vtk.org/t/vtkdatasetsurfacefilter-and-nonlinearsubdivisionlevel/8646 "2022-06-02T14:05:56Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![spyridon97](https://discourse.vtk.org/user_avatar/discourse.vtk.org/spyridon97/32/7069_2.png) [@spyridon97](https://discourse.vtk.org/u/spyridon97)
#### Post date: [June 2, 2022, 2:05pm UTC](https://discourse.vtk.org/t/vtkdatasetsurfacefilter-and-nonlinearsubdivisionlevel/8646/1 "2022-06-02T14:05:56Z")

</div>

Is anybody using vtkDataSetSurfaceFilter’s NonlinearSubdivisionLevel \> 1?

I am asking because i am currently working on speeding up vtkDataSetSurfaceFilter/vtkGeometryFilter and in the case where NonlinearSubdivisionLevel \> 1, additional datastructures are used which complicate things a lot, especially for multithreading computing.

---

<div class="post-metadata">

### Author: ![utkarshayachit](https://discourse.vtk.org/user_avatar/discourse.vtk.org/utkarshayachit/32/379_2.png) [@utkarshayachit](https://discourse.vtk.org/u/utkarshayachit)
#### Post date: [June 2, 2022, 2:15pm UTC](https://discourse.vtk.org/t/vtkdatasetsurfacefilter-and-nonlinearsubdivisionlevel/8646/2 "2022-06-02T14:15:13Z")

</div>

Yes. We use that in ParaView for non-linear cells. e.g. [here](https://discourse.paraview.org/t/higher-order-meshes-render-speckled/6108)

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cory.quammen/32/6751_2.png) [@cory.quammen](https://discourse.vtk.org/u/cory.quammen)
#### Post date: [June 2, 2022, 2:41pm UTC](https://discourse.vtk.org/t/vtkdatasetsurfacefilter-and-nonlinearsubdivisionlevel/8646/3 "2022-06-02T14:41:02Z")

</div>

Yes. Not only is it in use, we will likely be expanding its use in the future as higher-order cells are used more and more.

---

<div class="post-metadata">

### Author: ![spyridon97](https://discourse.vtk.org/user_avatar/discourse.vtk.org/spyridon97/32/7069_2.png) [@spyridon97](https://discourse.vtk.org/u/spyridon97)
#### Post date: [June 2, 2022, 2:46pm UTC](https://discourse.vtk.org/t/vtkdatasetsurfacefilter-and-nonlinearsubdivisionlevel/8646/4 "2022-06-02T14:46:43Z")

</div>

Thanks for letting me know!

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [June 2, 2022, 2:56pm UTC](https://discourse.vtk.org/t/vtkdatasetsurfacefilter-and-nonlinearsubdivisionlevel/8646/5 "2022-06-02T14:56:40Z")

</div>

This non-linear subdivision stuff is a real problem for vtkGeometryFilter / vtkDataSetSurfaceFilter - it throws a plateful of spaghetti into the mix (the design needs significant rework IMO). Spiros, if possible we should find a way to isolate this code into a helper method etc. We may have to give up some performance for these higher-order cells, or create a specialized filter for them, so that for the 99% of code that does not use them we get the performance we need out of these geometry filters.

---

<div class="post-metadata">

### Author: ![Yohann\_Bearzi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/yohann_bearzi/32/671_2.png) [@Yohann\_Bearzi](https://discourse.vtk.org/u/Yohann_Bearzi)
#### Post date: [June 2, 2022, 4:59pm UTC](https://discourse.vtk.org/t/vtkdatasetsurfacefilter-and-nonlinearsubdivisionlevel/8646/6 "2022-06-02T16:59:32Z")

</div>

@will.schroeder When you’re talking redesign, you’re talking about the higher order cell classes?

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [June 2, 2022, 5:59pm UTC](https://discourse.vtk.org/t/vtkdatasetsurfacefilter-and-nonlinearsubdivisionlevel/8646/7 "2022-06-02T17:59:30Z")

</div>

Take a quick look at vtkDataSetSurfaceFilter. If you follow it through, you can see the subdivision level really impacts the code, and attempts to optimize/speed it up. I just think we can do better 🙂
