Ok, scripting the “SelVolumeObject” works well. I wrote another version of the script with some extended functionality.
What is nice about the
SelVolumeObject command is that it also works with closed meshes as input. So having that in the script I used render-mesh as the slightly offset volume instead of offsetting polysurfaces, which in many cases is slower and less reliable.
What is NOT nice about the SelVolumeObject command, it does not work well with Groups. Meaning, if the contained object is a part of a group and the whole group is not contained in the volume, it will not be selected.
So this script works with render-meshes, and does some extra work to maintain original object groupings, with an option to keep the “in-volume” objects that will also retain their original groupings (as duplicates). We work with groups a lot so it only makes sense. You can even group some individual input objects and sigle-object groups, so if the result is tons of pieces of each, they will end up neatly grouped.
Here is the script for anyone interested: DIG_BooleanSplitTrim.rvb (5.0 KB)
@Pascal - any chance we could have an option in SelVolumeObject command to ignore Groups?
And in general, could the above functionality be added as a full-fledge Rhino command (BooleanTrim)? It’s nice to be able to script this to some degree but for cleanness and speed a native command would be great. It seems like such a basic functionality that IMHO it should be in the base Rhino toolset among other fancy trim/split/Boolean capabilities.
@Dale - could we add a Wish for SelVolumeObject RhinoScript method ?