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

Happy New Year everyone!
Wishing all of you and your families a healthy and joyful 2021

I’m pleased to share a new tool for fast and robust generation of high quality isotropic triangular meshes (and their duals) from a Brep or mesh input.
The resulting meshes consist of triangles with similar edge lengths, angles and areas.

This will be included in Grasshopper in the next Rhino 7 service release candidate.
The new component will then appear at the bottom of the Mesh>Triangulation tab.

It also optimizes for mesh valence - and will generally give what are known as ‘5-6-7’ meshes, where each internal vertex is surrounded by 5, 6 or 7 triangles.
It can detect and robustly preserve sharp features and boundaries and produces conforming meshes (which match edge-to-edge including across creases without hidden slivers in concave regions - a common problem with other remeshers).
Features can either be inferred from the edges of an input Brep, detected from mesh face angles, or input directly as curves or points to keep fixed.
It also outputs the dual mesh. Because the triangular meshes have 5-6-7 connectivity, this dual mesh consists mainly of hexagons, with some pentagons and heptagons. It also optimizes so that these Ngons also have similar areas and edge lengths.

If just one brep/mesh is given as input, it will be remeshed, but it also gives the option to provide a starting geometry and a target geometry and shrink wrap one onto the other.
This even allows the used of a bad mesh as the target, with holes, non-manifold edges and duplicate faces. So it can be a way of fixing problematic meshes before further processing.

Even when the edge lengths are relatively high with respect to geometric features of the target it is more resistant than other remeshing tools to the common ‘frostbite’ problem where the mesh will slip past thin protrusions such as the fingers of a hand, or the ears of the Stanford bunny, cutting them off in the result.

It is multi-threaded and runs natively without any external dependencies. I’ve tested it on meshes with a few million faces. This first component prioritizes simplicity of interface and robustness over speed - it should already be pretty fast, but the future plan is to add some more components with finer grain control over all the steps of the remeshing to allow users to choose to skip checks which are not necessary in certain cases for faster results on huge meshes.

The remeshing code is all by me, synthesising ideas from many papers as well as some novel features. Internally it uses the Plankton mesh data structure, which was a collaboration between me and @will. (you do not need to install anything extra for this - it is included in the files above)

I’ve made various remeshing tools over the last 8 years since I first got interested in the topic.
However, this is a complete rewrite from scratch, and solves many of the bugs problems with previous versions of MeshMachine/SimpleRemesh etc.
I wanted to share this simple component as a start, but there’s also more to come with this in 2021, such as a Rhino command line version, scripting interface, variable mesh sizing, circle packing, anisotropy, alignment, relaxation, developability…

Scan model sources:
Tennyson bust: https://www.myminifactory.com/object/3d-print-alfred-tennyson-bust-at-the-usher-gallery-lincoln-2953
Dragon: http://graphics.stanford.edu/data/3Dscanrep/
Hand: http://visionair.ge.imati.cnr.it/ontologies/shapes/view.jsp?id=355-Hand

68 Likes

Might be handy, especially the planned new form of Rhino command!

3 Likes

Piping the boundaries of the dual can be a way to easily convert any object into a 3d printable lattice:

9 Likes

This is amazing! Thank you Daniel!

1 Like

Wow, nice way to ring in the new year.

1 Like

No time right now but I want to try it on this model here:

scanned with my Artec Leo

1 Like

The best sentence to read !
Thank you!

2 Likes

what a nice new year gift.
thanks @DanielPiker keep on this way!

1 Like

Here an example of some shrink wrapping - taking a complex mesh of composed of many parts and internal details (the engine and seats are all modelled) and wrapping it into a single closed solid mesh by taking the bounding box as the starting geometry and the disjoint mesh of many pieces as the target.

To not get people’s hopes up too much - this is pushing it to the limit - the shrink wrapping could still use some improvement for really complex models like this - it can still get a bit tangled when there are very fine details below the scale of the edge length. It’s also slower than simply remeshing an object in place - this one took almost a minute to process. I’m hoping this can be improved though.

This sort of thing can also be approached with isosurfacing, but setting the iso threshold high enough to unify the mesh and close any holes does tend to lose some of the detail. I think there’s also some interesting possibilities for combining the 2 approaches.

(car model from here)

7 Likes

Thanks for this tool it works very well.
I had just some problem finding the good directory as my Rhino 7 is still in Rhino WIP and also I had to install last version 7.2.

For dual network I also use my own tool that needs a weight at the Vertex (0.0= triangle to 1.0 = dual). I also have 2 types of dual.

6 Likes

Hi Daniel, all,

this looks great! I tried to install it and it’s not working for me:

My components folded looks like this:


and Kangaroo tab is available:

After downloading Trimesh.zip, unblocking the zip file, and Running Rhino 7.1 as administrator, I still cannot get this to load.

Kangaroo tab is missing:

And when I launch Rhino>Grasshopper I get this in the command line:

Command: _Grasshopper
An error occured during GHA assembly loading:
Path: C:\Program Files\Rhino 7\Plug-ins\Grasshopper\Components\Kangaroo2Component.gha
Exception System.IO.FileNotFoundException:
Message: Could not load file or assembly ‘System.Resources.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ or one of its dependencies. The system cannot find the file specified.

Any ideas what the problem could be?

Thanks,

G

I had the same problem you need last version, the release candidate the 7.2

3 Likes

Many thanks, Daniel! I can’t wait for next SR. And I have to say that I’ve never regret choosing Rhino + Grasshopper as my main design toolset. Why? Because it’s getting more and more powerful, but also because of it’s amazing community and people like you. :slightly_smiling_face:

2 Likes

very nice - fast too. thanks Daniel

triremesh

2 Likes

I second all of this.

I’ll add that even with Rhino’s limitations (e.g.: ASME drafting standards or parametric driving dimensions), R/GH can be used in parallel with other programs. I can do some amazing things by starting with a parametric model in Solidworks (since it’s already paid for) then importing into Rhino for the really cool stuff, and even back to Solidworks for say GD&T or other things that other software might be better at.

1 Like

So excited for this! Been following your development of this tool since the beginning, and it enabled us to do some cool optimisations, like changing the mesh topoogy in response to structural stresses, so i can’t wait to see what the added stability and speed will make possible.

I think this will be a huge boon for those who want to take complex shapes from Rhino/GH into FEA packages.

Haven’t had a chance to play with it yet, but very excited to hear about the added speed and robustness. The hidden slivers are definitely a challenge I have had to face!

Thanks as always, @DanielPiker

3 Likes

Thanks Laurent, that did it!

G

That’s what I thought I understood when I first read the topic, seeing this:

But fully rereading @DanielPiker’s post, it isn’t clear if it’s just the Grasshopper version that will be available in the next SR…

Will it indeed be the case that this will be added as a native Rhino command plus options?

Thanks,
–Mitch

Hi Mitch,
Sorry it wasn’t clear - right now there is only a Grasshopper component, which is what will be in the next SR. The plan is to also have it as a Rhino command soon though.

5 Likes

Thought i would print some hearts i liked the pattern so much. These will be cast in silver.

1 3

5 Likes