Closed svandenb-dev closed 1 day ago
Hey @svandenb-dev idx is not defined. What does it stand for?
@gkorompi I assume you took the code from unit test ? idx is the Rtree index (Spactial indexed class) to speed up the via search. https://en.wikipedia.org/wiki/R-tree fyi
I will check why bounding_box is failing
@gkorompi this bug is now fixed. void.bbox works and now regarding the refactoring it is : void.polygon_data.bounding_box
Before submitting the issue
Description of the bug
bounding_box property returns an error. See code below, bounding_box is also available and if bbox is replaced by this one it fails,
Steps To Reproduce
from pyedb.dotnet.edb import Edb from pyedb.generic.general_methods import generate_unique_folder_name import pyedb.misc.downloads as downloads
temp_folder = generate_unique_folder_name() targetfile = downloads.download_file("edb/ANSYS-HSD_V1.aedb", destination=temp_folder) edbapp = Edb(edbpath=targetfile, edbversion="2024.1", remove_existing_aedt=True)
poly_with_voids = [pp for pp in edbapp.modeler.polygons if pp.has_voids] for poly in poly_with_voids: for void in poly.voids: test = list(idx.intersection(void.bbox)) if test: void.expand(1e-3)
Which Operating System are you using?
Windows
Which Python version are you using?
3.10
Installed packages
NA