Skip to content

Speed up vtkDataSetSurfaceFilter with subdivisions

Florian Maurin requested to merge vtkDataSetSurfaceFilterSubdivision into master

There are 4 commits, here is what they are doing:

  • In vtkDataSetSurfaceFilter, nonlinear elements are triangulated. For Bezier element, interpolation was performed for each corner of each triangle. Since a triangle corner is often shared with other triangle corners, we are doing unnecessary interpolations. The first commit implement the use the PointMap to check if a point has been already treated or not.

  • In the second commit, for nonlinear elements with nonlinear subdivision > 1, the surface is triangulated and GetInterpolatedPointId is called for each triangle corner. This function was before allocating each time a vector for the weights. We now move this allocation outside of this function, such that the allocation is done only once per unstructured grid. So the weight is now part of the function arguments. It means that the old function has been marked as VTK_DEPRECATED_IN_9_1_0

  • One month ago, I have submitted a MR to fix nonlinear subdivision for nonlinear curves. In the list of nonlinear curve elements, I have forgot VTK_CUBIC_LINE. This is now fixed by the 3rd commit.

  • In the first commit, the new implementation remove calls to a function defined for the Bezier elements. Since these functions are not used anymore, they are marked in this last commit as deprecated.

Merge request reports