Hi!
Please see attached model.
Solid split.3dm (1.8 MB)
The orange solid simply wont split when I use “solid split” command and select the green soild as a cut solid. There is one blue soild that Ive succeeded to split but other orange ones - wont. Please help.
Im running rhino7
try MeshBooleanSplit, after converting them to meshes. that will work, you can turn it back into polysurfaces again if you need.
boolean operations are always pretty tricky, a little edge somewhere and it already gets a hick up.
Rhino can be very fiddly with booleans, especially if a seam is in the wrong place or two surfaces are coplanar etc. Fwiw other cad seems to manage the operation without issue.
@ftzuk I wonder what your other software is doing with the green body, can you send the green body back after importing to see if the surfaces have been changed?
What I see in Rhino is that the green body contains a lot of 0 area surfaces and surfaces that have singularities.
With the attached little gh script you can rid of both and then the BooleanSplit works successfully:
fix_polysrf.gh (7.3 KB)
green-body.stp (181.9 KB)
thanks, as expected the planar surfaces with singularities are replaced with trimmed planes.
how do you inspect that?
i found an easier method, strange i though i tried that but it seems to work now. use MergeAllCoplanarFaces on all the objects, then split also works.
edit: false alarm that did not work fully
Interesting, I tried that but it gave me a bad object. Did you do this in Rhino 7 or in 8?
what is more interesting is that this was not detected as bad object even before merging faces. SelBadObjects (before merging now) did not work but ExtractBadSrf pointed out these.
after extracing and rebuilding this part.
and this
the polysurface seems to heal up, yet boolean split still does not work on all the orange objects, so that was a false alarm from my side i actually only managed the biggest part the others i did not try anymore.
so meshing and splitting is my only suggestion for now.
Alright, then we’ve seen the same. As mentioned the polysurface is full of 3 sided surfaces meaning they have singularities that will mess up the Boolean operation. The only way to fix that is to replace them.
There are a couple of bugs to report with just that object.
yes but as already asked, maybe you can share how you inspect all these issues.
There isn’t really an automated way to detect singularities but you can see it in wireframe mode that many of the surfaces have non perpendicular isocurves. For the sliver surfaces, I first ran SellSmall after exploding, which can help a bit to find some.
Better though is to search these by surface area. That’s what I was doing in the gh script.
Nothing what you said works for me.
COnverting to meshes cretaed strange results on some objects.
Sell bad Object didnt point to anything.
Gijs, can you plase explain how to use the GH file youve have attached. I want to try this.
Thank you.
-
run _Grasshopper
-
Open the definition I sent
(it should already reference the green brep, but if not right click this component, and use Set one object)
-
right click the last component and Bake…
-
Use the resulting Brep to split the objects
Did all of that. Again split failed.
But when I hit that bake button I get an message …see attached.
There’s several really small “sliver” faces. These tiny faces fail to intersect and cause issues with the boolean/split.
In fact, these are all the faces whose area is less than the document tolerance:
This is the script I used to find all those faces.
// #! csharp
using System;
Rhino.Input.RhinoGet.GetOneObject("Select object", false, Rhino.DocObjects.ObjectType.Brep, out var rhObj);
Rhino.RhinoDoc.ActiveDoc.Objects.UnselectAll(true);
var brep = rhObj.Brep();
foreach(var face in brep.Faces)
{
var copy = face.DuplicateFace(true);
double area = copy.GetArea();
if(area < Rhino.RhinoDoc.ActiveDoc.ModelAbsoluteTolerance)
{
Rhino.Geometry.ComponentIndex idx = new Rhino.Geometry.ComponentIndex(Rhino.Geometry.ComponentIndexType.BrepFace, face.FaceIndex);
rhObj.Object().SelectSubObject(idx, true, true);
}
}
Once I deleted them then exploded the brep and joined it back together it all split as expected. Here’s the model I cleaned up.
Cleaned.3dm (1.7 MB)
I’m guessing you made this polysurface from a mesh. Mesh data isn’t usually very “clean” and can have issues like these tiny faces which cause problems in subsequent operations. I do think we should handle this better though.
@mario_pende in your screenshot, all the gh components are orange, which means there is no data
As mentioned in step 2
Other than that @Joshua_Kennedy 's script is probably an easier way out.
Gijs, wich version of GH are you using?
Model was created with version 8. Cannot open it. Running V7.
Joshua how do I load your script?