# Geodesic lines on a Mesh

Is there a way to draw geodesic lines on a Mesh similar to the Geodesic component for surfaces?

Three methods I can immediately think of (depending on the mesh):

1. If it’s a subdivided quad-mesh, one can make NURBS patches and find geodesics on these (example here).

2. If it’s an evenly triangulated mesh, one can make a graph and find shortest paths (roughly equivalent to geodesics, example here).

3. Use Kangaroo to pull and minimize/relax a polyline onto the mesh (this should work with any mesh).

That said, there are explicit methods out there developed for mesh geodesics (like this one). Perhaps someone has implemented one of these in GH.

3 Likes

I implemented a method

And for the next question

4 Likes

The problem is that I need them to run along the mesh from edge to edge. I need to cut the mesh into smaller meshes via geodesic lines.

The first video is what I am trying to do actually

“If it’s a subdivided quad-mesh, one can make NURBS patches and find geodesics on these”

Exactly what i am trying to do. For some reason I fail. The geodesic component does not work if I join the Brep, nor I can manage a way to make the pathces insto a single surface.

It’s difficult to provide further advice without some examples (images/files) of what you’re dealing with. That said, the first video is based upon maintaining a mapping from the starting quad-faces, their subdivision/vertices, and the joined subdivided mesh that is form found. Using this mapping one can “reconstruct” these initial quads as NURBS surfaces downstream. I would probably go with a Kangaroo2 solution today though, I think, just much more fun

1 Like

The thing is that in order for the patterns to be as exact as possible, I need a geodesic line. Anything else simply does not do the trick. Too much error.

Here is an example file

Test Mesh.dxf (540.9 KB)

The mesh itself is in NET-TRIANGLES layer.

I also have the mesh U&V and edge layers.

I am really interested in the method from the video. Fits my idea very well. Where can I find more material on it?

PS: Just looked at your work. Amazing stuff! OMG!

I am checking your definition for mesh analysis. Absolutelly awesome!!!

But I get this error when I open the file:

I’m afraid we never really published anything on this method (can maybe see about digging it up). That said, just tested out using Kangaroo2 (an older version FYI, so might be slightly different with later versions), and that seems to work quite well, so maybe just go with that:

180323_K2_MeshGeodesic_00.gh (68.4 KB)

Cheers

5 Likes

That component implements the `networkx` Python module. There are several threads here and on the old GH forum on how to install this module, so have a search if you want to test out this option.

1 Like

Ok! Will do so asap! OMG thank you! Will play with the Kangaroo solution too. Brilliant!

Just had a bit more fun: how one might go about generating the rulings, meshing these, and unrolling this mesh (using Kangaroo for the unrolling as well):

180323_K2_MeshGeodesic_00.gh (70.5 KB)

10 Likes

I am having great fun with this. It is exactly what I was looking for! Thank you Anders. It is a pleasure learning stuff from you.

2 Likes

Hi, this approach seems pretty interesting, it uses the Heat Method. https://www.cs.cmu.edu/~kmcrane/Projects/HeatMethod/.
Apparently is faster and has a better precision

@AndersDeleuran this is really helpful, thanks for sharing!

1 Like

Worth noting for the heat method that on the page there is an example for Unity which can be readily translated into Rhino/Grasshopper C#

https://www.cs.cmu.edu/~kmcrane/Projects/HeatMethod/HeatMethodWindows.zip