pyedb 0.50.0__py3-none-any.whl → 0.50.1__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 (62) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/dotnet/database/cell/hierarchy/component.py +3 -3
  3. pyedb/dotnet/database/edb_data/padstacks_data.py +13 -0
  4. pyedb/grpc/database/components.py +494 -652
  5. pyedb/grpc/database/control_file.py +458 -149
  6. pyedb/grpc/database/definition/component_def.py +17 -14
  7. pyedb/grpc/database/definition/materials.py +27 -27
  8. pyedb/grpc/database/definition/package_def.py +8 -8
  9. pyedb/grpc/database/definition/padstack_def.py +31 -33
  10. pyedb/grpc/database/geometry/arc_data.py +5 -5
  11. pyedb/grpc/database/geometry/point_3d_data.py +3 -3
  12. pyedb/grpc/database/geometry/polygon_data.py +5 -5
  13. pyedb/grpc/database/hfss.py +397 -395
  14. pyedb/grpc/database/hierarchy/component.py +58 -57
  15. pyedb/grpc/database/hierarchy/pin_pair_model.py +6 -6
  16. pyedb/grpc/database/hierarchy/pingroup.py +13 -11
  17. pyedb/grpc/database/hierarchy/s_parameter_model.py +1 -1
  18. pyedb/grpc/database/hierarchy/spice_model.py +1 -1
  19. pyedb/grpc/database/layers/layer.py +2 -2
  20. pyedb/grpc/database/layers/stackup_layer.py +26 -23
  21. pyedb/grpc/database/layout/layout.py +12 -12
  22. pyedb/grpc/database/layout/voltage_regulator.py +8 -8
  23. pyedb/grpc/database/modeler.py +248 -245
  24. pyedb/grpc/database/net/differential_pair.py +4 -4
  25. pyedb/grpc/database/net/extended_net.py +7 -8
  26. pyedb/grpc/database/net/net.py +57 -46
  27. pyedb/grpc/database/nets.py +139 -122
  28. pyedb/grpc/database/padstacks.py +174 -190
  29. pyedb/grpc/database/ports/ports.py +23 -17
  30. pyedb/grpc/database/primitive/padstack_instance.py +45 -30
  31. pyedb/grpc/database/primitive/path.py +6 -6
  32. pyedb/grpc/database/primitive/polygon.py +9 -9
  33. pyedb/grpc/database/primitive/primitive.py +21 -21
  34. pyedb/grpc/database/primitive/rectangle.py +1 -1
  35. pyedb/grpc/database/simulation_setup/hfss_advanced_settings.py +1 -1
  36. pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
  37. pyedb/grpc/database/simulation_setup/hfss_settings_options.py +1 -1
  38. pyedb/grpc/database/simulation_setup/hfss_simulation_settings.py +6 -6
  39. pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +2 -2
  40. pyedb/grpc/database/simulation_setup/raptor_x_simulation_settings.py +2 -2
  41. pyedb/grpc/database/simulation_setup/raptor_x_simulation_setup.py +1 -1
  42. pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +3 -3
  43. pyedb/grpc/database/siwave.py +166 -214
  44. pyedb/grpc/database/stackup.py +365 -292
  45. pyedb/grpc/database/terminal/bundle_terminal.py +12 -12
  46. pyedb/grpc/database/terminal/edge_terminal.py +6 -5
  47. pyedb/grpc/database/terminal/padstack_instance_terminal.py +13 -13
  48. pyedb/grpc/database/terminal/pingroup_terminal.py +12 -12
  49. pyedb/grpc/database/terminal/point_terminal.py +6 -6
  50. pyedb/grpc/database/terminal/terminal.py +26 -26
  51. pyedb/grpc/database/utility/heat_sink.py +5 -5
  52. pyedb/grpc/database/utility/hfss_extent_info.py +21 -21
  53. pyedb/grpc/database/utility/layout_statistics.py +13 -13
  54. pyedb/grpc/database/utility/rlc.py +3 -3
  55. pyedb/grpc/database/utility/sources.py +1 -1
  56. pyedb/grpc/database/utility/sweep_data_distribution.py +1 -1
  57. pyedb/grpc/edb.py +422 -672
  58. {pyedb-0.50.0.dist-info → pyedb-0.50.1.dist-info}/METADATA +1 -1
  59. {pyedb-0.50.0.dist-info → pyedb-0.50.1.dist-info}/RECORD +61 -62
  60. pyedb/grpc/database/utility/simulation_configuration.py +0 -3305
  61. {pyedb-0.50.0.dist-info → pyedb-0.50.1.dist-info}/LICENSE +0 -0
  62. {pyedb-0.50.0.dist-info → pyedb-0.50.1.dist-info}/WHEEL +0 -0
@@ -51,7 +51,7 @@ from pyedb.grpc.database.utility.layout_statistics import LayoutStatistics
51
51
 
