pyedb 0.48.0__py3-none-any.whl → 0.50.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 (40) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/configuration/cfg_modeler.py +42 -11
  3. pyedb/configuration/cfg_ports_sources.py +9 -1
  4. pyedb/configuration/cfg_stackup.py +4 -4
  5. pyedb/dotnet/database/cell/hierarchy/component.py +64 -8
  6. pyedb/dotnet/database/cell/hierarchy/s_parameter_model.py +7 -0
  7. pyedb/dotnet/database/cell/terminal/terminal.py +3 -3
  8. pyedb/dotnet/database/components.py +68 -46
  9. pyedb/dotnet/database/definition/package_def.py +29 -5
  10. pyedb/dotnet/database/edb_data/padstacks_data.py +5 -5
  11. pyedb/dotnet/database/edb_data/primitives_data.py +3 -3
  12. pyedb/dotnet/database/edb_data/variables.py +3 -3
  13. pyedb/dotnet/database/geometry/polygon_data.py +14 -1
  14. pyedb/dotnet/database/materials.py +16 -16
  15. pyedb/dotnet/database/modeler.py +50 -9
  16. pyedb/dotnet/database/padstack.py +7 -5
  17. pyedb/dotnet/database/sim_setup_data/data/settings.py +28 -0
  18. pyedb/dotnet/database/siwave.py +36 -32
  19. pyedb/dotnet/database/stackup.py +1 -0
  20. pyedb/dotnet/database/utilities/hfss_simulation_setup.py +5 -6
  21. pyedb/dotnet/database/utilities/siwave_simulation_setup.py +3 -1
  22. pyedb/dotnet/edb.py +22 -20
  23. pyedb/extensions/__init__.py +0 -0
  24. pyedb/extensions/via_design_backend.py +681 -0
  25. pyedb/grpc/database/components.py +57 -48
  26. pyedb/grpc/database/definition/materials.py +33 -33
  27. pyedb/grpc/database/definitions.py +6 -4
  28. pyedb/grpc/database/hfss.py +2 -2
  29. pyedb/grpc/database/hierarchy/component.py +3 -2
  30. pyedb/grpc/database/layers/stackup_layer.py +119 -22
  31. pyedb/grpc/database/layout_validation.py +5 -5
  32. pyedb/grpc/database/primitive/path.py +1 -1
  33. pyedb/grpc/database/source_excitations.py +156 -0
  34. pyedb/grpc/database/stackup.py +50 -24
  35. pyedb/grpc/edb.py +115 -105
  36. {pyedb-0.48.0.dist-info → pyedb-0.50.0.dist-info}/METADATA +1 -1
  37. {pyedb-0.48.0.dist-info → pyedb-0.50.0.dist-info}/RECORD +39 -38
  38. pyedb/extensions/pre_layout_design_toolkit/via_design.py +0 -1151
  39. {pyedb-0.48.0.dist-info → pyedb-0.50.0.dist-info}/LICENSE +0 -0
  40. {pyedb-0.48.0.dist-info → pyedb-0.50.0.dist-info}/WHEEL +0 -0
pyedb/__init__.py CHANGED
@@ -44,7 +44,7 @@ deprecation_warning()
44
44
  #
45
45
 
46
46
  pyedb_path = os.path.dirname(__file__)
47
- __version__ = "0.48.0"
47
+ __version__ = "0.50.0"
48
48
  version = __version__
49
49
 
50
50
  #
@@ -29,13 +29,15 @@ class CfgTrace:
29
29
  def __init__(self, **kwargs):
30
30
  self.name = kwargs.get("name", "")
31
31
  self.layer = kwargs["layer"]
32
- self.path = kwargs["path"]
32
+ self.path = kwargs.get("path")
33
33
  self.width = kwargs["width"]
34
34
  self.net_name = kwargs.get("net_name", "")
35
35
  self.start_cap_style = kwargs.get("start_cap_style", "round")
36
36
  self.end_cap_style = kwargs.get("end_cap_style", "round")
37
37
  self.corner_style = kwargs.get("corner_style", "sharp")
38
38
 
39
+ self.incremental_path = kwargs.get("incremental_path")
40
+
39
41
 
40
42
  class CfgPlane:
41
43
  def __init__(self, **kwargs):
@@ -54,6 +56,10 @@ class CfgPlane:
54
56
  # polygon
55
57
  self.points = kwargs.get("points", [])
56
58
 
59
+ # circle
60
+ self.radius = kwargs.get("radius", 0)
61
+ self.position = kwargs.get("position", [0, 0])
62
+
57
63
 
