The mesh is cut apart at the splits, is this what you want? It is split just like the Rhino Mesh Tools Split command splits the mesh. The line between the splits is clean, with minimal extra triangles injected to complete the split as shown in the two screen shots below:
The degenerate faces that were removed should have no impact on what you see as they have no area. The areas of the mesh between the split lines are not changed by the splitting operation.
Is the messiness you are referring due to the change in appearance of the Shaded View between the original mesh:
and the split mesh?
This is due to a change in the surface normals. I can unify the surface normals in the split pieces which makes the split mesh look like the original:
I think this is what you want. Below I will show you how to run the script to get this result.
Here is an updated link to .3dm file. Load this into Rhino as the first step to running the script.
Please note that the script has copied the original mesh to the Layer Start Mesh where it is preserved. I made one change to it though; I removed the degenerate faces that were causing problems with the script and were making it a Bad Mesh according to Rhino’s Mesh Tools-> Mesh repair wizard.
The script is written in Python. Put the script
TrimMeshForDD.py (360.2 KB)
in the folder at:
with Terry replaced by your userid.
To run the script, push the TRIM button in the Standard toolbar:
When you push the TRIM Button, the Form for the script should appear:
Before you push the Green Split Mesh button to split your mesh, click on the Show Options button and turn on the mesh cleaning operation called Normals so that the Shaded View of the Split mesh will look like the Original. Here is what the form should look like just before you push Split Mesh.
The cutting curves are on Layer Ordinary
and must be closed curves
as shown in Green in the above example and below. The curves cannot overlap but a curve can cross the mesh more than once or lie entirely within the mesh. Below is a simpler way to define a cutting curve to split the mesh into 3 pieces with a Closeup
on the right. Be sure to Click on the Closeup
for a better view of the thin Green cutting curve.
When Reuse is selected on the form, the cutting curves on Layer Ordinary are used. If instead you select the Enter option, then the curves on Layer Ordinary are erased and you can manually enter a new curve after you press Split Mesh. When entering the last point of the closed curve, do not try to click on the start point. Instead just click nearby and press Enter to let it autocomplete. If you want multiple curves on Layer Ordinary, then you can copy an existing curve on this layer (select curve, Ctrl+c, Ctrl+v) and modify it. Or you can make a copy of this layer (right mouse button when over Layer Ordinary) and then use the Enter option to place a new curve on this layer. After each new curve is entered, move it to the copied layer. Once all curves have been collected on the copied layer, move them to the Ordinary Layer when you are ready to split the mesh. The simplest way to move the curves is to delete the Ordinary Layer and rename the copied layer to Ordinary. To delete a layer, click on it to make it active (highlighted with blue stripe) and hit the Delete key then say Yes to remove the layer and the objects it contains.
You can even used curved cutting curves to split the mesh as shown in this example:
This cutting curve was entered by selecting the Enter
radio buttons before pressing Split Mesh
and drawing the freehand curve.
If you want to do some standalone cleaning operations on your mesh, first push the blue Clean Mesh button on the Form. Then select the options by clicking on the blue Show Options button:
Select from the 8 options in the top half. I suggest turning on Show Details
in the bottom half so you can see the details of the cleaning operations in the Command Window
. Push the green Clean Mesh
button when you are ready to clean your mesh. The cleaned mesh is put on layer Cleaned
. If you want to use this mesh for more operations, you need to copy it to the Normal
layer (delete whatever is there first). If you want to perform some of these cleaning operation on your mesh while splitting it, just go into this options panel and select them before you split the mesh.
The only other thing wrong with your starting mesh is that it has 36 intersecting faces as show by the red and blue dots in this perspective view:
My script can remove these and then you get a clean mesh report by Rhino:
However, the downside is that 1 face in each intersecting pair is removed which likely leaves holes in the mesh, an example of which is shown here:
You could go around to each of the locations and try to manually fix these using the Fill Hole option in the Rhino Mesh Tools toolbar
or you could just leave the intersecting faces in your mesh and ignore them. To remove the red and blue points, go to the Command Window
and type selpt
and then hit the Delete
Be sure to use the Tooltips built into the Form to learn more about each of the fields of the form. To see a Tooltip, hover the mouse pointer over a field. If you find the Tooltips too distracting, then go to the options panel and deselect Tooltips.
The script still needs more work to make it more robust and handle a wider range of meshes. I will update the attachment above when it has been significantly improved.