Thanks Daniel!.I stepped through this nice definition a few days ago but came back and realized I was taking the remeshing for granted.
TriRemesh itself is giving me a valid mesh output in your file - it’s just the downstream part that needs to be rejigged a little to also work with creased meshes because the vertices along the crease appear twice, so they need to be properly matched with their dual cells like this:
sharp_edge_holes.gh (143.1 KB)
Also, here are 3 different simple ways to do the sharp edge, depending on what you are starting from:
sharp_edge.gh (385.0 KB)
If the shape is smooth apart from the crease you want to keep, you can just turn the option ‘Sharp’ on without setting the edges explicitly and it will detect them based on dihedral angle even if the mesh is all welded.
If you know that your input mesh is already unwelded along the crease, you can use that as a feature curve (If feature curves are set, you don’t need to also have ‘Sharp’ on).
Or if you are starting from an open mesh and filling the hole, you can keep the boundary of the open mesh and use that as a feature.
That’s weird… I get an invalid mesh…
While I can’t quite understand how you are manipulating the points from the mesh vertices and circles into lists of 4 for the mesh faces, I understand now that this needs to be done differently due to the vertices appearing twice along the crease. What goes on in between TriRemesh and ConMesh is hard to follow but I think I get it…
Starting with a mesh with a hole and using MEdges is much neater than sorting points to create the feature curve.
The C# calling M.FillHoles(); is useful!
Thanks for the explanations!
It looks like the problem with your file was the way you were removing the duplicate points along the crease with TT Toolbox (I didn’t have it installed before, so had just swapped in the standard Kangaroo DupPts component) and interpolating the curve through these points.
You had the tolerance set to 1.0 which is high relative to the spacing of the points, so many were getting combined, then you were interpolating these, resulting in a feature curve which didn’t actually touch the vertices of the mesh you were remeshing.
The downside of double clicking the canvas to choose components! I hadn’t realised it was TT Toolbox RemoveDups.
Thanks again