58
64
  class CfgModeler:
59
65
  """Manage configuration general settings."""
@@ -153,16 +159,30 @@ class CfgModeler:
153
159
  def set_parameter_to_edb(self):
154
160
  if self.parent.traces:
155
161
  for t in self.parent.traces:
156
- obj = self._pedb.modeler.create_trace(
157
- path_list=t.path,
158
- layer_name=t.layer,
159
- net_name=t.net_name,
160
- width=t.width,
161
- start_cap_style=t.start_cap_style,
162
- end_cap_style=t.end_cap_style,
163
- corner_style=t.corner_style,
164
- )
165
- obj.aedt_name = t.name
162
+ if t.path:
163
+ obj = self._pedb.modeler.create_trace(
164
+ path_list=t.path,
165
+ layer_name=t.layer,
166
+ net_name=t.net_name,
167
+ width=t.width,
168
+ start_cap_style=t.start_cap_style,
169
+ end_cap_style=t.end_cap_style,
170
+ corner_style=t.corner_style,
171
+ )
172
+ obj.aedt_name = t.name
173
+ else:
174
+ obj = self._pedb.modeler.create_trace(
175
+ path_list=[t.incremental_path[0]],
176
+ layer_name=t.layer,
177
+ net_name=t.net_name,
178
+ width=t.width,
179
+ start_cap_style=t.start_cap_style,
180
+ end_cap_style=t.end_cap_style,
181
+ corner_style=t.corner_style,
182
+ )
183
+ obj.aedt_name = t.name
184
+ for x, y in t.incremental_path[1:]:
185
+ obj.add_point(x, y, True)
166
186
 
167
187
  if self.parent.padstack_defs:
168
188
  for p in self.parent.padstack_defs:
@@ -202,6 +222,17 @@ class CfgModeler:
202
222
  main_shape=p.points, layer_name=p.layer, net_name=p.net_name
203
223
  )
204
224
  obj.aedt_name = p.name
225
+ elif p.type == "circle":
226
+ obj = self._pedb.modeler.create_circle(
227
+ layer_name=p.layer,
228
+ net_name=p.net_name,
229
+ x=p.position[0],
230
+ y=p.position[1],
231
+ radius=p.radius,
232
+ )
233
+ obj.aedt_name = p.name
234
+ else:
235
+ raise
205
236
 
206
237
  for v in p.voids:
207
238
  for i in self._pedb.layout.primitives:
@@ -391,7 +391,11 @@ class CfgCircuitElement(CfgBase):
391
391
  pos_coor_terminal = dict()
392
392
  if self.type == "coax":
393
393
  pins = self._get_pins(pos_type, pos_value, self.positive_terminal_info.reference_designator)
394
- pins = {f"{self.name}_{self.positive_terminal_info.reference_designator}": i for _, i in pins.items()}
394
+ if len(pins) < 2:
395
+ pins = {f"{self.name}": i for _, i in pins.items()}
396
+ else:
397
+ pins = {f"{self.name}_{name}": i for name, i in pins.items()}
398
+ self.distributed = True
395
399
  pos_objs.update(pins)
396
400
  elif pos_type == "coordinates":
397
401
  layer = self.positive_terminal_info.layer
@@ -402,10 +406,14 @@ class CfgCircuitElement(CfgBase):
402
406
  pos_coor_terminal[self.name] = self._pedb.get_point_terminal(self.name, net_name, point, layer)
403
407
 
404
408
  elif pos_type == "padstack":
409
+ flag = False
405
410
  for pds in self._pedb.layout.padstack_instances:
406
411
  if pds.aedt_name == pos_value:
407
412
  pos_objs.update({pos_value: pds})
413
+ flag = True
408
414
  break
415
+ if flag is False:
416
+ raise ValueError(f"Padstack instance {pos_value} does not exist")
409
417
  elif pos_type == "pin":
