pyedb 0.53.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 (119) 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 +20 -9
  13. pyedb/configuration/cfg_s_parameter_models.py +67 -172
  14. pyedb/configuration/cfg_setup.py +102 -295
  15. pyedb/configuration/configuration.py +66 -6
  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 +64 -3
  20. pyedb/dotnet/database/cell/layout_obj.py +3 -3
  21. pyedb/dotnet/database/cell/primitive/path.py +6 -8
  22. pyedb/dotnet/database/cell/primitive/primitive.py +10 -31
  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 +26 -28
  28. pyedb/dotnet/database/cell/voltage_regulator.py +0 -21
  29. pyedb/dotnet/database/components.py +99 -91
  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 +27 -218
  34. pyedb/dotnet/database/dotnet/primitive.py +16 -16
  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 +35 -35
  38. pyedb/dotnet/database/edb_data/padstacks_data.py +65 -90
  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 +8 -4
  42. pyedb/dotnet/database/geometry/point_data.py +14 -10
  43. pyedb/dotnet/database/geometry/polygon_data.py +3 -5
  44. pyedb/dotnet/database/hfss.py +50 -52
  45. pyedb/dotnet/database/layout_validation.py +14 -11
  46. pyedb/dotnet/database/materials.py +10 -11
  47. pyedb/dotnet/database/modeler.py +104 -101
  48. pyedb/dotnet/database/nets.py +20 -23
  49. pyedb/dotnet/database/padstack.py +156 -84
  50. pyedb/dotnet/database/sim_setup_data/data/settings.py +24 -0
  51. pyedb/dotnet/database/sim_setup_data/io/siwave.py +26 -1
  52. pyedb/dotnet/database/siwave.py +47 -47
  53. pyedb/dotnet/database/stackup.py +152 -87
  54. pyedb/dotnet/database/utilities/heatsink.py +4 -4
  55. pyedb/dotnet/database/utilities/obj_base.py +3 -3
  56. pyedb/dotnet/database/utilities/simulation_setup.py +2 -2
  57. pyedb/dotnet/database/utilities/value.py +116 -0
  58. pyedb/dotnet/edb.py +248 -170
  59. pyedb/edb_logger.py +12 -27
  60. pyedb/extensions/via_design_backend.py +6 -3
  61. pyedb/generic/design_types.py +68 -21
  62. pyedb/generic/general_methods.py +0 -120
  63. pyedb/generic/process.py +44 -108
  64. pyedb/generic/settings.py +75 -19
  65. pyedb/grpc/__init__.py +0 -0
  66. pyedb/grpc/database/components.py +55 -17
  67. pyedb/grpc/database/control_file.py +5 -5
  68. pyedb/grpc/database/definition/materials.py +24 -31
  69. pyedb/grpc/database/definition/package_def.py +18 -18
  70. pyedb/grpc/database/definition/padstack_def.py +104 -51
  71. pyedb/grpc/database/geometry/arc_data.py +7 -5
  72. pyedb/grpc/database/geometry/point_3d_data.py +8 -7
  73. pyedb/grpc/database/geometry/polygon_data.py +4 -3
  74. pyedb/grpc/database/hierarchy/component.py +43 -38
  75. pyedb/grpc/database/hierarchy/pin_pair_model.py +15 -14
  76. pyedb/grpc/database/hierarchy/pingroup.py +9 -9
  77. pyedb/grpc/database/layers/stackup_layer.py +45 -44
  78. pyedb/grpc/database/layout/layout.py +17 -13
  79. pyedb/grpc/database/layout/voltage_regulator.py +7 -7
  80. pyedb/grpc/database/layout_validation.py +16 -15
  81. pyedb/grpc/database/modeler.py +60 -58
  82. pyedb/grpc/database/net/net.py +15 -14
  83. pyedb/grpc/database/nets.py +112 -31
  84. pyedb/grpc/database/padstacks.py +303 -190
  85. pyedb/grpc/database/ports/ports.py +5 -6
  86. pyedb/grpc/database/primitive/bondwire.py +8 -7
  87. pyedb/grpc/database/primitive/circle.py +4 -4
  88. pyedb/grpc/database/primitive/padstack_instance.py +191 -23
  89. pyedb/grpc/database/primitive/path.py +7 -7
  90. pyedb/grpc/database/primitive/polygon.py +3 -3
  91. pyedb/grpc/database/primitive/primitive.py +13 -17
  92. pyedb/grpc/database/primitive/rectangle.py +13 -13
  93. pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
  94. pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +10 -0
  95. pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +17 -1
  96. pyedb/grpc/database/siwave.py +31 -25
  97. pyedb/grpc/database/source_excitations.py +335 -233
  98. pyedb/grpc/database/stackup.py +165 -148
  99. pyedb/grpc/database/terminal/bundle_terminal.py +18 -8
  100. pyedb/grpc/database/terminal/edge_terminal.py +10 -0
  101. pyedb/grpc/database/terminal/padstack_instance_terminal.py +16 -5
  102. pyedb/grpc/database/terminal/pingroup_terminal.py +12 -11
  103. pyedb/grpc/database/terminal/point_terminal.py +4 -3
  104. pyedb/grpc/database/terminal/terminal.py +9 -9
  105. pyedb/grpc/database/utility/value.py +109 -0
  106. pyedb/grpc/database/utility/xml_control_file.py +5 -5
  107. pyedb/grpc/edb.py +130 -63
  108. pyedb/grpc/edb_init.py +3 -10
  109. pyedb/grpc/rpc_session.py +10 -10
  110. pyedb/libraries/common.py +366 -0
  111. pyedb/libraries/rf_libraries/base_functions.py +1358 -0
  112. pyedb/libraries/rf_libraries/planar_antennas.py +628 -0
  113. pyedb/misc/decorators.py +61 -0
  114. pyedb/misc/misc.py +0 -13
  115. pyedb/siwave.py +2 -2
  116. {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/METADATA +2 -3
  117. {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/RECORD +119 -112
  118. {pyedb-0.53.0.dist-info → pyedb-0.55.0.dist-info}/WHEEL +0 -0
  119. {pyedb-0.53.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.edb_api.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.edb_api.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.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.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.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.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.edb_api.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.edb_api.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.edb_api.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.edb_api.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.edb_api.cell.layer_type
340
+ return self._pedb.core.Cell.LayerType
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.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.edb_api.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.edb_api.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,14 +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()
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.LayerTypeSet.StackupLayerSet)))
689
688
  ]
