Verifies an object's bounding box is inside of another bounding box.
rhinoscriptsyntax.IsObjectInBox(object_id, box, test_mode=True)
rhinoscript.object.IsObjectInBox(object_id, box, test_mode=True)
object_id |
Required. String or Guid. The identifier of an object. |
||||||
box |
Required. List of Points or BoundingBox. The bounding box to test against. A bounding box is an array of eight 3-D points that define the corners of the box. Points need to be in counter-clockwise order starting with the bottom rectangle of the box. |
||||||
test_mode |
Optional. Boolean. The test mode.
|
True |
The object is inside of box |
False |
The object is not inside of box |
import rhinoscriptsyntax as rs
box = rs.GetBox()
if box:
rs.EnableRedraw(False)
object_list = rs.AllObjects()
for obj in object_list:
if rs.IsObjectInBox(obj, box, False):
rs.SelectObject( obj )
rs.EnableRedraw( True )