410
418
  pins = {
411
419
  pos_value: self._pedb.components.instances[self.positive_terminal_info.reference_designator].pins[
@@ -64,9 +64,9 @@ class CfgMaterial(CfgBase):
64
64
  self.specific_heat = kwargs.get("specific_heat", None)
65
65
  self.thermal_conductivity = kwargs.get("thermal_conductivity", None)
66
66
 
67
- self.thermal_modifier = [
68
- CfgMaterialPropertyThermalModifier(**i) for i in kwargs.get("thermal_modifier", {}) if i is not None
69
- ]
67
+ thermal_modifiers = kwargs.get("thermal_modifiers")
68
+ if thermal_modifiers:
69
+ self.thermal_modifiers = [CfgMaterialPropertyThermalModifier(**i) for i in thermal_modifiers]
70
70
 
71
71
 
72
72
  class CfgLayer(CfgBase):
@@ -162,7 +162,7 @@ class CfgStackup:
162
162
  attrs = mat_in_cfg.get_attributes()
163
163
  mat = self._pedb.materials.add_material(**attrs)
164
164
 
165
- for i in attrs.get("thermal_modifier", []):
165
+ for i in attrs.get("thermal_modifiers", []):
166
166
  mat.set_thermal_modifier(**i.to_dict())
167
167
 
168
168
  def get_materials_from_db(self):
@@ -44,6 +44,41 @@ except ImportError:
44
44
  from pyedb.generic.general_methods import get_filename_without_extension
45
45
 
46
46
 
47
+ class ICDieProperties:
48
+ def __init__(self, pedb, edb_object):
49
+ self._pedb = pedb
50
+ self._edb_object = edb_object
51
+
52
+ @property
53
+ def die_orientation(self):
54
+ if str(self._edb_object.GetOrientation()) == "ChipUp":
55
+ return "chip_up"
56
+ return "chip_down"
57
+
58
+ @die_orientation.setter
59
+ def die_orientation(self, value):
60
+ if value == "chip_up" or value == "ChipUp":
61
+ self._edb_object.SetOrientation(self._pedb.api_class.Definition.DieOrientation.ChipUp)
62
+ elif value == "chip_down" or value == "ChipDown":
63
+ self._edb_object.SetOrientation(self._pedb.api_class.Definition.DieOrientation.ChipDown)
64
+
65
+ @property
66
+ def die_type(self):
67
+ if str(self._edb_object.GetType()) == "NoDie":
68
+ return "none"
69
+ elif str(self._edb_object.GetType()) == "FlipChip":
70
+ return "flip_chip"
71
+ return "none"
72
+
73
+ @property
74
+ def height(self):
75
+ return self._edb_object.GetHeight()
76
+
77
+ @height.setter
78
+ def height(self, value):
79
+ self._edb_object.SetHeight(self._pedb.edb_value(value))
80
+
81
+
47
82
  class EDBComponent(Group):
48
83
  """Manages EDB functionalities for components.
49
84
 
@@ -61,6 +96,7 @@ class EDBComponent(Group):
61
96
  self.edbcomponent = edb_object
62
97
  self._layout_instance = None
63
98
  self._comp_instance = None
99
+ self._ic_die_properties = None
64
100
 
65
101
  @property
66
102
  def name(self):
@@ -149,6 +185,21 @@ class EDBComponent(Group):
149
185
  comp_prop.SetPackageDef(package_def._edb_object)
150
186
  self.edbcomponent.SetComponentProperty(comp_prop)
151
187
 
188
+ @property
189
+ def ic_die_properties(self):
190
+ """Adding IC properties for grpc compatibility."""
191
+ if self.type == "IC":
192
+ if not self._ic_die_properties:
193
+ self._ic_die_properties = ICDieProperties(self._pedb, self.component_property.GetDieProperty().Clone())
194
+ return self._ic_die_properties
195
+ return None
196
+
197
+ @ic_die_properties.setter
198
+ def ic_die_properties(self, value):
199
+ component_property = self.component_property
200
+ component_property.SetDieProperties(value)
201
+ self.component_property = component_property
202
+
152
203
  def create_package_def(self, name="", component_part_name=None):
153
204
  """Create a package definition and assign it to the component.
154
205
 
@@ -459,7 +510,7 @@ class EDBComponent(Group):
459
510
  return "0"
460
511
  for pinpair in pinpairs:
461
512
  pair = model.GetPinPairRlc(pinpair)
462
- return pair.R.ToString()
513
+ return pair.R.ToDouble()
463
514
  return None
464
515
 
465
516
  @res_value.setter
@@ -488,7 +539,7 @@ class EDBComponent(Group):
488
539
  return "0"
489
540
  for pinpair in pinpairs:
490
541
  pair = model.GetPinPairRlc(pinpair)
491
- return pair.C.ToString()
542
+ return pair.C.ToDouble()
492
543
  return None
493
544
 
494
545
  @cap_value.setter
@@ -517,7 +568,7 @@ class EDBComponent(Group):
517
568
  return "0"
518
569
  for pinpair in pinpairs:
519
570
  pair = model.GetPinPairRlc(pinpair)
520
- return pair.L.ToString()
571
+ return pair.L.ToDouble()
521
572
  return None
522
573
 
523
574
  @ind_value.setter
@@ -575,7 +626,7 @@ class EDBComponent(Group):
575
626
  list
576
627
  """
577
628
  center = self.component_instance.GetCenter()
578
- return [center.X.ToDouble(), center.Y.ToDouble()]
629
+ return [round(center.X.ToDouble(), 6), round(center.Y.ToDouble(), 6)]
579
630
 
580
631
  @property
581
632
  def bounding_box(self):
@@ -591,7 +642,12 @@ class EDBComponent(Group):
591
642
  bbox = self.component_instance.GetBBox()
592
643
  pt1 = bbox.Item1
593
644
  pt2 = bbox.Item2
594
- return [pt1.X.ToDouble(), pt1.Y.ToDouble(), pt2.X.ToDouble(), pt2.Y.ToDouble()]
645
+ return [
646
+ round(pt1.X.ToDouble(), 6),
647
+ round(pt1.Y.ToDouble(), 6),
648
+ round(pt2.X.ToDouble(), 6),
649
+ round(pt2.Y.ToDouble(), 6),
650
+ ]
595
651
 
596
652
  @property
597
653
  def rotation(self):
@@ -601,7 +657,7 @@ class EDBComponent(Group):
601
657
  -------
602
658
  float
603
659
  """
604
- return self.edbcomponent.GetTransform().Rotation.ToDouble()
660
+ return round(self.edbcomponent.GetTransform().Rotation.ToDouble(), 6)
605
661
 
606
662
  @property
607
663
  def pinlist(self):
@@ -776,7 +832,7 @@ class EDBComponent(Group):
776
832
  float
777
833
  Lower elevation of the placement layer.
778
834
  """
779
- return self.edbcomponent.GetPlacementLayer().Clone().GetLowerElevation()
835
+ return round(self.edbcomponent.GetPlacementLayer().Clone().GetLowerElevation(), 6)
780
836
 
781
837
  @property
782
838
  def upper_elevation(self):
@@ -788,7 +844,7 @@ class EDBComponent(Group):
788
844
  Upper elevation of the placement layer.
789
845
 
790
846
  """
791
- return self.edbcomponent.GetPlacementLayer().Clone().GetUpperElevation()
847
+ return round(self.edbcomponent.GetPlacementLayer().Clone().GetUpperElevation(), 6)
792
848
 
793
849
  @property
794
850
  def top_bottom_association(self):
@@ -32,3 +32,10 @@ class SparamModel(object): # pragma: no cover
32
32
  @property
33
33
  def reference_net(self):
34
34
  return self._edb_model.GetReferenceNet()
35
+
36
+ @property
37
+ def is_null(self):
38
+ """Adding this property to be compatible with grpc."""
39
+ if self.name:
40
+ return False
41
+ return True
@@ -405,7 +405,7 @@ class Terminal(Connectable):
405
405
  power_ground_net_names = [gnd_net]
406
406
  else:
407
407
  power_ground_net_names = [net for net in self._pedb.nets.power.keys()]
408
- comp_ref_pins = [i for i in pin_list if i.GetNet().GetName() in power_ground_net_names]
408
+ comp_ref_pins = [i for i in pin_list if i.net_name in power_ground_net_names]
409
409
  if len(comp_ref_pins) == 0: # pragma: no cover
410
410
  self._pedb.logger.error(
411
411
  "Terminal with PadStack Instance Name {} component has no reference pins.".format(ref_pin.GetName())
@@ -414,9 +414,9 @@ class Terminal(Connectable):
414
414
  closest_pin_distance = None
415
415
  pin_obj = None
416
416
  for pin in comp_ref_pins: # find the distance to all the pins to the terminal pin
417
- if pin.GetName() == ref_pin.GetName(): # skip the reference psi
417
+ if pin.component_pin == ref_pin.GetName(): # skip the reference psi
418
418
  continue # pragma: no cover
419
- _, pin_point, _ = pin.GetPositionAndRotation()
419
+ _, pin_point, _ = pin._edb_object.GetPositionAndRotation()
420
420
  distance = pad_stack_inst_point.Distance(pin_point)
421
421
  if closest_pin_distance is None:
422
422
  closest_pin_distance = distance
@@ -556,25 +556,27 @@ class Components(object):
556
556
  m_pin2_pos = [0.0, 0.0]
557
557
  h_pin1_pos = [0.0, 0.0]
558
558
  h_pin2_pos = [0.0, 0.0]
559
- if not isinstance(mounted_component, self._pedb.edb_api.cell.hierarchy.component):
559
+ from pyedb.dotnet.database.cell.hierarchy.component import EDBComponent
560
+
561
+ if not isinstance(mounted_component, EDBComponent):
560
562
  return False
561
- if not isinstance(hosting_component, self._pedb.edb_api.cell.hierarchy.component):
563
+ if not isinstance(hosting_component, EDBComponent):
562
564
  return False
563
565
 
564
- if mounted_component_pin1:
565
- m_pin1 = self._get_edb_pin_from_pin_name(mounted_component, mounted_component_pin1)
566
- m_pin1_pos = self.get_pin_position(m_pin1)
567
- if mounted_component_pin2:
568
- m_pin2 = self._get_edb_pin_from_pin_name(mounted_component, mounted_component_pin2)
569
- m_pin2_pos = self.get_pin_position(m_pin2)
566
+ if mounted_component_pin1 in mounted_component.pins:
567
+ m_pin1 = mounted_component.pins[mounted_component_pin1]
568
+ m_pin1_pos = m_pin1.position
569
+ if mounted_component_pin2 in mounted_component.pins:
570
+ m_pin2 = mounted_component.pins[mounted_component_pin2]
571
+ m_pin2_pos = m_pin2.position
570
572
 
571
- if hosting_component_pin1:
572
- h_pin1 = self._get_edb_pin_from_pin_name(hosting_component, hosting_component_pin1)
573
- h_pin1_pos = self.get_pin_position(h_pin1)
573
+ if hosting_component_pin1 in hosting_component.pins:
574
+ h_pin1 = hosting_component.pins[hosting_component_pin1]
575
+ h_pin1_pos = h_pin1.position
574
576
 
575
- if hosting_component_pin2:
576
- h_pin2 = self._get_edb_pin_from_pin_name(hosting_component, hosting_component_pin2)
577
- h_pin2_pos = self.get_pin_position(h_pin2)
577
+ if hosting_component_pin2 in hosting_component.pins:
578
+ h_pin2 = hosting_component.pins[hosting_component_pin2]
579
+ h_pin2_pos = h_pin2.position
578
580
  #
579
581
  vector = [h_pin1_pos[0] - m_pin1_pos[0], h_pin1_pos[1] - m_pin1_pos[1]]
580
582
  vector1 = GeometryOperators.v_points(m_pin1_pos, m_pin2_pos)
@@ -586,8 +588,8 @@ class Components(object):
586
588
 
587
589
  rotation = GeometryOperators.v_angle_sign_2D(vector1, vector2, False)
588
590
  if rotation != 0.0:
589
- layinst = mounted_component.GetLayout().GetLayoutInstance()
590
- cmpinst = layinst.GetLayoutObjInstance(mounted_component, None)
591
+ layinst = mounted_component._edb_object.GetLayout().GetLayoutInstance()
592
+ cmpinst = layinst.GetLayoutObjInstance(mounted_component._edb_object, None)
591
593
  center = cmpinst.GetCenter()
592
594
  center_double = [center.X.ToDouble(), center.Y.ToDouble()]
593
595
  vector_center = GeometryOperators.v_points(center_double, m_pin1_pos)
@@ -597,7 +599,7 @@ class Components(object):
597
599
  vector = [h_pin1_pos[0] - new_vector[0], h_pin1_pos[1] - new_vector[1]]
598
600
 
599
601
  if vector:
600
- solder_ball_height = self.get_solder_ball_height(mounted_component)
602
+ solder_ball_height = mounted_component.solder_ball_height
601
603
  return True, vector, rotation, solder_ball_height
602
604
  self._logger.warning("Failed to compute vector.")
603
605
  return False, [0, 0], 0, 0
@@ -818,7 +820,7 @@ class Components(object):
818
820
  if refdes and any(refdes.rlc_values):
819
821
  return self.deactivate_rlc_component(component=refdes, create_circuit_port=True)
820
822
  if not port_name:
821
- port_name = "Port_{}_{}".format(pins[0].net_name, pins[0].name)
823
+ port_name = f"Port_{pins[0].net_name}_{pins[0].name}".replace("-", "_")
822
824
 
823
825
  if len(pins) > 1 or pingroup_on_single_pin:
824
826
  if pec_boundary:
@@ -842,7 +844,7 @@ class Components(object):
842
844
  f"ports only, {len(reference_pins)} reference pins found "
843
845
  f"(pingroup_on_single_pin: {pingroup_on_single_pin})."
844
846
  )
845
- ref_group_name = "group_{}_ref".format(port_name)
847
+ ref_group_name = f"group_{port_name}_ref"
846
848
  ref_pin_group = self.create_pingroup_from_pins(reference_pins, ref_group_name)
847
849
  ref_term = self._create_pin_group_terminal(pingroup=ref_pin_group, term_name=port_name + "_ref")
848
850
  else:
@@ -857,7 +859,7 @@ class Components(object):
857
859
  term.SetBoundaryType(self._edb.cell.terminal.BoundaryType.PecBoundary)
858
860
  ref_term.SetBoundaryType(self._edb.cell.terminal.BoundaryType.PecBoundary)
859
861
  self._logger.info(
860
- "PEC boundary created between pin {} and reference pin {}".format(pins[0].name, reference_pins[0].name)
862
+ f"PEC boundary created between pin {pins[0].name} and reference pin {reference_pins[0].name}"
861
863
  )
862
864
 
863
865
  return term or False
@@ -1316,9 +1318,9 @@ class Components(object):
1316
1318
  pin_layers = self._padstack._get_pin_layer_range(pins[0])
1317
1319
  pos_pin_term = self._pedb.edb_api.cell.terminal.PadstackInstanceTerminal.Create(
1318
1320
  self._active_layout,
1319
- pins[0].GetNet(),
1320
- "{}_{}".format(component.refdes, pins[0].GetName()),
1321
- pins[0],
1321
+ pins[0].net._edb_object,
1322
+ f"{component.refdes}_{pins[0]._edb_object.GetName()}",
1323
+ pins[0]._edb_object,
1322
1324
  pin_layers[0],
1323
1325
  False,
1324
1326
  )
@@ -1326,9 +1328,9 @@ class Components(object):
1326
1328
  return False
1327
1329
  neg_pin_term = self._pedb.edb_api.cell.terminal.PadstackInstanceTerminal.Create(
1328
1330
  self._active_layout,
1329
- pins[1].GetNet(),
1330
- "{}_{}_ref".format(component.refdes, pins[1].GetName()),
1331
- pins[1],
1331
+ pins[1].net._edb_object,
1332
+ f"{component.refdes}_{pins[1]._edb_object.GetName()}_ref",
1333
+ pins[1]._edb_object,
1332
1334
  pin_layers[0],
1333
1335
  False,
1334
1336
  )
@@ -1382,9 +1384,9 @@ class Components(object):
1382
1384
  pin_layer = self._padstack._get_pin_layer_range(pins[0])[0]
1383
1385
  pos_pin_term = self._pedb.edb_api.cell.terminal.PadstackInstanceTerminal.Create(
1384
1386
  self._active_layout,
1385
- pins[0].GetNet(),
1386
- "{}_{}".format(component.refdes, pins[0].GetName()),
1387
- pins[0],
1387
+ pins[0]._edb_object.GetNet(),
1388
+ f"{component.refdes}_{pins[0]._edb_object.GetName()}",
1389
+ pins[0]._edb_object,
1388
1390
  pin_layer,
1389
1391
  False,
1390
1392
  )
@@ -1392,9 +1394,9 @@ class Components(object):
1392
1394
  return False
1393
1395
  neg_pin_term = self._pedb.edb_api.cell.terminal.PadstackInstanceTerminal.Create(
1394
1396
  self._active_layout,
1395
- pins[1].GetNet(),
1396
- "{}_{}_ref".format(component.refdes, pins[1].GetName()),
1397
- pins[1],
1397
+ pins[1]._edb_object.GetNet(),
1398
+ f"{component.refdes}_{pins[1]._edb_object.GetName()}_ref",
1399
+ pins[1]._edb_object,
1398
1400
  pin_layer,
1399
1401
  True,
1400
1402
  )
@@ -2164,7 +2166,7 @@ class Components(object):
2164
2166
  rlc.C = self._get_edb_value(cap_value)
2165
2167
  else:
2166
2168
  rlc.CEnabled = False
2167
- pin_pair = self._edb.utility.utility.PinPair(from_pin.GetName(), to_pin.GetName())
2169
+ pin_pair = self._edb.utility.utility.PinPair(from_pin.name, to_pin.name)
2168
2170
  rlc_model = self._edb.cell.hierarchy._hierarchy.PinPairModel()
2169
2171
  rlc_model.SetPinPairRlc(pin_pair, rlc)
2170
2172
  if not edb_rlc_component_property.SetModel(rlc_model) or not edb_component.SetComponentProperty(
@@ -2304,7 +2306,7 @@ class Components(object):
2304
2306
  footprint_cell = self.definitions[comp.partname]._edb_object.GetFootprintCell()
2305
2307
  comp_def = self._edb.definition.ComponentDef.Create(self._db, part_name, footprint_cell)
2306
2308
  for pin in pinlist:
2307
- self._edb.definition.ComponentDefPin.Create(comp_def, pin.GetName())
2309
+ self._edb.definition.ComponentDefPin.Create(comp_def, pin._edb_object.GetName())
2308
2310
 
2309
2311
  p_layer = comp.placement_layer
2310
2312
  refdes_temp = comp.refdes + "_temp"
@@ -2313,7 +2315,7 @@ class Components(object):
2313
2315
  unmount_comp_list.remove(refdes)
2314
2316
  comp.edbcomponent.Ungroup(True)
2315
2317
 
2316
- pinlist = [self._pedb.layout.find_object_by_id(i.GetId()) for i in pinlist]
2318
+ pinlist = [self._pedb.layout.find_object_by_id(i.id) for i in pinlist]
2317
2319
  self.create(pinlist, refdes, p_layer, part_name)
2318
2320
  self.refresh_components()
2319
2321
  comp = self.instances[refdes]
@@ -2360,11 +2362,11 @@ class Components(object):
2360
2362
  part_name = comp.partname
2361
2363
  comp_type = comp.type
2362
2364
  if comp_type == "Resistor":
2363
- value = comp.res_value
2365
+ value = str(comp.res_value)
2364
2366
  elif comp_type == "Capacitor":
2365
- value = comp.cap_value
2367
+ value = str(comp.cap_value)
2366
2368
  elif comp_type == "Inductor":
2367
- value = comp.ind_value
2369
+ value = str(comp.ind_value)
2368
2370
  else:
2369
2371
  value = ""
2370
2372
  if not value:
@@ -2383,7 +2385,7 @@ class Components(object):
2383
2385
  obj = self._pedb.edb_api.cell.hierarchy.component.FindByName(self._active_layout, reference_designator)
2384
2386
  return EDBComponent(self._pedb, obj)
2385
2387
 
2386
- def get_pin_from_component(self, component, netName=None, pinName=None):
2388
+ def get_pin_from_component(self, component, netName=None, pinName=None, net_name=None, pin_name=None):
2387
2389
  """Retrieve the pins of a component.
2388
2390
 
2389
2391
  Parameters
@@ -2396,6 +2398,14 @@ class Components(object):
2396
2398
  pinName : str, optional
2397
2399
  Filter on the pin name an alternative to
2398
2400
  ``netName``. The default is ``None``.
2401
+ net_name : str, optional
2402
+ Filter on the net name as an alternative to
2403
+ ``pin_name``. The default is ``None``. This parameter is added to add compatibility with grpc and is
2404
+ recommended using it rather than `netName`.
2405
+ pin_name : str, optional
2406
+ Filter on the pin name an alternative to
2407
+ ``netName``. The default is ``None``. This parameter is added to add compatibility with grpc and is
2408
+ recommended using it rather than `pinName`.
2399
2409
 
2400
2410
  Returns
2401
2411
  -------
@@ -2413,6 +2423,14 @@ class Components(object):
2413
2423
  warnings.warn("Use new property :func:`edb.padstacks.get_instances` instead.", DeprecationWarning)
2414
2424
  if not isinstance(component, self._pedb.edb_api.cell.hierarchy.component):
2415
2425
  component = self._pedb.edb_api.cell.hierarchy.component.FindByName(self._active_layout, component)
2426
+ if pinName:
2427
+ warnings.warn("Use argument `pin_name` instead of `pinName`", DeprecationWarning)
2428
+ if netName:
2429
+ warnings.warn("Use argument `net_name` instead of `netName`", DeprecationWarning)
2430
+ if net_name:
2431
+ netName = net_name
2432
+ if pin_name:
2433
+ pinName = pin_name
2416
2434
  if netName:
2417
2435
  if not isinstance(netName, list):
2418
2436
  netName = [netName]
@@ -2425,14 +2443,18 @@ class Components(object):
2425
2443
  if not isinstance(pinName, list):
2426
2444
  pinName = [pinName]
2427
2445
  pins = [
2428
- p
2446
+ EDBPadstackInstance(p, self._pedb)
2429
2447
  for p in list(component.LayoutObjs)
2430
2448
  if int(p.GetObjType()) == 1
2431
2449
  and p.IsLayoutPin()
2432
2450
  and (self.get_aedt_pin_name(p) in pinName or p.GetName() in pinName)
2433
2451
  ]
2434
2452
  else:
2435
- pins = [p for p in list(component.LayoutObjs) if int(p.GetObjType()) == 1 and p.IsLayoutPin()]
2453
+ pins = [
2454
+ EDBPadstackInstance(p, self._pedb)
2455
+ for p in list(component.LayoutObjs)
2456
+ if int(p.GetObjType()) == 1 and p.IsLayoutPin()
2457
+ ]
2436
2458
  return pins
2437
2459
 
2438
2460
  def get_aedt_pin_name(self, pin):
@@ -2560,7 +2582,7 @@ class Components(object):
2560
2582
  for j in [*i.pins.values()]:
2561
2583
  pin_list.append(j)
2562
2584
  for pin in pin_list:
2563
- if pin.GetNet().GetName() == net_name:
2585
+ if pin.net_name == net_name:
2564
2586
  pin_names.append(self.get_aedt_pin_name(pin))
2565
2587
  return pin_names
2566
2588
 
@@ -2587,7 +2609,7 @@ class Components(object):
2587
2609
  """
2588
2610
  netlist = []
2589
2611
  for pin in PinList:
2590
- netlist.append(pin.GetNet().GetName())
2612
+ netlist.append(pin.net_name)
2591
2613
  return list(set(netlist))
2592
2614
 
2593
2615
  def get_component_net_connection_info(self, refdes):
@@ -2613,9 +2635,9 @@ class Components(object):
2613
2635
  """
2614
2636
  component_pins = self.get_pin_from_component(refdes)
2615
2637
  data = {"refdes": [], "pin_name": [], "net_name": []}
2616
- for pin_obj in component_pins:
2617
- pin_name = pin_obj.GetName()
2618
- net_name = pin_obj.GetNet().GetName()
2638
+ for pin in component_pins:
2639
+ pin_name = pin._edb_object.GetName()
2640
+ net_name = pin._edb_object.GetNet().GetName()
2619
2641
  if pin_name is not None:
2620
2642
  data["refdes"].append(refdes)
2621
2643
  data["pin_name"].append(pin_name)
@@ -19,6 +19,7 @@
19
19
  # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  # SOFTWARE.
22
+ import warnings
22
23
 
23
24
  from pyedb.dotnet.database.geometry.polygon_data import PolygonData
24
25
  from pyedb.dotnet.database.utilities.obj_base import ObjBase
@@ -105,15 +106,29 @@ class PackageDef(ObjBase):
105
106
  self._edb_object.SetMaximumPower(value)
106
107
 
107
108
  @property
108
- def therm_cond(self):
109
- """Thermal conductivity of the package."""
109
+ def thermal_conductivity(self):
110
+ """Adding this property for compatibility with grpc."""
110
111
  return self._edb_object.GetTherm_Cond().ToDouble()
111
112
 
112
- @therm_cond.setter
113
- def therm_cond(self, value):
113
+ @thermal_conductivity.setter
114
+ def thermal_conductivity(self, value):
114
115
  value = self._pedb.edb_value(value)
115
116
  self._edb_object.SetTherm_Cond(value)
116
117
 
118
+ @property
119
+ def therm_cond(self):
120
+ """Thermal conductivity of the package.
121
+
122
+ ..deprecated:: 0.48.0
123
+ Use: func:`thermal_conductivity` property instead.
124
+ """
125
+ warnings.warn("Use property thermal_conductivity instead.", DeprecationWarning)
126
+ return self.thermal_conductivity
127
+
128
+ @therm_cond.setter
129
+ def therm_cond(self, value):
130
+ self.thermal_conductivity = value
131
+
117
132
  @property
118
133
  def theta_jb(self):
119
134
  """Theta Junction-to-Board of the package."""
@@ -153,10 +168,19 @@ class PackageDef(ObjBase):
153
168
  heatsink.fin_orientation = fin_orientation
154
169
  heatsink.fin_spacing = fin_spacing
155
170
  heatsink.fin_thickness = fin_thickness
156
- self._edb_object.SetHeatSink(heatsink._edb_object)
171
+ return self._edb_object.SetHeatSink(heatsink._edb_object)
157
172
 
158
173
  @property
159
174
  def heatsink(self):
175
+ """Component heatsink.
176
+
177
+ ..deprecated:: 0.48.0
178
+ Use: func:`heat_sink` property instead.
179
+ """
180
+ return self.heat_sink
181
+
182
+ @property
183
+ def heat_sink(self):
160
184
  """Component heatsink."""
161
185
  from pyedb.dotnet.database.utilities.heatsink import HeatSink
162
186