pyedb 0.56.0__py3-none-any.whl → 0.57.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.

Files changed (99) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/configuration/cfg_data.py +3 -0
  3. pyedb/configuration/cfg_terminals.py +232 -0
  4. pyedb/configuration/configuration.py +146 -3
  5. pyedb/dotnet/clr_module.py +1 -2
  6. pyedb/dotnet/database/Variables.py +30 -22
  7. pyedb/dotnet/database/cell/layout.py +5 -1
  8. pyedb/dotnet/database/cell/primitive/primitive.py +2 -2
  9. pyedb/dotnet/database/cell/terminal/bundle_terminal.py +12 -0
  10. pyedb/dotnet/database/cell/terminal/pingroup_terminal.py +1 -1
  11. pyedb/dotnet/database/cell/terminal/terminal.py +38 -0
  12. pyedb/dotnet/database/components.py +14 -16
  13. pyedb/dotnet/database/dotnet/database.py +1 -0
  14. pyedb/dotnet/database/edb_data/control_file.py +6 -3
  15. pyedb/dotnet/database/edb_data/nets_data.py +3 -3
  16. pyedb/dotnet/database/edb_data/padstacks_data.py +5 -2
  17. pyedb/dotnet/database/edb_data/ports.py +0 -25
  18. pyedb/dotnet/database/edb_data/primitives_data.py +3 -3
  19. pyedb/dotnet/database/edb_data/raptor_x_simulation_setup_data.py +18 -19
  20. pyedb/dotnet/database/edb_data/simulation_configuration.py +3 -3
  21. pyedb/dotnet/database/hfss.py +9 -8
  22. pyedb/dotnet/database/layout_validation.py +6 -3
  23. pyedb/dotnet/database/materials.py +1 -3
  24. pyedb/dotnet/database/modeler.py +7 -3
  25. pyedb/dotnet/database/nets.py +27 -19
  26. pyedb/dotnet/database/padstack.py +4 -2
  27. pyedb/dotnet/database/sim_setup_data/io/siwave.py +1 -1
  28. pyedb/dotnet/database/siwave.py +4 -3
  29. pyedb/dotnet/database/stackup.py +50 -26
  30. pyedb/dotnet/database/utilities/heatsink.py +0 -1
  31. pyedb/dotnet/database/utilities/simulation_setup.py +7 -5
  32. pyedb/dotnet/database/utilities/siwave_cpa_simulation_setup.py +1 -0
  33. pyedb/dotnet/database/utilities/siwave_simulation_setup.py +5 -2
  34. pyedb/dotnet/edb.py +39 -34
  35. pyedb/exceptions.py +1 -2
  36. pyedb/extensions/create_cell_array.py +19 -5
  37. pyedb/generic/data_handlers.py +13 -23
  38. pyedb/generic/design_types.py +9 -35
  39. pyedb/generic/filesystem.py +4 -2
  40. pyedb/generic/general_methods.py +4 -5
  41. pyedb/generic/plot.py +2 -2
  42. pyedb/grpc/database/_typing.py +0 -0
  43. pyedb/grpc/database/components.py +7 -8
  44. pyedb/grpc/database/control_file.py +14 -35
  45. pyedb/grpc/database/definition/materials.py +1 -1
  46. pyedb/grpc/database/definition/package_def.py +6 -3
  47. pyedb/grpc/database/definition/padstack_def.py +4 -7
  48. pyedb/grpc/database/hfss.py +1 -4
  49. pyedb/grpc/database/hierarchy/component.py +3 -4
  50. pyedb/grpc/database/hierarchy/pingroup.py +16 -3
  51. pyedb/grpc/database/layers/layer.py +1 -2
  52. pyedb/grpc/database/layers/stackup_layer.py +42 -19
  53. pyedb/grpc/database/layout/layout.py +43 -27
  54. pyedb/grpc/database/layout/voltage_regulator.py +6 -1
  55. pyedb/grpc/database/layout_validation.py +5 -2
  56. pyedb/grpc/database/modeler.py +226 -244
  57. pyedb/grpc/database/net/differential_pair.py +9 -2
  58. pyedb/grpc/database/net/extended_net.py +24 -9
  59. pyedb/grpc/database/net/net.py +14 -5
  60. pyedb/grpc/database/net/net_class.py +24 -7
  61. pyedb/grpc/database/nets.py +11 -43
  62. pyedb/grpc/database/padstacks.py +5 -16
  63. pyedb/grpc/database/primitive/bondwire.py +3 -67
  64. pyedb/grpc/database/primitive/circle.py +42 -3
  65. pyedb/grpc/database/primitive/padstack_instance.py +17 -19
  66. pyedb/grpc/database/primitive/path.py +154 -5
  67. pyedb/grpc/database/primitive/polygon.py +73 -7
  68. pyedb/grpc/database/primitive/primitive.py +2 -2
  69. pyedb/grpc/database/primitive/rectangle.py +105 -4
  70. pyedb/grpc/database/simulation_setup/hfss_general_settings.py +0 -2
  71. pyedb/grpc/database/simulation_setup/hfss_settings_options.py +0 -4
  72. pyedb/grpc/database/simulation_setup/siwave_cpa_simulation_setup.py +1 -0
  73. pyedb/grpc/database/simulation_setup/sweep_data.py +1 -3
  74. pyedb/grpc/database/siwave.py +6 -13
  75. pyedb/grpc/database/source_excitations.py +39 -56
  76. pyedb/grpc/database/stackup.py +50 -27
  77. pyedb/grpc/database/terminal/bundle_terminal.py +10 -3
  78. pyedb/grpc/database/terminal/pingroup_terminal.py +8 -1
  79. pyedb/grpc/database/terminal/terminal.py +19 -8
  80. pyedb/grpc/database/utility/heat_sink.py +0 -1
  81. pyedb/grpc/database/utility/hfss_extent_info.py +2 -2
  82. pyedb/grpc/database/utility/xml_control_file.py +6 -3
  83. pyedb/grpc/edb.py +24 -19
  84. pyedb/grpc/edb_init.py +1 -0
  85. pyedb/ipc2581/ecad/cad_data/layer_feature.py +6 -2
  86. pyedb/ipc2581/ecad/cad_data/step.py +1 -1
  87. pyedb/ipc2581/ipc2581.py +8 -7
  88. pyedb/libraries/common.py +3 -4
  89. pyedb/libraries/rf_libraries/base_functions.py +7 -16
  90. pyedb/libraries/rf_libraries/planar_antennas.py +3 -21
  91. pyedb/misc/downloads.py +1 -0
  92. pyedb/misc/misc.py +5 -2
  93. pyedb/misc/siw_feature_config/emc_rule_checker_settings.py +1 -1
  94. pyedb/misc/utilities.py +0 -1
  95. pyedb/modeler/geometry_operators.py +3 -2
  96. {pyedb-0.56.0.dist-info → pyedb-0.57.0.dist-info}/METADATA +3 -3
  97. {pyedb-0.56.0.dist-info → pyedb-0.57.0.dist-info}/RECORD +99 -97
  98. {pyedb-0.56.0.dist-info → pyedb-0.57.0.dist-info}/WHEEL +0 -0
  99. {pyedb-0.56.0.dist-info → pyedb-0.57.0.dist-info}/licenses/LICENSE +0 -0