690
689
  non_stackup = [
691
- i.Clone()
692
- for i in list(list(lc_readonly.Layers(self._pedb.edb_api.cell.layer_type_set.NonStackupLayerSet)))
690
+ i.Clone() for i in list(list(lc_readonly.Layers(self._pedb.core.Cell.LayerTypeSet.NonStackupLayerSet)))
693
691
  ]
694
- _lc = self._pedb.edb_api.cell._cell.LayerCollection()
692
+ _lc = self._pedb.core.Cell.LayerCollection()
695
693
  mode = lc_readonly.GetMode()
696
694
  _lc.SetMode(lc_readonly.GetMode())
697
695
  if str(mode) == "Overlapping":
@@ -727,11 +725,11 @@ class Stackup(LayerCollection):
727
725
 
728
726
  def _create_stackup_layer(self, layer_name, thickness, layer_type="signal"):
729
727
  if layer_type == "signal":
730
- _layer_type = self._pedb.edb_api.cell.layer_type.SignalLayer
728
+ _layer_type = self._pedb.core.Cell.LayerType.SignalLayer
731
729
  else:
732
- _layer_type = self._pedb.edb_api.cell.layer_type.DielectricLayer
730
+ _layer_type = self._pedb.core.Cell.LayerType.DielectricLayer
733
731
 
