pyedb 0.23.0__py3-none-any.whl → 0.25.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 (38) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/component_libraries/ansys_components.py +48 -2
  3. pyedb/configuration/cfg_operations.py +38 -4
  4. pyedb/configuration/cfg_ports_sources.py +16 -2
  5. pyedb/configuration/configuration.py +8 -0
  6. pyedb/dotnet/edb.py +39 -37
  7. pyedb/dotnet/edb_core/cell/hierarchy/hierarchy_obj.py +11 -0
  8. pyedb/dotnet/edb_core/cell/layout.py +47 -23
  9. pyedb/dotnet/edb_core/cell/layout_obj.py +0 -9
  10. pyedb/dotnet/edb_core/cell/primitive/__init__.py +3 -0
  11. pyedb/dotnet/edb_core/cell/{primitive.py → primitive/bondwire.py} +1 -146
  12. pyedb/dotnet/edb_core/cell/primitive/path.py +351 -0
  13. pyedb/dotnet/edb_core/cell/primitive/primitive.py +895 -0
  14. pyedb/dotnet/edb_core/cell/terminal/bundle_terminal.py +0 -4
  15. pyedb/dotnet/edb_core/cell/terminal/edge_terminal.py +1 -1
  16. pyedb/dotnet/edb_core/cell/terminal/terminal.py +2 -2
  17. pyedb/dotnet/edb_core/components.py +48 -25
  18. pyedb/dotnet/edb_core/dotnet/database.py +1 -23
  19. pyedb/dotnet/edb_core/dotnet/primitive.py +3 -139
  20. pyedb/dotnet/edb_core/edb_data/nets_data.py +1 -11
  21. pyedb/dotnet/edb_core/edb_data/padstacks_data.py +10 -24
  22. pyedb/dotnet/edb_core/edb_data/primitives_data.py +56 -868
  23. pyedb/dotnet/edb_core/geometry/polygon_data.py +43 -0
  24. pyedb/dotnet/edb_core/hfss.py +26 -22
  25. pyedb/dotnet/edb_core/layout_validation.py +3 -3
  26. pyedb/dotnet/edb_core/modeler.py +64 -81
  27. pyedb/dotnet/edb_core/nets.py +5 -4
  28. pyedb/dotnet/edb_core/padstack.py +12 -13
  29. pyedb/dotnet/edb_core/siwave.py +1 -1
  30. pyedb/dotnet/edb_core/stackup.py +3 -3
  31. pyedb/ipc2581/ecad/cad_data/layer_feature.py +1 -1
  32. pyedb/ipc2581/ecad/cad_data/polygon.py +2 -2
  33. pyedb/ipc2581/ecad/cad_data/step.py +2 -2
  34. pyedb/siwave.py +99 -0
  35. {pyedb-0.23.0.dist-info → pyedb-0.25.0.dist-info}/METADATA +4 -4
  36. {pyedb-0.23.0.dist-info → pyedb-0.25.0.dist-info}/RECORD +38 -35
  37. {pyedb-0.23.0.dist-info → pyedb-0.25.0.dist-info}/LICENSE +0 -0
  38. {pyedb-0.23.0.dist-info → pyedb-0.25.0.dist-info}/WHEEL +0 -0
@@ -43,10 +43,6 @@ class BundleTerminal(Terminal):
43
43
  """Get terminals belonging to this excitation."""
44
44
  return [EdgeTerminal(self._pedb, i) for i in list(self._edb_object.GetTerminals())]
45
45
 
46
- @property
47
- def name(self):
48
- return self.terminals[0].name
49
-
50
46
  def decouple(self):
51
47
  """Ungroup a bundle of terminals."""
52
48
  return self._edb_object.Ungroup()
@@ -47,4 +47,4 @@ class EdgeTerminal(Terminal):
47
47
  temp.extend([i._edb_object for i in port])
48
48
  edb_list = convert_py_list_to_net_list(temp, self._edb.cell.terminal.Terminal)
