Introducing TriRemesh - high quality triangular and hexagonal remeshing and shrink wrapping

丹尼尔,皮克,当我讲你的example的平面增加到200000时,特征线失效,单位是毫米,这里有误差吗 请核实

1 Like

when i increase the plane of your example to 200000, the characteristic line fails, the unit is mm, is there any error here please verify

Hi -

Please post your .gh file. In a thread with over 140 posts, it’s not clear where to start looking for the example that you talk about…
-wim

Hi @DanielPiker
I can not find triRemesh in Rhino Common, could you please point me in the direction or add it if possible?

1 Like

AFAIK trimesh is part of grasshopper. But it may be possible to run grashopper components outside of if it, for exmaple from custom plugin according to this guide:

However I am not aware if trimesh is exposed for this workflow.

1 Like

There’s a few posts above on this topic:

But indeed, it would be nice to have this exposed for scripting in either the KangarooSolver.dll or RhinoCommon.

1 Like

Hi Daniel Piker

I tested it with 25 iterations and the result is magnificent, but quite time consuming.
I need meshes with very high density.

What is the best graphics card for the full speed of this feature?

Hi Christiano,

It is multi-threaded, so more CPU cores will help a bit, but GPU won’t make a difference.
There are a couple of strategies you can sometimes use to speed things up:

If you can get closer to your target mesh density with simpler methods before TriRemesh, that helps. For example, if you have a mesh with 200 triangles, and you’re looking for a very dense result with 2 million triangles, get as close to the right triangle count as you can first through subdivision (with Weaverbird for example) or by changing your meshing settings if you’re passing a mesh you generate yourself. Then pass this denser mesh to TriRemesh, so it has to do mainly just edge flipping and vertex relocation.

For generating dense meshes you can also do the remeshing with a larger edge length than you actually want, then use one or two iterations of Loop Subdivision after remeshing (this approach works very well for when you want a smooth result, but isn’t so good if it’s a mesh with lots of sharp feature creases and corners you want to preserve precisely though).

For going the other way round (starting with some very dense mesh, and trying to reduce it to a coarser mesh with nice triangles), running ReduceMesh first to get closer in triangle count can sometimes help (though ReduceMesh does sometimes turn good meshes bad, so you might then have to shrink wrap a good mesh onto the bad mesh as a target).

For face reduction it can sometimes even help to stage it, using multiple remeshing components.
This is because the complexity of the target mesh affects the speed. If you have a mesh with 10 million faces you are trying to reduce to 1000, doing it all in one component, it has to keep pulling the points back to the ultra dense mesh. So what you can do is run 5 or 10 iterations to get it down to 1 million faces or so, then connect the resulting mesh to another remesh component, because each pulling operation will then only have to pull to the partially reduced mesh.

Finally - there is definitely scope for some substantial speedups in my code too. It currently does a lot of checks and reprojections at each step for the sake of being more robust to really bad meshes and odd edge cases, but most of the time many of these checks aren’t needed, so options to switch them off could make it faster. (I’ve been meaning to add this, and scripting access with more options, for a while - sorry for the delay).

6 Likes

Daniel Piker
I intend to use a Weaverbird component.
That would already help me a lot.
Will my client have Weaverbird installed on their Rhino 7?
Since Weaverbird doesn’t come installed on Grasshopper originally.

I’m making a plugin in python

Thanks @DanielPiker for TriRemesh. We are using it to create 10-30 meter diameter domes that look superficially like geodesic domes but have various trimmed openings in the surface that require a unique trimesh (as opposed to starting with a classic geodesic dome and simply cutting openings in the mesh). Would it be possible to have TriRemesh build its trimesh from a list of integer-length curves and still keep vertices on the original mesh surface. This essentially means moving mesh intersection points around slightly so that we can build these domes from a stock of perhaps 20 unique stick lengths (ideally with integer values) as opposed to each dome requiring hundreds of slightly different custom lengths? This project is an outdoor adventure playground and being able to build the entire project using a vocabulary of 20 or so standard lengths would make it easier to do as a community project.

1 Like

Beam lengths could be optimized with Kangaroo.

You may want to start a new topic and upload a Rhino file containing the relevant geometry.

1 Like

Hi @Joseph_O_Connell,

I’ve tried this sort of thing a few times in the past, and my experience has always been that getting triangulated meshes to snap to a limited set of edge lengths while staying close to the original surface is just too constrained to work.
With hexagonal or quad meshes it becomes a bit easier (since then the face shapes are not completely determined by the edge lengths like with triangles, so you have a bit more freedom), but of course these may not be so suitable structurally.
Another approach can be to take up some of the variation of the edge lengths using the nodes. In one project I worked on years ago, (starting from a 3d spaceframe with all unique edge lengths) we had 3d printed nodes (which were all unique anyway, since the angles were all different), but cut the struts to a few standard lengths, then varied the length of the arms of the nodes to make the small adjustments in length.

4 Likes

This would be great!

Hi @DanielPiker,
Is there any update to having this available as a Rhino command or in Rhinocommon?

:open_mouth: :flushed: :star_struck: :coffee:

2 Likes

Hi,
I am glad and excited to find this useful and amazing function in Rhino8. Thanks so much for your great work. There is one question for me is that I want generate a 3D triangular mesh structure, the best is to get valences for all vertexes is 6. I have all ready used TriRemesh module for many times iteration, while there are still many 5 and 7vertexes for the triangle meshes. So is there any other module or ways i could add to fix the problem? (The gh file is attached.) Many appreciation to any suggestions or tips.
trimesh.gh (5.9 KB)

3 Likes

@DanielPiker do you think triremesh can and will work it’s way into Rhino Common soon? I need this functionality outside of Grasshopper.
Please and pretty please?

2 Likes

I second this a lot, would help LOTS to have it in RhinoCommon for scripting and development purposes. Pretty pretty please? :sweat_smile:

2 Likes

trimesh as a command was also to find its way to rhino at some point, here below in the initial statement more than 4 years ago in which that at least was mentioned. is that going to happen still?

2 Likes