734
- result = self._pedb.edb_api.cell._cell.StackupLayer(
732
+ result = self._pedb.core.Cell.StackupLayer(
735
733
  layer_name,
736
734
  _layer_type,
737
735
  self._edb_value(thickness),
@@ -743,39 +741,39 @@ class Stackup(LayerCollection):
743
741
 
744
742
  def _create_nonstackup_layer(self, layer_name, layer_type):
745
743
  if layer_type == "conducting": # pragma: no cover
746
- _layer_type = self._pedb.edb_api.cell.layer_type.ConductingLayer
744
+ _layer_type = self._pedb.core.Cell.LayerType.ConductingLayer
747
745
  elif layer_type == "airlines": # pragma: no cover
748
- _layer_type = self._pedb.edb_api.cell.layer_type.AirlinesLayer
746
+ _layer_type = self._pedb.core.Cell.LayerType.AirlinesLayer
749
747
  elif layer_type == "error": # pragma: no cover
750
- _layer_type = self._pedb.edb_api.cell.layer_type.ErrorsLayer
748
+ _layer_type = self._pedb.core.Cell.LayerType.ErrorsLayer
751
749
  elif layer_type == "symbol": # pragma: no cover
752
- _layer_type = self._pedb.edb_api.cell.layer_type.SymbolLayer
750
+ _layer_type = self._pedb.core.Cell.LayerType.SymbolLayer
753
751
  elif layer_type == "measure": # pragma: no cover
754
- _layer_type = self._pedb.edb_api.cell.layer_type.MeasureLayer
752
+ _layer_type = self._pedb.core.Cell.LayerType.MeasureLayer
755
753
  elif layer_type == "assembly": # pragma: no cover
756
- _layer_type = self._pedb.edb_api.cell.layer_type.AssemblyLayer
754
+ _layer_type = self._pedb.core.Cell.LayerType.AssemblyLayer
757
755
  elif layer_type == "silkscreen": # pragma: no cover
758
- _layer_type = self._pedb.edb_api.cell.layer_type.SilkscreenLayer
756
+ _layer_type = self._pedb.core.Cell.LayerType.SilkscreenLayer
759
757
  elif layer_type == "soldermask": # pragma: no cover
760
- _layer_type = self._pedb.edb_api.cell.layer_type.SolderMaskLayer
758
+ _layer_type = self._pedb.core.Cell.LayerType.SolderMaskLayer
761
759
  elif layer_type == "solderpaste": # pragma: no cover
762
- _layer_type = self._pedb.edb_api.cell.layer_type.SolderPasteLayer
760
+ _layer_type = self._pedb.core.Cell.LayerType.SolderPasteLayer
763
761
  elif layer_type == "glue": # pragma: no cover
764
- _layer_type = self._pedb.edb_api.cell.layer_type.GlueLayer
762
+ _layer_type = self._pedb.core.Cell.LayerType.GlueLayer
765
763
  elif layer_type == "wirebond": # pragma: no cover
766
- _layer_type = self._pedb.edb_api.cell.layer_type.WirebondLayer
764
+ _layer_type = self._pedb.core.Cell.LayerType.WirebondLayer
767
765
  elif layer_type == "user": # pragma: no cover
768
- _layer_type = self._pedb.edb_api.cell.layer_type.UserLayer
766
+ _layer_type = self._pedb.core.Cell.LayerType.UserLayer
769
767
  elif layer_type == "siwavehfsssolverregions": # pragma: no cover
770
- _layer_type = self._pedb.edb_api.cell.layer_type.SIwaveHFSSSolverRegions
768
+ _layer_type = self._pedb.core.Cell.LayerType.SIwaveHFSSSolverRegions
771
769
  elif layer_type == "outline": # pragma: no cover
772
- _layer_type = self._pedb.edb_api.cell.layer_type.OutlineLayer
770
+ _layer_type = self._pedb.core.Cell.LayerType.OutlineLayer
773
771
  elif layer_type == "postprocessing": # pragma: no cover
774
- _layer_type = self._pedb.edb_api.cell.layer_type.PostprocessingLayer
772
+ _layer_type = self._pedb.core.Cell.LayerType.PostprocessingLayer
775
773
  else: # pragma: no cover
776
- _layer_type = self._pedb.edb_api.cell.layer_type.UndefinedLayerType
774
+ _layer_type = self._pedb.core.Cell.LayerType.UndefinedLayerType
777
775
 
778
- result = self._pedb.edb_api.cell.layer(layer_name, _layer_type)
776
+ result = self._pedb.core.Cell.layer(layer_name, _layer_type)
779
777
  self.refresh_layer_collection()
780
778
  return result
781
779
 
@@ -901,7 +899,7 @@ class Stackup(LayerCollection):
901
899
  -------
902
900
 
903
901
  """
904
- new_layer_collection = self._pedb.edb_api.Cell.LayerCollection()
902
+ new_layer_collection = self._pedb.core.Cell.LayerCollection()
905
903
  for lyr in self._edb_layer_list:
906
904
  if not (lyr.GetName() == name):
907
905
  new_layer_collection.AddLayerBottom(lyr)
@@ -1122,9 +1120,9 @@ class Stackup(LayerCollection):
1122
1120
  ``True`` when successful, ``False`` when failed.
1123
1121
  """
1124
1122
  if only_metals:
1125
- input_layers = self._pedb.edb_api.cell.layer_type_set.SignalLayerSet
1123
+ input_layers = self._pedb.core.Cell.LayerTypeSet.SignalLayerSet
1126
1124
  else:
1127
- input_layers = self._pedb.edb_api.cell.layer_type_set.StackupLayerSet
1125
+ input_layers = self._pedb.core.Cell.LayerTypeSet.StackupLayerSet
1128
1126
 
1129
1127
  res, topl, topz, bottoml, bottomz = self._layer_collection.GetTopBottomStackupLayers(input_layers)
1130
1128
  return topl.GetName(), topz, bottoml.GetName(), bottomz
@@ -1146,18 +1144,18 @@ class Stackup(LayerCollection):
1146
1144
  """
1147
1145
  try:
1148
1146
  lc = self._layer_collection
1149
- new_lc = self._pedb.edb_api.Cell.LayerCollection()
1147
+ new_lc = self._pedb.core.Cell.LayerCollection()
1150
1148
  lc_mode = lc.GetMode()
1151
1149
  new_lc.SetMode(lc_mode)
1152
1150
  max_elevation = 0.0
1153
- for layer in lc.Layers(self._pedb.edb_api.cell.layer_type_set.StackupLayerSet):
1151
+ for layer in lc.Layers(self._pedb.core.Cell.LayerTypeSet.StackupLayerSet):
1154
1152
  if "RadBox" not in layer.GetName(): # Ignore RadBox
1155
1153
  lower_elevation = layer.Clone().GetLowerElevation() * 1.0e6
1156
1154
  upper_elevation = layer.Clone().GetUpperElevation() * 1.0e6
1157
1155
  max_elevation = max([max_elevation, lower_elevation, upper_elevation])
1158
1156
 
1159
1157
  non_stackup_layers = []
1160
- for layer in lc.Layers(self._pedb.edb_api.cell.layer_type_set.AllLayerSet):
1158
+ for layer in lc.Layers(self._pedb.core.Cell.LayerTypeSet.AllLayerSet):
1161
1159
  cloned_layer = layer.Clone()
1162
1160
  if not cloned_layer.IsStackupLayer():
1163
1161
  non_stackup_layers.append(cloned_layer)
@@ -1169,19 +1167,15 @@ class Stackup(LayerCollection):
1169
1167
  cloned_layer.SetLowerElevation(val)
1170
1168
  if (
1171
1169
  cloned_layer.GetTopBottomAssociation()
1172
- == self._pedb.edb_api.Cell.TopBottomAssociation.TopAssociated
1170
+ == self._pedb.core.Cell.TopBottomAssociation.TopAssociated
1173
1171
  ):
1174
- cloned_layer.SetTopBottomAssociation(
1175
- self._pedb.edb_api.Cell.TopBottomAssociation.BottomAssociated
1176
- )
1172
+ cloned_layer.SetTopBottomAssociation(self._pedb.core.Cell.TopBottomAssociation.BottomAssociated)
1177
1173
  else:
1178
- cloned_layer.SetTopBottomAssociation(self._pedb.edb_api.Cell.TopBottomAssociation.TopAssociated)
1174
+ cloned_layer.SetTopBottomAssociation(self._pedb.core.Cell.TopBottomAssociation.TopAssociated)
1179
1175
  new_lc.AddStackupLayerAtElevation(cloned_layer)
1180
1176
 
1181
1177
  vialayers = [
1182
- lay
1183
- for lay in lc.Layers(self._pedb.edb_api.cell.layer_type_set.StackupLayerSet)
1184
- if lay.Clone().IsViaLayer()
1178
+ lay for lay in lc.Layers(self._pedb.core.Cell.LayerTypeSet.StackupLayerSet) if lay.Clone().IsViaLayer()
1185
1179
  ]
1186
1180
  for layer in vialayers:
1187
1181
  cloned_via_layer = layer.Clone()
@@ -1189,19 +1183,19 @@ class Stackup(LayerCollection):
1189
1183
  lower_ref_name = cloned_via_layer.GetRefLayerName(False)
1190
1184
  upper_ref = [
1191
1185
  lay
1192
- for lay in lc.Layers(self._pedb.edb_api.cell.layer_type_set.AllLayerSet)
1186
+ for lay in lc.Layers(self._pedb.core.Cell.LayerTypeSet.AllLayerSet)
1193
1187
  if lay.GetName() == upper_ref_name
1194
1188
  ][0]
1195
1189
  lower_ref = [
1196
1190
  lay
1197
- for lay in lc.Layers(self._pedb.edb_api.cell.layer_type_set.AllLayerSet)
1191
+ for lay in lc.Layers(self._pedb.core.Cell.LayerTypeSet.AllLayerSet)
1198
1192
  if lay.GetName() == lower_ref_name
1199
1193
  ][0]
1200
1194
  cloned_via_layer.SetRefLayer(lower_ref, True)
1201
1195
  cloned_via_layer.SetRefLayer(upper_ref, False)
1202
1196
  ref_layer_in_flipped_stackup = [
1203
1197
  lay
1204
- for lay in new_lc.Layers(self._pedb.edb_api.cell.layer_type_set.AllLayerSet)
1198
+ for lay in new_lc.Layers(self._pedb.core.Cell.LayerTypeSet.AllLayerSet)
1205
1199
  if lay.GetName() == upper_ref_name
1206
1200
  ][0]
1207
1201
  via_layer_lower_elevation = (
@@ -1246,7 +1240,7 @@ class Stackup(LayerCollection):
1246
1240
  cmp_prop.SetDieProperty(die_prop)
1247
1241
  cmp.SetComponentProperty(cmp_prop)
1248
1242
 
1249
- lay_list = list(new_lc.Layers(self._pedb.edb_api.cell.layer_type_set.SignalLayerSet))
1243
+ lay_list = list(new_lc.Layers(self._pedb.core.Cell.LayerTypeSet.SignalLayerSet))
1250
1244
  for padstack in list(self._pedb.padstacks.instances.values()):
1251
1245
  start_layer_id = [lay.GetLayerId() for lay in list(lay_list) if lay.GetName() == padstack.start_layer]
1252
1246
  stop_layer_id = [lay.GetLayerId() for lay in list(lay_list) if lay.GetName() == padstack.stop_layer]
@@ -1394,10 +1388,10 @@ class Stackup(LayerCollection):
1394
1388
  _offset_y = self._edb_value(offset_y)
1395
1389
 
1396
1390
  if edb_cell.GetName() not in self._pedb.cell_names:
1397
- list_cells = self._pedb.copy_cells([edb_cell.api_object])
1391
+ list_cells = self._pedb.copy_cells([edb_cell])
1398
1392
  edb_cell = list_cells[0]
1399
1393
  self._pedb.layout.cell.SetBlackBox(True)
1400
- cell_inst2 = self._pedb.edb_api.cell.hierarchy.cell_instance.Create(
1394
+ cell_inst2 = self._pedb.core.Cell.Hierarchy.CellInstance.Create(
1401
1395
  edb_cell.GetLayout(), self._pedb.layout.cell.GetName(), self._pedb.active_layout
1402
1396
  )
1403
1397
  cell_trans = cell_inst2.GetTransform()
@@ -1411,11 +1405,11 @@ class Stackup(LayerCollection):
1411
1405
 
1412
1406
  if place_on_top:
1413
1407
  cell_inst2.SetPlacementLayer(
1414
- list(stackup_target.Layers(self._pedb.edb_api.cell.layer_type_set.SignalLayerSet))[0]
1408
+ list(stackup_target.Layers(self._pedb.core.Cell.LayerTypeSet.SignalLayerSet))[0]
1415
1409
  )
1416
1410
  else:
1417
1411
  cell_inst2.SetPlacementLayer(
1418
- list(stackup_target.Layers(self._pedb.edb_api.cell.layer_type_set.SignalLayerSet))[-1]
1412
+ list(stackup_target.Layers(self._pedb.core.Cell.LayerTypeSet.SignalLayerSet))[-1]
1419
1413
  )
1420
1414
  self.refresh_layer_collection()
1421
1415
  return True
@@ -1502,26 +1496,26 @@ class Stackup(LayerCollection):
1502
1496
  _offset_y = self._edb_value(offset_y)
1503
1497
 
1504
1498
  if edb_cell.GetName() not in self._pedb.cell_names:
1505
- list_cells = self._pedb.copy_cells(edb_cell.api_object)
1499
+ list_cells = self._pedb.copy_cells(edb_cell)
1506
1500
  edb_cell = list_cells[0]
1507
1501
  self._pedb.layout.cell.SetBlackBox(True)
1508
- cell_inst2 = self._pedb.edb_api.cell.hierarchy.cell_instance.Create(
1502
+ cell_inst2 = self._pedb.core.Cell.Hierarchy.CellInstance.Create(
1509
1503
  edb_cell.GetLayout(), self._pedb.layout.cell.GetName(), self._pedb.active_layout
1510
1504
  )
1511
1505
 
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)
1506
+ stackup_target = self._pedb.core.Cell.LayerCollection(edb_cell.GetLayout().GetLayerCollection())
1507
+ stackup_source = self._pedb.core.Cell.LayerCollection(self._pedb.layout.layer_collection)
1514
1508
 
1515
1509
  if place_on_top:
1516
1510
  cell_inst2.SetPlacementLayer(
1517
- list(stackup_target.Layers(self._pedb.edb_api.cell.layer_type_set.SignalLayerSet))[0]
1511
+ list(stackup_target.Layers(self._pedb.core.Cell.LayerTypeSet.SignalLayerSet))[0]
1518
1512
  )
1519
1513
  else:
1520
1514
  cell_inst2.SetPlacementLayer(
1521
- list(stackup_target.Layers(self._pedb.edb_api.cell.layer_type_set.SignalLayerSet))[-1]
1515
+ list(stackup_target.Layers(self._pedb.core.Cell.LayerTypeSet.SignalLayerSet))[-1]
1522
1516
  )
1523
1517
  cell_inst2.SetIs3DPlacement(True)
1524
- sig_set = self._pedb.edb_api.cell.layer_type_set.SignalLayerSet
1518
+ sig_set = self._pedb.core.Cell.LayerTypeSet.SignalLayerSet
1525
1519
  res = stackup_target.GetTopBottomStackupLayers(sig_set)
1526
1520
  target_top_elevation = res[2]
1527
1521
  target_bottom_elevation = res[4]
@@ -1640,7 +1634,7 @@ class Stackup(LayerCollection):
1640
1634
  _offset_y = self._edb_value(offset_y)
1641
1635
 
1642
1636
  if edb_cell.GetName() not in self._pedb.cell_names:
1643
- list_cells = self._pedb.copy_cells(edb_cell.api_object)
1637
+ list_cells = self._pedb.copy_cells(edb_cell)
1644
1638
  edb_cell = list_cells[0]
1645
1639
  for cell in list(self._pedb.active_db.CircuitCells):
1646
1640
  if cell.GetName() == edb_cell.GetName():
@@ -1656,23 +1650,23 @@ class Stackup(LayerCollection):
1656
1650
 
1657
1651
  instance_name = generate_unique_name(edb_cell.GetName(), n=2)
1658
1652
 
1659
- cell_inst2 = self._pedb.edb_api.cell.hierarchy.cell_instance.Create(
1653
+ cell_inst2 = self._pedb.core.Cell.Hierarchy.CellInstance.Create(
1660
1654
  self._pedb.active_layout, instance_name, edb_cell.GetLayout()
1661
1655
  )
1662
1656
 
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)
1657
+ stackup_source = self._pedb.core.Cell.LayerCollection(edb_cell.GetLayout().GetLayerCollection())
1658
+ stackup_target = self._pedb.core.Cell.LayerCollection(self._pedb.layout.layer_collection)
1665
1659
 
1666
1660
  if place_on_top:
1667
1661
  cell_inst2.SetPlacementLayer(
1668
- list(stackup_target.Layers(self._pedb.edb_api.cell.layer_type_set.SignalLayerSet))[0]
1662
+ list(stackup_target.Layers(self._pedb.core.Cell.LayerTypeSet.SignalLayerSet))[0]
1669
1663
  )
1670
1664
  else:
1671
1665
  cell_inst2.SetPlacementLayer(
1672
- list(stackup_target.Layers(self._pedb.edb_api.cell.layer_type_set.SignalLayerSet))[-1]
1666
+ list(stackup_target.Layers(self._pedb.core.Cell.LayerTypeSet.SignalLayerSet))[-1]
1673
1667
  )
1674
1668
  cell_inst2.SetIs3DPlacement(True)
1675
- sig_set = self._pedb.edb_api.cell.layer_type_set.SignalLayerSet
1669
+ sig_set = self._pedb.core.Cell.LayerTypeSet.SignalLayerSet
1676
1670
  res = stackup_target.GetTopBottomStackupLayers(sig_set)
1677
1671
  target_top_elevation = res[2]
1678
1672
  target_bottom_elevation = res[4]
@@ -1755,8 +1749,8 @@ class Stackup(LayerCollection):
1755
1749
  _angle = angle * math.pi / 180.0
1756
1750
  rotation_axis_to = self._pedb.point_3d(math.cos(_angle), -1 * math.sin(_angle), 0.0)
1757
1751
 
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
1752
+ stackup_target = self._pedb.core.Cell.LayerCollection(self._pedb.layout.layer_collection)
1753
+ sig_set = self._pedb.core.Cell.LayerTypeSet.SignalLayerSet
1760
1754
  res = stackup_target.GetTopBottomStackupLayers(sig_set)
1761
1755
  target_top_elevation = res[2]
1762
1756
  target_bottom_elevation = res[4]
@@ -1769,7 +1763,7 @@ class Stackup(LayerCollection):
1769
1763
  h_stackup = self._edb_value(elevation)
1770
1764
  location = self._pedb.point_3d(offset_x, offset_y, h_stackup)
1771
1765
 
1772
- mcad_model = self._pedb.edb_api.McadModel.Create3DComp(self._pedb.active_layout, a3dcomp_path)
1766
+ mcad_model = self._pedb.core.McadModel.Create3DComp(self._pedb.active_layout, a3dcomp_path)
1773
1767
  if mcad_model.IsNull(): # pragma: no cover
1774
1768
  logger.error("Failed to create MCAD model from a3dcomp")
1775
1769
  return False
@@ -2002,7 +1996,7 @@ class Stackup(LayerCollection):
2002
1996
  if not str(layer_info.Dielectric_Fill) == "nan":
2003
1997
  layer.dielectric_fill = layer_info.Dielectric_Fill
2004
1998
 
2005
- lc_new = self._pedb.edb_api.Cell.LayerCollection()
1999
+ lc_new = self._pedb.core.Cell.LayerCollection()
2006
2000
  for name, _ in df.iterrows():
2007
2001
  layer = self.layers[name]
2008
2002
  lc_new.AddLayerBottom(layer._edb_layer)
@@ -2248,10 +2242,62 @@ class Stackup(LayerCollection):
2248
2242
  ``True`` when successful, ``False`` when failed.
2249
2243
  """
2250
2244
 
2251
- self._edb_object.ImportFromControlFile(file_path)
2252
- flag = self._pedb.layout._edb_object.SetLayerCollection(self._edb_object)
2253
- self.refresh_layer_collection()
2254
- 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()
2255
2301
 
2256
2302
  def _export_xml(self, file_path):
2257
2303
  """Export stackup information to an external XMLfile.
@@ -2815,3 +2861,22 @@ class Stackup(LayerCollection):
2815
2861
  elif show:
2816
2862
  plt.show()
2817
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.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.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.edb_api.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,9 +32,9 @@ 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])
37
- self._edb_object = Tuple[self._pedb.edb_api.Geometry.PointData, self._pedb.edb_api.Geometry.PointData](
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
+ 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
 
@@ -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