49
49
  _edb_bundle_terminal = self._edb.cell.terminal.BundleTerminal.Create(edb_list)
50
- return self._pedb.ports[self.name]
50
+ return self._pedb.ports[_edb_bundle_terminal.GetName()]
@@ -108,7 +108,7 @@ class Terminal(Connectable):
108
108
  point_data = self._pedb.point_data(0, 0)
109
109
  layer = list(self._pedb.stackup.layers.values())[0]._edb_layer
110
110
  if self._edb_object.GetParameters(point_data, layer):
111
- return layer
111
+ return self._pedb.stackup.all_layers[layer.GetName()]
112
112
  else:
113
113
  self._pedb.logger.warning(f"No pad parameters found for terminal {self.name}")
114
114
 
@@ -128,7 +128,7 @@ class Terminal(Connectable):
128
128
  @location.setter
129
129
  def location(self, value):
130
130
  layer = self.layer
131
- self._edb_object.SetParameters(self._pedb.point_data(*value), layer)
131
+ self._edb_object.SetParameters(self._pedb.point_data(*value), layer._edb_object)
132
132
 
133
133
  @property
134
134
  def is_circuit_port(self):
@@ -651,9 +651,8 @@ class Components(object):
651
651
 
652
652
  Returns
653
653
  -------
654
- pyedb.component_libraries.ansys_components import ComponentLib object. ComponentLib object contains nested
655
- dictionaries to navigate through [component tpe][vendors][series]
656
- [class: `pyedb.component_libraries.ansys_components.ComponentPart`]
654
+ ComponentLib object contains nested dictionaries to navigate through [component type][vendors][series]
655
+ :class: `pyedb.component_libraries.ansys_components.ComponentPart`
657
656
 
658
657
  Examples
659
658
  --------
@@ -681,6 +680,7 @@ class Components(object):
681
680
  for line in f.readlines():
682
681
  part_name, index = line.split()
683
682
  _serie[part_name] = ComponentPart(part_name, int(index), sbin_file)
683
+ _serie[part_name].type = cmp_type[:-1]
684
684
  f.close()
685
685
  series[serie_name] = _serie
686
686
  vendors[vendor] = series
@@ -770,7 +770,16 @@ class Components(object):
770
770
  )
771
771
  return True
772
772
 
