Mapping onto Quads Meshes and Nurbs

conformal_flatten.gh (60.8 KB)
mapping
Here’s a simple example (needs Kangaroo 2.5). The flattening probably works best if you remesh to a good triangulation first. For more complex shapes you probably need other ways of preventing foldovers (such as constraining the boundary and using zero length springs for the interior, then gradually applying the angle goal).

It’s a big topic and there are also lots of other ways of going about this.

Also, it’s not in Rhino*, but there’s a very nice standalone software for mesh flattening recently released:


(see also the referenced papers there for more reading on approaches conformal mapping of meshes)
*though in theory I think the libraries could be called from a plugin, which could be neat…

7 Likes

Wow, thank you very much.

I tried the definition with current food4rhino version, which 2.42. By 2.5 do you mean there would be a future release soon?

And one more bit, in my case I have to reduce angle strength goal to 0.01, if leave it 1 it explodes, 0.1 value have artifacts. Is it because I do not have 2.5 version?

It’s there on food4rhino, just scroll to the bottom of the list.
Also yes, in 2.5 I fixed an old issue with the angle goal where it behaved differently dependent on model scale.

1 Like

Was this the old issue where an elastica would go all zig-zaggy when the polyline edges were too short?

Exactly. Also where it would get super slow when the curves where many units long

1 Like

YES, that’s awesome. Team bendy rides again :raised_hands:

Thanks, it is nice to see how close it is to the surface squish command. All I do not if needed but adding mesh spring preserves the scaling of the mesh. Also for the projection, the mesh is not overlapping if the plane projection strength is very slowly increased, I am wondering if there could be a custom goal which strength increase within iterations:)

With mesh springs, right side surface squish command from rhino:

without:

I loaded Boundary-First-Flattening from github page to grasshopper.

It runs quite nicely.

The longest part is obj to mesh converter that takes time as BFS is realtime.

I will also try to do this with C++ app to get real time manipulation.

Here is a quad mesh from triangular mesh:

11 Likes

This is wonderful work. Thanks, Daniel!
Native Kangaroo 2 components along with quad remeshing in Rhino7 WIP has greatly advanced some bending active structure work that I am currently assisting with.
The (BBF) boundary first flattening will take it that much further and allow for multiple ways into realizing structures either pre or post Kangaroo solver.

I added BFF from Keenan Crane to NGon plugin if you want to try. There is an example file.

1 Like

Hi Petra’s,

I will give that a go this week, as we develop the work further. Thanks for the heads up.
I’ll post the results in a couple weeks, to see where it comes out.

Hi petras,

Thanks for the BFF. I tried to cover a closed mesh by hexagons; However, there is a gap between them. I checked the BFF GitHub page and apparently, it is not seamless yet. Is there any way to make it seamless (either in Rh or GH)? or should I wait until next release?

I am wondering if this geometrically possible because you need a seem to flatten closed objects.

Otherwise, you could project hexagonal sphere or box on your mesh using Kangaroo2 sort of shrink wrap trick.

Just use regular hex geometry

For hexagons I think you’d need the cone angles to all be multiples of pi/3. You’d then get non hexagonal faces (such as pentagons) just around the cone tips.
On their site it has said seamless maps are ‘coming soon’ for the last 3 years, so I’m guessing maybe they had some issues making it work stably? I’ll ask Rohan/Keenan about it.

A shrink wrapping approach won’t be fully automatic, but for a shape like the one shown shouldn’t be too hard. I’d recommend doing the meshing and shrink wrapping with triangles, then taking a dual at the end to get the hexagons.
Your initial coarse triangulation might be as simple as a single tetrahedron. If you want to share your shape I can give an example of setting this up.

The BFF with no cone singularities in the first picture of the cow has one open naked outline (look at the neck).
When the mesh is flattened it is probably mapped to a circle that is why the area distortion is high in the center.

I think the only option is what Daniel suggests as K2 setup.
Unless Rohan comes with some new great magic:

The Rh file is attached.

This is a really simple mesh. I wonder if it is possible to write a definition (whether it is shrink wrapping with triangles and taking dual or another technique) that works on every complex closed mesh, and the size of hexagons can be controlled . Imagine you are sculpting a real hive and tessellating it by hexagons.

Sculpting_01.3dm (3.0 MB)

Here’s a quick definition:


hexagons_on_mesh.gh (39.2 KB)

This wraps a subdivided icosahedron onto the shape. The 12 vertices of the original icosahedron correspond to 12 pentagons in the final result (the rest being hexagons).
We need these pentagons because the Euler number of a topological sphere like this is 2.

1 Like

As the shape gets further from a sphere, you might find you get closer to regular hexagons if you use a different initial coarse mesh from an icosahedron.
For example. here taking 2 joined icosahedra like this gives slightly less elongated cells in the final result:


hexagons_on_mesh2.gh (40.1 KB)

2 Likes

Thanks for the definition. It is working for this particular mesh, but not practical for a complex mesh. It is needed to create different icosahedra base for different meshes which can take a lot of time (Lets say we have a generation of meshes that need to be tessellated)

In comparison with BFF, it delivers more elongated cells; However, it is seamless which is good. (Pentagons are also ok). I think in this stage, I have to choose between seamless or non-distorted (Slightly distorted) cells, or wait to hear news from BFF team.

Since the shape you shared was simple I showed this technique with the manual construction of the base triangulation, but for more complex shapes another option for generating the base mesh is to do a remeshing, with a target edge length as large as possible while still approximating the form.

Yes, of course if you allow open seams and don’t require the cells to match along them there is a lot more freedom, and the cells away from these seams can be more regular.
Once you require that the mesh matches along the seams though, you are essentially solving a very similar problem as above of finding a coarse triangulation, and the faces will have to become less regular.

In the shrink wrapping/relaxation process, you can also choose how much to prioritise size vs shape.
You can get very regular shaped hexagons if you don’t mind them changing size across the mesh and vice-versa. Perfectly regular size and shape together is only possible when the surface is developable.

1 Like