OK, I got it working.
Now this starts to look very interesting. The algorithm is tough in that it doesn’t choke due to bad meshes and it seems that I can control the process programmatically.
This means for example that my originally bad meshes doesn’t get any better (…) but, that problem can be dealt with separately, with other tools. The big problem “out there” isn’t the fixing of bad meshes, instead it’s exactly this part - a reasonably good ShrinkWrapping tool.
In short - this component has a lot of potential and provides already as is" more than most other mesh tools, at least among free tools. I give it 8 out of 10 stars :
[¤|¤|¤|¤|¤|¤|¤|¤| | ]
One star missing due to speed and another one for some issues with fixed boundaries (“FixCurves” input).
In the picture below, compare the green “naked edge” with the remeshing result (black mesh). The bottom of the mesh was open and the algorithm tends to shrink such edges up along the surface, even double fold the surface (see the more dense part near the edge) and “sucking up” the (patched) bottom hole up into the mesh a bit. Fixed Vertices along this edge didn’t fix the problem.
Edit: Another problem I noticed was that inner “splinters” in the mesh affects the algorithm in that it seems it cannot fully determine which is the “outermost surface”. So it produces some strange craters (I made an algorithm for cleaning up such “bonemarrow” splinters, and starting from such a cleaned mesh I get the results shown here).
Fig 1. Remeshed :
Fig. 2: Original mesh:
I don’t know if the boundary problem can be enhanced in this apporach, but whatever you do, please maintain and enhance this ShrinkWrap component as a separate first class citizen because it does something rather unique.
I will definietly try using this component for my challenging project, so I will probably give some more feedback.
Many thumbs up!
Edit: I used the following configuration (0.05 tolerance and 0.5 mm edge length, and 40 iterations):
The original mesh
humerus_gh_cleaned.zip (195.0 KB)
The GH Definition:
Remesh_Shrinkwrap_RIL.gh (23.2 KB)