MeshSplit MeshTrim

Can you take a look and see if you can find a way to solve triming/splitting meshes like this?
MeshTrim MeshSplit.3dm (175.2 KB)

For Rhino to fail trimming or splitting dense meshes are “normal” but the mesh is generated from Grasshopper and should be just fine. Neither V5 or V6 manages to either split or trim it.

Check doesn’t like it:

This is a bad mesh.

Here is what is wrong with this mesh:
Mesh has 2 degenerate faces.
Mesh has 2 non manifold edges.
Skipping face direction check because of positive non manifold edge count.

Important things to consider with this mesh:
Mesh has 24 naked edges. Although this does not necessarily mean that the mesh is bad,
naked edges can cause problems if the ultimate goal is STL output.
Mesh has 3 faces where the face normal differs substantially from the vertex normals.
Although this does not necessarily mean that the mesh is bad,
these normals can cause problems if the ultimate goal is for rendering or boolean purposes.

After culling the degenerate faces, I put a cutting plane through the mesh and MeshSplit worked.
That said, we talked about the inadequacies of MeshSplit/Trim and the mesh Booleans in the development meeting today.

Specifically, what were you trying to do with this mesh?

Hi John, yeah, check often returns bad meshes, but still they need to be split :wink: And they are only triangles and quads and thus each face can be split so I am sure you can find a workaround.

What I tried to do can be understood in top view, I wanted to trim away all the stuff that lies outside the red border. (the grasshopper component doesn’t have a feature to stay within borders as it only triangulates points)
The mesh is made from a Grasshopper script that takes points and curves as input and outputs the mesh that I use as a terrain.

Here’s the workflow (just in case you are interested):
1 - We use a drone to take lots of pictures of the area
2 - Feed those into a photogrammetry software to make the mesh
3 - Reduce the mesh and use a set of scripts to alter the existing terrain to our basic needs
4 - Create accurate input curves and points for the grasshopper mesh script
5 - Generate height curves based on the grasshopper generated mesh
6 - Make the final 2D drawings with all the info
(7 - Export all 3D data to Unity for desktop walkthrough and/or a full VR experience)

Hi Jørgen,

If you are doing a lot of this, acquiring a single user license of RhinoTerrrain might be a good investment. It trims meshes really well; you might also use it to generate the terrain meshes in your step 5. It also does mesh Booleans way better than Rhino’s native tools. Certainly it’s a bit pricey, but it might save you a lot of time. Just a thought.

Cheers, --Mitch

Hi Mitch,
Yeah, Claude and Co know first hand the importance to work with the data at hand…

(Rant start)
and not complain about bad meshes, I was in dialog with him when he decided to develop their own booleantools since the Rhino tools were useless in real life scenarios, since they can not be trusted at all to do the job, and predictability is key when deadlines are at hand.
(Rant end)

We have a license and I used to resell it too, but the great thing with grasshopper and the current workflow is that it is “live” and I still cross my fingers for Rhino to develop adequate tools for the split and trim job.

In the file you sent, in the Top view, it appears you sent a file that was already trimmed.
I don’t see any of the mesh outside your Red boundary.

Do you have an earlier version of this that will demonstrate the issues?
Yes, I know I can fake something but the developers want REAL examples.

Is irony and a slight facepalm between friends ok here?
Try x-ray or wireframe mode and you will magically see through the mesh and the area will reveal itself to you :smiley:
(Hint: At the top you can see the mesh hiding the red curve :wink: )

The reason I want to trim the mesh is exactly this reason, I need to trim away the part that is not within the red border.

Thanks for taking a look at this John!

OK, thanks.
I’m getting an incomplete intersection.
I’ll see if I can get a developer to have a look at this

1 Like

Thanks John!
On a side note: I have encountered many issues when the intersector crosses a vertice too, if you want I can try and force some other bugs for you. I have not posted them all since the mesh trim wasn’t on the priority list, but now that it is (if it is) I will surely feed you the issues as they come along.

After the discussion in the development meeting, I’m hoping this gets some attention.
The example you sent seems like a good place to begin again.

Great, I just tried it mesh split in another file and it crashed Rhino V6. I can’t recreate the crash since I didn’t save it before I tested, but the object still won’t split nicely, so here’s the file.

Use the lines, either alone or as a combination, and see the different results. Some are really messy, none are good.

Now test it after unwelding with “0”. Mesh split performs nicely in this example now, why that makes a difference is beyond my understanding, but my bugtracking gut feeling told me it was worth a test.

Holo’s horse head mesh split bug.3dm (309.7 KB)

Here’s another one.

Try to mesh boolean difference the sphere away from the mesh chair.
I expected this to fail since the sphere surface has a “pole” (End of the sphere’s surface edge) ON a vertice. That is one thing that often messes up mesh split and mesh booleans.

If you move the ball slightly then it should work.
meshbooleandifference bug.3dm (435.1 KB)

Sorry, I guess I wasn’t clear.
We currently have plenty of examples. You don’t need to send any more.
Thank you for these.

I’ll see if I can repeat them and if they seem to be something different, I’ll add them to the pile.


great, tell me when you need more, I have struggled with this for years so it doesn’t take me long to muster up some new examples.

I can not repeat the horse head split issues you described.
I’m running an in-house build of V6 from this morning.

I ran MeshSplit in V6 and in the Front view as instructed.
I post selected the mesh then one line at a time.
In each case the mesh split without error or complaint.

The mesh is bad with 6 degenerate faces.
Culling the degenerate faces before or after MeshSplit had no effect.

Ok, the motor was running so I couldn’t stop just yet.

Here are some finding with the initial model:

  • Move border up 0.1 and it works fine
  • move some border points out and it works fine
  • copy mesh and border to the right and it will NOT work.
  • move the copied objects back to inital position and they WILL work…

It behaves like the last one is a tolerance issues, but I have no idea.

MeshTrim MeshSplit v2.3dm (572.2 KB)

Damn… I had saved the unwelded head. I replaced the file in that thread with the old mesh now. It should work " worse" :smiley:

Something strange is going on with the chair and sphere.
The chair is mostly open edges.
If I run MatchMeshEdge on it then I get a good mesh.

Using the NURBS sphere in either case just seems to delete the sphere.
If I replace the NURBS sphere with a mesh sphere, then MeshBooleanDifferent between the fixed chair and mesh sphere works as expected.

Something is still strange though. When I use my own simple objects (MeshBox, extrusion Box, MeshSphere, Sphere), the MeshBooleanDifference works fine.
I’ll see if I can figure out what is special about your Mesh chair.

Still no issues with MeshSplit here using a welded or unwelded mesh.
I wonder if this has to do with some plug-in you have loaded.

it was generated from another mesh with the subd tool.