Select by closed object

Hi!
I tried to find command but could not…
Is there way to select by closed surface?
I tried boolean difference (with two closed solid objects) but it failed. Maybe too many surfaces, which are same in both objects…
So I used explode and cut with solid object.
Now I’d like to choose all the surfaces, which are inside of the solid object, to delete them. It will take some time if picking one by one (very complex part).
Is there some easy way?

Thanks :slight_smile:

Maybe _SelVolumeObject?

Hi and thanks for fast reply.
In my real project it does nothing and in my sample, it picks only few surfaces…

I did it manually in my real project now but looking for the future to fasten up my job…

:slight_smile:

Hi Wagner -

That looks correct to me but then you only posted a picture and not the 3dm file. Also, perhaps your description of your requirement doesn’t fit the actual requirement?
-wim

It will only select objects that are completely inside the volume, not intersecting ones.

Not sure if this will work any better than SelVolumeObject, but here is an older script from my library if you want to try.

SelObjsInsideSolidV3.py (8.1 KB)

Hi!
Helvetosaur: No better result with old script:

Wim: I think it should select all the red ones.

Sample file attached :slight_smile:
SOLID SELECTION.3dm (748.4 KB)

From my first message:
“closed surface” I meant closed polysurface / object!

Hi Wagner - thanks for the example - it seems to depend on whether or not render meshes are present. ClearAllMeshes and the thing works better, but in any case not 100% right, here; the command does seem to need some work at least in this example.

-Pascal

Your red spherical surface appears to not only intersect the selection volume but possibly penetrate a bit through it.

This is a highly magnified view from the top:

Unfortunately, the command is designed to ignore objects that intersect the selection volume, they have to be fully inside - i.e. by at least the file tolerance away from the selection volume surfaces.

If I OffsetSrf your original volume object by just 0.01mm (your file tolerance) and use that as the selection object, my script at least will select all 11 red parts. SelVolumeObject does not get all of them though.

I have wanted to modify the script to also get “touching” objects, but this is difficult, as it’s hard to distinguish between “just touching” and “penetrating” by some small amount.

SelClosedPolysrf will select any closed polysurfaces.

SelClosedSrf will select any closed surfaces.

Thank you for everyone who gave opinion about this.
Now I understand your “developer problems” better about this :slight_smile:

Helvetosaur: I don’t know about penetrating. I just used split command, and it gave the result of that. I don’t know about tolerance there how it works.
Ok, I see it needs to be totally inside. Then the result makes sense :slight_smile:
I made offset and it took 4 minutes so maybe I’ll go on with manual work.

Thanks :slight_smile:

@Wagner

So, over the last couple of days, I decided to try to revamp my script to see if I could include objects completely inside the envelope, but have points or curves that just touch the envelope - i.e. objects that have been split with the envelope, curves that are coincident with the envelope etc.

I tested with your file above (without offsetting) and it works correctly - all the red objects are selected - I also tested with a few other cases here. Have a go with the script below and see if you find cases where it gives a false positive or negative (I’m sure there will be). It may be somewhat slow with many objects or very complex meshes or polysurfaces, as there are a lot of points to check. If you do find a case where it fails or doesn’t select what it’s supposed to, post it here and I will try to fix.

Edit - quickly added support for SubD’s - internally converted to breps.
SelObjsInsideSolidV4.py (11.7 KB)

1 Like

Hi Helvetosaur!

And wow, it works great, exactly how I needed. Let’s see in the future if I find some weird behaviour.
I wish you can include this in to the becoming updates :slight_smile:

I have no words to say how amazingly well and fast Rhino support works!
Thank you!