773
- def create_port_on_pins(self, refdes, pins, reference_pins, impedance=50.0, port_name=None, pec_boundary=False):
773
+ def create_port_on_pins(
774
+ self,
775
+ refdes,
776
+ pins,
777
+ reference_pins,
778
+ impedance=50.0,
779
+ port_name=None,
780
+ pec_boundary=False,
781
+ pingroup_on_single_pin=False,
782
+ ):
774
783
  """Create circuit port between pins and reference ones.
775
784
 
776
785
  Parameters
@@ -796,6 +805,9 @@ class Components(object):
796
805
  a perfect short is created between the pin and impedance is ignored. This
797
806
  parameter is only supported on a port created between two pins, such as
798
807
  when there is no pin group.
808
+ pingroup_on_single_pin : bool
809
+ If ``True`` force using pingroup definition on single pin to have the port created at the pad center. If
810
+ ``False`` the port is created at the pad edge. Default value is ``False``.
799
811
 
800
812
  Returns
801
813
  -------
@@ -817,6 +829,9 @@ class Components(object):
817
829
  pins = [pins]
818
830
  elif isinstance(pins, EDBPadstackInstance):
819
831
  pins = [pins.name]
832
+ if not reference_pins:
833
+ self._logger.error("No reference pin provided.")
834
+ return False
820
835
  if isinstance(reference_pins, str):
821
836
  reference_pins = [reference_pins]
822
837
  if isinstance(reference_pins, list):
@@ -848,17 +863,19 @@ class Components(object):
848
863
  if len([pin for pin in pins if isinstance(pin, str)]) == len(pins):
849
864
  cmp_pins = []
850
865
  for pin_name in pins:
851
- cmp_pin = [pin for pin in list(refdes_pins.values()) if pin_name == pin.name]
852
- if not cmp_pin:
853
- cmp_pin = [pin for pin in list(refdes_pins.values()) if pin_name == pin.name.split("-")[1]]
854
- if cmp_pin:
855
- cmp_pins.append(cmp_pin[0])
866
+ cmp_pins = [pin for pin in list(refdes_pins.values()) if pin_name == pin.name]
867
+ if not cmp_pins:
868
+ for pin in list(refdes_pins.values()):
869
+ if pin.name and "-" in pin.name:
870
+ if pin_name == pin.name.split("-")[1]:
871
+ cmp_pins.append(pin)
856
872
  if not cmp_pins:
873
+ self._logger.warning("No pin found during port creation. Port is not defined.")
857
874
  return
858
875
  pins = cmp_pins
859
876
  if not len([pin for pin in pins if isinstance(pin, EDBPadstackInstance)]) == len(pins):
860
877
  self._logger.error("Pin list must contain only pins instances")
861
- return
878
+ return False
862
879
  if not port_name:
863
880
  port_name = "Port_{}_{}".format(pins[0].net_name, pins[0].name)
864
881
  if len([pin for pin in reference_pins if isinstance(pin, str)]) == len(reference_pins):
@@ -866,15 +883,14 @@ class Components(object):
866
883
  for ref_pin_name in reference_pins:
867
884
  if ref_pin_name in refdes_pins:
868
885
  ref_cmp_pins.append(refdes_pins[ref_pin_name])
869
- elif "-" in ref_pin_name and ref_pin_name.split("-")[1] in refdes_pins:
870
- ref_cmp_pins.append(refdes_pins[ref_pin_name.split("-")[1]])
886
+ elif "-" in ref_pin_name:
887
+ if ref_pin_name.split("-")[1] in refdes_pins:
888
+ ref_cmp_pins.append(refdes_pins[ref_pin_name.split("-")[1]])
871
889
  if not ref_cmp_pins:
872
- return
890
+ self._logger.error("No reference pins found.")
891
+ return False
873
892
  reference_pins = ref_cmp_pins
874
- if not reference_pins:
875
- self._logger.error("No reference pins found.")
876
- return
877
- if len(pins) > 1:
893
+ if len(pins) > 1 or pingroup_on_single_pin:
878
894
  pec_boundary = False
879
895
  self._logger.info(
880
896
  "Disabling PEC boundary creation, this feature is supported on single pin "
@@ -887,7 +903,7 @@ class Components(object):
887
903
  else:
888
904
  term = self._create_terminal(pins[0].primitive_object, term_name=port_name)
889
905
  term.SetIsCircuitPort(True)
890
- if len(reference_pins) > 1:
906
+ if len(reference_pins) > 1 or pingroup_on_single_pin:
891
907
  pec_boundary = False
892
908
  self._logger.info(
893
909
  "Disabling PEC boundary creation. This feature is supported on single pin"
@@ -1134,7 +1150,7 @@ class Components(object):
1134
1150
  self.create_port_on_pins(
1135
1151
  component,
1136
1152
  [EDBPadstackInstance(pin, self._pedb).name],
1137
- [EDBPadstackInstance(ref_pin[0], self._pedb).id],
1153
+ [EDBPadstackInstance(ref_pin[0]._edb_object, self._pedb).id],
1138
1154
  )
1139
1155
  else:
1140
1156
  self._logger.error("Skipping port creation no reference pin found.")
@@ -1606,6 +1622,7 @@ class Components(object):
1606
1622
  >>> edbapp.components.create(pins, "A1New")
1607
1623
 
1608
1624
  """
1625
+ pins = [p._edb_object for p in pins]
1609
1626
  if not component_name:
