pyedb 0.53.0__py3-none-any.whl → 0.54.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 (84) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/configuration/cfg_ports_sources.py +6 -8
  3. pyedb/configuration/configuration.py +2 -1
  4. pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
  5. pyedb/dotnet/database/cell/layout.py +1 -1
  6. pyedb/dotnet/database/cell/layout_obj.py +3 -3
  7. pyedb/dotnet/database/cell/primitive/path.py +1 -1
  8. pyedb/dotnet/database/cell/primitive/primitive.py +8 -8
  9. pyedb/dotnet/database/cell/terminal/pingroup_terminal.py +1 -1
  10. pyedb/dotnet/database/cell/terminal/point_terminal.py +1 -1
  11. pyedb/dotnet/database/cell/terminal/terminal.py +24 -26
  12. pyedb/dotnet/database/components.py +24 -24
  13. pyedb/dotnet/database/definition/component_def.py +3 -3
  14. pyedb/dotnet/database/definition/component_model.py +1 -1
  15. pyedb/dotnet/database/definition/package_def.py +1 -1
  16. pyedb/dotnet/database/dotnet/database.py +43 -38
  17. pyedb/dotnet/database/dotnet/primitive.py +16 -16
  18. pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
  19. pyedb/dotnet/database/edb_data/layer_data.py +14 -14
  20. pyedb/dotnet/database/edb_data/padstacks_data.py +12 -12
  21. pyedb/dotnet/database/edb_data/primitives_data.py +3 -3
  22. pyedb/dotnet/database/edb_data/sources.py +6 -6
  23. pyedb/dotnet/database/edb_data/variables.py +7 -3
  24. pyedb/dotnet/database/geometry/point_data.py +1 -1
  25. pyedb/dotnet/database/geometry/polygon_data.py +2 -4
  26. pyedb/dotnet/database/hfss.py +7 -7
  27. pyedb/dotnet/database/materials.py +2 -2
  28. pyedb/dotnet/database/modeler.py +8 -11
  29. pyedb/dotnet/database/nets.py +1 -1
  30. pyedb/dotnet/database/padstack.py +72 -1
  31. pyedb/dotnet/database/sim_setup_data/data/settings.py +24 -0
  32. pyedb/dotnet/database/sim_setup_data/io/siwave.py +26 -1
  33. pyedb/dotnet/database/siwave.py +5 -5
  34. pyedb/dotnet/database/stackup.py +74 -77
  35. pyedb/dotnet/database/utilities/heatsink.py +4 -4
  36. pyedb/dotnet/database/utilities/obj_base.py +1 -1
  37. pyedb/dotnet/database/utilities/value.py +116 -0
  38. pyedb/dotnet/edb.py +43 -43
  39. pyedb/generic/design_types.py +12 -3
  40. pyedb/grpc/__init__.py +0 -0
  41. pyedb/grpc/database/components.py +53 -17
  42. pyedb/grpc/database/definition/materials.py +23 -30
  43. pyedb/grpc/database/definition/package_def.py +15 -15
  44. pyedb/grpc/database/definition/padstack_def.py +51 -51
  45. pyedb/grpc/database/geometry/arc_data.py +7 -5
  46. pyedb/grpc/database/geometry/point_3d_data.py +8 -7
  47. pyedb/grpc/database/geometry/polygon_data.py +3 -2
  48. pyedb/grpc/database/hierarchy/component.py +43 -38
  49. pyedb/grpc/database/hierarchy/pin_pair_model.py +15 -14
  50. pyedb/grpc/database/hierarchy/pingroup.py +9 -9
  51. pyedb/grpc/database/layers/stackup_layer.py +45 -44
  52. pyedb/grpc/database/layout/layout.py +9 -8
  53. pyedb/grpc/database/layout/voltage_regulator.py +7 -7
  54. pyedb/grpc/database/layout_validation.py +13 -12
  55. pyedb/grpc/database/modeler.py +51 -54
  56. pyedb/grpc/database/nets.py +42 -31
  57. pyedb/grpc/database/padstacks.py +270 -175
  58. pyedb/grpc/database/ports/ports.py +5 -6
  59. pyedb/grpc/database/primitive/bondwire.py +8 -7
  60. pyedb/grpc/database/primitive/circle.py +4 -4
  61. pyedb/grpc/database/primitive/padstack_instance.py +18 -18
  62. pyedb/grpc/database/primitive/path.py +7 -7
  63. pyedb/grpc/database/primitive/polygon.py +3 -3
  64. pyedb/grpc/database/primitive/primitive.py +13 -17
  65. pyedb/grpc/database/primitive/rectangle.py +13 -13
  66. pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
  67. pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +10 -0
  68. pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +17 -1
  69. pyedb/grpc/database/siwave.py +30 -24
  70. pyedb/grpc/database/source_excitations.py +333 -229
  71. pyedb/grpc/database/stackup.py +164 -147
  72. pyedb/grpc/database/terminal/bundle_terminal.py +17 -7
  73. pyedb/grpc/database/terminal/edge_terminal.py +10 -0
  74. pyedb/grpc/database/terminal/padstack_instance_terminal.py +15 -4
  75. pyedb/grpc/database/terminal/pingroup_terminal.py +11 -10
  76. pyedb/grpc/database/terminal/point_terminal.py +4 -3
  77. pyedb/grpc/database/terminal/terminal.py +9 -9
  78. pyedb/grpc/database/utility/value.py +109 -0
  79. pyedb/grpc/edb.py +59 -38
  80. pyedb/grpc/edb_init.py +0 -7
  81. {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/METADATA +3 -3
  82. {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/RECORD +84 -81
  83. {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/WHEEL +0 -0
  84. {pyedb-0.53.0.dist-info → pyedb-0.54.0.dist-info}/licenses/LICENSE +0 -0
@@ -68,20 +68,20 @@ class LayerCollection(object):
68
68
  self._pedb = pedb
69
69
 
70
70
  if edb_object:
71
- self._edb_object = self._pedb.edb_api.cell._cell.LayerCollection(edb_object)
71
+ self._edb_object = self._pedb.core.cell._cell.LayerCollection(edb_object)
72
72
  else:
73
- self._edb_object = self._pedb.edb_api.cell._cell.LayerCollection()
73
+ self._edb_object = self._pedb.core.cell._cell.LayerCollection()
74
74
 
75
75
  self._layer_type_set_mapping = {
76
- "stackup_layer_set": self._pedb.edb_api.cell.layer_type_set.StackupLayerSet,
77
- "signal_ayer_et": self._pedb.edb_api.cell.layer_type_set.SignalLayerSet,
78
- "non_stackup_layer_set": self._pedb.edb_api.cell.layer_type_set.NonStackupLayerSet,
79
- "all_layer_et": self._pedb.edb_api.cell.layer_type_set.AllLayerSet,
76
+ "stackup_layer_set": self._pedb.core.cell.layer_type_set.StackupLayerSet,
77
+ "signal_ayer_et": self._pedb.core.cell.layer_type_set.SignalLayerSet,
78
+ "non_stackup_layer_set": self._pedb.core.cell.layer_type_set.NonStackupLayerSet,
79
+ "all_layer_et": self._pedb.core.cell.layer_type_set.AllLayerSet,
80
80
  }
81
81
  self._lc_mode_mapping = {
82
- "laminate": self._pedb.edb_api.cell._cell.LayerCollectionMode.Laminate,
83
- "overlapping": self._pedb.edb_api.cell._cell.LayerCollectionMode.Overlapping,
84
- "multizone": self._pedb.edb_api.cell._cell.LayerCollectionMode.MultiZone,
82
+ "laminate": self._pedb.core.cell._cell.LayerCollectionMode.Laminate,
83
+ "overlapping": self._pedb.core.cell._cell.LayerCollectionMode.Overlapping,
84
+ "multizone": self._pedb.core.cell._cell.LayerCollectionMode.MultiZone,
85
85
  }
86
86
 
87
87
  def update_layout(self):
@@ -95,7 +95,7 @@ class LayerCollection(object):
95
95
 
96
96
  def refresh_layer_collection(self):
97
97
  """Refresh layer collection from Edb. This method is run on demand after all edit operations on stackup."""
98
- self._edb_object = self._pedb.edb_api.cell._cell.LayerCollection(self._pedb.layout.layer_collection)
98
+ self._edb_object = self._pedb.core.cell._cell.LayerCollection(self._pedb.layout.layer_collection)
99
99
  self._lc = self._edb_object
100
100
 
101
101
  def _add_layer(self, add_method, base_layer_name="", **kwargs):
@@ -238,7 +238,7 @@ class LayerCollection(object):
238
238
  return self._add_layer(add_method="add_layer_bottom", **kwargs)
239
239
 
240
240
  def set_layer_clone(self, layer_clone):
241
- lc = self._pedb.edb_api.cell._cell.LayerCollection() # empty layer collection
241
+ lc = self._pedb.core.cell._cell.LayerCollection() # empty layer collection
242
242
  lc.SetMode(self._edb_object.GetMode())
243
243
  if self.mode.lower() == "laminate":
244
244
  add_method = lc.AddLayerBottom
@@ -282,7 +282,7 @@ class LayerCollection(object):
282
282
  @property
283
283
  def all_layers(self):
284
284
  self.refresh_layer_collection()
285
- layer_list = list(self._edb_object.Layers(self._pedb.edb_api.cell.layer_type_set.AllLayerSet))
285
+ layer_list = list(self._edb_object.Layers(self._pedb.core.cell.layer_type_set.AllLayerSet))
286
286
  temp = dict()
287
287
  for i in layer_list:
288
288
  obj = layer_cast(self._pedb, i)
@@ -306,7 +306,7 @@ class LayerCollection(object):
306
306
 
307
307
  def find_layer_by_name(self, name: str):
308
308
  """Finds a layer with the given name."""
309
- obj = self._pedb.edb_api.cell._cell.Layer.FindByName(self._edb_object, name)
309
+ obj = self._pedb.core.cell._cell.Layer.FindByName(self._edb_object, name)
310
310
  if obj.IsNull():
311
311
  raise ValueError("Layer with name '{}' was not found.".format(name))
312
312
  else:
@@ -337,7 +337,7 @@ class Stackup(LayerCollection):
337
337
  type
338
338
  Types of layers.
339
339
  """
340
- return self._pedb.edb_api.cell.layer_type
340
+ return self._pedb.core.cell.layer_type
341
341
 
342
342
  @property
343
343
  def thickness(self):
@@ -592,7 +592,7 @@ class Stackup(LayerCollection):
592
592
 
593
593
  @mode.setter
594
594
  def mode(self, value):
595
- mode = self._pedb.edb_api.Cell.LayerCollectionMode
595
+ mode = self._pedb.core.Cell.LayerCollectionMode
596
596
  if value == 0 or value == mode.Laminate or value == "Laminate":
597
597
  self._layer_collection.SetMode(mode.Laminate)
598
598
  elif value == 1 or value == mode.Overlapping or value == "Overlapping":
@@ -627,7 +627,7 @@ class Stackup(LayerCollection):
627
627
 
628
628
  @property
629
629
  def _edb_layer_list(self):
630
- layer_list = list(self._layer_collection.Layers(self._pedb.edb_api.cell.layer_type_set.AllLayerSet))
630
+ layer_list = list(self._layer_collection.Layers(self._pedb.core.cell.layer_type_set.AllLayerSet))
631
631
  return [i.Clone() for i in layer_list]
632
632
 
633
633
  @property
@@ -638,7 +638,7 @@ class Stackup(LayerCollection):
638
638
  -------
639
639
  Dict[str, :class:`pyedb.dotnet.database.edb_data.layer_data.LayerEdbClass`]
640
640
  """
641
- layer_type = self._pedb.edb_api.cell.layer_type.SignalLayer
641
+ layer_type = self._pedb.core.cell.layer_type.SignalLayer
642
642
  _lays = OrderedDict()
643
643
  for name, obj in self.layers.items():
644
644
  if obj._edb_layer.GetLayerType() == layer_type:
@@ -654,7 +654,7 @@ class Stackup(LayerCollection):
654
654
  dict[str, :class:`dotnet.database.edb_data.layer_data.EDBLayer`]
655
655
  Dictionary of dielectric layers.
656
656
  """
657
- layer_type = self._pedb.edb_api.cell.layer_type.DielectricLayer
657
+ layer_type = self._pedb.core.cell.layer_type.DielectricLayer
658
658
  _lays = OrderedDict()
659
659
  for name, obj in self.layers.items():
660
660
  if obj._edb_layer.GetLayerType() == layer_type:
@@ -684,14 +684,13 @@ class Stackup(LayerCollection):
684
684
  if operation in ["change_position", "change_attribute", "change_name"]:
685
685
  lc_readonly = self._pedb.layout.layer_collection
686
686
  layers = [
687
- i.Clone()
688
- for i in list(list(lc_readonly.Layers(self._pedb.edb_api.cell.layer_type_set.StackupLayerSet)))
687
+ i.Clone() for i in list(list(lc_readonly.Layers(self._pedb.core.cell.layer_type_set.StackupLayerSet)))
689
688
  ]
690
689
  non_stackup = [
691
690
  i.Clone()
692
- for i in list(list(lc_readonly.Layers(self._pedb.edb_api.cell.layer_type_set.NonStackupLayerSet)))
691
+ for i in list(list(lc_readonly.Layers(self._pedb.core.cell.layer_type_set.NonStackupLayerSet)))
693
692
  ]
694
- _lc = self._pedb.edb_api.cell._cell.LayerCollection()
693
+ _lc = self._pedb.core.cell._cell.LayerCollection()
695
694
  mode = lc_readonly.GetMode()
696
695
  _lc.SetMode(lc_readonly.GetMode())
697
696
  if str(mode) == "Overlapping":
@@ -727,11 +726,11 @@ class Stackup(LayerCollection):
727
726
 
728
727
  def _create_stackup_layer(self, layer_name, thickness, layer_type="signal"):
729
728
  if layer_type == "signal":
730
- _layer_type = self._pedb.edb_api.cell.layer_type.SignalLayer
729
+ _layer_type = self._pedb.core.cell.layer_type.SignalLayer
731
730
  else:
732
- _layer_type = self._pedb.edb_api.cell.layer_type.DielectricLayer
731
+ _layer_type = self._pedb.core.cell.layer_type.DielectricLayer
733
732
 
734
- result = self._pedb.edb_api.cell._cell.StackupLayer(
733
+ result = self._pedb.core.cell._cell.StackupLayer(
735
734
  layer_name,
736
735
  _layer_type,
737
736
  self._edb_value(thickness),
@@ -743,39 +742,39 @@ class Stackup(LayerCollection):
743
742
 
744
743
  def _create_nonstackup_layer(self, layer_name, layer_type):
745
744
  if layer_type == "conducting": # pragma: no cover
746
- _layer_type = self._pedb.edb_api.cell.layer_type.ConductingLayer
745
+ _layer_type = self._pedb.core.cell.layer_type.ConductingLayer
747
746
  elif layer_type == "airlines": # pragma: no cover
748
- _layer_type = self._pedb.edb_api.cell.layer_type.AirlinesLayer
747
+ _layer_type = self._pedb.core.cell.layer_type.AirlinesLayer
749
748
  elif layer_type == "error": # pragma: no cover
750
- _layer_type = self._pedb.edb_api.cell.layer_type.ErrorsLayer
749
+ _layer_type = self._pedb.core.cell.layer_type.ErrorsLayer
751
750
  elif layer_type == "symbol": # pragma: no cover
752
- _layer_type = self._pedb.edb_api.cell.layer_type.SymbolLayer
751
+ _layer_type = self._pedb.core.cell.layer_type.SymbolLayer
753
752
  elif layer_type == "measure": # pragma: no cover
754
- _layer_type = self._pedb.edb_api.cell.layer_type.MeasureLayer
753
+ _layer_type = self._pedb.core.cell.layer_type.MeasureLayer
755
754
  elif layer_type == "assembly": # pragma: no cover
756
- _layer_type = self._pedb.edb_api.cell.layer_type.AssemblyLayer
755
+ _layer_type = self._pedb.core.cell.layer_type.AssemblyLayer
757
756
  elif layer_type == "silkscreen": # pragma: no cover
758
- _layer_type = self._pedb.edb_api.cell.layer_type.SilkscreenLayer
757
+ _layer_type = self._pedb.core.cell.layer_type.SilkscreenLayer
759
758
  elif layer_type == "soldermask": # pragma: no cover
760
- _layer_type = self._pedb.edb_api.cell.layer_type.SolderMaskLayer
759
+ _layer_type = self._pedb.core.cell.layer_type.SolderMaskLayer
761
760
  elif layer_type == "solderpaste": # pragma: no cover
762
- _layer_type = self._pedb.edb_api.cell.layer_type.SolderPasteLayer
761
+ _layer_type = self._pedb.core.cell.layer_type.SolderPasteLayer
763
762
  elif layer_type == "glue": # pragma: no cover
764
- _layer_type = self._pedb.edb_api.cell.layer_type.GlueLayer
763
+ _layer_type = self._pedb.core.cell.layer_type.GlueLayer
765
764
  elif layer_type == "wirebond": # pragma: no cover
766
- _layer_type = self._pedb.edb_api.cell.layer_type.WirebondLayer
765
+ _layer_type = self._pedb.core.cell.layer_type.WirebondLayer
767
766
  elif layer_type == "user": # pragma: no cover
768
- _layer_type = self._pedb.edb_api.cell.layer_type.UserLayer
767
+ _layer_type = self._pedb.core.cell.layer_type.UserLayer
769
768
  elif layer_type == "siwavehfsssolverregions": # pragma: no cover
770
- _layer_type = self._pedb.edb_api.cell.layer_type.SIwaveHFSSSolverRegions
769
+ _layer_type = self._pedb.core.cell.layer_type.SIwaveHFSSSolverRegions
771
770
  elif layer_type == "outline": # pragma: no cover
772
- _layer_type = self._pedb.edb_api.cell.layer_type.OutlineLayer
771
+ _layer_type = self._pedb.core.cell.layer_type.OutlineLayer
773
772
  elif layer_type == "postprocessing": # pragma: no cover
774
- _layer_type = self._pedb.edb_api.cell.layer_type.PostprocessingLayer
773
+ _layer_type = self._pedb.core.cell.layer_type.PostprocessingLayer
775
774
  else: # pragma: no cover
776
- _layer_type = self._pedb.edb_api.cell.layer_type.UndefinedLayerType
775
+ _layer_type = self._pedb.core.cell.layer_type.UndefinedLayerType
777
776
 
778
- result = self._pedb.edb_api.cell.layer(layer_name, _layer_type)
777
+ result = self._pedb.core.cell.layer(layer_name, _layer_type)
779
778
  self.refresh_layer_collection()
780
779
  return result
781
780
 
@@ -901,7 +900,7 @@ class Stackup(LayerCollection):
901
900
  -------
902
901
 
903
902
  """
904
- new_layer_collection = self._pedb.edb_api.Cell.LayerCollection()
903
+ new_layer_collection = self._pedb.core.Cell.LayerCollection()
905
904
  for lyr in self._edb_layer_list:
906
905
  if not (lyr.GetName() == name):
907
906
  new_layer_collection.AddLayerBottom(lyr)
@@ -1122,9 +1121,9 @@ class Stackup(LayerCollection):
1122
1121
  ``True`` when successful, ``False`` when failed.
1123
1122
  """
1124
1123
  if only_metals:
1125
- input_layers = self._pedb.edb_api.cell.layer_type_set.SignalLayerSet
1124
+ input_layers = self._pedb.core.cell.layer_type_set.SignalLayerSet
1126
1125
  else:
1127
- input_layers = self._pedb.edb_api.cell.layer_type_set.StackupLayerSet
1126
+ input_layers = self._pedb.core.cell.layer_type_set.StackupLayerSet
1128
1127
 
1129
1128
  res, topl, topz, bottoml, bottomz = self._layer_collection.GetTopBottomStackupLayers(input_layers)
1130
1129
  return topl.GetName(), topz, bottoml.GetName(), bottomz
@@ -1146,18 +1145,18 @@ class Stackup(LayerCollection):
1146
1145
  """
1147
1146
  try:
1148
1147
  lc = self._layer_collection
1149
- new_lc = self._pedb.edb_api.Cell.LayerCollection()
1148
+ new_lc = self._pedb.core.Cell.LayerCollection()
1150
1149
  lc_mode = lc.GetMode()
1151
1150
  new_lc.SetMode(lc_mode)
1152
1151
  max_elevation = 0.0
1153
- for layer in lc.Layers(self._pedb.edb_api.cell.layer_type_set.StackupLayerSet):
1152
+ for layer in lc.Layers(self._pedb.core.cell.layer_type_set.StackupLayerSet):
1154
1153
  if "RadBox" not in layer.GetName(): # Ignore RadBox
1155
1154
  lower_elevation = layer.Clone().GetLowerElevation() * 1.0e6
1156
1155
  upper_elevation = layer.Clone().GetUpperElevation() * 1.0e6
1157
1156
  max_elevation = max([max_elevation, lower_elevation, upper_elevation])
1158
1157
 
1159
1158
  non_stackup_layers = []
1160
- for layer in lc.Layers(self._pedb.edb_api.cell.layer_type_set.AllLayerSet):
1159
+ for layer in lc.Layers(self._pedb.core.cell.layer_type_set.AllLayerSet):
1161
1160
  cloned_layer = layer.Clone()
1162
1161
  if not cloned_layer.IsStackupLayer():
1163
1162
  non_stackup_layers.append(cloned_layer)
@@ -1169,18 +1168,16 @@ class Stackup(LayerCollection):
1169
1168
  cloned_layer.SetLowerElevation(val)
1170
1169
  if (
1171
1170
  cloned_layer.GetTopBottomAssociation()
1172
- == self._pedb.edb_api.Cell.TopBottomAssociation.TopAssociated
1171
+ == self._pedb.core.Cell.TopBottomAssociation.TopAssociated
1173
1172
  ):
1174
- cloned_layer.SetTopBottomAssociation(
1175
- self._pedb.edb_api.Cell.TopBottomAssociation.BottomAssociated
1176
- )
1173
+ cloned_layer.SetTopBottomAssociation(self._pedb.core.Cell.TopBottomAssociation.BottomAssociated)
1177
1174
  else:
1178
- cloned_layer.SetTopBottomAssociation(self._pedb.edb_api.Cell.TopBottomAssociation.TopAssociated)
1175
+ cloned_layer.SetTopBottomAssociation(self._pedb.core.Cell.TopBottomAssociation.TopAssociated)
1179
1176
  new_lc.AddStackupLayerAtElevation(cloned_layer)
1180
1177
 
1181
1178
  vialayers = [
1182
1179
  lay
1183
- for lay in lc.Layers(self._pedb.edb_api.cell.layer_type_set.StackupLayerSet)
1180
+ for lay in lc.Layers(self._pedb.core.cell.layer_type_set.StackupLayerSet)
1184
1181
  if lay.Clone().IsViaLayer()
1185
1182
  ]
1186
1183
  for layer in vialayers:
@@ -1189,19 +1186,19 @@ class Stackup(LayerCollection):
1189
1186
  lower_ref_name = cloned_via_layer.GetRefLayerName(False)
1190
1187
  upper_ref = [
1191
1188
  lay
1192
- for lay in lc.Layers(self._pedb.edb_api.cell.layer_type_set.AllLayerSet)
1189
+ for lay in lc.Layers(self._pedb.core.cell.layer_type_set.AllLayerSet)
1193
1190
  if lay.GetName() == upper_ref_name
1194
1191
  ][0]
1195
1192
  lower_ref = [
1196
1193
  lay
1197
- for lay in lc.Layers(self._pedb.edb_api.cell.layer_type_set.AllLayerSet)
1194
+ for lay in lc.Layers(self._pedb.core.cell.layer_type_set.AllLayerSet)
1198
1195
  if lay.GetName() == lower_ref_name
1199
1196
  ][0]
1200
1197
  cloned_via_layer.SetRefLayer(lower_ref, True)
1201
1198
  cloned_via_layer.SetRefLayer(upper_ref, False)
1202
1199
  ref_layer_in_flipped_stackup = [
1203
1200
  lay
1204
- for lay in new_lc.Layers(self._pedb.edb_api.cell.layer_type_set.AllLayerSet)
1201
+ for lay in new_lc.Layers(self._pedb.core.cell.layer_type_set.AllLayerSet)
1205
1202
  if lay.GetName() == upper_ref_name
1206
1203
  ][0]
1207
1204
  via_layer_lower_elevation = (
@@ -1246,7 +1243,7 @@ class Stackup(LayerCollection):
1246
1243
  cmp_prop.SetDieProperty(die_prop)
1247
1244
  cmp.SetComponentProperty(cmp_prop)
1248
1245
 
1249
- lay_list = list(new_lc.Layers(self._pedb.edb_api.cell.layer_type_set.SignalLayerSet))
1246
+ lay_list = list(new_lc.Layers(self._pedb.core.cell.layer_type_set.SignalLayerSet))
1250
1247
  for padstack in list(self._pedb.padstacks.instances.values()):
1251
1248
  start_layer_id = [lay.GetLayerId() for lay in list(lay_list) if lay.GetName() == padstack.start_layer]
1252
1249
  stop_layer_id = [lay.GetLayerId() for lay in list(lay_list) if lay.GetName() == padstack.stop_layer]
@@ -1397,7 +1394,7 @@ class Stackup(LayerCollection):
1397
1394
  list_cells = self._pedb.copy_cells([edb_cell.api_object])
1398
1395
  edb_cell = list_cells[0]
1399
1396
  self._pedb.layout.cell.SetBlackBox(True)
1400
- cell_inst2 = self._pedb.edb_api.cell.hierarchy.cell_instance.Create(
1397
+ cell_inst2 = self._pedb.core.cell.hierarchy.cell_instance.Create(
1401
1398
  edb_cell.GetLayout(), self._pedb.layout.cell.GetName(), self._pedb.active_layout
1402
1399
  )
1403
1400
  cell_trans = cell_inst2.GetTransform()
@@ -1411,11 +1408,11 @@ class Stackup(LayerCollection):
1411
1408
 
1412
1409
  if place_on_top:
1413
1410
  cell_inst2.SetPlacementLayer(
1414
- list(stackup_target.Layers(self._pedb.edb_api.cell.layer_type_set.SignalLayerSet))[0]
1411
+ list(stackup_target.Layers(self._pedb.core.cell.layer_type_set.SignalLayerSet))[0]
1415
1412
  )
1416
1413
  else:
1417
1414
  cell_inst2.SetPlacementLayer(
1418
- list(stackup_target.Layers(self._pedb.edb_api.cell.layer_type_set.SignalLayerSet))[-1]
1415
+ list(stackup_target.Layers(self._pedb.core.cell.layer_type_set.SignalLayerSet))[-1]
1419
1416
  )
1420
1417
  self.refresh_layer_collection()
1421
1418
  return True
@@ -1505,23 +1502,23 @@ class Stackup(LayerCollection):
1505
1502
  list_cells = self._pedb.copy_cells(edb_cell.api_object)
1506
1503
  edb_cell = list_cells[0]
1507
1504
  self._pedb.layout.cell.SetBlackBox(True)
1508
- cell_inst2 = self._pedb.edb_api.cell.hierarchy.cell_instance.Create(
1505
+ cell_inst2 = self._pedb.core.cell.hierarchy.cell_instance.Create(
1509
1506
  edb_cell.GetLayout(), self._pedb.layout.cell.GetName(), self._pedb.active_layout
1510
1507
  )
1511
1508
 
1512
- stackup_target = self._pedb.edb_api.Cell.LayerCollection(edb_cell.GetLayout().GetLayerCollection())
1513
- stackup_source = self._pedb.edb_api.Cell.LayerCollection(self._pedb.layout.layer_collection)
1509
+ stackup_target = self._pedb.core.Cell.LayerCollection(edb_cell.GetLayout().GetLayerCollection())
1510
+ stackup_source = self._pedb.core.Cell.LayerCollection(self._pedb.layout.layer_collection)
1514
1511
 
1515
1512
  if place_on_top:
1516
1513
  cell_inst2.SetPlacementLayer(
1517
- list(stackup_target.Layers(self._pedb.edb_api.cell.layer_type_set.SignalLayerSet))[0]
1514
+ list(stackup_target.Layers(self._pedb.core.cell.layer_type_set.SignalLayerSet))[0]
1518
1515
  )
1519
1516
  else:
1520
1517
  cell_inst2.SetPlacementLayer(
1521
- list(stackup_target.Layers(self._pedb.edb_api.cell.layer_type_set.SignalLayerSet))[-1]
1518
+ list(stackup_target.Layers(self._pedb.core.cell.layer_type_set.SignalLayerSet))[-1]
1522
1519
  )
1523
1520
  cell_inst2.SetIs3DPlacement(True)
1524
- sig_set = self._pedb.edb_api.cell.layer_type_set.SignalLayerSet
1521
+ sig_set = self._pedb.core.cell.layer_type_set.SignalLayerSet
1525
1522
  res = stackup_target.GetTopBottomStackupLayers(sig_set)
1526
1523
  target_top_elevation = res[2]
1527
1524
  target_bottom_elevation = res[4]
@@ -1656,23 +1653,23 @@ class Stackup(LayerCollection):
1656
1653
 
1657
1654
  instance_name = generate_unique_name(edb_cell.GetName(), n=2)
1658
1655
 
1659
- cell_inst2 = self._pedb.edb_api.cell.hierarchy.cell_instance.Create(
1656
+ cell_inst2 = self._pedb.core.cell.hierarchy.cell_instance.Create(
1660
1657
  self._pedb.active_layout, instance_name, edb_cell.GetLayout()
1661
1658
  )
1662
1659
 
1663
- stackup_source = self._pedb.edb_api.Cell.LayerCollection(edb_cell.GetLayout().GetLayerCollection())
1664
- stackup_target = self._pedb.edb_api.Cell.LayerCollection(self._pedb.layout.layer_collection)
1660
+ stackup_source = self._pedb.core.Cell.LayerCollection(edb_cell.GetLayout().GetLayerCollection())
1661
+ stackup_target = self._pedb.core.Cell.LayerCollection(self._pedb.layout.layer_collection)
1665
1662
 
1666
1663
  if place_on_top:
1667
1664
  cell_inst2.SetPlacementLayer(
1668
- list(stackup_target.Layers(self._pedb.edb_api.cell.layer_type_set.SignalLayerSet))[0]
1665
+ list(stackup_target.Layers(self._pedb.core.cell.layer_type_set.SignalLayerSet))[0]
1669
1666
  )
1670
1667
  else:
1671
1668
  cell_inst2.SetPlacementLayer(
1672
- list(stackup_target.Layers(self._pedb.edb_api.cell.layer_type_set.SignalLayerSet))[-1]
1669
+ list(stackup_target.Layers(self._pedb.core.cell.layer_type_set.SignalLayerSet))[-1]
1673
1670
  )
1674
1671
  cell_inst2.SetIs3DPlacement(True)
1675
- sig_set = self._pedb.edb_api.cell.layer_type_set.SignalLayerSet
1672
+ sig_set = self._pedb.core.cell.layer_type_set.SignalLayerSet
1676
1673
  res = stackup_target.GetTopBottomStackupLayers(sig_set)
1677
1674
  target_top_elevation = res[2]
1678
1675
  target_bottom_elevation = res[4]
@@ -1755,8 +1752,8 @@ class Stackup(LayerCollection):
1755
1752
  _angle = angle * math.pi / 180.0
1756
1753
  rotation_axis_to = self._pedb.point_3d(math.cos(_angle), -1 * math.sin(_angle), 0.0)
1757
1754
 
1758
- stackup_target = self._pedb.edb_api.cell._cell.LayerCollection(self._pedb.layout.layer_collection)
1759
- sig_set = self._pedb.edb_api.cell.layer_type_set.SignalLayerSet
1755
+ stackup_target = self._pedb.core.cell._cell.LayerCollection(self._pedb.layout.layer_collection)
1756
+ sig_set = self._pedb.core.cell.layer_type_set.SignalLayerSet
1760
1757
  res = stackup_target.GetTopBottomStackupLayers(sig_set)
1761
1758
  target_top_elevation = res[2]
1762
1759
  target_bottom_elevation = res[4]
@@ -1769,7 +1766,7 @@ class Stackup(LayerCollection):
1769
1766
  h_stackup = self._edb_value(elevation)
1770
1767
  location = self._pedb.point_3d(offset_x, offset_y, h_stackup)
1771
1768
 
1772
- mcad_model = self._pedb.edb_api.McadModel.Create3DComp(self._pedb.active_layout, a3dcomp_path)
1769
+ mcad_model = self._pedb.core.McadModel.Create3DComp(self._pedb.active_layout, a3dcomp_path)
1773
1770
  if mcad_model.IsNull(): # pragma: no cover
1774
1771
  logger.error("Failed to create MCAD model from a3dcomp")
1775
1772
  return False
@@ -2002,7 +1999,7 @@ class Stackup(LayerCollection):
2002
1999
  if not str(layer_info.Dielectric_Fill) == "nan":
2003
2000
  layer.dielectric_fill = layer_info.Dielectric_Fill
2004
2001
 
2005
- lc_new = self._pedb.edb_api.Cell.LayerCollection()
2002
+ lc_new = self._pedb.core.Cell.LayerCollection()
2006
2003
  for name, _ in df.iterrows():
2007
2004
  layer = self.layers[name]
2008
2005
  lc_new.AddLayerBottom(layer._edb_layer)
@@ -12,15 +12,15 @@ class HeatSink:
12
12
  def __init__(self, pedb, edb_object=None):
13
13
  self._pedb = pedb
14
14
  self._fin_orientation_type = {
15
- "x_oriented": self._pedb.edb_api.utility.utility.HeatSinkFinOrientation.XOriented,
16
- "y_oriented": self._pedb.edb_api.utility.utility.HeatSinkFinOrientation.YOriented,
17
- "other_oriented": self._pedb.edb_api.utility.utility.HeatSinkFinOrientation.OtherOriented,
15
+ "x_oriented": self._pedb.core.utility.utility.HeatSinkFinOrientation.XOriented,
16
+ "y_oriented": self._pedb.core.utility.utility.HeatSinkFinOrientation.YOriented,
17
+ "other_oriented": self._pedb.core.utility.utility.HeatSinkFinOrientation.OtherOriented,
18
18
  }
19
19
 
20
20
  if edb_object:
21
21
  self._edb_object = edb_object
22
22
  else:
23
- self._edb_object = self._pedb.edb_api.utility.utility.HeatSink()
23
+ self._edb_object = self._pedb.core.utility.utility.HeatSink()
24
24
 
25
25
  @property
26
26
  def fin_base_height(self):
@@ -34,7 +34,7 @@ class BBox:
34
34
  else:
35
35
  point_1 = PointData(self._pedb, x=point_1[0], y=point_1[1])
36
36
  point_2 = PointData(self._pedb, x=point_2[0], y=point_2[1])
37
- self._edb_object = Tuple[self._pedb.edb_api.Geometry.PointData, self._pedb.edb_api.Geometry.PointData](
37
+ self._edb_object = Tuple[self._pedb.core.Geometry.PointData, self._pedb.core.Geometry.PointData](
38
38
  point_1._edb_object, point_2._edb_object
39
39
  )
40
40
 
@@ -0,0 +1,116 @@
1
+ # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
2
+ # SPDX-License-Identifier: MIT
3
+ #
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ # SOFTWARE.
22
+
23
+
24
+ class Value(float):
25
+ """Class defining Edb Value properties."""
26
+
27
+ def __new__(cls, pedb, edb_obj):
28
+ temp = super().__new__(cls, float(round(edb_obj.ToDouble(), 9)))
29
+ temp._pedb = pedb
30
+ temp._edb_obj = edb_obj
31
+ return temp
32
+
33
+ def __str__(self):
34
+ """Returns the string of the variable.
35
+
36
+ Returns
37
+ -------
38
+ str
39
+ """
40
+ return self._edb_obj.ToString()
41
+
42
+ def __add__(self, other):
43
+ """Adds two Edb Values."""
44
+ edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})+({str(other)})")
45
+ return self.__class__(self._pedb, edb_object)
46
+
47
+ def __radd__(self, other):
48
+ edb_object = self._pedb.core.utility.value(f"({str(other)})+({self._edb_obj.ToString()})")
49
+ return self.__class__(self._pedb, edb_object)
50
+
51
+ def __sub__(self, other):
52
+ """Subtracts two Edb Values."""
53
+ edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})-({str(other)})")
54
+ return self.__class__(self._pedb, edb_object)
55
+
56
+ def __rsub__(self, other):
57
+ edb_object = self._pedb.core.utility.value(f"({str(other)})-({self._edb_obj.ToString()})")
58
+ return self.__class__(self._pedb, edb_object)
59
+
60
+ def __mul__(self, other):
61
+ """Multiplies two Edb Values."""
62
+ edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})*({str(other)})")
63
+ return self.__class__(self._pedb, edb_object)
64
+
65
+ def __rmul__(self, other):
66
+ edb_object = self._pedb.core.utility.value(f"({str(other)})*({self._edb_obj.ToString()})")
67
+ return self.__class__(self._pedb, edb_object)
68
+
69
+ def __truediv__(self, other):
70
+ """Divides two Edb Values."""
71
+ edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})/({str(other)})")
72
+ return self.__class__(self._pedb, edb_object)
73
+
74
+ def __rtruediv__(self, other):
75
+ edb_object = self._pedb.core.utility.value(f"({str(other)})/({self._edb_obj.ToString()})")
76
+ return self.__class__(self._pedb, edb_object)
77
+
78
+ def sqrt(self):
79
+ """Square root of the value."""
80
+ edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})**0.5")
81
+ return self.__class__(self._pedb, edb_object)
82
+
83
+ def log10(self):
84
+ """Base-10 logarithm of the value."""
85
+ edb_object = self._pedb.core.utility.value(f"log10({self._edb_obj.ToString()})")
86
+ return self.__class__(self._pedb, edb_object)
87
+
88
+ def sin(self):
89
+ """Sine of the value."""
90
+ edb_object = self._pedb.core.utility.value(f"sin({self._edb_obj.ToString()})")
91
+ return self.__class__(self._pedb, edb_object)
92
+
93
+ def cos(self):
94
+ """Cosine of the value."""
95
+ edb_object = self._pedb.core.utility.value(f"cos({self._edb_obj.ToString()})")
96
+ return self.__class__(self._pedb, edb_object)
97
+
98
+ def asin(self):
99
+ """Arcsine of the value."""
100
+ edb_object = self._pedb.core.utility.value(f"asin({self._edb_obj.ToString()})")
101
+ return self.__class__(self._pedb, edb_object)
102
+
103
+ def acos(self):
104
+ """Arccosine of the value."""
105
+ edb_object = self._pedb.core.utility.value(f"acos({self._edb_obj.ToString()})")
106
+ return self.__class__(self._pedb, edb_object)
107
+
108
+ def tan(self):
109
+ """Tangent of the value."""
110
+ edb_object = self._pedb.core.utility.value(f"tan({self._edb_obj.ToString()})")
111
+ return self.__class__(self._pedb, edb_object)
112
+
113
+ def atan(self):
114
+ """Arctangent of the value."""
115
+ edb_object = self._pedb.core.utility.value(f"atan({self._edb_obj.ToString()})")
116
+ return self.__class__(self._pedb, edb_object)