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
@@ -295,7 +295,7 @@ class EDBComponent(Group):
295
295
  @solder_ball_height.setter
296
296
  def solder_ball_height(self, value):
297
297
  if "GetSolderBallProperty" in dir(self.component_property):
298
- sball_height = round(self._edb.utility.Value(value).ToDouble(), 9)
298
+ sball_height = round(self._pedb.edb_value(value).ToDouble(), 9)
299
299
  cmp_property = self.component_property
300
300
  solder_ball_prop = cmp_property.GetSolderBallProperty().Clone()
301
301
  solder_ball_prop.SetHeight(self._get_edb_value(sball_height))
@@ -319,18 +319,18 @@ class EDBComponent(Group):
319
319
  shape = None
320
320
  if isinstance(value, str):
321
321
  if value.lower() == "cylinder":
322
- shape = self._edb.definition.SolderballShape.Cylinder
322
+ shape = self._edb.Definition.SolderballShape.Cylinder
323
323
  elif value.lower() == "none":
324
- shape = self._edb.definition.SolderballShape.NoSolderball
324
+ shape = self._edb.Definition.SolderballShape.NoSolderball
325
325
  elif value.lower() == "spheroid":
326
- shape = self._edb.definition.SolderballShape.Spheroid
326
+ shape = self._edb.Definition.SolderballShape.Spheroid
327
327
  if isinstance(value, int):
328
328
  if value == 0:
329
- shape = self._edb.definition.SolderballShape.NoSolderball
329
+ shape = self._edb.Definition.SolderballShape.NoSolderball
330
330
  elif value == 1:
331
- shape = self._edb.definition.SolderballShape.Cylinder
331
+ shape = self._edb.Definition.SolderballShape.Cylinder
332
332
  elif value == 2:
333
- shape = self._edb.definition.SolderballShape.Spheroid
333
+ shape = self._edb.Definition.SolderballShape.Spheroid
334
334
  if shape:
335
335
  cmp_property = self.component_property
336
336
  solder_ball_prop = cmp_property.GetSolderBallProperty().Clone()
@@ -441,11 +441,11 @@ class EDBComponent(Group):
441
441
  if isinstance(value, list): # pragma no cover
442
442
  rlc_enabled = [True if i else False for i in value]
443
443
  rlc_values = [self._get_edb_value(i) for i in value]
444
- model = self._edb.cell.hierarchy._hierarchy.PinPairModel()
444
+ model = self._edb.Cell.Hierarchy.PinPairModel()
445
445
  pin_names = list(self.pins.keys())
