pyedb 0.54.0__py3-none-any.whl → 0.55.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 (95) hide show
  1. pyedb/__init__.py +1 -8
  2. pyedb/configuration/cfg_boundaries.py +69 -151
  3. pyedb/configuration/cfg_components.py +201 -460
  4. pyedb/configuration/cfg_data.py +4 -2
  5. pyedb/configuration/cfg_general.py +13 -36
  6. pyedb/configuration/cfg_modeler.py +2 -1
  7. pyedb/configuration/cfg_nets.py +21 -35
  8. pyedb/configuration/cfg_operations.py +22 -151
  9. pyedb/configuration/cfg_package_definition.py +56 -112
  10. pyedb/configuration/cfg_padstacks.py +292 -688
  11. pyedb/configuration/cfg_pin_groups.py +32 -79
  12. pyedb/configuration/cfg_ports_sources.py +19 -6
  13. pyedb/configuration/cfg_s_parameter_models.py +67 -172
  14. pyedb/configuration/cfg_setup.py +102 -295
  15. pyedb/configuration/configuration.py +64 -5
  16. pyedb/dotnet/database/cell/connectable.py +38 -9
  17. pyedb/dotnet/database/cell/hierarchy/component.py +28 -28
  18. pyedb/dotnet/database/cell/hierarchy/model.py +1 -1
  19. pyedb/dotnet/database/cell/layout.py +63 -2
  20. pyedb/dotnet/database/cell/layout_obj.py +2 -2
  21. pyedb/dotnet/database/cell/primitive/path.py +6 -8
  22. pyedb/dotnet/database/cell/primitive/primitive.py +3 -24
  23. pyedb/dotnet/database/cell/terminal/edge_terminal.py +2 -2
  24. pyedb/dotnet/database/cell/terminal/padstack_instance_terminal.py +1 -1
  25. pyedb/dotnet/database/cell/terminal/pingroup_terminal.py +1 -1
  26. pyedb/dotnet/database/cell/terminal/point_terminal.py +1 -1
  27. pyedb/dotnet/database/cell/terminal/terminal.py +24 -24
  28. pyedb/dotnet/database/cell/voltage_regulator.py +0 -21
  29. pyedb/dotnet/database/components.py +96 -88
  30. pyedb/dotnet/database/definition/component_def.py +4 -4
  31. pyedb/dotnet/database/definition/component_model.py +1 -1
  32. pyedb/dotnet/database/definition/package_def.py +2 -3
  33. pyedb/dotnet/database/dotnet/database.py +3 -199
  34. pyedb/dotnet/database/dotnet/primitive.py +3 -3
  35. pyedb/dotnet/database/edb_data/control_file.py +5 -5
  36. pyedb/dotnet/database/edb_data/hfss_extent_info.py +6 -6
  37. pyedb/dotnet/database/edb_data/layer_data.py +23 -23
  38. pyedb/dotnet/database/edb_data/padstacks_data.py +63 -88
  39. pyedb/dotnet/database/edb_data/primitives_data.py +5 -5
  40. pyedb/dotnet/database/edb_data/sources.py +6 -6
  41. pyedb/dotnet/database/edb_data/variables.py +1 -1
  42. pyedb/dotnet/database/geometry/point_data.py +14 -10
  43. pyedb/dotnet/database/geometry/polygon_data.py +3 -3
  44. pyedb/dotnet/database/hfss.py +46 -48
  45. pyedb/dotnet/database/layout_validation.py +14 -11
  46. pyedb/dotnet/database/materials.py +10 -11
  47. pyedb/dotnet/database/modeler.py +97 -91
  48. pyedb/dotnet/database/nets.py +19 -22
  49. pyedb/dotnet/database/padstack.py +84 -83
  50. pyedb/dotnet/database/siwave.py +42 -42
  51. pyedb/dotnet/database/stackup.py +140 -72
  52. pyedb/dotnet/database/utilities/heatsink.py +4 -4
  53. pyedb/dotnet/database/utilities/obj_base.py +2 -2
  54. pyedb/dotnet/database/utilities/simulation_setup.py +2 -2
  55. pyedb/dotnet/database/utilities/value.py +16 -16
  56. pyedb/dotnet/edb.py +228 -150
  57. pyedb/edb_logger.py +12 -27
  58. pyedb/extensions/via_design_backend.py +6 -3
  59. pyedb/generic/design_types.py +67 -29
  60. pyedb/generic/general_methods.py +0 -120
  61. pyedb/generic/process.py +44 -108
  62. pyedb/generic/settings.py +75 -19
  63. pyedb/grpc/database/components.py +2 -0
  64. pyedb/grpc/database/control_file.py +5 -5
  65. pyedb/grpc/database/definition/materials.py +1 -1
  66. pyedb/grpc/database/definition/package_def.py +3 -3
  67. pyedb/grpc/database/definition/padstack_def.py +53 -0
  68. pyedb/grpc/database/geometry/polygon_data.py +1 -1
  69. pyedb/grpc/database/layout/layout.py +8 -5
  70. pyedb/grpc/database/layout_validation.py +3 -3
  71. pyedb/grpc/database/modeler.py +9 -4
  72. pyedb/grpc/database/net/net.py +15 -14
  73. pyedb/grpc/database/nets.py +70 -0
  74. pyedb/grpc/database/padstacks.py +35 -17
  75. pyedb/grpc/database/primitive/padstack_instance.py +175 -7
  76. pyedb/grpc/database/siwave.py +1 -1
  77. pyedb/grpc/database/source_excitations.py +2 -4
  78. pyedb/grpc/database/stackup.py +1 -1
  79. pyedb/grpc/database/terminal/bundle_terminal.py +1 -1
  80. pyedb/grpc/database/terminal/padstack_instance_terminal.py +1 -1
  81. pyedb/grpc/database/terminal/pingroup_terminal.py +1 -1
  82. pyedb/grpc/database/utility/xml_control_file.py +5 -5
  83. pyedb/grpc/edb.py +73 -27
  84. pyedb/grpc/edb_init.py +3 -3
  85. pyedb/grpc/rpc_session.py +10 -10
  86. pyedb/libraries/common.py +366 -0
  87. pyedb/libraries/rf_libraries/base_functions.py +1358 -0
  88. pyedb/libraries/rf_libraries/planar_antennas.py +628 -0
  89. pyedb/misc/decorators.py +61 -0
  90. pyedb/misc/misc.py +0 -13
  91. pyedb/siwave.py +2 -2
  92. {pyedb-0.54.0.dist-info → pyedb-0.55.0.dist-info}/METADATA +1 -2
  93. {pyedb-0.54.0.dist-info → pyedb-0.55.0.dist-info}/RECORD +95 -91
  94. {pyedb-0.54.0.dist-info → pyedb-0.55.0.dist-info}/WHEEL +0 -0
  95. {pyedb-0.54.0.dist-info → pyedb-0.55.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.core.cell._cell.LayerCollection(edb_object)
71
+ self._edb_object = self._pedb.core.Cell.LayerCollection(edb_object)
72
72
  else:
73
- self._edb_object = self._pedb.core.cell._cell.LayerCollection()
73
+ self._edb_object = self._pedb.core.Cell.LayerCollection()
74
74
 
75
75
  self._layer_type_set_mapping = {
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,
76
+ "stackup_layer_set": self._pedb.core.Cell.LayerTypeSet.StackupLayerSet,
77
+ "signal_ayer_et": self._pedb.core.Cell.LayerTypeSet.SignalLayerSet,
78
+ "non_stackup_layer_set": self._pedb.core.Cell.LayerTypeSet.NonStackupLayerSet,
79
+ "all_layer_et": self._pedb.core.Cell.LayerTypeSet.AllLayerSet,
80
80
  }
81
81
  self._lc_mode_mapping = {
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,
82
+ "laminate": self._pedb.core.Cell.LayerCollectionMode.Laminate,
83
+ "overlapping": self._pedb.core.Cell.LayerCollectionMode.Overlapping,
84
+ "multizone": self._pedb.core.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.core.cell._cell.LayerCollection(self._pedb.layout.layer_collection)
98
+ self._edb_object = self._pedb.core.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.core.cell._cell.LayerCollection() # empty layer collection
241
+ lc = self._pedb.core.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.core.cell.layer_type_set.AllLayerSet))
285
+ layer_list = list(self._edb_object.Layers(self._pedb.core.Cell.LayerTypeSet.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.core.cell._cell.Layer.FindByName(self._edb_object, name)
309
+ obj = self._pedb.core.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.core.cell.layer_type
340
+ return self._pedb.core.Cell.LayerType
341
341
 
342
342
  @property
343
343
  def thickness(self):
@@ -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.core.cell.layer_type_set.AllLayerSet))
630
+ layer_list = list(self._layer_collection.Layers(self._pedb.core.Cell.LayerTypeSet.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.core.cell.layer_type.SignalLayer
641
+ layer_type = self._pedb.core.Cell.LayerType.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.core.cell.layer_type.DielectricLayer
657
+ layer_type = self._pedb.core.Cell.LayerType.DielectricLayer
658
658
  _lays = OrderedDict()
659
659
  for name, obj in self.layers.items():
660
660
  if obj._edb_layer.GetLayerType() == layer_type:
@@ -684,13 +684,12 @@ 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() for i in list(list(lc_readonly.Layers(self._pedb.core.cell.layer_type_set.StackupLayerSet)))
687
+ i.Clone() for i in list(list(lc_readonly.Layers(self._pedb.core.Cell.LayerTypeSet.StackupLayerSet)))
688
688
  ]
689
689
  non_stackup = [
690
- i.Clone()
691
- for i in list(list(lc_readonly.Layers(self._pedb.core.cell.layer_type_set.NonStackupLayerSet)))
690
+ i.Clone() for i in list(list(lc_readonly.Layers(self._pedb.core.Cell.LayerTypeSet.NonStackupLayerSet)))
692
691
  ]
693
- _lc = self._pedb.core.cell._cell.LayerCollection()
692
+ _lc = self._pedb.core.Cell.LayerCollection()
694
693
  mode = lc_readonly.GetMode()
695
694
  _lc.SetMode(lc_readonly.GetMode())
696
695
  if str(mode) == "Overlapping":
@@ -726,11 +725,11 @@ class Stackup(LayerCollection):
726
725
 
727
726
  def _create_stackup_layer(self, layer_name, thickness, layer_type="signal"):
728
727
  if layer_type == "signal":
729
- _layer_type = self._pedb.core.cell.layer_type.SignalLayer
728
+ _layer_type = self._pedb.core.Cell.LayerType.SignalLayer
730
729
  else:
731
- _layer_type = self._pedb.core.cell.layer_type.DielectricLayer
730
+ _layer_type = self._pedb.core.Cell.LayerType.DielectricLayer
732
731
 
733
- result = self._pedb.core.cell._cell.StackupLayer(
732
+ result = self._pedb.core.Cell.StackupLayer(
734
733
  layer_name,
735
734
  _layer_type,
736
735
  self._edb_value(thickness),
@@ -742,39 +741,39 @@ class Stackup(LayerCollection):
742
741
 
743
742
  def _create_nonstackup_layer(self, layer_name, layer_type):
744
743
  if layer_type == "conducting": # pragma: no cover
745
- _layer_type = self._pedb.core.cell.layer_type.ConductingLayer
744
+ _layer_type = self._pedb.core.Cell.LayerType.ConductingLayer
746
745
  elif layer_type == "airlines": # pragma: no cover
747
- _layer_type = self._pedb.core.cell.layer_type.AirlinesLayer
746
+ _layer_type = self._pedb.core.Cell.LayerType.AirlinesLayer
748
747
  elif layer_type == "error": # pragma: no cover
749
- _layer_type = self._pedb.core.cell.layer_type.ErrorsLayer
748
+ _layer_type = self._pedb.core.Cell.LayerType.ErrorsLayer
750
749
  elif layer_type == "symbol": # pragma: no cover
751
- _layer_type = self._pedb.core.cell.layer_type.SymbolLayer
750
+ _layer_type = self._pedb.core.Cell.LayerType.SymbolLayer
752
751
  elif layer_type == "measure": # pragma: no cover
753
- _layer_type = self._pedb.core.cell.layer_type.MeasureLayer
752
+ _layer_type = self._pedb.core.Cell.LayerType.MeasureLayer
754
753
  elif layer_type == "assembly": # pragma: no cover
755
- _layer_type = self._pedb.core.cell.layer_type.AssemblyLayer
754
+ _layer_type = self._pedb.core.Cell.LayerType.AssemblyLayer
756
755
  elif layer_type == "silkscreen": # pragma: no cover
757
- _layer_type = self._pedb.core.cell.layer_type.SilkscreenLayer
756
+ _layer_type = self._pedb.core.Cell.LayerType.SilkscreenLayer
758
757
  elif layer_type == "soldermask": # pragma: no cover
759
- _layer_type = self._pedb.core.cell.layer_type.SolderMaskLayer
758
+ _layer_type = self._pedb.core.Cell.LayerType.SolderMaskLayer
760
759
  elif layer_type == "solderpaste": # pragma: no cover
761
- _layer_type = self._pedb.core.cell.layer_type.SolderPasteLayer
760
+ _layer_type = self._pedb.core.Cell.LayerType.SolderPasteLayer
762
761
  elif layer_type == "glue": # pragma: no cover
763
- _layer_type = self._pedb.core.cell.layer_type.GlueLayer
762
+ _layer_type = self._pedb.core.Cell.LayerType.GlueLayer
764
763
  elif layer_type == "wirebond": # pragma: no cover
765
- _layer_type = self._pedb.core.cell.layer_type.WirebondLayer
764
+ _layer_type = self._pedb.core.Cell.LayerType.WirebondLayer
766
765
  elif layer_type == "user": # pragma: no cover
767
- _layer_type = self._pedb.core.cell.layer_type.UserLayer
766
+ _layer_type = self._pedb.core.Cell.LayerType.UserLayer
768
767
  elif layer_type == "siwavehfsssolverregions": # pragma: no cover
769
- _layer_type = self._pedb.core.cell.layer_type.SIwaveHFSSSolverRegions
768
+ _layer_type = self._pedb.core.Cell.LayerType.SIwaveHFSSSolverRegions
770
769
  elif layer_type == "outline": # pragma: no cover
771
- _layer_type = self._pedb.core.cell.layer_type.OutlineLayer
770
+ _layer_type = self._pedb.core.Cell.LayerType.OutlineLayer
772
771
  elif layer_type == "postprocessing": # pragma: no cover
773
- _layer_type = self._pedb.core.cell.layer_type.PostprocessingLayer
772
+ _layer_type = self._pedb.core.Cell.LayerType.PostprocessingLayer
774
773
  else: # pragma: no cover
775
- _layer_type = self._pedb.core.cell.layer_type.UndefinedLayerType
774
+ _layer_type = self._pedb.core.Cell.LayerType.UndefinedLayerType
776
775
 
777
- result = self._pedb.core.cell.layer(layer_name, _layer_type)
776
+ result = self._pedb.core.Cell.layer(layer_name, _layer_type)
778
777
  self.refresh_layer_collection()
779
778
  return result
780
779
 
@@ -1121,9 +1120,9 @@ class Stackup(LayerCollection):
1121
1120
  ``True`` when successful, ``False`` when failed.
1122
1121
  """
1123
1122
  if only_metals:
1124
- input_layers = self._pedb.core.cell.layer_type_set.SignalLayerSet
1123
+ input_layers = self._pedb.core.Cell.LayerTypeSet.SignalLayerSet
1125
1124
  else:
1126
- input_layers = self._pedb.core.cell.layer_type_set.StackupLayerSet
1125
+ input_layers = self._pedb.core.Cell.LayerTypeSet.StackupLayerSet
1127
1126
 
1128
1127
  res, topl, topz, bottoml, bottomz = self._layer_collection.GetTopBottomStackupLayers(input_layers)
1129
1128
  return topl.GetName(), topz, bottoml.GetName(), bottomz
@@ -1149,14 +1148,14 @@ class Stackup(LayerCollection):
1149
1148
  lc_mode = lc.GetMode()
1150
1149
  new_lc.SetMode(lc_mode)
1151
1150
  max_elevation = 0.0
1152
- for layer in lc.Layers(self._pedb.core.cell.layer_type_set.StackupLayerSet):
1151
+ for layer in lc.Layers(self._pedb.core.Cell.LayerTypeSet.StackupLayerSet):
1153
1152
  if "RadBox" not in layer.GetName(): # Ignore RadBox
1154
1153
  lower_elevation = layer.Clone().GetLowerElevation() * 1.0e6
1155
1154
  upper_elevation = layer.Clone().GetUpperElevation() * 1.0e6
1156
1155
  max_elevation = max([max_elevation, lower_elevation, upper_elevation])
1157
1156
 
1158
1157
  non_stackup_layers = []
1159
- for layer in lc.Layers(self._pedb.core.cell.layer_type_set.AllLayerSet):
1158
+ for layer in lc.Layers(self._pedb.core.Cell.LayerTypeSet.AllLayerSet):
1160
1159
  cloned_layer = layer.Clone()
1161
1160
  if not cloned_layer.IsStackupLayer():
1162
1161
  non_stackup_layers.append(cloned_layer)
@@ -1176,9 +1175,7 @@ class Stackup(LayerCollection):
1176
1175
  new_lc.AddStackupLayerAtElevation(cloned_layer)
1177
1176
 
1178
1177
  vialayers = [
1179
- lay
1180
- for lay in lc.Layers(self._pedb.core.cell.layer_type_set.StackupLayerSet)
1181
- if lay.Clone().IsViaLayer()
1178
+ lay for lay in lc.Layers(self._pedb.core.Cell.LayerTypeSet.StackupLayerSet) if lay.Clone().IsViaLayer()
1182
1179
  ]
1183
1180
  for layer in vialayers:
1184
1181
  cloned_via_layer = layer.Clone()
@@ -1186,19 +1183,19 @@ class Stackup(LayerCollection):
1186
1183
  lower_ref_name = cloned_via_layer.GetRefLayerName(False)
1187
1184
  upper_ref = [
1188
1185
  lay
1189
- for lay in lc.Layers(self._pedb.core.cell.layer_type_set.AllLayerSet)
1186
+ for lay in lc.Layers(self._pedb.core.Cell.LayerTypeSet.AllLayerSet)
1190
1187
  if lay.GetName() == upper_ref_name
1191
1188
  ][0]
1192
1189
  lower_ref = [
1193
1190
  lay
1194
- for lay in lc.Layers(self._pedb.core.cell.layer_type_set.AllLayerSet)
1191
+ for lay in lc.Layers(self._pedb.core.Cell.LayerTypeSet.AllLayerSet)
1195
1192
  if lay.GetName() == lower_ref_name
1196
1193
  ][0]
1197
1194
  cloned_via_layer.SetRefLayer(lower_ref, True)
1198
1195
  cloned_via_layer.SetRefLayer(upper_ref, False)
1199
1196
  ref_layer_in_flipped_stackup = [
1200
1197
  lay
1201
- for lay in new_lc.Layers(self._pedb.core.cell.layer_type_set.AllLayerSet)
1198
+ for lay in new_lc.Layers(self._pedb.core.Cell.LayerTypeSet.AllLayerSet)
1202
1199
  if lay.GetName() == upper_ref_name
1203
1200
  ][0]
1204
1201
  via_layer_lower_elevation = (
@@ -1243,7 +1240,7 @@ class Stackup(LayerCollection):
1243
1240
  cmp_prop.SetDieProperty(die_prop)
1244
1241
  cmp.SetComponentProperty(cmp_prop)
1245
1242
 
1246
- lay_list = list(new_lc.Layers(self._pedb.core.cell.layer_type_set.SignalLayerSet))
1243
+ lay_list = list(new_lc.Layers(self._pedb.core.Cell.LayerTypeSet.SignalLayerSet))
1247
1244
  for padstack in list(self._pedb.padstacks.instances.values()):
1248
1245
  start_layer_id = [lay.GetLayerId() for lay in list(lay_list) if lay.GetName() == padstack.start_layer]
1249
1246
  stop_layer_id = [lay.GetLayerId() for lay in list(lay_list) if lay.GetName() == padstack.stop_layer]
@@ -1391,10 +1388,10 @@ class Stackup(LayerCollection):
1391
1388
  _offset_y = self._edb_value(offset_y)
1392
1389
 
1393
1390
  if edb_cell.GetName() not in self._pedb.cell_names:
1394
- list_cells = self._pedb.copy_cells([edb_cell.api_object])
1391
+ list_cells = self._pedb.copy_cells([edb_cell])
1395
1392
  edb_cell = list_cells[0]
1396
1393
  self._pedb.layout.cell.SetBlackBox(True)
1397
- cell_inst2 = self._pedb.core.cell.hierarchy.cell_instance.Create(
1394
+ cell_inst2 = self._pedb.core.Cell.Hierarchy.CellInstance.Create(
1398
1395
  edb_cell.GetLayout(), self._pedb.layout.cell.GetName(), self._pedb.active_layout
1399
1396
  )
1400
1397
  cell_trans = cell_inst2.GetTransform()
@@ -1408,11 +1405,11 @@ class Stackup(LayerCollection):
1408
1405
 
1409
1406
  if place_on_top:
1410
1407
  cell_inst2.SetPlacementLayer(
1411
- list(stackup_target.Layers(self._pedb.core.cell.layer_type_set.SignalLayerSet))[0]
1408
+ list(stackup_target.Layers(self._pedb.core.Cell.LayerTypeSet.SignalLayerSet))[0]
1412
1409
  )
1413
1410
  else:
1414
1411
  cell_inst2.SetPlacementLayer(
1415
- list(stackup_target.Layers(self._pedb.core.cell.layer_type_set.SignalLayerSet))[-1]
1412
+ list(stackup_target.Layers(self._pedb.core.Cell.LayerTypeSet.SignalLayerSet))[-1]
1416
1413
  )
1417
1414
  self.refresh_layer_collection()
1418
1415
  return True
@@ -1499,10 +1496,10 @@ class Stackup(LayerCollection):
1499
1496
  _offset_y = self._edb_value(offset_y)
1500
1497
 
1501
1498
  if edb_cell.GetName() not in self._pedb.cell_names:
1502
- list_cells = self._pedb.copy_cells(edb_cell.api_object)
1499
+ list_cells = self._pedb.copy_cells(edb_cell)
1503
1500
  edb_cell = list_cells[0]
1504
1501
  self._pedb.layout.cell.SetBlackBox(True)
1505
- cell_inst2 = self._pedb.core.cell.hierarchy.cell_instance.Create(
1502
+ cell_inst2 = self._pedb.core.Cell.Hierarchy.CellInstance.Create(
1506
1503
  edb_cell.GetLayout(), self._pedb.layout.cell.GetName(), self._pedb.active_layout
1507
1504
  )
1508
1505
 
@@ -1511,14 +1508,14 @@ class Stackup(LayerCollection):
1511
1508
 
1512
1509
  if place_on_top:
1513
1510
  cell_inst2.SetPlacementLayer(
1514
- list(stackup_target.Layers(self._pedb.core.cell.layer_type_set.SignalLayerSet))[0]
1511
+ list(stackup_target.Layers(self._pedb.core.Cell.LayerTypeSet.SignalLayerSet))[0]
1515
1512
  )
1516
1513
  else:
1517
1514
  cell_inst2.SetPlacementLayer(
1518
- list(stackup_target.Layers(self._pedb.core.cell.layer_type_set.SignalLayerSet))[-1]
1515
+ list(stackup_target.Layers(self._pedb.core.Cell.LayerTypeSet.SignalLayerSet))[-1]
1519
1516
  )
1520
1517
  cell_inst2.SetIs3DPlacement(True)
1521
- sig_set = self._pedb.core.cell.layer_type_set.SignalLayerSet
1518
+ sig_set = self._pedb.core.Cell.LayerTypeSet.SignalLayerSet
1522
1519
  res = stackup_target.GetTopBottomStackupLayers(sig_set)
1523
1520
  target_top_elevation = res[2]
1524
1521
  target_bottom_elevation = res[4]
@@ -1637,7 +1634,7 @@ class Stackup(LayerCollection):
1637
1634
  _offset_y = self._edb_value(offset_y)
1638
1635
 
1639
1636
  if edb_cell.GetName() not in self._pedb.cell_names:
1640
- list_cells = self._pedb.copy_cells(edb_cell.api_object)
1637
+ list_cells = self._pedb.copy_cells(edb_cell)
1641
1638
  edb_cell = list_cells[0]
1642
1639
  for cell in list(self._pedb.active_db.CircuitCells):
1643
1640
  if cell.GetName() == edb_cell.GetName():
@@ -1653,7 +1650,7 @@ class Stackup(LayerCollection):
1653
1650
 
1654
1651
  instance_name = generate_unique_name(edb_cell.GetName(), n=2)
1655
1652
 
1656
- cell_inst2 = self._pedb.core.cell.hierarchy.cell_instance.Create(
1653
+ cell_inst2 = self._pedb.core.Cell.Hierarchy.CellInstance.Create(
1657
1654
  self._pedb.active_layout, instance_name, edb_cell.GetLayout()
1658
1655
  )
1659
1656
 
@@ -1662,14 +1659,14 @@ class Stackup(LayerCollection):
1662
1659
 
1663
1660
  if place_on_top:
1664
1661
  cell_inst2.SetPlacementLayer(
1665
- list(stackup_target.Layers(self._pedb.core.cell.layer_type_set.SignalLayerSet))[0]
1662
+ list(stackup_target.Layers(self._pedb.core.Cell.LayerTypeSet.SignalLayerSet))[0]
1666
1663
  )
1667
1664
  else:
1668
1665
  cell_inst2.SetPlacementLayer(
1669
- list(stackup_target.Layers(self._pedb.core.cell.layer_type_set.SignalLayerSet))[-1]
1666
+ list(stackup_target.Layers(self._pedb.core.Cell.LayerTypeSet.SignalLayerSet))[-1]
1670
1667
  )
1671
1668
  cell_inst2.SetIs3DPlacement(True)
1672
- sig_set = self._pedb.core.cell.layer_type_set.SignalLayerSet
1669
+ sig_set = self._pedb.core.Cell.LayerTypeSet.SignalLayerSet
1673
1670
  res = stackup_target.GetTopBottomStackupLayers(sig_set)
1674
1671
  target_top_elevation = res[2]
1675
1672
  target_bottom_elevation = res[4]
@@ -1752,8 +1749,8 @@ class Stackup(LayerCollection):
1752
1749
  _angle = angle * math.pi / 180.0
1753
1750
  rotation_axis_to = self._pedb.point_3d(math.cos(_angle), -1 * math.sin(_angle), 0.0)
1754
1751
 
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
1752
+ stackup_target = self._pedb.core.Cell.LayerCollection(self._pedb.layout.layer_collection)
1753
+ sig_set = self._pedb.core.Cell.LayerTypeSet.SignalLayerSet
1757
1754
  res = stackup_target.GetTopBottomStackupLayers(sig_set)
1758
1755
  target_top_elevation = res[2]
1759
1756
  target_bottom_elevation = res[4]
@@ -2245,10 +2242,62 @@ class Stackup(LayerCollection):
2245
2242
  ``True`` when successful, ``False`` when failed.
2246
2243
  """
2247
2244
 
2248
- self._edb_object.ImportFromControlFile(file_path)
2249
- flag = self._pedb.layout._edb_object.SetLayerCollection(self._edb_object)
2250
- self.refresh_layer_collection()
2251
- return flag
2245
+ if not colors:
2246
+ self._pedb.logger.error("Matplotlib is needed. Please, install it first.")
2247
+ return False
2248
+ tree = ET.parse(file_path)
2249
+ root = tree.getroot()
2250
+ stackup = root.find("Stackup")
2251
+ stackup_dict = {}
2252
+ if stackup.find("Materials"):
2253
+ mats = []
2254
+ for m in stackup.find("Materials").findall("Material"):
2255
+ temp = dict()
2256
+ for i in list(m):
2257
+ value = list(i)[0].text
2258
+ temp[i.tag] = value
2259
+ mat = {"name": m.attrib["Name"]}
2260
+ temp_dict = {
2261
+ "Permittivity": "permittivity",
2262
+ "Conductivity": "conductivity",
2263
+ "DielectricLossTangent": "dielectric_loss_tangent",
2264
+ }
2265
+ for i in temp_dict.keys():
2266
+ value = temp.get(i, None)
2267
+ if value:
2268
+ mat[temp_dict[i]] = value
2269
+ mats.append(mat)
2270
+ stackup_dict["materials"] = mats
2271
+
2272
+ stackup_section = stackup.find("Layers")
2273
+ if stackup_section:
2274
+ length_unit = stackup_section.attrib["LengthUnit"]
2275
+ layers = []
2276
+ for l in stackup.find("Layers").findall("Layer"):
2277
+ temp = l.attrib
2278
+ layer = dict()
2279
+ temp_dict = {
2280
+ "Name": "name",
2281
+ "Color": "color",
2282
+ "Material": "material",
2283
+ "Thickness": "thickness",
2284
+ "Type": "type",
2285
+ "FillMaterial": "fill_material",
2286
+ }
2287
+ for i in temp_dict.keys():
2288
+ value = temp.get(i, None)
2289
+ if value:
2290
+ if i == "Thickness":
2291
+ value = str(round(float(value), 6)) + length_unit
2292
+ value = "signal" if value == "conductor" else value
2293
+ if i == "Color":
2294
+ value = [int(x * 255) for x in list(colors.to_rgb(value))]
2295
+ layer[temp_dict[i]] = value
2296
+ layers.append(layer)
2297
+ stackup_dict["layers"] = layers
2298
+ cfg = {"stackup": stackup_dict}
2299
+ self._pedb.configuration.load(cfg)
2300
+ return self._pedb.configuration.run()
2252
2301
 
2253
2302
  def _export_xml(self, file_path):
2254
2303
  """Export stackup information to an external XMLfile.
@@ -2812,3 +2861,22 @@ class Stackup(LayerCollection):
2812
2861
  elif show:
2813
2862
  plt.show()
2814
2863
  return plt
2864
+
2865
+ def load_from_xml(self, file_path):
2866
+ """Load stackup from a XML file.
2867
+
2868
+ Parameters
2869
+ ----------
2870
+ file_path: str
2871
+ Path to external XML file.
2872
+
2873
+ Returns
2874
+ -------
2875
+ bool
2876
+ ``True`` when successful, ``False`` when failed.
2877
+ """
2878
+
2879
+ self._edb_object.ImportFromControlFile(file_path)
2880
+ flag = self._pedb.layout._edb_object.SetLayerCollection(self._edb_object)
2881
+ self.refresh_layer_collection()
2882
+ return flag
@@ -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.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,
15
+ "x_oriented": self._pedb.core.Utility.HeatSinkFinOrientation.XOriented,
16
+ "y_oriented": self._pedb.core.Utility.HeatSinkFinOrientation.YOriented,
17
+ "other_oriented": self._pedb.core.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.core.utility.utility.HeatSink()
23
+ self._edb_object = self._pedb.core.Utility.HeatSink()
24
24
 
25
25
  @property
26
26
  def fin_base_height(self):
@@ -32,8 +32,8 @@ class BBox:
32
32
  if edb_object:
33
33
  self._edb_object = edb_object
34
34
  else:
35
- point_1 = PointData(self._pedb, x=point_1[0], y=point_1[1])
36
- point_2 = PointData(self._pedb, x=point_2[0], y=point_2[1])
35
+ point_1 = PointData.create_from_xy(self._pedb, x=point_1[0], y=point_1[1])
36
+ point_2 = PointData.create_from_xy(self._pedb, x=point_2[0], y=point_2[1])
37
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
  )
@@ -86,7 +86,7 @@ class SimulationSetup(object):
86
86
  "kNumSetupTypes": None,
87
87
  }
88
88
 
89
- if float(self._pedb.edbversion) >= 2024.2:
89
+ if float(self._pedb.version) >= 2024.2:
90
90
  self._simulation_setup_type.update(
91
91
  {
92
92
  "kRaptorX": self._pedb.simsetupdata.RaptorX.RaptorXSimulationSettings,
@@ -169,7 +169,7 @@ class SimulationSetup(object):
169
169
  "kNumSetupTypes": None,
170
170
  }
171
171
 
172
- if float(self._pedb.edbversion) >= 2024.2:
172
+ if float(self._pedb.version) >= 2024.2:
173
173
  setup_type_mapping["kRaptorX"] = utility.RaptorXSimulationSetup
174
174
  setup_type_mapping["kHFSSPI"] = utility.HFSSPISimulationSetup
175
175
  sim_setup_type = self.sim_setup_info.sim_setup_type
@@ -41,76 +41,76 @@ class Value(float):
41
41
 
42
42
  def __add__(self, other):
43
43
  """Adds two Edb Values."""
44
- edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})+({str(other)})")
44
+ edb_object = self._pedb.core.Utility.Value(f"({self._edb_obj.ToString()})+({str(other)})")
45
45
  return self.__class__(self._pedb, edb_object)
46
46
 
47
47
  def __radd__(self, other):
48
- edb_object = self._pedb.core.utility.value(f"({str(other)})+({self._edb_obj.ToString()})")
48
+ edb_object = self._pedb.core.Utility.Value(f"({str(other)})+({self._edb_obj.ToString()})")
49
49
  return self.__class__(self._pedb, edb_object)
50
50
 
51
51
  def __sub__(self, other):
52
52
  """Subtracts two Edb Values."""
53
- edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})-({str(other)})")
53
+ edb_object = self._pedb.core.Utility.Value(f"({self._edb_obj.ToString()})-({str(other)})")
54
54
  return self.__class__(self._pedb, edb_object)
55
55
 
56
56
  def __rsub__(self, other):
57
- edb_object = self._pedb.core.utility.value(f"({str(other)})-({self._edb_obj.ToString()})")
57
+ edb_object = self._pedb.core.Utility.Value(f"({str(other)})-({self._edb_obj.ToString()})")
58
58
  return self.__class__(self._pedb, edb_object)
59
59
 
60
60
  def __mul__(self, other):
61
61
  """Multiplies two Edb Values."""
62
- edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})*({str(other)})")
62
+ edb_object = self._pedb.core.Utility.Value(f"({self._edb_obj.ToString()})*({str(other)})")
63
63
  return self.__class__(self._pedb, edb_object)
64
64
 
65
65
  def __rmul__(self, other):
66
- edb_object = self._pedb.core.utility.value(f"({str(other)})*({self._edb_obj.ToString()})")
66
+ edb_object = self._pedb.core.Utility.Value(f"({str(other)})*({self._edb_obj.ToString()})")
67
67
  return self.__class__(self._pedb, edb_object)
68
68
 
69
69
  def __truediv__(self, other):
70
70
  """Divides two Edb Values."""
71
- edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})/({str(other)})")
71
+ edb_object = self._pedb.core.Utility.Value(f"({self._edb_obj.ToString()})/({str(other)})")
72
72
  return self.__class__(self._pedb, edb_object)
73
73
 
74
74
  def __rtruediv__(self, other):
75
- edb_object = self._pedb.core.utility.value(f"({str(other)})/({self._edb_obj.ToString()})")
75
+ edb_object = self._pedb.core.Utility.Value(f"({str(other)})/({self._edb_obj.ToString()})")
76
76
  return self.__class__(self._pedb, edb_object)
77
77
 
78
78
  def sqrt(self):
79
79
  """Square root of the value."""
80
- edb_object = self._pedb.core.utility.value(f"({self._edb_obj.ToString()})**0.5")
80
+ edb_object = self._pedb.core.Utility.Value(f"({self._edb_obj.ToString()})**0.5")
81
81
  return self.__class__(self._pedb, edb_object)
82
82
 
83
83
  def log10(self):
84
84
  """Base-10 logarithm of the value."""
85
- edb_object = self._pedb.core.utility.value(f"log10({self._edb_obj.ToString()})")
85
+ edb_object = self._pedb.core.Utility.Value(f"log10({self._edb_obj.ToString()})")
86
86
  return self.__class__(self._pedb, edb_object)
87
87
 
88
88
  def sin(self):
89
89
  """Sine of the value."""
90
- edb_object = self._pedb.core.utility.value(f"sin({self._edb_obj.ToString()})")
90
+ edb_object = self._pedb.core.Utility.Value(f"sin({self._edb_obj.ToString()})")
91
91
  return self.__class__(self._pedb, edb_object)
92
92
 
93
93
  def cos(self):
94
94
  """Cosine of the value."""
95
- edb_object = self._pedb.core.utility.value(f"cos({self._edb_obj.ToString()})")
95
+ edb_object = self._pedb.core.Utility.Value(f"cos({self._edb_obj.ToString()})")
96
96
  return self.__class__(self._pedb, edb_object)
97
97
 
98
98
  def asin(self):
99
99
  """Arcsine of the value."""
100
- edb_object = self._pedb.core.utility.value(f"asin({self._edb_obj.ToString()})")
100
+ edb_object = self._pedb.core.Utility.Value(f"asin({self._edb_obj.ToString()})")
101
101
  return self.__class__(self._pedb, edb_object)
102
102
 
103
103
  def acos(self):
104
104
  """Arccosine of the value."""
105
- edb_object = self._pedb.core.utility.value(f"acos({self._edb_obj.ToString()})")
105
+ edb_object = self._pedb.core.Utility.Value(f"acos({self._edb_obj.ToString()})")
106
106
  return self.__class__(self._pedb, edb_object)
107
107
 
108
108
  def tan(self):
109
109
  """Tangent of the value."""
110
- edb_object = self._pedb.core.utility.value(f"tan({self._edb_obj.ToString()})")
110
+ edb_object = self._pedb.core.Utility.Value(f"tan({self._edb_obj.ToString()})")
111
111
  return self.__class__(self._pedb, edb_object)
112
112
 
113
113
  def atan(self):
114
114
  """Arctangent of the value."""
115
- edb_object = self._pedb.core.utility.value(f"atan({self._edb_obj.ToString()})")
115
+ edb_object = self._pedb.core.Utility.Value(f"atan({self._edb_obj.ToString()})")
116
116
  return self.__class__(self._pedb, edb_object)