Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Improve cutout voids #807

Merged
merged 41 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1df26cb
hfsspi SimsetupInfo bug fixed
svandenb-dev Jun 21, 2024
08113cd
Merge remote-tracking branch 'origin/main'
svandenb-dev Jun 24, 2024
80b8b48
Merge remote-tracking branch 'origin/main'
svandenb-dev Jun 24, 2024
f33aaed
Merge remote-tracking branch 'origin/main'
svandenb-dev Jun 25, 2024
1935556
temp
svandenb-dev Jun 25, 2024
66fb218
Merge remote-tracking branch 'origin/main'
svandenb-dev Jun 28, 2024
14846b7
Merge remote-tracking branch 'origin/main'
svandenb-dev Jul 1, 2024
54e6d7f
Merge remote-tracking branch 'origin/main'
svandenb-dev Jul 2, 2024
fa3f4cd
Merge remote-tracking branch 'origin/main'
svandenb-dev Jul 3, 2024
7267ca7
Merge remote-tracking branch 'origin/main'
svandenb-dev Jul 11, 2024
bae0c6d
Merge remote-tracking branch 'origin/main'
svandenb-dev Jul 11, 2024
f0ac95c
Merge remote-tracking branch 'origin/main'
svandenb-dev Jul 12, 2024
b5717ac
Merge remote-tracking branch 'origin/main'
svandenb-dev Jul 24, 2024
6065327
Merge remote-tracking branch 'origin/main'
svandenb-dev Jul 24, 2024
a62b8f8
Merge remote-tracking branch 'origin/main'
svandenb-dev Jul 24, 2024
a800262
Merge remote-tracking branch 'origin/main'
svandenb-dev Jul 25, 2024
e14256f
Merge remote-tracking branch 'origin/main'
svandenb-dev Aug 19, 2024
54e2691
Merge remote-tracking branch 'origin/main'
svandenb-dev Aug 20, 2024
7471fa1
create port in pin exception handling
svandenb-dev Aug 20, 2024
4f989d1
Merge remote-tracking branch 'origin/main'
svandenb-dev Aug 21, 2024
9061774
Merge remote-tracking branch 'origin/main'
svandenb-dev Aug 22, 2024
e53bac6
Merge remote-tracking branch 'origin/main'
svandenb-dev Aug 29, 2024
f87902a
Merge remote-tracking branch 'origin/main'
svandenb-dev Aug 30, 2024
99e73b9
Merge remote-tracking branch 'origin/main'
svandenb-dev Sep 2, 2024
cdb58c1
Merge remote-tracking branch 'origin/main'
svandenb-dev Sep 2, 2024
bd6cfd6
Merge remote-tracking branch 'origin/main'
svandenb-dev Sep 4, 2024
8d2ee7c
Merge remote-tracking branch 'origin/main'
svandenb-dev Sep 4, 2024
08cf92f
Merge remote-tracking branch 'origin/main'
svandenb-dev Sep 5, 2024
c441ad5
Merge remote-tracking branch 'origin/main'
svandenb-dev Sep 11, 2024
44fc86f
Merge remote-tracking branch 'origin/main'
svandenb-dev Sep 11, 2024
90574c0
Merge remote-tracking branch 'origin/main'
svandenb-dev Sep 16, 2024
9c39c26
Improve the cutout voids trying to take into account the voids presen…
Sep 19, 2024
077919d
Improve the cutout voids trying to take into account the voids presen…
Sep 20, 2024
0304cb8
MISC: Auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 20, 2024
deb601c
Improve the cutout voids trying to take into account the voids presen…
Sep 20, 2024
f2eda90
Merge remote-tracking branch 'origin/improve_cutout_voids' into impro…
Sep 20, 2024
b5831ec
Merge remote-tracking branch 'origin/main'
svandenb-dev Sep 20, 2024
9054211
Merge branch 'main' into improve_cutout_voids
svandenb-dev Sep 20, 2024
08c650a
grpc
svandenb-dev Sep 20, 2024
e84edcf
grpc
svandenb-dev Sep 20, 2024
d03e305
grpc
svandenb-dev Sep 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/pyedb/dotnet/edb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,14 @@ def _create_conformal(
)
else:
obj_data = i.Expand(expansion_size, tolerance, round_corner, round_extension)
if inlcude_voids_in_extents and "PolygonData" not in str(i) and i.has_voids and obj_data:
for void in i.voids:
void_data = void.primitive_object.GetPolygonData().Expand(
-1 * expansion_size, tolerance, round_corner, round_extension
)
if void_data:
for v in list(void_data):
obj_data[0].AddHole(v)
if obj_data:
if not inlcude_voids_in_extents:
unite_polys.extend(list(obj_data))
Expand Down Expand Up @@ -2209,9 +2217,9 @@ def _create_cutout_multithread(
pins_to_preserve.extend([i.id for i in el.pins.values()])
nets_to_preserve.extend(el.nets)
if include_pingroups:
for reference in reference_list:
for pin in self.nets.nets[reference].padstack_instances:
if pin.pingroups:
for pingroup in self.padstacks.pingroups:
for pin in pingroup.pins.values():
if pin.net_name in reference_list:
pins_to_preserve.append(pin.id)
if check_terminals:
terms = [
Expand Down Expand Up @@ -2280,12 +2288,12 @@ def _create_cutout_multithread(
if extent_type in ["Conforming", self.edb_api.geometry.extent_type.Conforming, 1]:
if extent_defeature > 0:
_poly = _poly.Defeature(extent_defeature)

_poly1 = _poly.CreateFromArcs(_poly.GetArcData(), True)
if inlcude_voids_in_extents:
for hole in list(_poly.Holes):
if hole.Area() >= 0.05 * _poly1.Area():
_poly1.AddHole(hole)
self.logger.info(f"Number of voids included:{len(list(_poly1.Holes))}")
_poly = _poly1
if not _poly or _poly.IsNull():
self._logger.error("Failed to create Extent.")
Expand Down
15 changes: 9 additions & 6 deletions src/pyedb/dotnet/edb_core/edb_data/nets_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from pyedb.dotnet.edb_core.dotnet.database import (
DifferentialPairDotNet,
ExtendedNetDotNet,
Expand Down Expand Up @@ -58,7 +57,10 @@ def primitives(self):
-------
list of :class:`pyedb.dotnet.edb_core.edb_data.primitives_data.EDBPrimitives`
"""
return [self._app.layout.find_object_by_id(i.GetId()) for i in self.net_object.Primitives]
from pyedb.dotnet.edb_core.cell.layout import primitive_cast

return [primitive_cast(self._app, i) for i in self.net_object.Primitives]
# return [self._app.layout.find_object_by_id(i.GetId()) for i in self.net_object.Primitives]

@property
def padstack_instances(self):
Expand All @@ -67,10 +69,11 @@ def padstack_instances(self):
Returns
-------
list of :class:`pyedb.dotnet.edb_core.edb_data.padstacks_data.EDBPadstackInstance`"""
name = self.name
return [
EDBPadstackInstance(i, self._app) for i in self.net_object.PadstackInstances if i.GetNet().GetName() == name
]
# name = self.name
# return [
# EDBPadstackInstance(i, self._app) for i in self.net_object.PadstackInstances if i.GetNet().GetName() == name
# ]
return [EDBPadstackInstance(i, self._app) for i in self.net_object.PadstackInstances]

@property
def components(self):
Expand Down
4 changes: 4 additions & 0 deletions tests/legacy/system/test_edb.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,17 @@ def test_create_custom_cutout_4(self):
self.local_scratch.copyfolder(source_path, target_path)

edbapp = Edb(target_path, edbversion=desktop_version)
edbapp.components.create_pingroup_from_pins(
[i for i in list(edbapp.components.instances["U1"].pins.values()) if i.net_name == "GND"]
)

assert edbapp.cutout(
signal_list=["DDR4_DQS0_P", "DDR4_DQS0_N"],
reference_list=["GND"],
number_of_threads=4,
extent_type="ConvexHull",
use_pyaedt_extent_computing=True,
include_pingroups=True,
check_terminals=True,
expansion_factor=4,
)
Expand Down
Loading