if I can get a boundingbox from RhinoObject.Geometry.GetBoundingBox(bool), then, could I know from the boundingbox the geometry from which it was created?
Not from the bounding box itself. But it is created from
RhinoObject.Geometry, the object you’re asking to create a bounding box. I’m not sure I quite understand what you want to do though, can you elaborate?
I have a boundignbox with one or more objects within its limits, I want to know what those objects are
Loop through all objects in the document and see if their bounding boxes are contained within the bounding box you are interested in: BoundingBox.Contains Method (BoundingBox).
Probably something like:
main_bb = ob.Geometry.GetBoundingBox(True) ob_id = ob.Id obs_in_main_bb = [ob for ob in sc.doc.Objects if main_bb.Contains(ob.Geometry.GetBoundingBox(True) and not ob_id.Equals(ob.id)]
obs_in_main_bb will contain all objects contained within the main bounding box, excluding the object from which you got the bounding box.
(note: untested, I type this while I sit at the barber shop).