1610
1627
  component_name = generate_unique_name("Comp_")
1611
1628
  if component_part_name:
@@ -1619,7 +1636,7 @@ class Components(object):
1619
1636
  )
1620
1637
 
1621
1638
  if isinstance(pins[0], EDBPadstackInstance):
1622
- pins = [i._edb_padstackinstance for i in pins]
1639
+ pins = [i._edb_object for i in pins]
1623
1640
  hosting_component_location = pins[0].GetComponent().GetTransform()
1624
1641
  for pin in pins:
1625
1642
  pin.SetIsLayoutPin(True)
@@ -1746,7 +1763,7 @@ class Components(object):
1746
1763
  """
1747
1764
  if not modelname:
1748
1765
  modelname = get_filename_without_extension(modelpath)
1749
- edbComponent = self.get_component_by_name(componentname)
1766
+ edbComponent = self.get_component_by_name(componentname)._edb_object
1750
1767
  if str(edbComponent.EDBHandle) == "0":
1751
1768
  return False
1752
1769
  edbRlcComponentProperty = edbComponent.GetComponentProperty().Clone()
@@ -1958,7 +1975,7 @@ class Components(object):
1958
1975
  >>> edbapp.components.delete("A1")
1959
1976
 
1960
1977
  """
1961
- edb_cmp = self.get_component_by_name(component_name)
1978
+ edb_cmp = self.get_component_by_name(component_name)._edb_object
1962
1979
  if edb_cmp is not None:
1963
1980
  edb_cmp.Delete()
1964
1981
  if edb_cmp in list(self.instances.keys()):
@@ -1989,6 +2006,7 @@ class Components(object):
1989
2006
  """
1990
2007
  edb_cmp = self.get_component_by_name(component_name)
1991
2008
  if edb_cmp is not None:
2009
+ edb_cmp = edb_cmp._edb_object
1992
2010
  rlc_property = edb_cmp.GetComponentProperty().Clone()
1993
2011
  pin_pair_model = rlc_property.GetModel().Clone()
1994
2012
  pprlc = pin_pair_model.GetPinPairRlc(list(pin_pair_model.PinPairs)[0])
@@ -2066,8 +2084,8 @@ class Components(object):
2066
2084
  pin1 = list(cmp.pins.values())[0].pin
2067
2085
  pin_layers = pin1.GetPadstackDef().GetData().GetLayerNames()
2068
2086
  pad_params = self._padstack.get_pad_parameters(pin=pin1, layername=pin_layers[0], pad_type=0)
2069
- _sb_diam = min([self._get_edb_value(val).ToDouble() for val in pad_params[1]])
2070
- sball_diam = _sb_diam
2087
+ _sb_diam = min([abs(self._get_edb_value(val).ToDouble()) for val in pad_params[1]])
2088
+ sball_diam = 0.8 * _sb_diam
2071
2089
  if sball_height:
2072
2090
  sball_height = round(self._edb.utility.Value(sball_height).ToDouble(), 9)
2073
2091
  else:
@@ -2149,7 +2167,7 @@ class Components(object):
2149
2167
  self.instances[componentname].is_enabled = False
2150
2168
  self._logger.info("No parameters passed, component %s is disabled.", componentname)
2151
2169
  return True
2152
- edb_component = self.get_component_by_name(componentname)
2170
+ edb_component = self.get_component_by_name(componentname)._edb_object
2153
2171
  edb_rlc_component_property = self._edb.cell.hierarchy._hierarchy.RLCComponentProperty()
2154
2172
  component_pins = self.get_pin_from_component(componentname)
2155
2173
  pin_number = len(component_pins)
@@ -2322,6 +2340,7 @@ class Components(object):
2322
2340
  unmount_comp_list.remove(refdes)
2323
2341
  comp.edbcomponent.Ungroup(True)
2324
2342
 
2343
+ pinlist = [self._pedb.layout.find_object_by_id(i.GetId()) for i in pinlist]
2325
2344
  self.create(pinlist, refdes, p_layer, part_name)
2326
2345
  self.refresh_components()
2327
2346
  comp = self.instances[refdes]
@@ -2522,6 +2541,10 @@ class Components(object):
2522
2541
  >>> edbapp.components.get_pin_position(pin)
2523
2542
 
2524
2543
  """
