here is simple script to select all the circles of a certain radius. It should be pretty straight forward. However, when I run it I find it only finds SOME of the circles of that radius. When I look at the ones it doesn’t select, they seem to have an identical radius to the ones it did select.
rs.UnselectAllObjects() diam = rs.GetReal("Diameter to search", 5.0 ) srchrad = diam/2.0 objs = rs.ObjectsByType (4, select=False) info = 0 for object_id in objs: if rs.IsCircle(object_id): if rs.CircleRadius(object_id) == (srchrad): rs.SelectObject(object_id) info += 1 print str(info) + " objects selected"
I’m wondering if it has something to do with rounding, or if the object has been scaled or moved or copied or something. Any suggestions?