@@ -23,6 +23,7 @@
23
23
  import math
24
24
 
25
25
  from pyedb.generic.general_methods import ET
26
+ from pyedb.generic.settings import settings
26
27
  from pyedb.ipc2581.ecad.cad_data.feature import Feature, FeatureType
27
28
 
28
29
 
@@ -99,8 +100,11 @@ class LayerFeature(object):
99
100
  )
100
101
  )
101
102
  self.features.append(feature)
102
- except:
103
- pass
103
+ except Exception as e:
104
+ settings.logger.warning(
105
+ f"A(n) {type(e).__name__} error occurred while attempting to append IPC2581 "
106
+ f"feature {feature} to features of object {self}: {str(e)}"
107
+ )
104
108
 
105
109
  def add_drill_feature(self, via, diameter=0.0): # pragma no cover
106
110
  feature = Feature(self._ipc, self._pedb)
@@ -262,7 +262,7 @@ class Step(object):
262
262
  start_layer, stop_layer = padstack_instance.get_layer_range()
263
263
  for layer_name in self.layer_ranges(start_layer, stop_layer):
264
264
  if layer_name not in layers:
265
- layer_feature = LayerFeature(self._ipc)
265
+ layer_feature = LayerFeature(self._ipc, self._pedb)
266
266
  layer_feature.layer_name = layer_name