2544
+ try:
2545
+ pin = pin._edb_object
2546
+ except:
2547
+ pin = pin
2525
2548
  res, pt_pos, rot_pos = pin.GetPositionAndRotation()
2526
2549
 
2527
2550
  if pin.GetComponent().IsNull():
@@ -92,6 +92,7 @@ class PolygonDataDotNet: # pragma: no cover
92
92
  self._pedb = pedb
93
93
  self.dotnetobj = pedb.edb_api.geometry.api_class.PolygonData
94
94
  self.edb_api = api_object
95
+ self._edb_object = api_object
95
96
 
96
97
  @property
97
98
  def api_class(self): # pragma: no cover
@@ -103,16 +104,6 @@ class PolygonDataDotNet: # pragma: no cover
103
104
  """List of Edb.Geometry.ArcData."""
104
105
  return list(self.edb_api.GetArcData())
105
106
 
106
- def get_points(self):
107
- """Get all points in polygon.
108
-
109
- Returns
110
- -------
111
- list[list[edb_value]]
112
- """
113
-
114
- return [[self._pedb.edb_value(i.X), self._pedb.edb_value(i.Y)] for i in list(self.edb_api.Points)]
115
-
116
107
  def add_point(self, x, y, incremental=False):
117
108
  """Add a point at the end of the point list of the polygon.
118
109
 
@@ -217,19 +208,6 @@ class PolygonDataDotNet: # pragma: no cover
217
208
  class NetDotNet:
218
209
  """Net Objects."""
219
210
 
220
- def __getattr__(self, key):
221
- try:
222
- return super().__getattribute__(key)
223
- except AttributeError:
224
- if self.net_obj and key in dir(self.net_obj):
225
- obj = self.net_obj
226
- else:
227
- obj = self.net
228
- try:
229
- return getattr(obj, key)
230
- except AttributeError:
231
- raise AttributeError("Attribute not present")
232
-
233
211
  def __init__(self, app, net_obj=None):
234
212
  self.net = app._edb.Cell.Net
235
213
 
@@ -21,7 +21,7 @@
21
21
  # SOFTWARE.
22
22
 
23
23
  """Primitive."""
24
- from pyedb.dotnet.edb_core.dotnet.database import NetDotNet, PolygonDataDotNet
24
+ from pyedb.dotnet.edb_core.dotnet.database import NetDotNet
25
25
  from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
26
26
  from pyedb.modeler.geometry_operators import GeometryOperators
27
27
 
@@ -36,8 +36,6 @@ def cast(api, prim_object):
36
36
  prim_type = prim_object.GetPrimitiveType()
37
37
  if prim_type == prim_type.Rectangle:
38
38
  return RectangleDotNet(api, prim_object)
39
- elif prim_type == prim_type.Polygon:
40
- return PolygonDotNet(api, prim_object)
41
39
  elif prim_type == prim_type.Path:
42
40
  return PathDotNet(api, prim_object)
43
41
  elif prim_type == prim_type.Bondwire:
@@ -53,67 +51,17 @@ def cast(api, prim_object):
53
51
  class PrimitiveDotNet:
54
52
  """Base class representing primitive objects."""
55
53
 
56
- def __getattr__(self, key):
57
- try:
58
- return super().__getattribute__(key)
59
- except AttributeError:
60
- if self.prim_obj and key in dir(self.prim_obj):
61
- obj = self.prim_obj
62
- else:
63
- obj = self.api
64
- try:
65
- return getattr(obj, key)
66
- except AttributeError: # pragma: no cover
67
- raise AttributeError("Attribute {} not present".format(key))
68
-
69
54
  def __init__(self, api, prim_object=None):
70
55
  self._app = api
71
56
  self.api = api._edb.Cell.Primitive
72
57
  self.edb_api = api._edb
73
58
  self.prim_obj = prim_object
74
-
75
- @property
76
- def id(self):
77
- return self.prim_obj.GetId()
59
+ self._edb_object = prim_object
78
60
 
79
61
  @property
80
62
  def api_class(self):
81
63
  return self.api
82
64
 
83
- @property
84
- def aedt_name(self):
85
- """Name to be visualized in AEDT.
86
-
87
- Returns
88
- -------
89
- str
90
- Name.
91
- """
92
- from System import String
93
-
94
- val = String("")
95
-
96
- _, name = self.prim_obj.GetProductProperty(self._app._edb.ProductId.Designer, 1, val)
97
- name = str(name).strip("'")
98
- if name == "":
99
- if str(self.primitive_type) == "Path":
100
- ptype = "line"
101
- elif str(self.primitive_type) == "Rectangle":
102
- ptype = "rect"
103
- elif str(self.primitive_type) == "Polygon":
104
- ptype = "poly"
105
- elif str(self.primitive_type) == "Bondwire":
106
- ptype = "bwr"
107
- else:
108
- ptype = str(self.primitive_type).lower()
109
- name = "{}_{}".format(ptype, self.id)
110
- self.prim_obj.SetProductProperty(self._app._edb.ProductId.Designer, 1, name)
111
- return name
112
-
113
- @aedt_name.setter
114
- def aedt_name(self, value):
115
- self.prim_obj.SetProductProperty(self._app._edb.ProductId.Designer, 1, value)
116
-
117
65
  @property
118
66
  def api_object(self):
119
67
  return self.prim_obj
@@ -130,10 +78,6 @@ class PrimitiveDotNet:
130
78
  def circle(self):
131
79
  return CircleDotNet(self._app)
132
80
 
133
- @property
134
- def polygon(self):
135
- return PolygonDotNet(self._app)
136
-
137
81
  @property
138
82
  def text(self):
139
83
  return TextDotNet(self._app)
@@ -160,15 +104,6 @@ class PrimitiveDotNet:
160
104
  except TypeError:
161
105
  self._app.logger.error("Error setting net object")
162
106
 
163
- @property
164
- def polygon_data(self):
165
- """:class:`pyedb.dotnet.edb_core.dotnet.database.PolygonDataDotNet`: Outer contour of the Polygon object."""
166
- return PolygonDataDotNet(self._app, self.prim_obj.GetPolygonData())
167
-
168
- @polygon_data.setter
169
- def polygon_data(self, poly):
170
- return self.prim_obj.SetPolygonData(poly)
171
-
172
107
  @property
173
108
  def primitive_type(self):
174
109
  """:class:`PrimitiveType`: Primitive type of the primitive.
