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

Starting point was a SubD with an open back side on the XY plane.

Offsets of both pegs are subtracted with SubD boolean.

Then TriRemesh. Works perfectly!

Quad Remesh with the intersection curves of the pegs and the initial SubD as guide curves works really nicely too.

Open backside looks good:

2 Likes

One other thing I didn’t mention yet -
When wrapping onto open meshes, small holes in the target should get covered smoothly, but for large openings, the wrapped mesh will generally have lower triangle quality on the ‘floating’ parts which are not in contact with the target.
The aim is to improve this in the future, but currently you might want to do a second remeshing pass after the first wrapping (or alternatively use FillMeshHoles on the input first to fix the holes in the target as much as possible before wrapping onto it).

9 Likes

HI Daniel.

Thank you very much for your mesh tools and this new tool.

I am trying this out today. I am trying to force a simple flat brep composed of multiple flat surfaces originally to mesh to defined points to ensure connectivity for FEA analysis. When i pass a list of points to the Features input I get the message that point cannot be converted to geometry class. See below. Any ideas? Also I have always struggled for a planar mesh to pick up required target vertex points on the mesh or edges of the mesh. Any tips?

Also; there appears to be a limit on the amount of features i can pass. (I have 600 line elements I want the mesh vertex to remesh to see below). Some line elements I want to pass are not previewing in some areas. These areas are where the mesh component is not remeshing so that the vertices pick up the end points of these lines, see below:

Hi @stephen_lewis,

The features input currently only takes curves which actually have the data type Curve. Casting your lines to curves should make it recognise them and their end points:
image
This was an oversight on my part - of course it is reasonable to expect the component to recognise lines as curves, and I’ll make sure it does work for lines (and isolated points) for the next release (or I can send a hotfix sooner).

Can you clarify what you mean here, and maybe upload an example?

1 Like

One little tip for if you have a planar surface and you want to include some curve in the mesh as a feature- if you split the surface then rejoin it, the default Rhino mesh will make a mesh with vertices along that curve, so the curve can then be preserved in the remeshing:

and if you want to insert some isolated vertices as feature points into an existing mesh, here’s a little tool to help:
insertverts_remesh.gh (8.6 KB)

Potentially this behaviour could be incorporated into the TriRemesh component itself though - to allow users to input features where the input mesh does not already have an edge or vertex.

4 Likes

Thank you Daniel for quick response. Forcing casting of segment to curve does not help. See below. For one area of segments of a polyline it is still not meshing. I think this tweak can solve problems in future where i have a line element defined not line like curve. (Here i have a polyline, i explode that to segments which were already out put as line-like curves. As a check i did an explicit cast as you suggested). Still a problem

I believe using your terminology i always have issues getting mesh machine and this to work with isolated points on mesh edges and internal mesh points… When the surface/brep is not planar I don’t have so much issue.

I can’t debug a screenshot - can you post a file?

2 Likes

Daniel. If possible i would strongly vote for this feature of meshing to isolated points. I have to do this all the time when generating FEA meshes. If we can just add these points as a feature input and re-mesh to them it would be superb.

So, in your work around it looks like you re mesh the starting Geometry mesh based on user defined isolated points.(I didn’t know the mesh nearest point method!) Then create fictitious lines that have an end point on the new mesh/isolated points and then use these as features.

Steve

Of course, see attached, my rhino model session is in units of mm when using it (Don’t know if tolerances affect anything…)Mesh.gh (93.3 KB)

Daniel,

some question about the code syntax which is new to my c# basic understanding

  1. int fi = m1.Faces[f].IsQuad ? 4 : 3;

What does the ? operator do here? Short cut flag for if true/false?
2) for(int j = 0;j < fi;j++)
m1.Faces.AddFace(m1.Faces[f][j], m1.Faces[f][(j + 1) % fi], v);

What is the % operator doing here for m1.Faces[f][(j + 1) % fi]

Sorry one more thing, what if the isolated point lies on a brep/surface and not a mesh. Is there a solution there?

Daniel

i got it to work by doing as you suggested, splitting the surface with the segments of the poly line, rejoining the surface, sending surface as input geometry and sending segments as features. Its meshing along polylines now, thanks.

Still hope to see isolated point feature!!

1 Like

Yes, the ?a:b is a convenient way of doing inline conditionals:

and I was using
(j + 1) % fi
to make sure the indexing wraps when taking the next point around the boundary (to get the edge between vert 2 and 0 if it is a triangle, or between 3 and 0 when it is a quad).

I’ll make sure isolated point inputs work properly in the next release
(it was working before, and the code is all still in there, I just changed the component at the last moment from having separate inputs for feature points and feature curves, to having one combined input, and forgot to properly update the data types and casting)

I’ll also update the component to allow the setting of isolated feature points which do not already exist in the input Brep or Mesh.

1 Like

brilliant thank you

1 Like

Is there a way to use this in Rhino v6? I tried installing the component but it failed to load

It seems you could use a better Beetle… I’ll PM you one if you like :wink:

2 Likes

Thank you! I’m really very happy that you’ve circled back to remeshing, this has been a sore point for me in Rhino for literally decades, and since Meshmachine we’ve known you have the answer. This seems quite robust, I’m already using it in production. The mesh quality is top-notch, and speed is not bad even for quite big meshes.

In closing, yay! Thanks again.

4 Likes

Thanks Bathsheba!

It makes me really happy to hear this :slight_smile:

1 Like

This kind of thing is my day job https://crystalproteins.com/proof/1783/
and isotropic remeshing is the easiest way to get those pretty point distributions, so this is daily workflow for me. Now I can get rid of some annoying detours into Zbrush and Meshmixer!

5 Likes