52
52
 
53
53
  class Modeler(object):
54
- """Manages EDB methods for primitives management accessible from `Edb.modeler` property.
54
+ """Manages EDB methods for primitives management accessible from `Edb.modeler`.
55
55
 
56
56
  Examples
57
57
  --------
@@ -61,16 +61,22 @@ class Modeler(object):
61
61
  """
62
62
 
63
63
  def __getitem__(self, name):
64
- """Get a layout instance from the Edb project.
64
+ """Get a primitive instance by name or ID.
65
65
 
66
66
  Parameters
67
67
  ----------
68
- name : str, int
68
+ name : str or int
69
+ Name or ID of the primitive.
69
70
 
70
71
  Returns
71
72
  -------
72
- :class:`pyedb.dotnet.database.cell.hierarchy.component.EDBComponent`
73
+ :class:`pyedb.dotnet.database.cell.hierarchy.component.EDBComponent` or None
74
+ Primitive instance if found, None otherwise.
73
75
 
76
+ Raises
77
+ ------
78
+ TypeError
79
+ If name is not str or int.
74
80
  """
75
81
  for i in self.primitives:
76
82
  if (
@@ -83,33 +89,74 @@ class Modeler(object):
83
89
  return
84
90
 
85
91
  def __init__(self, p_edb):
92
+ """Initialize Modeler instance."""
86
93
  self._pedb = p_edb
87
94
  self._primitives = []
88
95
 
89
96
  @property
90
97
  def _edb(self):
98
+ """EDB API object.
99
+
100
+ Returns
101
+ -------
102
+ object
103
+ EDB API object.
104
+ """
91
105
  return self._pedb
92
106
 
93
107
  @property
94
108
  def _logger(self):
95
- """Logger."""
109
+ """Logger instance.
110
+
111
+ Returns
112
+ -------
113
+ :class:`logger.Logger`
114
+ Logger instance.
115
+ """
96
116
  return self._pedb.logger
97
117
 
98
118
  @property
99
119
  def _active_layout(self):
120
+ """Active layout.
121
+
122
+ Returns
123
+ -------
124
+ :class:`ansys.edb.core.layout.Layout`
125
+ Active layout object.
126
+ """
100
127
  return self._pedb.active_layout
101
128
 
102
129
  @property
103
130
  def _layout(self):
131
+ """Current layout.
132
+
133
+ Returns
134
+ -------
135
+ :class:`ansys.edb.core.layout.Layout`
136
+ Layout object.
137
+ """
104
138
  return self._pedb.layout
105
139
 
106
140
  @property
107
141
  def _cell(self):
142
+ """Active cell.
143
+
144
+ Returns
145
+ -------
146
+ :class:`ansys.edb.core.hierarchy.Cell`
147
+ Active cell object.
148
+ """
108
149
  return self._pedb.active_cell
109
150
 
110
151
  @property
111
152
  def db(self):
112
- """Db object."""
153
+ """Database object.
154
+
155
+ Returns
156
+ -------
157
+ :class:`ansys.edb.core.database.Database`
158
+ Database object.
159
+ """
113
160
  return self._pedb.active_db
114
161
 
115
162
  @property
@@ -119,22 +166,22 @@ class Modeler(object):
119
166
  Returns
120
167
  -------
121
168
  dict
122
- Dictionary of layers.
169
+ Dictionary of layers with layer names as keys.
123
170
  """
124
171
  return self._pedb.stackup.layers
125
172
 
126
173
  def get_primitive(self, primitive_id):
127
- """Retrieve primitive from give id.
174
+ """Retrieve primitive by ID.
128
175
 
129
176
  Parameters
130
177
  ----------
131
178
  primitive_id : int
132
- Primitive id.
179
+ Primitive ID.
133
180
 
134
181
  Returns
135
182
  -------
136
- list of :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
137
- List of primitives.
183
+ :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive` or bool
184
+ Primitive object if found, False otherwise.
138
185
  """
139
186
  for p in self._layout.primitives:
140
187
  if p.edb_uid == primitive_id:
@@ -164,23 +211,23 @@ class Modeler(object):
164
211
 
165
212
  @property
166
213
  def primitives(self):
167
- """Primitives.
214
+ """All primitives in the layout.
168
215
 
169
216
  Returns
170
217
  -------
171
- list of :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
172
- List of primitives.
218
+ list
219
+ List of :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive` objects.
173
220
  """
174
221
  return [self.__mapping_primitive_type(prim) for prim in self._pedb.layout.primitives]
175
222
 
176
223
  @property
177
224
  def polygons_by_layer(self):
178
- """Primitives with layer names as keys.
225
+ """Primitives organized by layer names.
179
226
 
180
227
  Returns
181
228
  -------
182
229
  dict
183
- Dictionary of primitives with layer names as keys.
230
+ Dictionary where keys are layer names and values are lists of polygons.
184
231
  """
185
232
  _primitives_by_layer = {}
186
233
  for lay in self.layers:
@@ -189,12 +236,12 @@ class Modeler(object):
189
236
 
190
237
  @property
191
238
  def primitives_by_net(self):
192
- """Primitives with net names as keys.
239
+ """Primitives organized by net names.
193
240
 
194
241
  Returns
195
242
  -------
196
243
  dict
197
- Dictionary of primitives with nat names as keys.
244
+ Dictionary where keys are net names and values are lists of primitives.
198
245
  """
199
246
  _prim_by_net = {}
200
247
  for net, net_obj in self._pedb.nets.nets.items():
@@ -203,12 +250,12 @@ class Modeler(object):
203
250
 
204
251
  @property
205
252
  def primitives_by_layer(self):
206
- """Primitives with layer names as keys.
253
+ """Primitives organized by layer names.
207
254
 
208
255
  Returns
209
256
  -------
210
257
  dict
211
- Dictionary of primitives with layer names as keys.
258
+ Dictionary where keys are layer names and values are lists of primitives.
212
259
  """
213
260
  _primitives_by_layer = {}
214
261
  for lay in self.layers:
@@ -226,64 +273,62 @@ class Modeler(object):
226
273
 
227
274
  @property
228
275
  def rectangles(self):
229
- """Rectangles.
276
+ """All rectangle primitives.
230
277
 
231
278
  Returns
232
279
  -------
233
- list of :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
234
- List of rectangles.
235
-
280
+ list
281
+ List of :class:`pyedb.dotnet.database.edb_data.primitives_data.Rectangle` objects.
236
282
  """
237
283
  return [Rectangle(self._pedb, i) for i in self.primitives if i.type == "rectangle"]
238
284
 
239
285
  @property
240
286
  def circles(self):
241
- """Circles.
287
+ """All circle primitives.
242
288
 
243
289
  Returns
244
290
  -------
245
- list of :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
246
- List of circles.
247
-
291
+ list
292
+ List of :class:`pyedb.dotnet.database.edb_data.primitives_data.Circle` objects.
248
293
  """
249
294
  return [Circle(self._pedb, i) for i in self.primitives if i.type == "circle"]
250
295
 
251
296
  @property
252
297
  def paths(self):
253
- """Paths.
298
+ """All path primitives.
254
299
 
255
300
  Returns
256
301
  -------
257
- list of :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
258
- List of paths.
302
+ list
303
+ List of :class:`pyedb.dotnet.database.edb_data.primitives_data.Path` objects.
259
304
  """
260
305
  return [Path(self._pedb, i) for i in self.primitives if i.type == "path"]
261
306
 
262
307
  @property
263
308
  def polygons(self):
264
- """Polygons.
309
+ """All polygon primitives.
265
310
 
266
311
  Returns
267
312
  -------
268
- list of :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
269
- List of polygons.
313
+ list
314
+ List of :class:`pyedb.dotnet.database.edb_data.primitives_data.Polygon` objects.
270
315
  """
271
316
  return [Polygon(self._pedb, i) for i in self.primitives if i.type == "polygon"]
272
317
 
273
318
  def get_polygons_by_layer(self, layer_name, net_list=None):
274
- """Retrieve polygons by a layer.
319
+ """Retrieve polygons by layer.
275
320
 
276
321
  Parameters
277
322
  ----------
278
323
  layer_name : str
279
- Name of the layer.
324
+ Layer name.
280
325
  net_list : list, optional
281
- List of net names.
326
+ List of net names to filter by.
282
327
 
283
328
  Returns
284
329
  -------
285
330
  list
286
- List of primitive objects.
331
+ List of polygon objects.
287
332
  """
288
333
  objinst = []
289
334
  for el in self.polygons:
@@ -296,23 +341,26 @@ class Modeler(object):
296
341
  return objinst
297
342
 
298
343
  def get_primitive_by_layer_and_point(self, point=None, layer=None, nets=None):
299
- """Return primitive given coordinate point [x, y], layer name and nets.
344
+ """Get primitive at specified point on layer.
300
345
 
301
346
  Parameters
302
347
  ----------
303
- point : list
304
- Coordinate [x, y]
305
-
306
- layer : list or str, optional
307
- list of layer name or layer name applied on filter.
308
-
309
- nets : list or str, optional
310
- list of net name or single net name applied on filter
348
+ point : list, optional
349
+ [x, y] coordinate point.
350
+ layer : str or list, optional
351
+ Layer name(s) to filter by.
352
+ nets : str or list, optional
353
+ Net name(s) to filter by.
311
354
 
312
355
  Returns
313
356
  -------
314
- list of :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
315
- List of primitives, polygons, paths and rectangles.
357
+ list
358
+ List of primitive objects at the point.
359
+
360
+ Raises
361
+ ------
362
+ ValueError
363
+ If point is invalid.
316
364
  """
317
365
  from ansys.edb.core.primitive.circle import Circle as GrpcCircle
318
366
  from ansys.edb.core.primitive.path import Path as GrpcPath
@@ -358,22 +406,17 @@ class Modeler(object):
358
406
 
359
407
  @staticmethod
360
408
  def get_polygon_bounding_box(polygon):
361
- """Retrieve a polygon bounding box.
409
+ """Get bounding box of polygon.
362
410
 
363
411
  Parameters
364
412
  ----------
365
- polygon :
366
- Name of the polygon.
413
+ polygon : :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
414
+ Polygon primitive.
367
415
 
368
416
  Returns
369
417
  -------
370
418
  list
371
- List of bounding box coordinates in the format ``[-x, -y, +x, +y]``.
372
-
373
- Examples
374
- --------
375
- >>> poly = database.modeler.get_polygons_by_layer("GND")
376
- >>> bounding = database.modeler.get_polygon_bounding_box(poly[0])
419
+ Bounding box coordinates [min_x, min_y, max_x, max_y].
377
420
  """
378
421
  bounding_box = polygon.polygon_data.bbox()
379
422
  return [
@@ -385,31 +428,17 @@ class Modeler(object):
385
428
 
386
429
  @staticmethod
387
430
  def get_polygon_points(polygon):
388
- """Retrieve polygon points.
389
-
390
- .. note::
391
- For arcs, one point is returned.
431
+ """Get points defining a polygon.
392
432
 
393
433
  Parameters
394
434
  ----------
395
- polygon :
396
- class: `dotnet.database.edb_data.primitives_data.Primitive`
435
+ polygon : :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
436
+ Polygon primitive.
397
437
 
398
438
  Returns
399
439
  -------
400
440
  list
401
- List of tuples. Each tuple provides x, y point coordinate. If the length of two consecutives tuples
402
- from the list equals 2, a segment is defined. The first tuple defines the starting point while the second
403
- tuple the ending one. If the length of one tuple equals one, that means a polyline is defined and the value
404
- is giving the arc height. Therefore to polyline is defined as starting point for the tuple
405
- before in the list, the current one the arc height and the tuple after the polyline ending point.
406
-
407
- Examples
408
- --------
409
-
410
- >>> poly = database.modeler.get_polygons_by_layer("GND")
411
- >>> points = database.modeler.get_polygon_points(poly[0])
412
-
441
+ List of point coordinates.
413
442
  """
414
443
  points = []
415
444
  i = 0
@@ -432,26 +461,23 @@ class Modeler(object):
432
461
  return points
433
462
 
434
463
  def parametrize_polygon(self, polygon, selection_polygon, offset_name="offsetx", origin=None):
435
- """Parametrize pieces of a polygon based on another polygon.
464
+ """Parametrize polygon points based on another polygon.
436
465
 
437
466
  Parameters
438
467
  ----------
439
- polygon :
440
- Name of the polygon.
441
- selection_polygon :
442
- Polygon to use as a filter.
468
+ polygon : :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
469
+ Polygon to parametrize.
470
+ selection_polygon : :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
471
+ Polygon used for selection.
443
472
  offset_name : str, optional
444
- Name of the offset to create. The default is ``"offsetx"``.
473
+ Name of offset parameter.
445
474
  origin : list, optional
446
- List of the X and Y origins, which impacts the vector
447
- computation and is needed to determine expansion direction.
448
- The default is ``None``, in which case the vector is
449
- computed from the polygon's center.
475
+ [x, y] origin point for vector calculation.
450
476
 
451
477
  Returns
452
478
  -------
453
479
  bool
454
- ``True`` when successful, ``False`` when failed.
480
+ True if successful, False otherwise.
455
481
  """
456
482
 
457
483
  def calc_slope(point, origin):
@@ -611,34 +637,29 @@ class Modeler(object):
611
637
  end_cap_style="Round",
612
638
  corner_style="Round",
613
639
  ):
614
- """
615
- Create a trace based on a list of points.
640
+ """Create trace path.
616
641
 
617
642
  Parameters
618
643
  ----------
619
644
  path_list : list
620
- List of points.
645
+ List of [x,y] points.
621
646
  layer_name : str
622
- Name of the layer on which to create the path.
647
+ Layer name.
623
648
  width : float, optional
624
- Width of the path. The default is ``1``.
649
+ Trace width.
625
650
  net_name : str, optional
626
- Name of the net. The default is ``""``.
651
+ Associated net name.
627
652
  start_cap_style : str, optional
628
- Style of the cap at its start. Options are ``"Round"``,
629
- ``"Extended",`` and ``"Flat"``. The default is
630
- ``"Round"``.
653
+ Start cap style ("Round", "Extended", "Flat").
631
654
  end_cap_style : str, optional
632
- Style of the cap at its end. Options are ``"Round"``,
633
- ``"Extended",`` and ``"Flat"``. The default is
634
- ``"Round"``.
655
+ End cap style ("Round", "Extended", "Flat").
635
656
  corner_style : str, optional
636
- Style of the corner. Options are ``"Round"``,
637
- ``"Sharp"`` and ``"Mitered"``. The default is ``"Round"``.
657
+ Corner style ("Round", "Sharp", "Mitered").
638
658
 
639
659
  Returns
640
660
  -------
641
- :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
661
+ :class:`pyedb.dotnet.database.edb_data.primitives_data.Path` or bool
662
+ Path object if created, False otherwise.
642
663
  """
643
664
 
644
665
  primitive = self._create_path(
@@ -654,25 +675,23 @@ class Modeler(object):
654
675
  return primitive
655
676
 
656
677
  def create_polygon(self, points, layer_name, voids=[], net_name=""):
657
- """Create a polygon based on a list of points and voids.
678
+ """Create polygon primitive.
658
679
 
659
680
  Parameters
660
681
  ----------
661
- points : list of points or PolygonData.
662
- - [x, y] coordinate
663
- - [x, y, height] for an arc with specific height (between previous point and actual point)
664
- - [x, y, rotation, xc, yc] for an arc given a point, rotation and center.
682
+ points : list or :class:`ansys.edb.core.geometry.polygon_data.PolygonData`
683
+ Polygon points or PolygonData object.
665
684
  layer_name : str
666
- Name of the layer on which to create the polygon.
685
+ Layer name.
667
686
  voids : list, optional
668
- List of shape objects for voids or points that creates the shapes. The default is``[]``.
687
+ List of void shapes or points.
669
688
  net_name : str, optional
670
- Name of the net. The default is ``""``.
689
+ Associated net name.
671
690
 
672
691
  Returns
673
692
  -------
674
- bool, :class:`dotnet.database.edb_data.primitives.Primitive`
675
- Polygon when successful, ``False`` when failed.
693
+ :class:`pyedb.dotnet.database.edb_data.primitives_data.Polygon` or bool
694
+ Polygon object if created, False otherwise.
676
695
  """
677
696
  net = self._pedb.nets.find_or_create_net(net_name)
678
697
  if isinstance(points, list):
@@ -718,36 +737,35 @@ class Modeler(object):
718
737
  corner_radius="0mm",
719
738
  rotation="0deg",
720
739
  ):
721
- """Create rectangle.
740
+ """Create rectangle primitive.
722
741
 
723
742
  Parameters
724
743
  ----------
725
744
  layer_name : str
726
- Name of the layer on which to create the rectangle.
727
- net_name : str
728
- Name of the net. The default is ``""``.
729
- lower_left_point : list
730
- Lower left point when ``representation_type="lower_left_upper_right"``. The default is ``""``.
731
- upper_right_point : list
732
- Upper right point when ``representation_type="lower_left_upper_right"``. The default is ``""``.
733
- center_point : list
734
- Center point when ``representation_type="center_width_height"``. The default is ``""``.
735
- width : str
736
- Width of the rectangle when ``representation_type="center_width_height"``. The default is ``""``.
737
- height : str
738
- Height of the rectangle when ``representation_type="center_width_height"``. The default is ``""``.
745
+ Layer name.
746
+ net_name : str, optional
747
+ Associated net name.
748
+ lower_left_point : list, optional
749
+ [x,y] lower left point.
750
+ upper_right_point : list, optional
751
+ [x,y] upper right point.
752
+ center_point : list, optional
753
+ [x,y] center point.
754
+ width : str or float, optional
755
+ Rectangle width.
756
+ height : str or float, optional
757
+ Rectangle height.
739
758
  representation_type : str, optional
740
- Type of the rectangle representation. The default is ``lower_left_upper_right``. Options are
741
- ``"lower_left_upper_right"`` and ``"center_width_height"``.
759
+ "lower_left_upper_right" or "center_width_height".
742
760
  corner_radius : str, optional
743
- Radius of the rectangle corner. The default is ``"0mm"``.
761
+ Corner radius with units.
744
762
  rotation : str, optional
745
- Rotation of the rectangle. The default is ``"0deg"``.
763
+ Rotation angle with units.
746
764
 
747
765
  Returns
748
766
  -------
749
- :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
750
- Rectangle when successful, ``False`` when failed.
767
+ :class:`pyedb.dotnet.database.edb_data.primitives_data.Rectangle` or bool
768
+ Rectangle object if created, False otherwise.
751
769
  """
752
770
  edb_net = self._pedb.nets.find_or_create_net(net_name)
753
771
  if representation_type == "lower_left_upper_right":
@@ -797,26 +815,25 @@ class Modeler(object):
797
815
  return False
798
816
 
799
817
  def create_circle(self, layer_name, x, y, radius, net_name=""):
800
- """Create a circle on a specified layer.
818
+ """Create circle primitive.
801
819
 
802
820
  Parameters
803
821
  ----------
804
822
  layer_name : str
805
- Name of the layer.
823
+ Layer name.
806
824
  x : float
807
- Position on the X axis.
825
+ Center x-coordinate.
808
826
  y : float
809
- Position on the Y axis.
827
+ Center y-coordinate.
810
828
  radius : float
811
- Radius of the circle.
829
+ Circle radius.
812
830
  net_name : str, optional
813
- Name of the net. The default is ``None``, in which case the
814
- default name is assigned.
831
+ Associated net name.
815
832
 
816
833
  Returns
817
834
  -------
818
- :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
819
- Objects of the circle created when successful.
835
+ :class:`pyedb.dotnet.database.edb_data.primitives_data.Circle` or bool
836
+ Circle object if created, False otherwise.
820
837
  """
821
838
  edb_net = self._pedb.nets.find_or_create_net(net_name)
822
839
 
@@ -833,22 +850,17 @@ class Modeler(object):
833
850
  return False
834
851
 
835
852
  def delete_primitives(self, net_names):
836
- """Delete primitives by net names.
853
+ """Delete primitives by net name(s).
837
854
 
838
855
  Parameters
839
856
  ----------
840
- net_names : str, list
841
- Names of the nets to delete.
857
+ net_names : str or list
858
+ Net name(s).
842
859
 
843
860
  Returns
844
861
  -------
845
862
  bool
846
- ``True`` when successful, ``False`` when failed.
847
-
848
- References
849
- ----------
850
-
851
- >>> Edb.modeler.delete_primitives(net_names=["GND"])
863
+ True if successful, False otherwise.
852
864
  """
853
865
  if not isinstance(net_names, list): # pragma: no cover
854
866
  net_names = [net_names]
@@ -859,22 +871,23 @@ class Modeler(object):
859
871
  return True
860
872
 
861
873
  def get_primitives(self, net_name=None, layer_name=None, prim_type=None, is_void=False):
862
- """Get primitives by conditions.
874
+ """Get primitives with filtering.
863
875
 
864
876
  Parameters
865
877
  ----------
866
878
  net_name : str, optional
867
- Set filter on net_name. Default is `None`.
879
+ Net name filter.
868
880
  layer_name : str, optional
869
- Set filter on layer_name. Default is `None`.
870
- prim_type : str, optional
871
- Set filter on primitive type. Default is `None`.
872
- is_void : bool
873
- Set filter on is_void. Default is 'False'
881
+ Layer name filter.
882
+ prim_type : str, optional
883
+ Primitive type filter.
884
+ is_void : bool, optional
885
+ Void primitive filter.
886
+
874
887
  Returns
875
888
  -------
876
889
  list
877
- List of filtered primitives
890
+ List of filtered primitives.
878
891
  """
879
892
  prims = []
880
893
  for el in self.primitives:
@@ -895,12 +908,12 @@ class Modeler(object):
895
908
  return prims
896
909
 
897
910
  def fix_circle_void_for_clipping(self):
898
- """Fix issues when circle void are clipped due to a bug in EDB.
911
+ """Fix circle void clipping issues.
899
912
 
900
913
  Returns
901
914
  -------
902
915
  bool
903
- ``True`` when successful, ``False`` when no changes were applied.
916
+ True if changes made, False otherwise.
904
917
  """
905
918
  for void_circle in self.circles:
906
919
  if not void_circle.is_void:
@@ -922,16 +935,20 @@ class Modeler(object):
922
935
 
923
936
  @staticmethod
924
937
  def add_void(shape, void_shape):
925
- """Add a void into a shape.
938
+ """Add void to shape.
926
939
 
927
940
  Parameters
928
941
  ----------
929
- shape : Polygon
930
- Shape of the main object.
931
- void_shape : list, Path
932
- Shape of the voids.
942
+ shape : :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
943
+ Main shape.
944
+ void_shape : list or :class:`pyedb.dotnet.database.edb_data.primitives_data.Primitive`
945
+ Void shape(s).
946
+
947
+ Returns
948
+ -------
949
+ bool
950
+ True if successful, False otherwise.
933
951
  """
934
- flag = False
935
952
  if not isinstance(void_shape, list):
936
953
  void_shape = [void_shape]
937
954
  for void in void_shape:
@@ -945,25 +962,6 @@ class Modeler(object):
945
962
  return flag
946
963
  return True
947
964
 
948
- def shape_to_polygon_data(self, shape):
949
- """Convert a shape to polygon data.
950
-
951
- Parameters
952
- ----------
953
- shape : :class:`pyedb.dotnet.database.modeler.Modeler.Shape`
954
- Type of the shape to convert. Options are ``"rectangle"`` and ``"polygon"``.
955
- """
956
- if shape.type == "polygon":
957
- return self._createPolygonDataFromPolygon(shape)
958
- elif shape.type == "rectangle":
959
- return self._createPolygonDataFromRectangle(shape)
960
- else:
961
- self._logger.error(
962
- "Unsupported shape type %s when creating a polygon primitive.",
963
- shape.type,
964
- )
965
- return None
966
-
967
965
  def _createPolygonDataFromPolygon(self, shape):
968
966
  points = shape.points
969
967
  if not self._validatePoint(points[0]):
@@ -1113,23 +1111,23 @@ class Modeler(object):
1113
1111
  parameter_name="trace_width",
1114
1112
  variable_value=None,
1115
1113
  ):
1116
- """Parametrize a Trace on specific layer or all stackup.
1114
+ """Parametrize trace width.
1117
1115
 
1118
1116
  Parameters
1119
1117
  ----------
1120
- nets_name : str, list
1121
- name of the net or list of nets to parametrize.
1122
- layers_name : str, optional
1123
- name of the layer or list of layers to which the net to parametrize has to be included.
1118
+ nets_name : str or list
1119
+ Net name(s).
1120
+ layers_name : str or list, optional
1121
+ Layer name(s) filter.
1124
1122
  parameter_name : str, optional
1125
- name of the parameter to create.
1126
- variable_value : str, float, optional
1127
- value with units of parameter to create.
1128
- If None, the first trace width of Net will be used as parameter value.
1123
+ Parameter name prefix.
1124
+ variable_value : float or str, optional
1125
+ Initial parameter value.
1129
1126
 
1130
1127
  Returns
1131
1128
  -------
1132
1129
  bool
1130
+ True if successful, False otherwise.
1133
1131
  """
1134
1132
  if isinstance(nets_name, str):
1135
1133
  nets_name = [nets_name]
@@ -1155,21 +1153,21 @@ class Modeler(object):
1155
1153
  return True
1156
1154
 
1157
1155
  def unite_polygons_on_layer(self, layer_name=None, delete_padstack_gemometries=False, net_names_list=[]):
1158
- """Try to unite all Polygons on specified layer.
1156
+ """Unite polygons on layer.
1159
1157
 
1160
1158
  Parameters
1161
1159
  ----------
1162
- layer_name : str, optional
1163
- Name of layer name to unite objects on. The default is ``None``, in which case all layers are taken.
1160
+ layer_name : str or list, optional
1161
+ Layer name(s) to process.
1164
1162
  delete_padstack_gemometries : bool, optional
1165
- Whether to delete all padstack geometries. The default is ``False``.
1166
- net_names_list : list[str] : optional
1167
- Net names list filter. The default is ``[]``, in which case all nets are taken.
1163
+ Whether to delete padstack geometries.
1164
+ net_names_list : list, optional
1165
+ Net names filter.
1168
1166
 
1169
1167
  Returns
1170
1168
  -------
1171
1169
  bool
1172
- ``True`` is successful.
1170
+ True if successful, False otherwise.
1173
1171
  """
1174
1172
  if isinstance(layer_name, str):
1175
1173
  layer_name = [layer_name]
@@ -1226,20 +1224,19 @@ class Modeler(object):
1226
1224
  return True
1227
1225
 
1228
1226
  def defeature_polygon(self, poly, tolerance=0.001):
1229
- """Defeature the polygon based on the maximum surface deviation criteria.
1227
+ """Defeature polygon.
1230
1228
 
1231
1229
  Parameters
1232
1230
  ----------
1233
- maximum_surface_deviation : float
1234
- poly : Edb Polygon primitive
1231
+ poly : :class:`pyedb.dotnet.database.edb_data.primitives_data.Polygon`
1235
1232
  Polygon to defeature.
1236
1233
  tolerance : float, optional
1237
- Maximum tolerance criteria. The default is ``0.001``.
1234
+ Maximum surface deviation tolerance.
1238
1235
 
1239
1236
  Returns
1240
1237
  -------
1241
1238
  bool
1242
- ``True`` when successful, ``False`` when failed.
1239
+ True if successful, False otherwise.
1243
1240
  """
1244
1241
  new_poly = poly.polygon_data.defeature(tol=tolerance)
1245
1242
  if not new_poly.points:
@@ -1251,20 +1248,19 @@ class Modeler(object):
1251
1248
  return True
1252
1249
 
1253
1250
  def get_layout_statistics(self, evaluate_area=False, net_list=None):
1254
- """Return EDBStatistics object from a layout.
1251
+ """Get layout statistics.
1255
1252
 
1256
1253
  Parameters
1257
1254
  ----------
1258
-
1259
- evaluate_area : optional bool
1260
- When True evaluates the layout metal surface, can take time-consuming,
1261
- avoid using this option on large design.
1255
+ evaluate_area : bool, optional
1256
+ Whether to compute metal area statistics.
1257
+ net_list : list, optional
1258
+ Net list for area computation.
1262
1259
 
1263
1260
  Returns
1264
1261
  -------
1265
-
1266
- EDBStatistics object.
1267
-
1262
+ :class:`LayoutStatistics`
1263
+ Layout statistics object.
1268
1264
  """
1269
1265
  stat_model = LayoutStatistics()
1270
1266
  stat_model.num_layers = len(list(self._pedb.stackup.layers.values()))
@@ -1319,44 +1315,45 @@ class Modeler(object):
1319
1315
  end_cell_instance_name=None,
1320
1316
  bondwire_type="jedec4",
1321
1317
  ):
1322
- """Create a bondwire object.
1318
+ """Create bondwire.
1323
1319
 
1324
1320
  Parameters
1325
1321
  ----------
1326
- bondwire_type : :class:`BondwireType`
1327
- Type of bondwire: kAPDBondWire or kJDECBondWire types.
1328
1322
  definition_name : str
1329
1323
  Bondwire definition name.
1330
1324
  placement_layer : str
1331
- Layer name this bondwire will be on.
1332
- width : :class:`Value <ansys.edb.utility.Value>`
1325
+ Placement layer name.
1326
+ width : float or str
1333
1327
  Bondwire width.
1334
1328
  material : str
1335
- Bondwire material name.
1329
+ Material name.
1336
1330
  start_layer_name : str
1337
- Name of start layer.
1338
- start_x : :class:`Value <ansys.edb.utility.Value>`
1339
- X value of start point.
1340
- start_y : :class:`Value <ansys.edb.utility.Value>`
1341
- Y value of start point.
1331
+ Start layer name.
1332
+ start_x : float or str
1333
+ Start x-coordinate.
1334
+ start_y : float or str
1335
+ Start y-coordinate.
1342
1336
  end_layer_name : str
1343
- Name of end layer.
1344
- end_x : :class:`Value <ansys.edb.utility.Value>`
1345
- X value of end point.
1346
- end_y : :class:`Value <ansys.edb.utility.Value>`
1347
- Y value of end point.
1348
- net : str or :class:`Net <ansys.edb.net.Net>` or None
1349
- Net of the Bondwire.
1337
+ End layer name.
1338
+ end_x : float or str
1339
+ End x-coordinate.
1340
+ end_y : float or str
1341
+ End y-coordinate.
1342
+ net : str
1343
+ Associated net name.
1350
1344
  start_cell_instance_name : str, optional
1351
- Cell instance name where the bondwire starts.
1345
+ Start cell instance name.
1352
1346
  end_cell_instance_name : str, optional
1353
- Cell instance name where the bondwire ends.
1347
+ End cell instance name.
1348
+ bondwire_type : str, optional
1349
+ Bondwire type ("jedec4", "jedec5", "apd").
1354
1350
 
1355
1351
  Returns
1356
1352
  -------
1357
- :class:`pyedb.dotnet.database.dotnet.primitive.BondwireDotNet`
1358
- Bondwire object created.
1353
+ :class:`pyedb.dotnet.database.edb_data.primitives_data.Bondwire` or bool
1354
+ Bondwire object if created, False otherwise.
1359
1355
  """
1356
+
1360
1357
  from ansys.edb.core.hierarchy.cell_instance import (
1361
1358
  CellInstance as GrpcCellInstance,
1362
1359
  )
@@ -1414,17 +1411,23 @@ class Modeler(object):
1414
1411
  pins_by_aedt_name=None,
1415
1412
  pins_by_name=None,
1416
1413
  ):
1417
- """Create a PinGroup.
1414
+ """Create pin group.
1418
1415
 
1419
1416
  Parameters
1420
- name : str,
1421
- Name of the PinGroup.
1422
- pins_by_id : list[int] or None
1423
- List of pins by ID.
1424
- pins_by_aedt_name : list[str] or None
1425
- List of pins by AEDT name.
1426
- pins_by_name : list[str] or None
1427
- List of pins by name.
1417
+ ----------
1418
+ name : str
1419
+ Pin group name.
1420
+ pins_by_id : list, optional
1421
+ List of pin IDs.
1422
+ pins_by_aedt_name : list, optional
1423
+ List of pin AEDT names.
1424
+ pins_by_name : list, optional
1425
+ List of pin names.
1426
+
1427
+ Returns
1428
+ -------
1429
+ :class:`pyedb.dotnet.database.siwave.pin_group.PinGroup` or bool
1430
+ PinGroup object if created, False otherwise.
1428
1431
  """
1429
1432
  # TODO move this method to components and merge with existing one
1430
1433
  pins = {}