MeshTrim incomplete result

I want to trim the 2 meshes against each other.

MeshTrim doesn’t trim the complete overlap.

I tried:

  • RebuildMesh
  • MeshIntersect and trim with the 4 resulting curves
  • Scale by factor 10 and trim
  • Weld 30° and trim
  • MeshBooleanUnion

There is never a usable result.
What else could I try?

2025-10-28_MeshTrim.3dm (5.2 MB)

that one is a bit of a nasty one, the meshes are good though but what it came down to is that the bottom does not clearly intersect, you see that when you run MeshIntersect, right at the bottom it diverts a little at the last couple of faces.

what i did is create a cut plane exactly along the intersection with the help of project snaps and use the lower intersection and the highest, then use Meshsplit with the cutplane as a cutter.

the remaining surfaces then also join into one should that be your further step.

joined.3dm (2.3 MB)

ok i have to qualify that remark, it joins but the entire face is still naked.. sorry but hopefully that helps already no time to check further for now

so, i had a few minutes the only way to fix it was to delete one of the sides and mirror it since they are actually symmetrical anyway as it seems.

now it is joined without any naked edges within the surface
just in case, i rotated the object to orient it along the axis

fixed.3dm (2.6 MB)

to expand on the good solution above ^^

this is a little known hack for trimming meshes…

use a nurbs plane or surface as the cutting object, ( a cut plane is a nurbs object ) then use the mesh trim

for whatever reason, in my practice here, Nurbs surfaces works more often and more consistently than trimming with a curve or mesh object.

Absolutely! I’d also add that the cut plane/surface must extend beyond the mesh boundaries a bit.

Thanks for all proposals and solutions!

There is a weakness (bug) in MeshTrim.
If it would work correct, no workarounds are needed.
I think it’s worth to fix MeshTrim.

I think is work for @piac

the mesh trim in v8 and ongoing into v9 is much improved over previous versions.

what version of Rhino are you using?

@Charles Better than the Trim Mesh command is the Split command, which you can use with a surface, or you can convert it into a mesh and then use Split.
example


I can see where it si getting confused in the intersection. I think it has to do with super thin mesh faces as a a result of the intersection. We will add it to the list to see if we can determine how to figure out which faces to keep.

Hi all

the easiest thing to do here is to use an option --which is admittedly hard to find-- and will work in most of these each-with-each cases.

  • Run _MeshSplit
  • Select BOTH meshes and press _Enter
  • Tap the newly appeared option “PermitSplittingWithEachOther”. All this option does, is to clear selection. This way you can perform the next step
  • Select both meshes again

This works immediately on the first file. Thanks,

Giulio

giulio@mcneel.com

I know, mesh things were introduced in V4.
And yes, they improved a lot since then!

(8.25.25294.11001, 2025-10-21) + WIP

And 1, 1.1, 2, 3, 4, 5, 6, 7 :grinning_face:

Thanks to @piac

Wow! I didn’t expect that.
The result is not 100% perfect, a single mesh face is still there.
But very easy to fix.


I didn’t read the command line properly.

Even if I had, I would have been lost.
Now that I know the existence of that option, I looked into Help:

DiscardUnsplitMeshes

If the split is partial and there is only one mesh in the result, do not modify the document.

PermitSplittingInputsWithEachOther

Allows to select the meshes of the first step for them to be cross-split.

This option is only available when multiple objects are selected in the first step.

I understand + I don’t understand.

Allows to select the meshes of the first step for them to be cross-split.

That’s what I did as the first action when prompt tells me to select objects.
For me, no way to understand this.

Also the result info after the command ran is a mystery:

Mesh has features that require a cleanup step. A preprocess step will attempt to merge features to 1E-07 units. This option can be changed.
Consider also running _MeshRepair.

The good thing is, MeshSplit works well.
It would be even better if the extra option is the default.

Or the option is easy to discover.
The user shouldn’t have to solve puzzles.

The Split Mesh command is definitely the best choice compared to Trim, which can cause issues.
Giulio’s method is new to me as well; I had never tested his approach before.


:call_me_hand:

whelp…that’s my “ i was today years old when I learned this in Rhino” moment for the morning..

@piac maybe we can tune this UI up a bit so it’s not so cryptic to find? Hiding a powerful feature behind a secret handshake is not ideal IMO.

@Charles can I use this file to make a short public facing video?

Sure, I made for practicing and nothing else.

Guys – please don’t kill me. I know this is a little cryptic…

This is what happens when you need to make changes to 20±year-old commands and still keep macros running - and behavior similar. Basically, the issue is that, in the old command, you could not re-select the items from the first set to split during the second step. Often it’s useful, so that the UI is not cluttered. This limitation, though, is not present in the new SDK implementation, and I also didn’t expect it to be so powerful, so the option appears only if the first set has more than one item, so that the first objects can be used in the second set as additional cross-reference.

Maybe @theoutside could we review this in the next UI team review meeting?

Giulio
giulio@mcneel.com