267
267
  # layer_feature.color = self._ipc._pedb.stackup[layer_name].color
268
268
  layer_feature.color = layer_colors[layer_name]
pyedb/ipc2581/ipc2581.py CHANGED
@@ -89,9 +89,9 @@ class Ipc2581(object):
89
89
  self.from_meter_to_units(pad.parameters_values[0], self.units)
90
90
  )
91
91
  if not primitive_ref in self.content.standard_geometries_dict.standard_circ_dict:
92
- self.content.standard_geometries_dict.standard_circ_dict[
93
- primitive_ref
94
- ] = self.from_meter_to_units(pad.parameters_values[0], self.units)
92
+ self.content.standard_geometries_dict.standard_circ_dict[primitive_ref] = (
93
+ self.from_meter_to_units(pad.parameters_values[0], self.units)
94
+ )
95
95
  elif pad.geometry_type == 2:
96
96
  primitive_ref = "RECT_{}_{}".format(
97
97
  self.from_meter_to_units(pad.parameters_values[0], self.units),
@@ -135,9 +135,9 @@ class Ipc2581(object):
135
135
  self.from_meter_to_units(antipad.parameters_values[0], self.units)
136
136
  )
137
137
  if not primitive_ref in self.content.standard_geometries_dict.standard_circ_dict:
138
- self.content.standard_geometries_dict.standard_circ_dict[
139
- primitive_ref
140
- ] = self.from_meter_to_units(antipad.parameters_values[0], self.units)
138
+ self.content.standard_geometries_dict.standard_circ_dict[primitive_ref] = (
139
+ self.from_meter_to_units(antipad.parameters_values[0], self.units)
140
+ )
141
141
  elif antipad.geometry_type == 2:
