Curves to follow mesh surface

I have “organic curves” which I want to follow a mesh surface. Meaning at the corners has to be sharp edges of the curves. Mesh closest point “almost” solves the issue except extra point has to be added to curves. Can it be done with some simple way or Kangaroo is needed to solve the problem?


curve to follow mesh.gh (134.5 KB)

I think what will be simplest depends a bit on what the stages before and after are.
If this is the same sort of curves from shortest walk on a mesh as your other thread, then it might make sense to do this shortest walk on this 3d box mesh, so it follows the creases automatically.
However, if you want to do a planar offset of the curves after, it might be tricky getting this to wrap around the sharp edges of the box properly starting from only the 3d curves, so you might want to generate the pattern flat, then crease it.

Yes it is from your shorteswalk+curve network solution. I was trying to follow the mesh but for me is not following at the corners, as you can see on the image. What do I do wrong?
SHORTEST WALK Daniel.gh (20.2 KB)

To keep the sharp edges during the remeshing it is better here if you connect the Brep directly.
Also for the graph smoothing, the points along these sharp edges need to be kept fixed:
shortestwalk_sharpedges.gh (22.3 KB)

1 Like

Did you changed something in the code regarding the curves distances to each other? The final curve network appears to be more equalized. See attached image.

Actually I cannot use the origal brep becuse it contains curved surfaces and the final element has to be flat. Therefore the curve network will not be exactly on the surface. Why brep is better than than mesh?

I have just discoverer that there is a sharp setting on Trimesh.

Hi @Balazs
I think I changed the target length for the meshing. Going from a coarse mesh to an extremely dense one can take a while. When the input is a Brep, it tries to initialize it so the starting mesh has roughly the right density. If you want a less equalized mesh, you can reduce the iterations, so it stops earlier.

You can create a mesh and provide that as input (and as you say, there is the ‘sharp’ option for preserving creases), but then the remesher has to detect the creases by angles, whereas when you input a Brep, it knows where the borders between different surfaces are, even if the crease angle is small.