6
6
if TYPE_CHECKING :
7
7
from ansys .edb .core .net .net import Net
8
8
from ansys .edb .core .layout .layout import Layout
9
+ from ansys .edb .core .typing import ValueLike
9
10
10
11
from enum import Enum
11
12
@@ -31,7 +32,7 @@ class BackDrillType(Enum):
31
32
32
33
33
34
class PadstackInstance (conn_obj .ConnObj ):
34
- """Representis a padstack instance object."""
35
+ """Represents a padstack instance object."""
35
36
36
37
__stub : padstack_instance_pb2_grpc .PadstackInstanceServiceStub = StubAccessor (
37
38
StubType .padstack_instance
@@ -46,9 +47,9 @@ def create(
46
47
net : Net ,
47
48
name : str ,
48
49
padstack_def : PadstackDef ,
49
- position_x : Value ,
50
- position_y : Value ,
51
- rotation : Value ,
50
+ position_x : ValueLike ,
51
+ position_y : ValueLike ,
52
+ rotation : ValueLike ,
52
53
top_layer : Layer ,
53
54
bottom_layer : Layer ,
54
55
solder_ball_layer : Layer | None = None ,
@@ -66,11 +67,11 @@ def create(
66
67
Name of the padstack instance.
67
68
padstack_def : .PadstackDef
68
69
Padstack definition of the padstack instance.
69
- position_x : .Value
70
+ position_x : :term:`ValueLike`
70
71
Position x of the padstack instance.
71
- position_y : .Value
72
+ position_y : :term:`ValueLike`
72
73
Position y of the padstack instance.
73
- rotation : .Value
74
+ rotation : :term:`ValueLike`
74
75
Rotation of the padstack instance.
75
76
top_layer : .Layer
76
77
Top layer of the padstack instance.
@@ -146,16 +147,16 @@ def get_position_and_rotation(self) -> tuple[Value, Value, Value]:
146
147
Value (params .rotation ),
147
148
)
148
149
149
- def set_position_and_rotation (self , x : Value , y : Value , rotation : Value ):
150
+ def set_position_and_rotation (self , x : ValueLike , y : ValueLike , rotation : ValueLike ):
150
151
"""Set the position and rotation of the padstack instance.
151
152
152
153
Parameters
153
154
----------
154
- x : .Value
155
+ x : :term:`ValueLike`
155
156
x : X coordinate.
156
- y : .Value
157
+ y : :term:`ValueLike`
157
158
y : Y coordinate.
158
- rotation : .Value
159
+ rotation : :term:`ValueLike`
159
160
Rotation in radians.
160
161
"""
161
162
self .__stub .SetPositionAndRotation (
@@ -252,14 +253,14 @@ def get_hole_overrides(self) -> tuple[bool, Value]:
252
253
Value (params .hole_override ),
253
254
)
254
255
255
- def set_hole_overrides (self , is_hole_override : bool , hole_override : Value ):
256
+ def set_hole_overrides (self , is_hole_override : bool , hole_override : ValueLike ):
256
257
"""Set the hole overrides of the padstack instance.
257
258
258
259
Parameters
259
260
----------
260
261
is_hole_override : bool
261
262
Whether the padstack instance is a hole override.
262
- hole_override : .Value
263
+ hole_override : :term:`ValueLike`
263
264
Hole override diameter of the padstack instance.
264
265
"""
265
266
self .__stub .SetHoleOverrides (
@@ -339,7 +340,7 @@ def get_back_drill_by_layer(self, from_bottom: bool) -> tuple[Layer, Value, Valu
339
340
)
340
341
341
342
def set_back_drill_by_layer (
342
- self , drill_to_layer : Layer , offset : Value , diameter : Value , from_bottom : bool
343
+ self , drill_to_layer : Layer , offset : ValueLike , diameter : ValueLike , from_bottom : bool
343
344
):
344
345
"""Set the back drill by the layer.
345
346
@@ -349,9 +350,9 @@ def set_back_drill_by_layer(
349
350
Layer to drill to. If drilling from the top, the drill stops at the upper
350
351
elevation of the layer. If drilling from the bottom, the drill stops at
351
352
the lower elevation of the layer.
352
- offset : .Value
353
+ offset : :term:`ValueLike`
353
354
Layer offset (or depth if the layer is empty).
354
- diameter : .Value
355
+ diameter : :term:`ValueLike`
355
356
Drilling diameter.
356
357
from_bottom : bool
357
358
Whether to set the back drill type from the bottom.
@@ -390,14 +391,14 @@ def get_back_drill_by_depth(self, from_bottom: bool) -> tuple[Value, Value]:
390
391
)
391
392
return Value (params .drill_depth ), Value (params .diameter )
392
393
393
- def set_back_drill_by_depth (self , drill_depth : Value , diameter : Value , from_bottom : bool ):
394
+ def set_back_drill_by_depth (self , drill_depth : ValueLike , diameter : ValueLike , from_bottom : bool ):
394
395
"""Set the back drill type by depth.
395
396
396
397
Parameters
397
398
----------
398
- drill_depth : .Value
399
+ drill_depth : :term:`ValueLike`
399
400
Drilling depth, which may not align with the layer.
400
- diameter : :.Value
401
+ diameter : :term:`ValueLike`
401
402
Drilling diameter.
402
403
from_bottom : bool
403
404
Whether to set the back drill type from the bottom.
0 commit comments