SelBoundary to be independent of zoom

I would like to use SelBoundary command for checking interference on xy planes.My Goal is to detect objects that interfere with curves in the xy coordinate plane.

However, using SelBoundary, the selected object changes depending on the camera position and zoom, even if the original curve is the same.To have it determined by coordinates,if possible, how can I do this?

Hi -

That sounds correct, yes. Have you tried changing the selection mode to Crossing to see if that works better in your case? If that doesn’t do the trick, perhaps you could post a simple file so that we can better understand the issue?

That sounds a bit like a job for IntersectTwoSets?

sample.3dm (26.0 KB)
Hello wim
Thank you for your comment. I have uploaded a simple sample.

There are one Extrude and one Curve object in the file.
I want to select all the objects that overlap with the Curve viewed from the Top screen,
and I do not want to select the Extrude object whose coordinates do not overlap.
By using SelBoundary with Crossing mode, the Extrude object is also selected even if it does not interfere on the coordinates when the viewpoint is moved away from the object.I would like to separate this well.

I believe that IntersectTwoSets cannot be used because they do not interfere with each other in three dimensions.

Hi Eisuke -
I’m missing some steps, perhaps?
When I open your file, this is what I see in the “Top” and “Perspective” viewports:

When I run SelBoundary in either the “Top” or “Perspective” viewport and select that curve, nothing gets selected. Which is how it should be. Is this behaving differently for you? I’m still not clear about what you are trying to do…

1 Like

Sorry for the lack of explanation.
Please select TopView as shown in the attached screenshot and make the camera far away.

Of course, I do not normally use command in this situation, but if I do SelBoundary away like this, the Extrude object will be selected.

Hi Eisuke -

Thanks for that clarification. I see that behavior on Rhino 7 here as well. When I test this with the same situation in the current Rhino 8 WIP, that works as expected. It looks like this bug got fixed somewhere along the way.

1 Like

Bug or “limitation”… IIRC, SelBoundary was pixel-based (at least partially) and thus the zoom level mattered. Maybe Mikko reworked for V8 it to eliminate this limitation.


Hi Wim
Thanks for your testing.
It works in Rhino 8, so upgrading is one way to avoid this probrem.
Is there any way to work around this in Rhino7?

Hi Eisuke -

I may have spoken too soon. I’ve reviewed YT reports for the SelBoundary command and nothing has been changed for Rhino 8. In testing further, I can make that fail in Rhino 8 as well.

In 2012, the Precise=Yes/No option was added and the current help file entry for this command is based on that YT (RH-12193 Added Precise=Yes/No option).
In 2017, RH-37631 “made SelBoundary tolerate some fuzz in the tests done in screen space coordinates”. That reports makes no mention of the precise mode…

I’ve created RH-73387 - SelBoundary: Failure case - to have the developer have a look at this.

If you always need to check this in the Top viewport, I suppose you could reduce this to a 2D intersection problem that can be scripted. Here’s a very quick attempt of such in Grasshopper:
SelBoundary Workaround (11.9 KB)


1 Like

Hi Wim
I’m sorry for the misunderstanding as well.
Also, thanks for reporting the issue and Grasshopper sample!
I usually process objects in TopView.
I will check if i can do what I want to do with the sample you provided.

Hi Wim
I tried this work around and it worked fine. Thank you!
I usually use python scripts, so I tried to make it work with python scripts using the same idea and will share the sample code.

import rhinoscriptsyntax as rs
def project_to_plane(obj):
    # Cplane must be xy-planar.
    rs.Command("_ProjectToCPlane _No _Enter")
    project_obj = rs.LastCreatedObjects()
    return project_obj

curve = "curve_guid"
brep = "brep_guid"
curve_project = project_to_plane(curve)
brep_project = project_to_plane(brep)
result = rs.CurveBrepIntersect(curve_project, brep_project)
if result:

RH-73387 is fixed in the latest WIP