Hi, I could create a incenter subdivision algorithm. It creates 3 triangles per each one on the input data, each one of those triangles will include the incenter point and one side of the original triangle.
If someone thinks is useful I could make it available inside the Dynamic Modeler Subdivide tool. Please see picture below for before and after subdivision (left and right sides of the screenshot correspondingly)
I thought this could be useful to improve the WrapSolidify algorithm because it creates a new point in the middle of the earlier triangle (not over the already existing edges as vtkLinearSubdivision) because of this maybe the new point could intrude into a hole on the mesh to be wrapped
Ok. So, after working a bit, on this I realized I needed a remeshing algorithm not a subdivision algorithm. I did implement incenterRemeshing but it was not useful to improve the wrap solidy effect. Then I realized what I needed was isotropic remeshing. I was able to implement it.
I would be glad if someone tests this algorithm and gives feedback. See demo picture below:
Thanks for sharing, this looks interesting. Overall, looks similar to vtkSmoothPolyDataFilter: it keeps mesh topology the same, iteratively relaxes points to make the mesh more uniform. It may be possible that you can make the convergence significantly faster by tweaking the point position update rules.
Could you do some side-by-side comparison of vtkIsotropicRemeshing and vtkSmoothPolyDataFilter? In vtkSmoothPolyDataFilter set the input surface both as InputData and SourceData and set the number of iterations high. Setting the source data makes sure points move tangentially (on the surface), completely eliminating any shrinking. Setting the number of iteration high ensures that we can see the highest quality result that the filter can provide; later you can play with reducing the number of iterations and increasing the relaxation factor to speed up the processing. If you find that your update rule works much better then it could be added as an option to vtkSmoothPolyDataFilter instead of adding a completely new filter. It would reduce the amount of added code and it would allow combining your algorithm with all the features of vtkSmoothPolyDataFilter (constraining to source data, feature edges, boundary smoothing, error metric computations, double/float support, etc.).
It might be interesting to compare with vtkConstrainedSmoothingFilter, too. The filter is nice because it is highly parallelized and it allows setting custom smoothing constraints per point.
For wrap solidify: If you have concavities in the input segment then for a fair comparison you need to enable “Carve holes” (the hole size is similar to the hole size in the vtkFillHolesFilter). Please compare again with this option.
Making the mesh more uniform by a smoothing filter (your filter or vtkSmoothPolyDataFilter) instead of remeshing by converting to labelmap image could be a good idea. As I remember, we tried very similar ideas with you a few years ago and somehow the results were not better, but maybe we did not try this exactly. More testing would be useful.