pyedb 0.37.0__py3-none-any.whl → 0.39.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyedb might be problematic. Click here for more details.
- pyedb/__init__.py +1 -1
- pyedb/common/nets.py +53 -139
- pyedb/configuration/cfg_common.py +1 -1
- pyedb/configuration/cfg_components.py +229 -201
- pyedb/configuration/cfg_data.py +3 -1
- pyedb/configuration/cfg_general.py +4 -2
- pyedb/configuration/cfg_modeler.py +7 -7
- pyedb/configuration/cfg_package_definition.py +1 -1
- pyedb/configuration/cfg_padstacks.py +346 -290
- pyedb/configuration/cfg_ports_sources.py +243 -65
- pyedb/configuration/configuration.py +23 -3
- pyedb/dotnet/{application → database}/Variables.py +21 -21
- pyedb/dotnet/{edb_core → database}/cell/connectable.py +5 -5
- pyedb/dotnet/{edb_core → database}/cell/hierarchy/component.py +11 -11
- pyedb/dotnet/{edb_core → database}/cell/hierarchy/hierarchy_obj.py +1 -1
- pyedb/dotnet/{edb_core → database}/cell/hierarchy/model.py +1 -1
- pyedb/dotnet/{edb_core → database}/cell/layout.py +19 -19
- pyedb/dotnet/{edb_core → database}/cell/layout_obj.py +3 -3
- pyedb/dotnet/{edb_core → database}/cell/primitive/bondwire.py +1 -1
- pyedb/dotnet/{edb_core → database}/cell/primitive/path.py +4 -4
- pyedb/dotnet/{edb_core → database}/cell/primitive/primitive.py +14 -14
- pyedb/dotnet/{edb_core → database}/cell/terminal/bundle_terminal.py +2 -2
- pyedb/dotnet/{edb_core → database}/cell/terminal/edge_terminal.py +4 -4
- pyedb/dotnet/{edb_core → database}/cell/terminal/padstack_instance_terminal.py +2 -2
- pyedb/dotnet/{edb_core → database}/cell/terminal/pingroup_terminal.py +2 -2
- pyedb/dotnet/{edb_core → database}/cell/terminal/point_terminal.py +2 -2
- pyedb/dotnet/{edb_core → database}/cell/terminal/terminal.py +11 -11
- pyedb/dotnet/{edb_core → database}/cell/voltage_regulator.py +2 -2
- pyedb/dotnet/{edb_core → database}/components.py +101 -124
- pyedb/dotnet/{edb_core → database}/definition/component_def.py +5 -5
- pyedb/dotnet/{edb_core → database}/definition/component_model.py +1 -1
- pyedb/dotnet/{edb_core → database}/definition/definition_obj.py +1 -1
- pyedb/dotnet/{edb_core → database}/definition/definitions.py +2 -2
- pyedb/dotnet/{edb_core → database}/definition/package_def.py +4 -4
- pyedb/dotnet/{edb_core → database}/dotnet/database.py +8 -8
- pyedb/dotnet/{edb_core → database}/dotnet/primitive.py +9 -9
- pyedb/dotnet/{edb_core → database}/edb_data/control_file.py +12 -12
- pyedb/dotnet/{edb_core → database}/edb_data/hfss_extent_info.py +7 -7
- pyedb/dotnet/{edb_core → database}/edb_data/nets_data.py +10 -13
- pyedb/dotnet/{edb_core → database}/edb_data/padstacks_data.py +60 -73
- pyedb/dotnet/{edb_core → database}/edb_data/ports.py +4 -4
- pyedb/dotnet/{edb_core → database}/edb_data/primitives_data.py +5 -5
- pyedb/dotnet/{edb_core → database}/edb_data/raptor_x_simulation_setup_data.py +4 -4
- pyedb/dotnet/{edb_core → database}/edb_data/simulation_configuration.py +10 -10
- pyedb/dotnet/{edb_core → database}/edb_data/sources.py +4 -4
- pyedb/dotnet/{edb_core → database}/edb_data/variables.py +1 -1
- pyedb/dotnet/{edb_core → database}/geometry/polygon_data.py +4 -4
- pyedb/dotnet/{edb_core → database}/hfss.py +8 -8
- pyedb/dotnet/{edb_core → database}/layout_obj_instance.py +1 -1
- pyedb/dotnet/{edb_core → database}/layout_validation.py +2 -2
- pyedb/dotnet/{edb_core → database}/materials.py +23 -8
- pyedb/dotnet/{edb_core → database}/modeler.py +27 -27
- pyedb/dotnet/{edb_core → database}/net_class.py +8 -8
- pyedb/dotnet/{edb_core → database}/nets.py +12 -12
- pyedb/dotnet/{edb_core → database}/padstack.py +17 -16
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/mesh_operation.py +1 -1
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/settings.py +18 -3
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/sim_setup_info.py +2 -2
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/simulation_settings.py +1 -1
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/siw_dc_ir_settings.py +1 -1
- pyedb/dotnet/{edb_core → database}/sim_setup_data/data/sweep_data.py +4 -4
- pyedb/dotnet/{edb_core → database}/siwave.py +10 -10
- pyedb/dotnet/{edb_core → database}/stackup.py +12 -12
- pyedb/dotnet/{edb_core → database}/utilities/hfss_simulation_setup.py +15 -15
- pyedb/dotnet/{edb_core → database}/utilities/obj_base.py +1 -1
- pyedb/dotnet/{edb_core → database}/utilities/simulation_setup.py +4 -3
- pyedb/dotnet/{edb_core → database}/utilities/siwave_simulation_setup.py +6 -6
- pyedb/dotnet/edb.py +118 -113
- pyedb/extensions/pre_layout_design_toolkit/via_design.py +1151 -0
- pyedb/generic/design_types.py +26 -19
- pyedb/generic/general_methods.py +1 -1
- pyedb/generic/plot.py +0 -2
- pyedb/grpc/database/__init__.py +1 -0
- pyedb/grpc/database/components.py +2354 -0
- pyedb/grpc/database/control_file.py +1277 -0
- pyedb/grpc/database/definition/component_def.py +218 -0
- pyedb/grpc/database/definition/component_model.py +39 -0
- pyedb/grpc/database/definition/component_pin.py +32 -0
- pyedb/grpc/database/definition/materials.py +1207 -0
- pyedb/grpc/database/definition/n_port_component_model.py +34 -0
- pyedb/grpc/database/definition/package_def.py +227 -0
- pyedb/grpc/database/definition/padstack_def.py +842 -0
- pyedb/grpc/database/definitions.py +70 -0
- pyedb/grpc/database/general.py +43 -0
- pyedb/grpc/database/geometry/__init__.py +0 -0
- pyedb/grpc/database/geometry/arc_data.py +93 -0
- pyedb/grpc/database/geometry/point_3d_data.py +79 -0
- pyedb/grpc/database/geometry/point_data.py +30 -0
- pyedb/grpc/database/geometry/polygon_data.py +133 -0
- pyedb/grpc/database/hfss.py +1279 -0
- pyedb/grpc/database/hierarchy/__init__.py +0 -0
- pyedb/grpc/database/hierarchy/component.py +1301 -0
- pyedb/grpc/database/hierarchy/model.py +31 -0
- pyedb/grpc/database/hierarchy/netlist_model.py +30 -0
- pyedb/grpc/database/hierarchy/pin_pair_model.py +128 -0
- pyedb/grpc/database/hierarchy/pingroup.py +245 -0
- pyedb/grpc/database/hierarchy/s_parameter_model.py +33 -0
- pyedb/grpc/database/hierarchy/spice_model.py +48 -0
- pyedb/grpc/database/layers/__init__.py +0 -0
- pyedb/grpc/database/layers/layer.py +57 -0
- pyedb/grpc/database/layers/stackup_layer.py +410 -0
- pyedb/grpc/database/layout/__init__.py +0 -0
- pyedb/grpc/database/layout/cell.py +30 -0
- pyedb/grpc/database/layout/layout.py +196 -0
- pyedb/grpc/database/layout/voltage_regulator.py +149 -0
- pyedb/grpc/database/layout_validation.py +319 -0
- pyedb/grpc/database/modeler.py +1468 -0
- pyedb/grpc/database/net/__init__.py +0 -0
- pyedb/grpc/database/net/differential_pair.py +138 -0
- pyedb/grpc/database/net/extended_net.py +340 -0
- pyedb/grpc/database/net/net.py +198 -0
- pyedb/grpc/database/net/net_class.py +93 -0
- pyedb/grpc/database/nets.py +633 -0
- pyedb/grpc/database/padstacks.py +1500 -0
- pyedb/grpc/database/ports/__init__.py +0 -0
- pyedb/grpc/database/ports/ports.py +396 -0
- pyedb/grpc/database/primitive/__init__.py +3 -0
- pyedb/grpc/database/primitive/bondwire.py +181 -0
- pyedb/grpc/database/primitive/circle.py +75 -0
- pyedb/grpc/database/primitive/padstack_instance.py +1116 -0
- pyedb/grpc/database/primitive/path.py +346 -0
- pyedb/grpc/database/primitive/polygon.py +276 -0
- pyedb/grpc/database/primitive/primitive.py +739 -0
- pyedb/grpc/database/primitive/rectangle.py +146 -0
- pyedb/grpc/database/simulation_setup/__init__.py +0 -0
- pyedb/grpc/database/simulation_setup/adaptive_frequency.py +33 -0
- pyedb/grpc/database/simulation_setup/hfss_advanced_meshing_settings.py +32 -0
- pyedb/grpc/database/simulation_setup/hfss_advanced_settings.py +59 -0
- pyedb/grpc/database/simulation_setup/hfss_dcr_settings.py +35 -0
- pyedb/grpc/database/simulation_setup/hfss_general_settings.py +61 -0
- pyedb/grpc/database/simulation_setup/hfss_settings_options.py +78 -0
- pyedb/grpc/database/simulation_setup/hfss_simulation_settings.py +118 -0
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +355 -0
- pyedb/grpc/database/simulation_setup/hfss_solver_settings.py +34 -0
- pyedb/grpc/database/simulation_setup/mesh_operation.py +34 -0
- pyedb/grpc/database/simulation_setup/raptor_x_advanced_settings.py +34 -0
- pyedb/grpc/database/simulation_setup/raptor_x_general_settings.py +33 -0
- pyedb/grpc/database/simulation_setup/raptor_x_simulation_settings.py +64 -0
- pyedb/grpc/database/simulation_setup/raptor_x_simulation_setup.py +125 -0
- pyedb/grpc/database/simulation_setup/siwave_dcir_simulation_setup.py +34 -0
- pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +119 -0
- pyedb/grpc/database/simulation_setup/sweep_data.py +32 -0
- pyedb/grpc/database/siwave.py +1023 -0
- pyedb/grpc/database/source_excitations.py +2572 -0
- pyedb/grpc/database/stackup.py +2574 -0
- pyedb/grpc/database/terminal/__init__.py +0 -0
- pyedb/grpc/database/terminal/bundle_terminal.py +218 -0
- pyedb/grpc/database/terminal/edge_terminal.py +51 -0
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +171 -0
- pyedb/grpc/database/terminal/pingroup_terminal.py +162 -0
- pyedb/grpc/database/terminal/point_terminal.py +99 -0
- pyedb/grpc/database/terminal/terminal.py +470 -0
- pyedb/grpc/database/utility/__init__.py +3 -0
- pyedb/grpc/database/utility/constants.py +25 -0
- pyedb/grpc/database/utility/heat_sink.py +124 -0
- pyedb/grpc/database/utility/hfss_extent_info.py +448 -0
- pyedb/grpc/database/utility/layout_statistics.py +277 -0
- pyedb/grpc/database/utility/rlc.py +80 -0
- pyedb/grpc/database/utility/simulation_configuration.py +3305 -0
- pyedb/grpc/database/utility/sources.py +388 -0
- pyedb/grpc/database/utility/sweep_data_distribution.py +83 -0
- pyedb/grpc/database/utility/xml_control_file.py +1277 -0
- pyedb/grpc/edb.py +4151 -0
- pyedb/grpc/edb_init.py +481 -0
- pyedb/grpc/rpc_session.py +177 -0
- pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +3 -2
- pyedb/ipc2581/ecad/cad_data/feature.py +4 -3
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +32 -20
- pyedb/ipc2581/ecad/cad_data/outline.py +3 -2
- pyedb/ipc2581/ecad/cad_data/package.py +4 -3
- pyedb/ipc2581/ecad/cad_data/path.py +82 -31
- pyedb/ipc2581/ecad/cad_data/polygon.py +122 -60
- pyedb/ipc2581/ecad/cad_data/profile.py +13 -12
- pyedb/ipc2581/ecad/cad_data/step.py +52 -20
- pyedb/ipc2581/ipc2581.py +47 -49
- pyedb/modeler/geometry_operators.py +1 -1
- {pyedb-0.37.0.dist-info → pyedb-0.39.0.dist-info}/METADATA +9 -6
- pyedb-0.39.0.dist-info/RECORD +288 -0
- pyedb-0.37.0.dist-info/RECORD +0 -194
- /pyedb/dotnet/{edb_core → database}/__init__.py +0 -0
- /pyedb/dotnet/{application → database/cell}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/cell → database/cell/hierarchy}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/hierarchy/netlist_model.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/hierarchy/pin_pair_model.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/hierarchy/s_parameter_model.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/hierarchy/spice_model.py +0 -0
- /pyedb/dotnet/{edb_core → database}/cell/primitive/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/cell/hierarchy → database/cell/terminal}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/cell/terminal → database/definition}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/definition → database/dotnet}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core/dotnet → database/edb_data}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/edb_data/design_options.py +0 -0
- /pyedb/dotnet/{edb_core → database}/edb_data/edbvalue.py +0 -0
- /pyedb/dotnet/{edb_core → database}/edb_data/layer_data.py +0 -0
- /pyedb/dotnet/{edb_core → database}/edb_data/utilities.py +0 -0
- /pyedb/dotnet/{edb_core → database}/general.py +0 -0
- /pyedb/dotnet/{edb_core/edb_data → database/geometry}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/geometry/point_data.py +0 -0
- /pyedb/dotnet/{edb_core → database}/sim_setup_data/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/sim_setup_data/data/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/sim_setup_data/data/adaptive_frequency_data.py +0 -0
- /pyedb/dotnet/{edb_core/geometry → database/sim_setup_data/io}/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/sim_setup_data/io/siwave.py +0 -0
- /pyedb/dotnet/{edb_core → database}/utilities/__init__.py +0 -0
- /pyedb/dotnet/{edb_core → database}/utilities/heatsink.py +0 -0
- /pyedb/{dotnet/edb_core/sim_setup_data/io → grpc/database/definition}/__init__.py +0 -0
- {pyedb-0.37.0.dist-info → pyedb-0.39.0.dist-info}/LICENSE +0 -0
- {pyedb-0.37.0.dist-info → pyedb-0.39.0.dist-info}/WHEEL +0 -0
pyedb/__init__.py
CHANGED
pyedb/common/nets.py
CHANGED
|
@@ -1,44 +1,9 @@
|
|
|
1
1
|
import math
|
|
2
|
-
import os
|
|
3
2
|
import time
|
|
4
3
|
|
|
5
4
|
from pyedb.generic.constants import CSS4_COLORS
|
|
6
5
|
|
|
7
6
|
|
|
8
|
-
def is_notebook():
|
|
9
|
-
"""Check if pyaedt is running in Jupyter or not.
|
|
10
|
-
|
|
11
|
-
Returns
|
|
12
|
-
-------
|
|
13
|
-
bool
|
|
14
|
-
"""
|
|
15
|
-
try:
|
|
16
|
-
shell = get_ipython().__class__.__name__
|
|
17
|
-
if shell in ["ZMQInteractiveShell"]: # pragma: no cover
|
|
18
|
-
return True # Jupyter notebook or qtconsole
|
|
19
|
-
else:
|
|
20
|
-
return False
|
|
21
|
-
except NameError:
|
|
22
|
-
return False # Probably standard Python interpreter
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def is_ipython():
|
|
26
|
-
"""Check if pyaedt is running in Jupyter or not.
|
|
27
|
-
|
|
28
|
-
Returns
|
|
29
|
-
-------
|
|
30
|
-
bool
|
|
31
|
-
"""
|
|
32
|
-
try:
|
|
33
|
-
shell = get_ipython().__class__.__name__
|
|
34
|
-
if shell in ["TerminalInteractiveShell", "SpyderShell"]:
|
|
35
|
-
return True # Jupyter notebook or qtconsole
|
|
36
|
-
else: # pragma: no cover
|
|
37
|
-
return False
|
|
38
|
-
except NameError:
|
|
39
|
-
return False # Probably standard Python interpreter
|
|
40
|
-
|
|
41
|
-
|
|
42
7
|
class CommonNets:
|
|
43
8
|
def __init__(self, _pedb):
|
|
44
9
|
self._pedb = _pedb
|
|
@@ -57,8 +22,6 @@ class CommonNets:
|
|
|
57
22
|
show=True,
|
|
58
23
|
annotate_component_names=True,
|
|
59
24
|
plot_vias=False,
|
|
60
|
-
include_outline=True,
|
|
61
|
-
plot_edges=True,
|
|
62
25
|
**kwargs,
|
|
63
26
|
):
|
|
64
27
|
"""Plot a Net to Matplotlib 2D Chart.
|
|
@@ -79,7 +42,7 @@ class CommonNets:
|
|
|
79
42
|
If a path is specified the plot will be saved in this location.
|
|
80
43
|
If ``save_plot`` is provided, the ``show`` parameter is ignored.
|
|
81
44
|
outline : list, optional
|
|
82
|
-
|
|
45
|
+
List of points of the outline to plot.
|
|
83
46
|
size : tuple, int, optional
|
|
84
47
|
Image size in pixel (width, height). Default value is ``(6000, 3000)``
|
|
85
48
|
top_view : bool, optional
|
|
@@ -96,17 +59,12 @@ class CommonNets:
|
|
|
96
59
|
Default is ``False``.
|
|
97
60
|
show : bool, optional
|
|
98
61
|
Whether to show the plot or not. Default is `True`.
|
|
99
|
-
include_outline : bool, optional
|
|
100
|
-
Whether to include the internal layout outline or not. Default is `True`.
|
|
101
|
-
plot_edges : bool, optional
|
|
102
|
-
Whether to plot polygon edges or not. Default is `True`.
|
|
103
62
|
|
|
104
63
|
Returns
|
|
105
64
|
-------
|
|
106
65
|
(ax, fig)
|
|
107
66
|
Matplotlib ax and figures.
|
|
108
67
|
"""
|
|
109
|
-
|
|
110
68
|
if "plot_components_on_top" in kwargs and top_view:
|
|
111
69
|
plot_components = kwargs["plot_components_on_top"]
|
|
112
70
|
if "plot_components_on_bottom" in kwargs and not top_view:
|
|
@@ -118,30 +76,22 @@ class CommonNets:
|
|
|
118
76
|
sign = -1
|
|
119
77
|
return [[sign * i[0], i[1]] for i in poly]
|
|
120
78
|
|
|
121
|
-
|
|
122
|
-
import matplotlib.pyplot as plt
|
|
123
|
-
except ImportError: # pragma: no cover
|
|
124
|
-
self._pedb.logger.error("Matplotlib is needed. Please, install it first.")
|
|
125
|
-
return False
|
|
79
|
+
import matplotlib.pyplot as plt
|
|
126
80
|
|
|
127
81
|
dpi = 100.0
|
|
128
82
|
figsize = (size[0] / dpi, size[1] / dpi)
|
|
129
83
|
|
|
130
84
|
fig = plt.figure(figsize=figsize)
|
|
131
85
|
ax = fig.add_subplot(1, 1, 1)
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
from shapely.plotting import plot_line, plot_polygon
|
|
142
|
-
except ImportError: # pragma: no cover
|
|
143
|
-
self._pedb.logger.error("Shapely is needed. Please, install it first.")
|
|
144
|
-
return False
|
|
86
|
+
from shapely import affinity
|
|
87
|
+
from shapely.geometry import (
|
|
88
|
+
LinearRing,
|
|
89
|
+
MultiLineString,
|
|
90
|
+
MultiPolygon,
|
|
91
|
+
Point,
|
|
92
|
+
Polygon,
|
|
93
|
+
)
|
|
94
|
+
from shapely.plotting import plot_line, plot_polygon
|
|
145
95
|
|
|
146
96
|
start_time = time.time()
|
|
147
97
|
if not nets:
|
|
@@ -154,33 +104,19 @@ class CommonNets:
|
|
|
154
104
|
layers = [layers]
|
|
155
105
|
color_index = 0
|
|
156
106
|
label_colors = {}
|
|
157
|
-
edge_colors = {}
|
|
158
107
|
if outline:
|
|
159
108
|
poly = Polygon(outline)
|
|
160
109
|
plot_line(poly.boundary, add_points=False, color=(0.7, 0, 0), linewidth=4)
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
plot_line(poly, add_points=False, color=(0.7, 0, 0), linewidth=4)
|
|
172
|
-
else:
|
|
173
|
-
bbox = self._pedb.hfss.get_layout_bounding_box()
|
|
174
|
-
if not bbox:
|
|
175
|
-
return False, False
|
|
176
|
-
x1 = bbox[0]
|
|
177
|
-
x2 = bbox[2]
|
|
178
|
-
y1 = bbox[1]
|
|
179
|
-
y2 = bbox[3]
|
|
180
|
-
p = [(x1, y1), (x1, y2), (x2, y2), (x2, y1), (x1, y1)]
|
|
181
|
-
p = mirror_poly(p)
|
|
182
|
-
poly = LinearRing(p)
|
|
183
|
-
plot_line(poly, add_points=False, color=(0.7, 0, 0), linewidth=4)
|
|
110
|
+
else:
|
|
111
|
+
bbox = self._pedb.hfss.get_layout_bounding_box()
|
|
112
|
+
x1 = bbox[0]
|
|
113
|
+
x2 = bbox[2]
|
|
114
|
+
y1 = bbox[1]
|
|
115
|
+
y2 = bbox[3]
|
|
116
|
+
p = [(x1, y1), (x1, y2), (x2, y2), (x2, y1), (x1, y1)]
|
|
117
|
+
p = mirror_poly(p)
|
|
118
|
+
poly = LinearRing(p)
|
|
119
|
+
plot_line(poly, add_points=False, color=(0.7, 0, 0), linewidth=4)
|
|
184
120
|
layer_colors = {i: k.color for i, k in self._pedb.stackup.layers.items()}
|
|
185
121
|
top_layer = list(self._pedb.stackup.signal_layers.keys())[0]
|
|
186
122
|
bottom_layer = list(self._pedb.stackup.signal_layers.keys())[-1]
|
|
@@ -310,24 +246,14 @@ class CommonNets:
|
|
|
310
246
|
# poly = LineString(line).buffer(prim.width / 2)
|
|
311
247
|
# else:
|
|
312
248
|
xt, yt = prim.points()
|
|
313
|
-
if len(xt) < 3:
|
|
314
|
-
return
|
|
315
249
|
p1 = [(i, j) for i, j in zip(xt[::-1], yt[::-1])]
|
|
316
250
|
p1 = mirror_poly(p1)
|
|
317
251
|
|
|
318
252
|
holes = []
|
|
319
253
|
for void in prim.voids:
|
|
320
254
|
xvt, yvt = void.points(arc_segments=3)
|
|
321
|
-
if len(xvt) < 3:
|
|
322
|
-
continue
|
|
323
255
|
h1 = mirror_poly([(i, j) for i, j in zip(xvt, yvt)])
|
|
324
256
|
holes.append(h1)
|
|
325
|
-
if len(holes) > 1:
|
|
326
|
-
holes = union_all([Polygon(i) for i in holes])
|
|
327
|
-
if isinstance(holes, MultiPolygon):
|
|
328
|
-
holes = [i.boundary for i in list(holes.geoms)]
|
|
329
|
-
else:
|
|
330
|
-
holes = [holes.boundary]
|
|
331
257
|
poly = Polygon(p1, holes)
|
|
332
258
|
if layer_name == "Outline":
|
|
333
259
|
if label_colors[label] in lines:
|
|
@@ -338,36 +264,33 @@ class CommonNets:
|
|
|
338
264
|
|
|
339
265
|
if color_by_net:
|
|
340
266
|
for net in nets:
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
if lines:
|
|
369
|
-
ob = MultiLineString(p)
|
|
370
|
-
plot_line(ob, ax=ax, add_points=False, color=label_colors[label], linewidth=1, label=label)
|
|
267
|
+
if net in self._pedb.nets.nets:
|
|
268
|
+
prims = self._pedb.nets.nets[net].primitives
|
|
269
|
+
polys = []
|
|
270
|
+
lines = []
|
|
271
|
+
if net not in nets:
|
|
272
|
+
continue
|
|
273
|
+
label = "Net " + net
|
|
274
|
+
label_colors[label] = list(CSS4_COLORS.keys())[color_index]
|
|
275
|
+
color_index += 1
|
|
276
|
+
if color_index >= len(CSS4_COLORS):
|
|
277
|
+
color_index = 0
|
|
278
|
+
for prim in prims:
|
|
279
|
+
create_poly(prim, polys, lines)
|
|
280
|
+
if polys:
|
|
281
|
+
ob = MultiPolygon(polys)
|
|
282
|
+
plot_polygon(
|
|
283
|
+
ob,
|
|
284
|
+
ax=ax,
|
|
285
|
+
color=label_colors[label],
|
|
286
|
+
add_points=False,
|
|
287
|
+
alpha=0.7,
|
|
288
|
+
label=label,
|
|
289
|
+
edgecolor="none",
|
|
290
|
+
)
|
|
291
|
+
if lines:
|
|
292
|
+
ob = MultiLineString(p)
|
|
293
|
+
plot_line(ob, ax=ax, add_points=False, color=label_colors[label], linewidth=1, label=label)
|
|
371
294
|
else:
|
|
372
295
|
prims_by_layers_dict = {i: j for i, j in self._pedb.modeler.primitives_by_layer.items()}
|
|
373
296
|
if not top_view:
|
|
@@ -397,10 +320,6 @@ class CommonNets:
|
|
|
397
320
|
if color_index >= len(CSS4_COLORS):
|
|
398
321
|
color_index = 0
|
|
399
322
|
label_colors[label] = c
|
|
400
|
-
try:
|
|
401
|
-
edge_colors[label] = [i * 0.5 for i in c]
|
|
402
|
-
except TypeError:
|
|
403
|
-
edge_colors[label] = label_colors[label]
|
|
404
323
|
for prim in prims:
|
|
405
324
|
create_poly(prim, polys, lines)
|
|
406
325
|
if polys:
|
|
@@ -412,7 +331,7 @@ class CommonNets:
|
|
|
412
331
|
add_points=False,
|
|
413
332
|
alpha=alpha,
|
|
414
333
|
label=label,
|
|
415
|
-
edgecolor="none"
|
|
334
|
+
edgecolor="none",
|
|
416
335
|
)
|
|
417
336
|
if lines:
|
|
418
337
|
ob = MultiLineString(p)
|
|
@@ -480,15 +399,10 @@ class CommonNets:
|
|
|
480
399
|
plt.title(message, size=20)
|
|
481
400
|
if show_legend:
|
|
482
401
|
plt.legend(loc="upper left", fontsize="x-large")
|
|
483
|
-
end_time = time.time() - start_time
|
|
484
|
-
self._logger.info(f"Plot Generation time {round(end_time, 3)}")
|
|
485
402
|
if save_plot:
|
|
486
403
|
plt.savefig(save_plot)
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
fig.show()
|
|
492
|
-
else:
|
|
493
|
-
plt.show()
|
|
404
|
+
elif show:
|
|
405
|
+
plt.show()
|
|
406
|
+
end_time = time.time() - start_time
|
|
407
|
+
self._logger.info(f"Plot Generation time {round(end_time, 3)}")
|
|
494
408
|
return fig, ax
|