@@ -583,6 +518,7 @@ class CircleDotNet(PrimitiveDotNet):
583
518
 
584
519
  def __init__(self, api, prim_obj=None):
585
520
  PrimitiveDotNet.__init__(self, api, prim_obj)
521
+ self._edb_object = prim_obj
586
522
 
587
523
  def create(self, layout, layer, net, center_x, center_y, radius):
588
524
  """Create a circle.
@@ -772,44 +708,6 @@ class TextDotNet(PrimitiveDotNet):
772
708
  )
773
709
 
774
710
 
775
- class PolygonDotNet(PrimitiveDotNet):
776
- """Class representing a polygon object."""
777
-
778
- def __init__(self, api, prim_obj=None):
779
- PrimitiveDotNet.__init__(self, api, prim_obj)
780
-
781
- def create(self, layout, layer, net, polygon_data):
782
- """Create a polygon.
783
-
784
- Parameters
785
- ----------
786
- layout : :class:`Layout <ansys.edb.layout.Layout>`
787
- Layout the polygon will be in.
788
- layer : str or :class:`Layer <ansys.edb.layer.Layer>`
789
- Layer this Polygon will be in.
790
- net : str or :class:`Net <ansys.edb.net.Net>` or None
791
- Net of the Polygon object.
792
- polygon_data : :class:`PolygonData <ansys.edb.geometry.PolygonData>`
793
- The outer contour of the Polygon.
794
-
795
- Returns
796
- -------
797
- :class:`pyedb.dotnet.edb_core.dotnet.primitive.PolygonDotNet`
798
- Polygon object created.
799
- """
800
- if isinstance(net, NetDotNet):
801
- net = net.api_object
802
- return PolygonDotNet(self._app, self.api.Polygon.Create(layout, layer, net, polygon_data))
803
-
804
- @property
805
- def can_be_zone_primitive(self):
806
- """:obj:`bool`: If a polygon can be a zone.
807
-
808
- Read-Only.
809
- """
810
- return True
811
-
812
-
813
711
  class PathDotNet(PrimitiveDotNet):
814
712
  """Class representing a path object."""
815
713
 
@@ -866,40 +764,6 @@ class PathDotNet(PrimitiveDotNet):
866
764
  polygon_data = self._edb.geometry.polygon_data.dotnetobj(convert_py_list_to_net_list(points), False)
867
765
  self.prim_obj.SetCenterLine(polygon_data)
868
766
 
869
- @property
870
- def end_cap_style(self):
871
- """Get path end cap styles.
872
-
873
- Returns
874
- -------
875
- tuple[
876
- :class:`PathEndCapType`,
877
- :class:`PathEndCapType`
878
- ]
879
-
880
- Returns a tuple of the following format:
881
-
882
- **(end_cap1, end_cap2)**
883
-
884
- **end_cap1** : End cap style of path start end cap.
885
-
886
- **end_cap2** : End cap style of path end end cap.
887
- """
888
- return self._edb_object.GetEndCapStyle()
889
-
890
- @end_cap_style.setter
891
- def end_cap_style(self, end_cap1, end_cap2):
892
- """Set path end cap styles.
893
-
894
- Parameters
895
- ----------
896
- end_cap1: :class:`PathEndCapType`
897
- End cap style of path start end cap.
898
- end_cap2: :class:`PathEndCapType`
899
- End cap style of path end end cap.
900
- """
901
- self._edb_object.SetEndCapStyle(end_cap1, end_cap2)
902
-
903
767
  @property
904
768
  def get_clip_info(self):
905
769
  """Get data used to clip the path.
