diff --git a/src/pyedb/configuration/cfg_padstacks.py b/src/pyedb/configuration/cfg_padstacks.py index 96cbda4684..acff073046 100644 --- a/src/pyedb/configuration/cfg_padstacks.py +++ b/src/pyedb/configuration/cfg_padstacks.py @@ -62,7 +62,9 @@ def apply(self): def retrieve_parameters_from_edb(self): self.clean() - for _, obj in self._pedb.padstacks.definitions.items(): + for name, obj in self._pedb.padstacks.definitions.items(): + if name.lower() == "symbol": + continue pdef = CfgPadstackDefinition(self._pedb, obj) pdef.retrieve_parameters_from_edb() self.definitions.append(pdef) diff --git a/src/pyedb/configuration/configuration.py b/src/pyedb/configuration/configuration.py index f13d7570ab..dd75d4186a 100644 --- a/src/pyedb/configuration/configuration.py +++ b/src/pyedb/configuration/configuration.py @@ -327,7 +327,7 @@ def export( self, file_path, stackup=True, - package_definitions=True, + package_definitions=False, setups=True, sources=True, ports=True, diff --git a/src/pyedb/dotnet/edb_core/cell/primitive/primitive.py b/src/pyedb/dotnet/edb_core/cell/primitive/primitive.py index aa99dbc3b8..bf56a930e0 100644 --- a/src/pyedb/dotnet/edb_core/cell/primitive/primitive.py +++ b/src/pyedb/dotnet/edb_core/cell/primitive/primitive.py @@ -603,10 +603,6 @@ def polygon_data(self): """:class:`pyedb.dotnet.edb_core.dotnet.database.PolygonDataDotNet`: Outer contour of the Polygon object.""" return PolygonData(self._pedb, self._edb_object.GetPolygonData()) - @polygon_data.setter - def polygon_data(self, poly): - self._edb_object.SetPolygonData(poly._edb_object) - def add_void(self, point_list): """Add a void to current primitive. @@ -757,24 +753,6 @@ def points_raw(self): points.append(point) return points - def expand(self, offset=0.001, tolerance=1e-12, round_corners=True, maximum_corner_extension=0.001): - """Expand the polygon shape by an absolute value in all direction. - Offset can be negative for negative expansion. - - Parameters - ---------- - offset : float, optional - Offset value in meters. - tolerance : float, optional - Tolerance in meters. - round_corners : bool, optional - Whether to round corners or not. - If True, use rounded corners in the expansion otherwise use straight edges (can be degenerate). - maximum_corner_extension : float, optional - The maximum corner extension (when round corners are not used) at which point the corner is clipped. - """ - return self.polygon_data.expand(offset, tolerance, round_corners, maximum_corner_extension) - def scale(self, factor, center=None): """Scales the polygon relative to a center point by a factor. diff --git a/src/pyedb/dotnet/edb_core/edb_data/primitives_data.py b/src/pyedb/dotnet/edb_core/edb_data/primitives_data.py index bbd9524b2c..687017f0e5 100644 --- a/src/pyedb/dotnet/edb_core/edb_data/primitives_data.py +++ b/src/pyedb/dotnet/edb_core/edb_data/primitives_data.py @@ -29,6 +29,7 @@ RectangleDotNet, TextDotNet, ) +from pyedb.dotnet.edb_core.geometry.polygon_data import PolygonData from pyedb.modeler.geometry_operators import GeometryOperators @@ -305,6 +306,36 @@ def in_polygon( # prim = point_list # return self.add_void(prim) + @property + def polygon_data(self): + """:class:`pyedb.dotnet.edb_core.dotnet.database.PolygonDataDotNet`: Outer contour of the Polygon object.""" + return PolygonData(self._pedb, self._edb_object.GetPolygonData()) + + @polygon_data.setter + def polygon_data(self, poly): + self._edb_object.SetPolygonData(poly._edb_object) + + def expand(self, offset=0.001, tolerance=1e-12, round_corners=True, maximum_corner_extension=0.001): + """Expand the polygon shape by an absolute value in all direction. + Offset can be negative for negative expansion. + + Parameters + ---------- + offset : float, optional + Offset value in meters. + tolerance : float, optional + Tolerance in meters. + round_corners : bool, optional + Whether to round corners or not. + If True, use rounded corners in the expansion otherwise use straight edges (can be degenerate). + maximum_corner_extension : float, optional + The maximum corner extension (when round corners are not used) at which point the corner is clipped. + """ + pd = self.polygon_data + pd.expand(offset, tolerance, round_corners, maximum_corner_extension) + self.polygon_data = pd + return pd + class EdbText(Primitive, TextDotNet): def __init__(self, raw_primitive, core_app): diff --git a/tests/legacy/system/test_edb_modeler.py b/tests/legacy/system/test_edb_modeler.py index 98cc549be2..7e2921e684 100644 --- a/tests/legacy/system/test_edb_modeler.py +++ b/tests/legacy/system/test_edb_modeler.py @@ -85,9 +85,6 @@ def test_modeler_polygons(self): assert k.expand(0.0005) # edb.modeler.parametrize_polygon(k, poly_5953, offset_name=f"offset_{i}", origin=centroid) - poly_167 = [i for i in self.edbapp.modeler.paths if i.id == 167][0] - assert poly_167.expand(0.0005) - def test_modeler_paths(self, edb_examples): """Evaluate modeler paths""" edbapp = edb_examples.get_si_verse()