It looks like you're new here. If you want to get involved, click one of these buttons!
I want to find shapes that overlap with a search region box. There is the method 'db.Shapes.each_overlapping' which from the description sounds like exactly what I need. However, this method somehow checks not the shapes for overlapping but the bounding boxes of the shapes.
Here is an example where the path and the search box do not geometrically even touch each other, but the bounding boxes do:
s = db.Shapes() path = db.Path([db.Point(0, 0), db.Point(0, 10), db.Point(10, 10)], 2) s.insert(path) search_box = db.Box(db.Point(4, 4), db.Point(5, 5)) overlap = list(s.each_overlapping(search_box)) assert len(overlap) == 0
What is the proper way to find overlapping shapes of a box? For me it is also important to preserve the properties of the shapes, so I cannot convert the Shapes object into a Region.
Thanks in advance!