The new code for MeshSplit

Part of a series on mesh intersection code improvements. Other Mesh Intersection Milestones…

Hi all,

the new Rhino 7 WIP contains a rewrite of the _MeshSplit command: fun stuff I’ve been working on for several months after the _MeshIntersect and _MeshSelfIntersect commands, which have also been slowly improving in parallel.

Here a few comparison of know problematic cases for the old mesh splitter. The new one seems to be faring better for these cases.

1. Pay respect to tiny gaps

The new code uses a more advanced intersection algorithm in order to minimize the places where tiny gaps result in intersection conflicts. The precision of the triangle-line intersection code is about double in respect to the old code.

2. Handle overlaps with care

The old splitter simply refused to split the plane with the extruded shape above. This is because large overlaps were often misinterpreted. The new splitter tackles this with code that deals specifically with overlaps, not treating overlaps as intersections per se, making sure that the ones that are within tolerance get handled as overlaps and are computed separately. An overlap that is also an intersection should result in an overlap.

3. Same level for all (quads)

Earlier on, all quads were logically treated as planar. But they may well not be. In fact, almost each quad that is not on one of the three fundamental planes is not planar. This means that, in each place that had a non-planar quad, some magic had to happen to make gaps properly close. You can see this in the second picture above. The new code always treats quads as a couple of triangles, where the shorter diagonal creates the two planes.

Although being much more robust, this last decision means a few more intersection points for quad-quads and quad-triangles intersections. This difference might not be always visible, but is present.

If you feel like trying the new code in the WIP, and see anything (good or bad), please let me know.
Also, note that MeshTrim, MeshSplitWithCurve, and all other commands still use the old splitter. The new one will be adjusted to the needs of the other commands as next steps.



Giulio Piacentino
for Robert McNeel & Associates

PS: As usual, here the cases that I am discussing above.
mesh-split-cases.3dm (110.5 KB)


A post was split to a new topic: Selecting edge rows

Is this code implemented in Rhino 7? Is there an equivalent that can be used to replace _SplitMeshWithCurve that could help for this example:

1 Like

@wattzie I replied there! Thanks for the link, you can also just @-mention me there.

1 Like