142
142
  primitive_ref = "RECT_{}_{}".format(
143
143
  self.from_meter_to_units(antipad.parameters_values[0], self.units),
@@ -336,7 +336,8 @@ class Ipc2581(object):
336
336
  padstack_defs = {i: k for i, k in self._pedb.padstacks.definitions.items()}
337
337
  polys = {i: j for i, j in self._pedb.modeler.primitives_by_layer.items()}
338
338
  for layer_name, layer in layers.items():
339
- self.ecad.cad_data.cad_data_step.add_layer_feature(layer, polys[layer_name])
339
+ if layer_name in polys:
340
+ self.ecad.cad_data.cad_data_step.add_layer_feature(layer, polys[layer_name])
340
341
  self.ecad.cad_data.cad_data_step.add_padstack_instances(padstack_instances, padstack_defs)
341
342
 
342
343
  def add_drills(self):
pyedb/libraries/common.py CHANGED
@@ -45,8 +45,7 @@ class Substrate:
45
45
 
46
46
  Examples
47
47
  --------
48
- >>> sub = Substrate(h=1.6e-3, er=4.4, tan_d=0.02,
49
- ... name="FR4", size=(10e-3, 15e-3))
48
+ >>> sub = Substrate(h=1.6e-3, er=4.4, tan_d=0.02, name="FR4", size=(10e-3, 15e-3))
50
49
  >>> sub.h
51
50
  0.0016
52
51
  """
@@ -84,7 +83,7 @@ class Material:
84
83
  >>> m = Material(edb, "MyMaterial")
85
84
  >>> m.name
86
85
  'MyMaterial'
87
- >>> edb.materials["MyMaterial"] # now exists in the database
86
+ >>> edb.materials["MyMaterial"] # now exists in the database
88
87
  <Material object at ...>
89
88
  """
90
89
 
@@ -125,7 +124,7 @@ class Conductor(Material):
125
124
  >>> cu = Conductor(edb, "Copper", conductivity=5.8e7)
126
125
  >>> cu.conductivity
127
126
  58000000.0
128
- >>> cu.conductivity = 3.5e7 # update on-the-fly
127
+ >>> cu.conductivity = 3.5e7 # update on-the-fly
129
128
  >>> edb.materials["Copper"].conductivity
130
129
  35000000.0
131
130
  """
@@ -50,8 +50,7 @@ class HatchGround:
50
50
 
51
51
  Examples
52
52
  --------
53
- >>> hatch = HatchGround(pitch=0.5e-3, width=0.2e-3,
54
- ... fill_target=70, board_size=5e-3)
53
+ >>> hatch = HatchGround(pitch=0.5e-3, width=0.2e-3, fill_target=70, board_size=5e-3)
55
54
  >>> edb = Edb("demo.aedb")
56
55
  >>> hatch._edb = edb
57
56
  >>> hatch.create()
@@ -164,8 +163,7 @@ class Meander:
164
163
 
165
164
  Examples
166
165
  --------
167
- >>> m = Meander(pitch=0.2e-3, trace_width=0.15e-3,
168
- ... amplitude=2e-3, num_turns=4)
166
+ >>> m = Meander(pitch=0.2e-3, trace_width=0.15e-3, amplitude=2e-3, num_turns=4)
169
167
  >>> edb = Edb("meander.aedb")
170
168
  >>> m._pedb = edb
171
169
  >>> m.create()
@@ -293,7 +291,7 @@ class MIMCapacitor:
293
291
  >>> edb = Edb("mim.aedb")
294
292
  >>> cap._pedb = edb
295
293
  >>> cap.create()
296
- >>> f"{cap.capacitance_f*1e12:.2f} pF"
294
+ >>> f"{cap.capacitance_f * 1e12:.2f} pF"
297
295
  '1.45 pF'
298
296
  """
299
297
 
@@ -383,8 +381,7 @@ class SpiralInductor:
383
381
 
384
382
  Examples
385
383
  --------
386
- >>> sp = SpiralInductor(turns=3.5, trace_width=25e-6,
387
- ... inner_diameter=80e-6)
384
+ >>> sp = SpiralInductor(turns=3.5, trace_width=25e-6, inner_diameter=80e-6)
388
385
  >>> edb = Edb("spiral.aedb")
389
386
  >>> sp._pedb = edb
390
387
  >>> sp.create()
@@ -769,7 +766,7 @@ class RatRace:
769
766
  >>> edb = Edb("ratrace.aedb")
770
767
  >>> rr._pedb = edb
771
768
  >>> rr.create()
772
- >>> f"{rr.circumference*1e3:.2f} mm"
769
+ >>> f"{rr.circumference * 1e3:.2f} mm"
773
770
  '45.00 mm'
774
771
  """
775
772
 
@@ -958,9 +955,7 @@ class InterdigitalCapacitor:
958
955
 
959
956
  Examples
960
957
  --------
961
- >>> idc = InterdigitalCapacitor(fingers=10,
962
- ... finger_length="0.5mm",
963
- ... gap="0.03mm")
958
+ >>> idc = InterdigitalCapacitor(fingers=10, finger_length="0.5mm", gap="0.03mm")
964
959
  >>> edb = Edb("idc.aedb")
965
960
  >>> idc._pedb = edb
966
961
  >>> idc.create()
@@ -1104,11 +1099,7 @@ class DifferentialTLine:
1104
1099
 
1105
1100
  Examples
1106
1101
  --------
1107
- >>> diff = DifferentialTLine(Edb("diff.aedb"),
1108
- ... length=5e-3,
1109
- ... width=0.15e-3,
1110
- ... spacing=0.1e-3,
1111
- ... angle=math.pi/4)
1102
+ >>> diff = DifferentialTLine(Edb("diff.aedb"), length=5e-3, width=0.15e-3, spacing=0.1e-3, angle=math.pi / 4)
1112
1103
  >>> traces = diff.create()
1113
1104
  >>> f"{diff.diff_impedance:.1f} Ω"
1114
1105
  '95.6 Ω'
@@ -66,13 +66,7 @@ class RectangularPatch:
66
66
  Build a 5.8 GHz patch on a 0.787 mm Rogers RO4350B substrate:
67
67
 
68
68
  >>> edb = pyedb.Edb()
69
- >>> patch = RectangularPatch(
70
- ... edb_cell=edb,
71
- ... freq="5.8GHz",
72
- ... inset="4.2mm",
73
- ... layer="TOP",
74
- ... bottom_layer="GND"
75
- ... )
69
+ >>> patch = RectangularPatch(edb_cell=edb, freq="5.8GHz", inset="4.2mm", layer="TOP", bottom_layer="GND")
76
70
  >>> patch.substrate.er = 3.66
77
71
  >>> patch.substrate.tand = 0.0037
78
72
  >>> patch.substrate.h = 0.000787
@@ -248,13 +242,7 @@ class CircularPatch:
248
242
  Build a 5.8 GHz circular patch on a 0.787 mm Rogers RO4350B substrate:
249
243
 
250
244
  >>> edb = pyedb.Edb()
251
- >>> patch = CircularPatch(
252
- ... edb_cell=edb,
253
- ... freq="5.8GHz",
254
- ... probe_offset="6.4mm",
255
- ... layer="TOP",
256
- ... bottom_layer="GND"
257
- ... )
245
+ >>> patch = CircularPatch(edb_cell=edb, freq="5.8GHz", probe_offset="6.4mm", layer="TOP", bottom_layer="GND")
258
246
  >>> patch.substrate.er = 3.66
259
247
  >>> patch.substrate.tand = 0.0037
260
248
  >>> patch.substrate.h = 0.000787
@@ -425,13 +413,7 @@ class TriangularPatch:
425
413
  Build a 5.8 GHz triangular patch on a 0.787 mm Rogers RO4350B substrate:
426
414
 
427
415
  >>> edb = pyedb.Edb()
428
- >>> patch = TriangularPatch(
429
- ... edb_cell=edb,
430
- ... freq="5.8GHz",
431
- ... probe_offset="5.6mm",
432
- ... layer="TOP",
433
- ... bottom_layer="GND"
434
- ... )
416
+ >>> patch = TriangularPatch(edb_cell=edb, freq="5.8GHz", probe_offset="5.6mm", layer="TOP", bottom_layer="GND")
435
417
  >>> patch.substrate.er = 3.66
436
418
  >>> patch.substrate.tand = 0.0037
437
419
  >>> patch.substrate.h = 0.000787
pyedb/misc/downloads.py CHANGED
@@ -21,6 +21,7 @@
21
21
  # SOFTWARE.
22
22
 
23
23
  """Download example datasets from https://github.com/pyansys/example-data"""
24
+
24
25
  import os
25
26
  import shutil
26
27
  import tempfile
pyedb/misc/misc.py CHANGED
@@ -21,9 +21,12 @@
21
21
  # SOFTWARE.
22
22
 
23
23
  """Miscellaneous Methods for PyEDB."""
24
+
24
25
  import os
25
26
  import warnings
26
27
 
28
+ from pyedb.generic.settings import settings
29
+
27
30
 
28
31
  def list_installed_ansysem():
29
32
  """Return a list of installed AEDT versions on ``ANSYSEM_ROOT``."""
@@ -68,8 +71,8 @@ def installed_versions():
68
71
  else:
69
72
  v_key = "20{0}.{1}".format(version, release)
70
73
  return_dict[v_key] = os.environ[version_env_var]
71
- except: # pragma: no cover
72
- pass
74
+ except Exception: # pragma: no cover
75
+ settings.logger.debug(f"Failed to parse version and release from {current_version_id}")
73
76
  return return_dict
74
77
 
75
78
 
@@ -66,7 +66,7 @@ class EMCRuleCheckerSettings:
66
66
  tree = ET.ElementTree(root)
67
67
  try:
68
68
  ET.indent(tree, space="\t", level=0)
69
- except: # pragma no cover
69
+ except AttributeError: # pragma no cover
70
70
  pass
71
71
  return tree
72
72
 
pyedb/misc/utilities.py CHANGED
@@ -22,7 +22,6 @@
22
22
 
23
23
  """Module gathering utility functions for PyEDB modules."""
24
24
 
25
-
26
25
  import math
27
26
 
28
27
 
@@ -62,12 +62,12 @@ class GeometryOperators(object):
62
62
  Parse `'"2mm"'`.
63
63
 
64
64
  >>> from pyedb.modeler.geometry_operators import GeometryOperators as go
65
- >>> go.parse_dim_arg('2mm')
65
+ >>> go.parse_dim_arg("2mm")
66
66
  >>> 0.002
67
67
 
68
68
  Use the optional argument ``scale_to_unit`` to specify the destination unit.
69
69
 
70
- >>> go.parse_dim_arg('2mm', scale_to_unit='mm')
70
+ >>> go.parse_dim_arg("2mm", scale_to_unit="mm")
71
71
  >>> 2.0
72
72
 
73
73
  """
@@ -1588,6 +1588,7 @@ class GeometryOperators(object):
1588
1588
  ``True`` if the segments are intersecting.
1589
1589
  ``False`` otherwise.
1590
1590
  """
1591
+
1591
1592
  # fmt: off
1592
1593
  def on_segment(p, q, r):
1593
1594
  # Given three collinear points p, q, r, the function checks if point q lies on line-segment 'pr'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyedb
3
- Version: 0.56.0
3
+ Version: 0.57.0
4
4
  Summary: Higher-Level Pythonic Ansys Electronics Data Base
5
5
  Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
6
6
  Maintainer-email: PyEDB developers <simon.vandenbrouck@ansys.com>
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.9
16
16
  Classifier: Programming Language :: Python :: 3.10
17
17
  Classifier: Programming Language :: Python :: 3.11
18
18
  License-File: LICENSE
19
- Requires-Dist: cffi>=1.16.0,<1.18; platform_system=='Linux'
19
+ Requires-Dist: cffi>=1.16.0,<2.1; platform_system=='Linux'
20
20
  Requires-Dist: pywin32 >= 303;platform_system=='Windows'
21
21
  Requires-Dist: ansys-pythonnet >= 3.1.0rc4
22
22
  Requires-Dist: dotnetcore2 ==3.1.23;platform_system=='Linux'
@@ -52,7 +52,7 @@ Requires-Dist: shapely ; extra == "full"
52
52
  Requires-Dist: matplotlib>=3.5.0,<3.11 ; extra == "tests"
53
53
  Requires-Dist: mock>=5.1.0,<5.3 ; extra == "tests"
54
54
  Requires-Dist: pytest>=7.4.0,<8.5 ; extra == "tests"
55
- Requires-Dist: pytest-cov>=4.0.0,<6.3 ; extra == "tests"
55
+ Requires-Dist: pytest-cov>=4.0.0,<7.1 ; extra == "tests"
56
56
  Requires-Dist: pytest-xdist>=3.5.0,<3.7 ; extra == "tests"
57
57
  Requires-Dist: scikit-rf ; extra == "tests"
58
58
  Requires-Dist: shapely ; extra == "tests"