446
446
  for idx, i in enumerate(np.arange(len(pin_names) // 2)):
447
- pin_pair = self._edb.utility.utility.PinPair(pin_names[idx], pin_names[idx + 1])
448
- rlc = self._edb.utility.utility.Rlc(
447
+ pin_pair = self._edb.Utility.PinPair(pin_names[idx], pin_names[idx + 1])
448
+ rlc = self._edb.Utility.Rlc(
449
449
  rlc_values[0], rlc_enabled[0], rlc_values[1], rlc_enabled[1], rlc_values[2], rlc_enabled[2], False
450
450
  )
451
451
  model.SetPinPairRlc(pin_pair, rlc)
@@ -482,11 +482,11 @@ class EDBComponent(Group):
482
482
  rlc_values = [value if i == self.type else 0 for i in ["Resistor", "Inductor", "Capacitor"]]
483
483
  rlc_values = [self._get_edb_value(i) for i in rlc_values]
484
484
 
485
- model = self._edb.cell.hierarchy._hierarchy.PinPairModel()
485
+ model = self._edb.Cell.Hierarchy.PinPairModel()
486
486
  pin_names = list(self.pins.keys())
487
487
  for idx, i in enumerate(np.arange(len(pin_names) // 2)):
488
- pin_pair = self._edb.utility.utility.PinPair(pin_names[idx], pin_names[idx + 1])
489
- rlc = self._edb.utility.utility.Rlc(
488
+ pin_pair = self._edb.Utility.PinPair(pin_names[idx], pin_names[idx + 1])
489
+ rlc = self._edb.Utility.Rlc(
490
490
  rlc_values[0], rlc_enabled[0], rlc_values[1], rlc_enabled[1], rlc_values[2], rlc_enabled[2], False
491
491
  )
492
492
  model.SetPinPairRlc(pin_pair, rlc)
@@ -671,7 +671,7 @@ class EDBComponent(Group):
671
671
  pins = [
672
672
  p
673
673
  for p in self.edbcomponent.LayoutObjs
674
- if p.GetObjType() == self._edb.cell.layout_object_type.PadstackInstance
674
+ if p.GetObjType() == self._edb.Cell.LayoutObjType.PadstackInstance
675
675
  and p.IsLayoutPin()
676
676
  and p.GetComponent().GetName() == self.refdes
677
677
  ]
@@ -740,17 +740,17 @@ class EDBComponent(Group):
740
740
  """
741
741
  new_type = new_type.lower()
742
742
  if new_type == "resistor":
743
- type_id = self._pedb.definition.ComponentType.Resistor
743
+ type_id = self._pedb.core.Definition.ComponentType.Resistor
744
744
  elif new_type == "inductor":
745
- type_id = self._pedb.definition.ComponentType.Inductor
745
+ type_id = self._pedb.core.Definition.ComponentType.Inductor
746
746
  elif new_type == "capacitor":
747
- type_id = self._pedb.definition.ComponentType.Capacitor
747
+ type_id = self._pedb.core.Definition.ComponentType.Capacitor
748
748
  elif new_type == "ic":
749
- type_id = self._pedb.definition.ComponentType.IC
749
+ type_id = self._pedb.core.Definition.ComponentType.IC
750
750
  elif new_type == "io":
751
- type_id = self._pedb.definition.ComponentType.IO
751
+ type_id = self._pedb.core.Definition.ComponentType.IO
752
752
  elif new_type == "other":
753
- type_id = self._pedb.definition.ComponentType.Other
753
+ type_id = self._pedb.core.Definition.ComponentType.Other
754
754
  else:
755
755
  return
756
756
  self.edbcomponent.SetComponentType(type_id)
@@ -911,7 +911,7 @@ class EDBComponent(Group):
911
911
  if not len(pin_names_sp) == self.numpins: # pragma: no cover
912
912
  raise ValueError(f"Pin counts doesn't match component {self.name}.")
913
913
 
914
- model = self._edb.cell.hierarchy._hierarchy.SPICEModel()
914
+ model = self._edb.Cell.Hierarchy.SPICEModel()
915
915
  model.SetModelPath(file_path)
916
916
  model.SetModelName(name)
917
917
  if sub_circuit_name:
@@ -949,13 +949,13 @@ class EDBComponent(Group):
949
949
  name = get_filename_without_extension(file_path)
950
950
 
951
951
  edbComponentDef = self.edbcomponent.GetComponentDef()
952
- nPortModel = self._edb.definition.NPortComponentModel.FindByName(edbComponentDef, name)
952
+ nPortModel = self._edb.Definition.NPortComponentModel.FindByName(edbComponentDef, name)
953
953
  if nPortModel.IsNull():
954
- nPortModel = self._edb.definition.NPortComponentModel.Create(name)
954
+ nPortModel = self._edb.Definition.NPortComponentModel.Create(name)
955
955
  nPortModel.SetReferenceFile(file_path)
956
956
  edbComponentDef.AddComponentModel(nPortModel)
957
957
 
958
- model = self._edb.cell.hierarchy._hierarchy.SParameterModel()
958
+ model = self._edb.Cell.Hierarchy.SParameterModel()
959
959
  model.SetComponentModelName(name)
960
960
  if reference_net:
961
961
  model.SetReferenceNet(reference_net)
@@ -983,7 +983,7 @@ class EDBComponent(Group):
983
983
  >>>comp_def.add_n_port_model("c:GRM32_DC0V_25degC_series.s2p", "GRM32_DC0V_25degC_series")
984
984
  >>>edbapp.components["C200"].use_s_parameter_model("GRM32_DC0V_25degC_series")
985
985
  """
986
- model = self._edb.cell.hierarchy._hierarchy.SParameterModel()
986
+ model = self._edb.Cell.Hierarchy.SParameterModel()
987
987
  model.SetComponentModelName(name)
988
988
  if reference_net:
989
989
  model.SetReferenceNet(reference_net)
@@ -1013,13 +1013,13 @@ class EDBComponent(Group):
1013
1013
  ind = 0 if ind is None else ind
1014
1014
  cap = 0 if cap is None else cap
1015
1015
  res, ind, cap = self._get_edb_value(res), self._get_edb_value(ind), self._get_edb_value(cap)
1016
- model = self._edb.cell.hierarchy._hierarchy.PinPairModel()
1016
+ model = self._edb.Cell.Hierarchy.PinPairModel()
1017
1017
 
1018
1018
  pin_names = list(self.pins.keys())
1019
1019
  for idx, i in enumerate(np.arange(len(pin_names) // 2)):
1020
- pin_pair = self._edb.utility.utility.PinPair(pin_names[idx], pin_names[idx + 1])
1020
+ pin_pair = self._edb.Utility.PinPair(pin_names[idx], pin_names[idx + 1])
1021
1021
 
1022
- rlc = self._edb.utility.utility.Rlc(res, r_enabled, ind, l_enabled, cap, c_enabled, is_parallel)
1022
+ rlc = self._edb.Utility.Rlc(res, r_enabled, ind, l_enabled, cap, c_enabled, is_parallel)
1023
1023
  model.SetPinPairRlc(pin_pair, rlc)
1024
1024
  return self._set_model(model)
1025
1025
 
@@ -28,7 +28,7 @@ class Model(ObjBase):
28
28
 
29
29
  def __init__(self, pedb, edb_object):
30
30
  super().__init__(pedb, edb_object)
31
- self._model_type_mapping = {"PinPairModel": self._pedb.edb_api.cell}
31
+ self._model_type_mapping = {"PinPairModel": self._pedb.core.Cell}
32
32
 
33
33
  @property
34
34
  def model_type(self):
@@ -23,7 +23,7 @@
23
23
  """
24
24
  This module contains these classes: `EdbLayout` and `Shape`.
25
25
  """
26
- from typing import Union
26
+ from typing import List, Union
27
27
 
28
28
  from pyedb.dotnet.database.cell.hierarchy.component import EDBComponent
29
29
  from pyedb.dotnet.database.cell.primitive.bondwire import Bondwire
@@ -102,7 +102,7 @@ class Layout(ObjBase):
102
102
 
103
103
  @property
104
104
  def _edb(self):
105
- return self._pedb.edb_api
105
+ return self._pedb.core
106
106
 
107
107
  def expanded_extent(self, nets, extent, expansion_factor, expansion_unitless, use_round_corner, num_increments):
108
108
  """Get an expanded polygon for the Nets collection.
@@ -337,7 +337,7 @@ class Layout(ObjBase):
337
337
  -------
338
338
 
339
339
  """
340
- obj = self._pedb._edb.Cell.Hierarchy.Component.FindByName(self._edb_object, value)
340
+ obj = self._pedb.core.Cell.Hierarchy.Component.FindByName(self._edb_object, value)
341
341
  return EDBComponent(self._pedb, obj) if obj is not None else None
342
342
 
343
343
  def find_primitive(
@@ -369,3 +369,64 @@ class Layout(ObjBase):
369
369
  prims = [i for i in prims if i.layer_name in layer_name] if layer_name is not None else prims
370
370
  prims = [i for i in prims if i.net_name in net_name] if net_name is not None else prims
371
371
  return prims
372
+
373
+ def find_padstack_instances(
374
+ self,
375
+ aedt_name: Union[str, List[str]] = None,
376
+ component_name: Union[str, List[str]] = None,
377
+ component_pin_name: Union[str, List[str]] = None,
378
+ net_name: Union[str, List[str]] = None,
379
+ instance_id: Union[int, List[int]] = None,
380
+ ) -> List:
381
+ """
382
+ Finds padstack instances matching the specified criteria.
383
+
384
+ This method filters the available padstack instances based on specified attributes such as
385
+ `aedt_name`, `component_name`, `component_pin_name`, `net_name`, or `instance_id`. Criteria
386
+ can be passed as individual values or as a list of values. If no padstack instances match
387
+ the criteria, an error is raised.
388
+
389
+ Parameters
390
+ ----------
391
+ aedt_name : Union[str, List[str]], optional
392
+ Name(s) of the AEDT padstack instance(s) to filter.
393
+ component_name : Union[str, List[str]], optional
394
+ Name(s) of the component(s) to filter padstack instances by.
395
+ component_pin_name : Union[str, List[str]], optional
396
+ Name(s) of the component pin(s) to filter padstack instances by.
397
+ net_name : Union[str, List[str]], optional
398
+ Name(s) of the net(s) to filter padstack instances by.
399
+ instance_id : Union[int, List[int]], optional
400
+ ID(s) of the padstack instance(s) to filter.
401
+
402
+ Returns
403
+ -------
404
+ List
405
+ A list of padstack instances matching the specified criteria.
406
+ """
407
+ candidates = self.padstack_instances
408
+ if instance_id is not None:
409
+ value = instance_id if isinstance(instance_id, list) else [instance_id]
410
+ candidates = [i for i in candidates if i.id in value]
411
+
412
+ if aedt_name is not None:
413
+ name = aedt_name if isinstance(aedt_name, list) else [aedt_name]
414
+ candidates = [i for i in candidates if i.aedt_name in name]
415
+
416
+ if component_name is not None:
417
+ value = component_name if isinstance(component_name, list) else [component_name]
418
+ candidates = [i for i in candidates if i.component_name in value]
419
+
420
+ if net_name is not None:
421
+ value = net_name if isinstance(net_name, list) else [net_name]
422
+ candidates = [i for i in candidates if i.net_name in value]
423
+
424
+ if component_pin_name is not None:
425
+ value = component_pin_name if isinstance(component_pin_name, list) else [component_pin_name]
426
+ candidates = [i for i in candidates if i.name in value]
427
+ if not candidates: # pragma: no cover
428
+ raise ValueError(
429
+ f"Failed to find padstack instances with aedt_name={aedt_name}, component_name={component_name}, "
430
+ f"net_name={net_name}, component_pin_name={component_pin_name}"
431
+ )
432
+ return candidates
@@ -38,7 +38,7 @@ class LayoutObj(ObjBase):
38
38
  -------
39
39
  Ansys.Ansoft.Edb
40
40
  """
41
- return self._pedb.edb_api
41
+ return self._pedb.core
42
42
 
43
43
  @property
44
44
  def _layout_obj_instance(self):
@@ -48,12 +48,12 @@ class LayoutObj(ObjBase):
48
48
 
49
49
  @property
50
50
  def _edb_properties(self):
51
- p = self._edb_object.GetProductSolverOption(self._edb.edb_api.ProductId.Designer, "HFSS")
51
+ p = self._edb_object.GetProductSolverOption(self._edb.ProductId.Designer, "HFSS")
52
52
  return p
53
53
 
54
54
  @_edb_properties.setter
55
55
  def _edb_properties(self, value):
56
- self._edb_object.SetProductSolverOption(self._edb.edb_api.ProductId.Designer, "HFSS", value)
56
+ self._edb_object.SetProductSolverOption(self._edb.ProductId.Designer, "HFSS", value)
57
57
 
58
58
  @property
59
59
  def _obj_type(self):
@@ -122,7 +122,7 @@ class Path(Primitive):
122
122
  last_point = list(center_line.Points)[-1]
123
123
  x = "({})+({})".format(x, last_point.X.ToString())
124
124
  y = "({})+({})".format(y, last_point.Y.ToString())
125
- center_line.AddPoint(PointData(self._pedb, x=x, y=y)._edb_object)
125
+ center_line.AddPoint(PointData.create_from_xy(self._pedb, x=x, y=y)._edb_object)
126
126
  return self._edb_object.SetCenterLine(center_line)
127
127
 
128
128
  def get_center_line(self, to_string=False):
@@ -151,19 +151,17 @@ class Path(Primitive):
151
151
  bool
152
152
  ``True`` when successful, ``False`` when failed.
153
153
  """
154
- center_line = self.center_line
155
- width = self.width
156
154
  corner_style = self.corner_style
157
155
  end_cap_style = self.get_end_cap_style()
158
- cloned_path = self._app.edb_api.cell.primitive.path.create(
156
+ cloned_path = self._app.core.Cell.Primitive.Path.Create(
159
157
  self._app.active_layout,
160
158
  self.layer_name,
161
- self.net,
162
- width,
159
+ self.net._edb_object,
160
+ self._edb_object.GetWidthValue(),
163
161
  end_cap_style[1],
164
162
  end_cap_style[2],
165
163
  corner_style,
166
- center_line,
164
+ self._edb_object.GetCenterLine(),
167
165
  )
168
166
  if cloned_path:
169
167
  return cloned_path
@@ -338,7 +336,7 @@ class Path(Primitive):
338
336
  def center_line(self, value):
339
337
  if isinstance(value, list):
340
338
  points = [self._pedb.point_data(i[0], i[1]) for i in value]
341
- polygon_data = self._edb.geometry.polygon_data.dotnetobj(convert_py_list_to_net_list(points), False)
339
+ polygon_data = self._edb.Geometry.PolygonData(convert_py_list_to_net_list(points), False)
342
340
  self._edb_object.SetCenterLine(polygon_data)
343
341
 
344
342
  def get_center_line_polygon_data(self):
@@ -21,6 +21,8 @@
21
21
  # SOFTWARE.
22
22
  import re
23
23
 
24
+ from System import String
25
+
24
26
  from pyedb.dotnet.database.cell.connectable import Connectable
25
27
  from pyedb.dotnet.database.general import convert_py_list_to_net_list
26
28
  from pyedb.dotnet.database.geometry.polygon_data import PolygonData
@@ -147,15 +149,6 @@ class Primitive(Connectable):
147
149
  """
148
150
  return self._edb_object.IsVoid()
149
151
 
150
- def get_connected_objects(self):
151
- """Get connected objects.
152
-
153
- Returns
154
- -------
155
- list
156
- """
157
- return self._pedb.get_connected_objects(self._layout_obj_instance)
158
-
159
152
  def area(self, include_voids=True):
160
153
  """Return the total area.
161
154
 
@@ -240,18 +233,6 @@ class Primitive(Connectable):
240
233
  """
241
234
  return point.IsArc()
242
235
 
243
- def get_connected_object_id_set(self):
244
- """Produce a list of all geometries physically connected to a given layout object.
245
-
246
- Returns
247
- -------
248
- list
249
- Found connected objects IDs with Layout object.
250
- """
251
- layoutInst = self._edb_object.GetLayout().GetLayoutInstance()
252
- layoutObjInst = layoutInst.GetLayoutObjInstance(self._edb_object, None) # 2nd arg was []
253
- return [loi.GetLayoutObj().GetId() for loi in layoutInst.GetConnectedObjects(layoutObjInst).Items]
254
-
255
236
  @property
256
237
  def bbox(self):
257
238
  """Return the primitive bounding box points. Lower left corner, upper right corner.
@@ -264,10 +245,10 @@ class Primitive(Connectable):
264
245
  """
265
246
  bbox = self.polygon_data._edb_object.GetBBox()
266
247
  return [
267
- round(bbox.Item1.X.ToDouble(), 6),
268
- round(bbox.Item1.Y.ToDouble(), 6),
269
- round(bbox.Item2.X.ToDouble(), 6),
270
- round(bbox.Item2.Y.ToDouble(), 6),
248
+ round(bbox.Item1.X.ToDouble(), 9),
249
+ round(bbox.Item1.Y.ToDouble(), 9),
250
+ round(bbox.Item2.X.ToDouble(), 9),
251
+ round(bbox.Item2.Y.ToDouble(), 9),
271
252
  ]
272
253
 
273
254
  def convert_to_polygon(self):
@@ -336,7 +317,7 @@ class Primitive(Connectable):
336
317
  list of float
337
318
  """
338
319
  if isinstance(point, (list, tuple)):
339
- point = self._app.edb_api.geometry.point_data(self._app.edb_value(point[0]), self._app.edb_value(point[1]))
320
+ point = self._app.core.geometry.point_data(self._app.edb_value(point[0]), self._app.edb_value(point[1]))
340
321
 
341
322
  p0 = self.polygon_data._edb_object.GetClosestPoint(point)
342
323
  return [p0.X.ToDouble(), p0.Y.ToDouble()]
@@ -540,7 +521,7 @@ class Primitive(Connectable):
540
521
  -------
541
522
  list of float
542
523
  """
543
- if isinstance(point, self._app.edb_api.geometry.geometry.PointData):
524
+ if isinstance(point, self._app.core.Geometry.PointData):
544
525
  point = [point.X.ToDouble(), point.Y.ToDouble()]
545
526
  dist = 1e12
546
527
  out = None
@@ -581,8 +562,6 @@ class Primitive(Connectable):
581
562
  str
582
563
  Name.
583
564
  """
584
- from System import String
585
-
586
565
  val = String("")
587
566
 
588
567
  _, name = self._edb_object.GetProductProperty(self._pedb._edb.ProductId.Designer, 1, val)
@@ -821,7 +800,7 @@ class Primitive(Connectable):
821
800
  r"$end 'EM properties'\n"
822
801
  )
823
802
 
824
- pid = self._pedb.edb_api.ProductId.Designer
803
+ pid = self._pedb.core.ProductId.Designer
825
804
  _, p = self._edb_object.GetProductProperty(pid, 18, "")
826
805
  if p:
827
806
  return p
@@ -831,7 +810,7 @@ class Primitive(Connectable):
831
810
  @_em_properties.setter
832
811
  def _em_properties(self, em_prop):
833
812
  """Set EM properties"""
834
- pid = self._pedb.edb_api.ProductId.Designer
813
+ pid = self._pedb.core.ProductId.Designer
835
814
  self._edb_object.SetProductProperty(pid, 18, em_prop)
836
815
 
837
816
  @property
@@ -45,8 +45,8 @@ class EdgeTerminal(Terminal):
45
45
  port = [port]
46
46
  temp = [self._edb_object]
47
47
  temp.extend([i._edb_object for i in port])
48
- edb_list = convert_py_list_to_net_list(temp, self._edb.cell.terminal.Terminal)
49
- _edb_bundle_terminal = self._edb.cell.terminal.BundleTerminal.Create(edb_list)
48
+ edb_list = convert_py_list_to_net_list(temp, self._edb.Cell.Terminal.Terminal)
49
+ _edb_bundle_terminal = self._edb.Cell.Terminal.BundleTerminal.Create(edb_list)
50
50
  return self._pedb.ports[_edb_bundle_terminal.GetName()]
51
51
 
52
52
  @property
@@ -80,7 +80,7 @@ class PadstackInstanceTerminal(Terminal):
80
80
 
81
81
  layer_obj = self._pedb.stackup.signal_layers[layer]
82
82
 
83
- terminal = self._edb.cell.terminal.PadstackInstanceTerminal.Create(
83
+ terminal = self._edb.Cell.Terminal.PadstackInstanceTerminal.Create(
84
84
  self._pedb.active_layout,
85
85
  padstack_instance.net.net_object,
86
86
  name,
@@ -48,7 +48,7 @@ class PinGroupTerminal(Terminal):
48
48
  :class:`pyedb.dotnet.database.edb_data.terminals.PinGroupTerminal`
49
49
  """
50
50
  net_obj = self._pedb.layout.find_net_by_name(net_name)
51
- term = self._pedb.edb_api.cell.terminal.PinGroupTerminal.Create(
51
+ term = self._pedb.core.Cell.Terminal.PinGroupTerminal.Create(
52
52
  self._pedb.active_layout,
53
53
  net_obj._edb_object,
54
54
  name,
@@ -50,7 +50,7 @@ class PointTerminal(Terminal):
50
50
  -------
51
51
  :class:`pyedb.dotnet.database.edb_data.terminals.PointTerminal`
52
52
  """
53
- terminal = self._pedb.edb_api.cell.terminal.PointTerminal.Create(
53
+ terminal = self._pedb.core.Cell.Terminal.PointTerminal.Create(
54
54
  self._pedb.active_layout,
55
55
  self._pedb.layout.find_net_by_name(net)._edb_object,
56
56
  name,
@@ -34,26 +34,26 @@ class Terminal(Connectable):
34
34
  self._reference_object = None
35
35
 
36
36
  self._boundary_type_mapping = {
37
- "InvalidBoundary": self._pedb.edb_api.cell.terminal.BoundaryType.InvalidBoundary,
38
- "PortBoundary": self._pedb.edb_api.cell.terminal.BoundaryType.PortBoundary,
39
- "PecBoundary": self._pedb.edb_api.cell.terminal.BoundaryType.PecBoundary,
40
- "RlcBoundary": self._pedb.edb_api.cell.terminal.BoundaryType.RlcBoundary,
41
- "kCurrentSource": self._pedb.edb_api.cell.terminal.BoundaryType.kCurrentSource,
42
- "kVoltageSource": self._pedb.edb_api.cell.terminal.BoundaryType.kVoltageSource,
43
- "kNexximGround": self._pedb.edb_api.cell.terminal.BoundaryType.kNexximGround,
44
- "kNexximPort": self._pedb.edb_api.cell.terminal.BoundaryType.kNexximPort,
45
- "kDcTerminal": self._pedb.edb_api.cell.terminal.BoundaryType.kDcTerminal,
46
- "kVoltageProbe": self._pedb.edb_api.cell.terminal.BoundaryType.kVoltageProbe,
37
+ "InvalidBoundary": self._pedb.core.Cell.Terminal.BoundaryType.InvalidBoundary,
38
+ "PortBoundary": self._pedb.core.Cell.Terminal.BoundaryType.PortBoundary,
39
+ "PecBoundary": self._pedb.core.Cell.Terminal.BoundaryType.PecBoundary,
40
+ "RlcBoundary": self._pedb.core.Cell.Terminal.BoundaryType.RlcBoundary,
41
+ "kCurrentSource": self._pedb.core.Cell.Terminal.BoundaryType.kCurrentSource,
42
+ "kVoltageSource": self._pedb.core.Cell.Terminal.BoundaryType.kVoltageSource,
43
+ "kNexximGround": self._pedb.core.Cell.Terminal.BoundaryType.kNexximGround,
44
+ "kNexximPort": self._pedb.core.Cell.Terminal.BoundaryType.kNexximPort,
45
+ "kDcTerminal": self._pedb.core.Cell.Terminal.BoundaryType.kDcTerminal,
46
+ "kVoltageProbe": self._pedb.core.Cell.Terminal.BoundaryType.kVoltageProbe,
47
47
  }
48
48
 
49
49
  self._terminal_type_mapping = {
50
- "InvalidTerminal": self._pedb.edb_api.cell.terminal.TerminalType.InvalidTerminal,
51
- "EdgeTerminal": self._pedb.edb_api.cell.terminal.TerminalType.EdgeTerminal,
52
- "PointTerminal": self._pedb.edb_api.cell.terminal.TerminalType.PointTerminal,
53
- "TerminalInstanceTerminal": self._pedb.edb_api.cell.terminal.TerminalType.TerminalInstanceTerminal,
54
- "PadstackInstanceTerminal": self._pedb.edb_api.cell.terminal.TerminalType.PadstackInstanceTerminal,
55
- "BundleTerminal": self._pedb.edb_api.cell.terminal.TerminalType.BundleTerminal,
56
- "PinGroupTerminal": self._pedb.edb_api.cell.terminal.TerminalType.PinGroupTerminal,
50
+ "InvalidTerminal": self._pedb.core.Cell.Terminal.TerminalType.InvalidTerminal,
51
+ "EdgeTerminal": self._pedb.core.Cell.Terminal.TerminalType.EdgeTerminal,
52
+ "PointTerminal": self._pedb.core.Cell.Terminal.TerminalType.PointTerminal,
53
+ "TerminalInstanceTerminal": self._pedb.core.Cell.Terminal.TerminalType.TerminalInstanceTerminal,
54
+ "PadstackInstanceTerminal": self._pedb.core.Cell.Terminal.TerminalType.PadstackInstanceTerminal,
55
+ "BundleTerminal": self._pedb.core.Cell.Terminal.TerminalType.BundleTerminal,
56
+ "PinGroupTerminal": self._pedb.core.Cell.Terminal.TerminalType.PinGroupTerminal,
57
57
  }
58
58
 
59
59
  @property
@@ -240,10 +240,10 @@ class Terminal(Connectable):
240
240
  if not self._reference_object:
241
241
  term = self._edb_object
242
242
 
243
- if self.terminal_type == self._pedb.edb_api.cell.terminal.TerminalType.EdgeTerminal:
243
+ if self.terminal_type == self._pedb.core.Cell.Terminal.TerminalType.EdgeTerminal:
244
244
  edges = self._edb_object.GetEdges()
245
245
  edgeType = edges[0].GetEdgeType()
246
- if edgeType == self._pedb.edb_api.cell.terminal.EdgeType.PadEdge:
246
+ if edgeType == self._pedb.core.Cell.Terminal.EdgeType.PadEdge:
247
247
  self._reference_object = self.get_pad_edge_terminal_reference_pin()
248
248
  else:
249
249
  self._reference_object = self.get_edge_terminal_reference_primitive()
@@ -304,16 +304,14 @@ class Terminal(Connectable):
304
304
  """
305
305
 
306
306
  refTerm = self._edb_object.GetReferenceTerminal()
307
- if self._edb_object.GetTerminalType() == self._pedb.edb_api.cell.terminal.TerminalType.PinGroupTerminal:
307
+ if self._edb_object.GetTerminalType() == self._pedb.core.Cell.Terminal.TerminalType.PinGroupTerminal:
308
308
  padStackInstance = self._edb_object.GetPinGroup().GetPins()[0]
309
309
  pingroup = refTerm.GetPinGroup()
310
310
  refPinList = pingroup.GetPins()
311
311
  return self._get_closest_pin(padStackInstance, refPinList, gnd_net_name_preference)
312
- elif (
313
- self._edb_object.GetTerminalType() == self._pedb.edb_api.cell.terminal.TerminalType.PadstackInstanceTerminal
314
- ):
312
+ elif self._edb_object.GetTerminalType() == self._pedb.core.Cell.Terminal.TerminalType.PadstackInstanceTerminal:
315
313
  _, padStackInstance, _ = self._edb_object.GetParameters()
316
- if refTerm.GetTerminalType() == self._pedb.edb_api.cell.terminal.TerminalType.PinGroupTerminal:
314
+ if refTerm.GetTerminalType() == self._pedb.core.Cell.Terminal.TerminalType.PinGroupTerminal:
317
315
  pingroup = refTerm.GetPinGroup()
318
316
  refPinList = pingroup.GetPins()
319
317
  return self._get_closest_pin(padStackInstance, refPinList, gnd_net_name_preference)
@@ -339,7 +337,7 @@ class Terminal(Connectable):
339
337
  _, _, point_data = edges[0].GetParameters()
340
338
  X = point_data.X
341
339
  Y = point_data.Y
342
- shape_pd = self._pedb.edb_api.geometry.point_data(X, Y)
340
+ shape_pd = self._pedb.core.geometry.point_data(X, Y)
343
341
  layer_name = ref_layer.GetName()
344
342
  for primitive in self._pedb.layout.primitives:
345
343
  if primitive.GetLayer().GetName() == layer_name or not layer_name:
@@ -361,7 +359,7 @@ class Terminal(Connectable):
361
359
  _, point_data, layer = ref_term.GetParameters()
362
360
  X = point_data.X
363
361
  Y = point_data.Y
364
- shape_pd = self._pedb.edb_api.geometry.point_data(X, Y)
362
+ shape_pd = self._pedb.core.geometry.point_data(X, Y)
365
363
  layer_name = layer.GetName()
366
364
  for primitive in self._pedb.layout.primitives:
367
365
  if primitive.GetLayer().GetName() == layer_name:
@@ -436,7 +434,7 @@ class Terminal(Connectable):
436
434
 
437
435
  @magnitude.setter
438
436
  def magnitude(self, value):
439
- self._edb_object.SetSourceAmplitude(self._edb.utility.value(value))
437
+ self._edb_object.SetSourceAmplitude(self._edb.Utility.Value(value))
440
438
 
441
439
  @property
442
440
  def phase(self):
@@ -445,4 +443,4 @@ class Terminal(Connectable):
445
443
 
446
444
  @phase.setter
447
445
  def phase(self, value):
448
- self._edb_object.SetSourcePhase(self._edb.utility.value(value))
446
+ self._edb_object.SetSourcePhase(self._edb.Utility.Value(value))
@@ -30,27 +30,6 @@ class VoltageRegulator(Connectable):
30
30
  def __init__(self, pedb, edb_object=None):
31
31
  super().__init__(pedb, edb_object)
32
32
 
33
- @property
34
- def component(self):
35
- """Retrieve voltage regulator component"""
36
- if not self._edb_object.GetComponent().IsNull():
37
- ref_des = self._edb_object.GetComponent().GetName()
38
- if not ref_des:
39
- return False
40
- return self._pedb.components.instances[ref_des]
41
- self._pedb.logger.warning("No voltage regulator component.")
42
- return False
43
-
44
- @component.setter
45
- def component(self, value):
46
- if not isinstance(value, str):
47
- self._pedb.logger.error("refdes name must be provided to set vrm component")
48
- return
49
- if value not in self._pedb.components.instances:
50
- self._pedb.logger.error(f"component {value} not found in layout")
51
- return
52
- self._edb_object.SetGroup(self._pedb.components.instances[value]._edb_object)
53
-
54
33
  @property
55
34
  def load_regulator_current(self):
56
35
  """Retrieve load regulator current value"""