@@ -27,7 +27,6 @@ from pyedb.dotnet.edb_core.dotnet.database import (
27
27
  NetDotNet,
28
28
  )
29
29
  from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
30
- from pyedb.dotnet.edb_core.edb_data.primitives_data import cast
31
30
 
32
31
 
33
32
  class EDBNetsData(NetDotNet):
@@ -43,15 +42,6 @@ class EDBNetsData(NetDotNet):
43
42
  >>> edb_net.name # EDB Object Property
44
43
  """
45
44
 
46
- def __getattr__(self, key):
47
- try:
48
- return self[key]
49
- except:
50
- try:
51
- return getattr(self.net_object, key)
52
- except AttributeError:
53
- raise AttributeError("Attribute not present")
54
-
55
45
  def __init__(self, raw_net, core_app):
56
46
  self._app = core_app
57
47
  self._core_components = core_app.components
@@ -68,7 +58,7 @@ class EDBNetsData(NetDotNet):
68
58
  -------
69
59
  list of :class:`pyedb.dotnet.edb_core.edb_data.primitives_data.EDBPrimitives`
70
60
  """
71
- return [cast(i, self._app) for i in self.net_object.Primitives]
61
+ return [self._app.layout.find_object_by_id(i.GetId()) for i in self.net_object.Primitives]
72
62
 
73
63
  @property
74
64
  def padstack_instances(self):
@@ -26,7 +26,7 @@ import re
26
26
  import warnings
27
27
 
28
28
  from pyedb.dotnet.clr_module import String
29
- from pyedb.dotnet.edb_core.cell.primitive import Primitive
29
+ from pyedb.dotnet.edb_core.cell.primitive.primitive import Primitive
30
30
  from pyedb.dotnet.edb_core.dotnet.database import PolygonDataDotNet
31
31
  from pyedb.dotnet.edb_core.edb_data.edbvalue import EdbValue
32
32
  from pyedb.dotnet.edb_core.general import PadGeometryTpe, convert_py_list_to_net_list
@@ -821,11 +821,10 @@ class EDBPadstack(object):
821
821
  pos = via.position
822
822
  started = False
823
823
  if len(self.pad_by_layer[self.via_start_layer].parameters) == 0:
824
- self._edb.cell.primitive.polygon.create(
825
- layout,
826
- self.via_start_layer,
827
- via._edb_padstackinstance.GetNet(),
828
- self.pad_by_layer[self.via_start_layer].polygon_data.edb_api,
824
+ self._ppadstack._pedb.modeler.create_polygon(
825
+ self.pad_by_layer[self.via_start_layer].polygon_data._edb_object,
826
+ layer_name=self.via_start_layer,
827
+ net_name=via._edb_padstackinstance.GetNet().GetName(),
829
828
  )
830
829
  else:
831
830
  self._edb.cell.primitive.circle.create(
@@ -837,11 +836,10 @@ class EDBPadstack(object):
837
836
  self._get_edb_value(self.pad_by_layer[self.via_start_layer].parameters_values[0] / 2),
838
837
  )
839
838
  if len(self.pad_by_layer[self.via_stop_layer].parameters) == 0:
840
- self._edb.cell.primitive.polygon.create(
841
- layout,
842
- self.via_stop_layer,
843
- via._edb_padstackinstance.GetNet(),
844
- self.pad_by_layer[self.via_stop_layer].polygon_data.edb_api,
839
+ self._ppadstack._pedb.modeler.create_polygon(
840
+ self.pad_by_layer[self.via_stop_layer].polygon_data._edb_object,
841
+ layer_name=self.via_stop_layer,
842
+ net_name=via._edb_padstackinstance.GetNet().GetName(),
845
843
  )
846
844
  else:
847
845
  self._edb.cell.primitive.circle.create(
@@ -1027,7 +1025,7 @@ class EDBPadstack(object):
1027
1025
  None,
1028
1026
  None,
1029
1027
  )
1030
- padstack_instance.SetIsLayoutPin(via.is_pin)
1028
+ padstack_instance._edb_object.SetIsLayoutPin(via.is_pin)
1031
1029
  i += 1
1032
1030
  via.delete()
1033
1031
  self._ppadstack._pedb.logger.info("Created {} new microvias.".format(i))
@@ -2058,18 +2056,6 @@ class EDBPadstackInstance(Primitive):
2058
2056
  created_polygon = self._pedb.modeler.create_polygon(path, layer_name)
2059
2057
  return created_polygon
2060
2058
 
2061
- def get_connected_object_id_set(self):
2062
- """Produce a list of all geometries physically connected to a given layout object.
2063
-
2064
- Returns
2065
- -------
2066
- list
2067
- Found connected objects IDs with Layout object.
2068
- """
2069
- layoutInst = self._edb_padstackinstance.GetLayout().GetLayoutInstance()
2070
- layoutObjInst = self.object_instance
2071
- return [loi.GetLayoutObj().GetId() for loi in layoutInst.GetConnectedObjects(layoutObjInst).Items]
2072
-
2073
2059
  def get_reference_pins(self, reference_net="GND", search_radius=5e-3, max_limit=0, component_only=True):
2074
2060
  """Search for reference pins using given criteria.
2075
2061