pyedb 0.2.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.
- pyedb/__init__.py +17 -0
- pyedb/dotnet/__init__.py +0 -0
- pyedb/dotnet/application/Variables.py +2261 -0
- pyedb/dotnet/application/__init__.py +0 -0
- pyedb/dotnet/clr_module.py +103 -0
- pyedb/dotnet/edb.py +4237 -0
- pyedb/dotnet/edb_core/__init__.py +1 -0
- pyedb/dotnet/edb_core/cell/__init__.py +0 -0
- pyedb/dotnet/edb_core/cell/hierarchy/__init__.py +0 -0
- pyedb/dotnet/edb_core/cell/hierarchy/model.py +66 -0
- pyedb/dotnet/edb_core/components.py +2669 -0
- pyedb/dotnet/edb_core/configuration.py +423 -0
- pyedb/dotnet/edb_core/definition/__init__.py +0 -0
- pyedb/dotnet/edb_core/definition/component_def.py +166 -0
- pyedb/dotnet/edb_core/definition/component_model.py +30 -0
- pyedb/dotnet/edb_core/definition/definition_obj.py +18 -0
- pyedb/dotnet/edb_core/definition/definitions.py +12 -0
- pyedb/dotnet/edb_core/dotnet/__init__.py +0 -0
- pyedb/dotnet/edb_core/dotnet/database.py +1218 -0
- pyedb/dotnet/edb_core/dotnet/layout.py +238 -0
- pyedb/dotnet/edb_core/dotnet/primitive.py +1517 -0
- pyedb/dotnet/edb_core/edb_data/__init__.py +0 -0
- pyedb/dotnet/edb_core/edb_data/components_data.py +938 -0
- pyedb/dotnet/edb_core/edb_data/connectable.py +113 -0
- pyedb/dotnet/edb_core/edb_data/control_file.py +1268 -0
- pyedb/dotnet/edb_core/edb_data/design_options.py +35 -0
- pyedb/dotnet/edb_core/edb_data/edbvalue.py +45 -0
- pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +330 -0
- pyedb/dotnet/edb_core/edb_data/hfss_simulation_setup_data.py +1607 -0
- pyedb/dotnet/edb_core/edb_data/layer_data.py +576 -0
- pyedb/dotnet/edb_core/edb_data/nets_data.py +281 -0
- pyedb/dotnet/edb_core/edb_data/obj_base.py +19 -0
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +2080 -0
- pyedb/dotnet/edb_core/edb_data/ports.py +287 -0
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +1397 -0
- pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +2914 -0
- pyedb/dotnet/edb_core/edb_data/simulation_setup.py +716 -0
- pyedb/dotnet/edb_core/edb_data/siwave_simulation_setup_data.py +1205 -0
- pyedb/dotnet/edb_core/edb_data/sources.py +514 -0
- pyedb/dotnet/edb_core/edb_data/terminals.py +632 -0
- pyedb/dotnet/edb_core/edb_data/utilities.py +148 -0
- pyedb/dotnet/edb_core/edb_data/variables.py +91 -0
- pyedb/dotnet/edb_core/general.py +181 -0
- pyedb/dotnet/edb_core/hfss.py +1646 -0
- pyedb/dotnet/edb_core/layout.py +1244 -0
- pyedb/dotnet/edb_core/layout_validation.py +272 -0
- pyedb/dotnet/edb_core/materials.py +939 -0
- pyedb/dotnet/edb_core/net_class.py +335 -0
- pyedb/dotnet/edb_core/nets.py +1215 -0
- pyedb/dotnet/edb_core/padstack.py +1389 -0
- pyedb/dotnet/edb_core/siwave.py +1427 -0
- pyedb/dotnet/edb_core/stackup.py +2703 -0
- pyedb/edb_logger.py +396 -0
- pyedb/generic/__init__.py +0 -0
- pyedb/generic/constants.py +1063 -0
- pyedb/generic/data_handlers.py +320 -0
- pyedb/generic/design_types.py +104 -0
- pyedb/generic/filesystem.py +150 -0
- pyedb/generic/general_methods.py +1535 -0
- pyedb/generic/plot.py +1840 -0
- pyedb/generic/process.py +285 -0
- pyedb/generic/settings.py +224 -0
- pyedb/ipc2581/__init__.py +0 -0
- pyedb/ipc2581/bom/__init__.py +0 -0
- pyedb/ipc2581/bom/bom.py +21 -0
- pyedb/ipc2581/bom/bom_item.py +32 -0
- pyedb/ipc2581/bom/characteristics.py +37 -0
- pyedb/ipc2581/bom/refdes.py +16 -0
- pyedb/ipc2581/content/__init__.py +0 -0
- pyedb/ipc2581/content/color.py +38 -0
- pyedb/ipc2581/content/content.py +55 -0
- pyedb/ipc2581/content/dictionary_color.py +29 -0
- pyedb/ipc2581/content/dictionary_fill.py +28 -0
- pyedb/ipc2581/content/dictionary_line.py +30 -0
- pyedb/ipc2581/content/entry_color.py +13 -0
- pyedb/ipc2581/content/entry_line.py +14 -0
- pyedb/ipc2581/content/fill.py +15 -0
- pyedb/ipc2581/content/layer_ref.py +10 -0
- pyedb/ipc2581/content/standard_geometries_dictionary.py +72 -0
- pyedb/ipc2581/ecad/__init__.py +0 -0
- pyedb/ipc2581/ecad/cad_data/__init__.py +0 -0
- pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +26 -0
- pyedb/ipc2581/ecad/cad_data/cad_data.py +37 -0
- pyedb/ipc2581/ecad/cad_data/component.py +41 -0
- pyedb/ipc2581/ecad/cad_data/drill.py +30 -0
- pyedb/ipc2581/ecad/cad_data/feature.py +54 -0
- pyedb/ipc2581/ecad/cad_data/layer.py +41 -0
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +151 -0
- pyedb/ipc2581/ecad/cad_data/logical_net.py +32 -0
- pyedb/ipc2581/ecad/cad_data/outline.py +25 -0
- pyedb/ipc2581/ecad/cad_data/package.py +104 -0
- pyedb/ipc2581/ecad/cad_data/padstack_def.py +38 -0
- pyedb/ipc2581/ecad/cad_data/padstack_hole_def.py +24 -0
- pyedb/ipc2581/ecad/cad_data/padstack_instance.py +62 -0
- pyedb/ipc2581/ecad/cad_data/padstack_pad_def.py +26 -0
- pyedb/ipc2581/ecad/cad_data/path.py +89 -0
- pyedb/ipc2581/ecad/cad_data/phy_net.py +80 -0
- pyedb/ipc2581/ecad/cad_data/pin.py +31 -0
- pyedb/ipc2581/ecad/cad_data/polygon.py +169 -0
- pyedb/ipc2581/ecad/cad_data/profile.py +40 -0
- pyedb/ipc2581/ecad/cad_data/stackup.py +31 -0
- pyedb/ipc2581/ecad/cad_data/stackup_group.py +42 -0
- pyedb/ipc2581/ecad/cad_data/stackup_layer.py +21 -0
- pyedb/ipc2581/ecad/cad_data/step.py +275 -0
- pyedb/ipc2581/ecad/cad_header.py +33 -0
- pyedb/ipc2581/ecad/ecad.py +19 -0
- pyedb/ipc2581/ecad/spec.py +46 -0
- pyedb/ipc2581/history_record.py +37 -0
- pyedb/ipc2581/ipc2581.py +387 -0
- pyedb/ipc2581/logistic_header.py +25 -0
- pyedb/misc/__init__.py +0 -0
- pyedb/misc/aedtlib_personalib_install.py +14 -0
- pyedb/misc/downloads.py +322 -0
- pyedb/misc/misc.py +67 -0
- pyedb/misc/pyedb.runtimeconfig.json +13 -0
- pyedb/misc/siw_feature_config/__init__.py +0 -0
- pyedb/misc/siw_feature_config/emc/__init__.py +0 -0
- pyedb/misc/siw_feature_config/emc/component_tags.py +46 -0
- pyedb/misc/siw_feature_config/emc/net_tags.py +37 -0
- pyedb/misc/siw_feature_config/emc/tag_library.py +62 -0
- pyedb/misc/siw_feature_config/emc/xml_generic.py +78 -0
- pyedb/misc/siw_feature_config/emc_rule_checker_settings.py +179 -0
- pyedb/misc/utilities.py +27 -0
- pyedb/modeler/geometry_operators.py +2082 -0
- pyedb-0.2.0.dist-info/LICENSE +21 -0
- pyedb-0.2.0.dist-info/METADATA +208 -0
- pyedb-0.2.0.dist-info/RECORD +128 -0
- pyedb-0.2.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,1517 @@
|
|
|
1
|
+
"""Primitive."""
|
|
2
|
+
from pyedb.dotnet.edb_core.dotnet.database import NetDotNet, PolygonDataDotNet
|
|
3
|
+
from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
|
|
4
|
+
from pyedb.modeler.geometry_operators import GeometryOperators
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def cast(api, prim_object):
|
|
8
|
+
"""Cast the primitive object to correct concrete type.
|
|
9
|
+
|
|
10
|
+
Returns
|
|
11
|
+
-------
|
|
12
|
+
PrimitiveDotNet
|
|
13
|
+
"""
|
|
14
|
+
prim_type = prim_object.GetPrimitiveType()
|
|
15
|
+
if prim_type == prim_type.Rectangle:
|
|
16
|
+
return RectangleDotNet(api, prim_object)
|
|
17
|
+
elif prim_type == prim_type.Polygon:
|
|
18
|
+
return PolygonDotNet(api, prim_object)
|
|
19
|
+
elif prim_type == prim_type.Path:
|
|
20
|
+
return PathDotNet(api, prim_object)
|
|
21
|
+
elif prim_type == prim_type.Bondwire:
|
|
22
|
+
return BondwireDotNet(api, prim_object)
|
|
23
|
+
elif prim_type == prim_type.Text:
|
|
24
|
+
return TextDotNet(api, prim_object)
|
|
25
|
+
elif prim_type == prim_type.Circle:
|
|
26
|
+
return CircleDotNet(api, prim_object)
|
|
27
|
+
else:
|
|
28
|
+
return None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class PrimitiveDotNet:
|
|
32
|
+
"""Base class representing primitive objects."""
|
|
33
|
+
|
|
34
|
+
def __getattr__(self, key):
|
|
35
|
+
try:
|
|
36
|
+
return super().__getattribute__(key)
|
|
37
|
+
except AttributeError:
|
|
38
|
+
if self.prim_obj and key in dir(self.prim_obj):
|
|
39
|
+
obj = self.prim_obj
|
|
40
|
+
else:
|
|
41
|
+
obj = self.api
|
|
42
|
+
try:
|
|
43
|
+
return getattr(obj, key)
|
|
44
|
+
except AttributeError: # pragma: no cover
|
|
45
|
+
raise AttributeError("Attribute {} not present".format(key))
|
|
46
|
+
|
|
47
|
+
def __init__(self, api, prim_object=None):
|
|
48
|
+
self._app = api
|
|
49
|
+
self.api = api._edb.Cell.Primitive
|
|
50
|
+
self.edb_api = api._edb
|
|
51
|
+
self.prim_obj = prim_object
|
|
52
|
+
|
|
53
|
+
@property
|
|
54
|
+
def api_class(self):
|
|
55
|
+
return self.api
|
|
56
|
+
|
|
57
|
+
@property
|
|
58
|
+
def api_object(self):
|
|
59
|
+
return self.prim_obj
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def path(self):
|
|
63
|
+
return PathDotNet(self._app)
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def rectangle(self):
|
|
67
|
+
return RectangleDotNet(self._app)
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def circle(self):
|
|
71
|
+
return CircleDotNet(self._app)
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def polygon(self):
|
|
75
|
+
return PolygonDotNet(self._app)
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def text(self):
|
|
79
|
+
return TextDotNet(self._app)
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def bondwire(self):
|
|
83
|
+
return BondwireDotNet(self._app)
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def padstack_instance(self):
|
|
87
|
+
return PadstackInstanceDotNet(self._app)
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def net(self):
|
|
91
|
+
return self.prim_obj.GetNet()
|
|
92
|
+
|
|
93
|
+
@net.setter
|
|
94
|
+
def net(self, value):
|
|
95
|
+
try:
|
|
96
|
+
if "net" in dir(value):
|
|
97
|
+
self.prim_obj.SetNet(value.net_obj)
|
|
98
|
+
else:
|
|
99
|
+
self.prim_obj.SetNet(value)
|
|
100
|
+
except TypeError:
|
|
101
|
+
self._app.logger.error("Error setting net object")
|
|
102
|
+
|
|
103
|
+
@property
|
|
104
|
+
def polygon_data(self):
|
|
105
|
+
""":class:`pyedb.dotnet.edb_core.dotnet.database.PolygonDataDotNet`: Outer contour of the Polygon object."""
|
|
106
|
+
return PolygonDataDotNet(self._app, self.prim_obj.GetPolygonData())
|
|
107
|
+
|
|
108
|
+
@polygon_data.setter
|
|
109
|
+
def polygon_data(self, poly):
|
|
110
|
+
return self.prim_obj.SetPolygonData(poly)
|
|
111
|
+
|
|
112
|
+
@property
|
|
113
|
+
def primitive_type(self):
|
|
114
|
+
""":class:`PrimitiveType`: Primitive type of the primitive.
|
|
115
|
+
|
|
116
|
+
Read-Only.
|
|
117
|
+
"""
|
|
118
|
+
return self.prim_obj.GetPrimitiveType()
|
|
119
|
+
|
|
120
|
+
def add_void(self, point_list):
|
|
121
|
+
"""Add a void to current primitive.
|
|
122
|
+
|
|
123
|
+
Parameters
|
|
124
|
+
----------
|
|
125
|
+
point_list : list or :class:`pyedb.dotnet.edb_core.edb_data.primitives_data.EDBPrimitives` \
|
|
126
|
+
or EDB Primitive Object. Point list in the format of `[[x1,y1], [x2,y2],..,[xn,yn]]`.
|
|
127
|
+
|
|
128
|
+
Returns
|
|
129
|
+
-------
|
|
130
|
+
bool
|
|
131
|
+
``True`` if successful, either ``False``.
|
|
132
|
+
"""
|
|
133
|
+
if isinstance(point_list, list):
|
|
134
|
+
plane = self._app.modeler.Shape("polygon", points=point_list)
|
|
135
|
+
_poly = self._app.modeler.shape_to_polygon_data(plane)
|
|
136
|
+
if _poly is None or _poly.IsNull() or _poly is False:
|
|
137
|
+
self._logger.error("Failed to create void polygon data")
|
|
138
|
+
return False
|
|
139
|
+
point_list = self._app.edb_api.cell.primitive.polygon.create(
|
|
140
|
+
self._app.active_layout, self.layer_name, self.prim_obj.GetNet(), _poly
|
|
141
|
+
).prim_obj
|
|
142
|
+
elif "prim_obj" in dir(point_list):
|
|
143
|
+
point_list = point_list.prim_obj
|
|
144
|
+
elif "primitive_obj" in dir(point_list):
|
|
145
|
+
point_list = point_list.primitive_obj
|
|
146
|
+
return self.prim_obj.AddVoid(point_list)
|
|
147
|
+
|
|
148
|
+
def set_hfss_prop(self, material, solve_inside):
|
|
149
|
+
"""Set HFSS properties.
|
|
150
|
+
|
|
151
|
+
Parameters
|
|
152
|
+
----------
|
|
153
|
+
material : str
|
|
154
|
+
Material property name to be set.
|
|
155
|
+
solve_inside : bool
|
|
156
|
+
Whether to do solve inside.
|
|
157
|
+
"""
|
|
158
|
+
self.prim_obj.SetHfssProp(material, solve_inside)
|
|
159
|
+
|
|
160
|
+
@property
|
|
161
|
+
def layer(self):
|
|
162
|
+
""":class:`Layer <ansys.edb.layer.Layer>`: Layer that the primitive object is on."""
|
|
163
|
+
layer_msg = self.prim_obj.GetLayer()
|
|
164
|
+
return layer_msg
|
|
165
|
+
|
|
166
|
+
@layer.setter
|
|
167
|
+
def layer(self, layer):
|
|
168
|
+
self.prim_obj.SetLayer(layer)
|
|
169
|
+
|
|
170
|
+
@property
|
|
171
|
+
def is_negative(self):
|
|
172
|
+
""":obj:`bool`: If the primitive is negative."""
|
|
173
|
+
return self.prim_obj.GetIsNegative()
|
|
174
|
+
|
|
175
|
+
@is_negative.setter
|
|
176
|
+
def is_negative(self, is_negative):
|
|
177
|
+
self.prim_obj.SetIsNegative(is_negative)
|
|
178
|
+
|
|
179
|
+
@property
|
|
180
|
+
def is_void(self):
|
|
181
|
+
""":obj:`bool`: If a primitive is a void."""
|
|
182
|
+
return self.prim_obj.IsVoid()
|
|
183
|
+
|
|
184
|
+
@property
|
|
185
|
+
def has_voids(self):
|
|
186
|
+
""":obj:`bool`: If a primitive has voids inside.
|
|
187
|
+
|
|
188
|
+
Read-Only.
|
|
189
|
+
"""
|
|
190
|
+
return self.prim_obj.HasVoids()
|
|
191
|
+
|
|
192
|
+
@property
|
|
193
|
+
def voids(self):
|
|
194
|
+
""":obj:`list` of :class:`Primitive <ansys.edb.primitive.Primitive>`: List of void\
|
|
195
|
+
primitive objects inside the primitive.
|
|
196
|
+
|
|
197
|
+
Read-Only.
|
|
198
|
+
"""
|
|
199
|
+
return [cast(self._app, void) for void in self.prim_obj.Voids]
|
|
200
|
+
|
|
201
|
+
@property
|
|
202
|
+
def owner(self):
|
|
203
|
+
""":class:`Primitive <ansys.edb.primitive.Primitive>`: Owner of the primitive object.
|
|
204
|
+
|
|
205
|
+
Read-Only.
|
|
206
|
+
"""
|
|
207
|
+
return cast(self._app, self.prim_obj)
|
|
208
|
+
|
|
209
|
+
@property
|
|
210
|
+
def is_parameterized(self):
|
|
211
|
+
""":obj:`bool`: Primitive's parametrization.
|
|
212
|
+
|
|
213
|
+
Read-Only.
|
|
214
|
+
"""
|
|
215
|
+
return self.prim_obj.IsParameterized()
|
|
216
|
+
|
|
217
|
+
def get_hfss_prop(self):
|
|
218
|
+
"""
|
|
219
|
+
Get HFSS properties.
|
|
220
|
+
|
|
221
|
+
Returns
|
|
222
|
+
-------
|
|
223
|
+
material : str
|
|
224
|
+
Material property name.
|
|
225
|
+
solve_inside : bool
|
|
226
|
+
If solve inside.
|
|
227
|
+
"""
|
|
228
|
+
material = ""
|
|
229
|
+
solve_inside = True
|
|
230
|
+
self.prim_obj.GetHfssProp(material, solve_inside)
|
|
231
|
+
return material, solve_inside
|
|
232
|
+
|
|
233
|
+
def remove_hfss_prop(self):
|
|
234
|
+
"""Remove HFSS properties."""
|
|
235
|
+
self.prim_obj.RemoveHfssProp()
|
|
236
|
+
|
|
237
|
+
@property
|
|
238
|
+
def is_zone_primitive(self):
|
|
239
|
+
""":obj:`bool`: If primitive object is a zone.
|
|
240
|
+
|
|
241
|
+
Read-Only.
|
|
242
|
+
"""
|
|
243
|
+
return self.prim_obj.IsZonePrimitive()
|
|
244
|
+
|
|
245
|
+
@property
|
|
246
|
+
def can_be_zone_primitive(self):
|
|
247
|
+
""":obj:`bool`: If a primitive can be a zone.
|
|
248
|
+
|
|
249
|
+
Read-Only.
|
|
250
|
+
"""
|
|
251
|
+
return True
|
|
252
|
+
|
|
253
|
+
def make_zone_primitive(self, zone_id):
|
|
254
|
+
"""Make primitive a zone primitive with a zone specified by the provided id.
|
|
255
|
+
|
|
256
|
+
Parameters
|
|
257
|
+
----------
|
|
258
|
+
zone_id : int
|
|
259
|
+
Id of zone primitive will use.
|
|
260
|
+
|
|
261
|
+
"""
|
|
262
|
+
self.prim_obj.MakeZonePrimitive(zone_id)
|
|
263
|
+
|
|
264
|
+
def _get_points_for_plot(self, my_net_points, num):
|
|
265
|
+
"""
|
|
266
|
+
Get the points to be plot
|
|
267
|
+
"""
|
|
268
|
+
# fmt: off
|
|
269
|
+
x = []
|
|
270
|
+
y = []
|
|
271
|
+
for i, point in enumerate(my_net_points):
|
|
272
|
+
# point = my_net_points[i]
|
|
273
|
+
if not point.IsArc():
|
|
274
|
+
x.append(point.X.ToDouble())
|
|
275
|
+
y.append(point.Y.ToDouble())
|
|
276
|
+
# i += 1
|
|
277
|
+
else:
|
|
278
|
+
arc_h = point.GetArcHeight().ToDouble()
|
|
279
|
+
p1 = [my_net_points[i-1].X.ToDouble(), my_net_points[i-1].Y.ToDouble()]
|
|
280
|
+
if i+1 < len(my_net_points):
|
|
281
|
+
p2 = [my_net_points[i+1].X.ToDouble(), my_net_points[i+1].Y.ToDouble()]
|
|
282
|
+
else:
|
|
283
|
+
p2 = [my_net_points[0].X.ToDouble(), my_net_points[0].Y.ToDouble()]
|
|
284
|
+
x_arc, y_arc = self._eval_arc_points(p1, p2, arc_h, num)
|
|
285
|
+
x.extend(x_arc)
|
|
286
|
+
y.extend(y_arc)
|
|
287
|
+
# i += 1
|
|
288
|
+
# fmt: on
|
|
289
|
+
return x, y
|
|
290
|
+
|
|
291
|
+
def points(self, arc_segments=6):
|
|
292
|
+
"""Return the list of points with arcs converted to segments.
|
|
293
|
+
|
|
294
|
+
Parameters
|
|
295
|
+
----------
|
|
296
|
+
arc_segments : int
|
|
297
|
+
Number of facets to convert an arc. Default is `6`.
|
|
298
|
+
|
|
299
|
+
Returns
|
|
300
|
+
-------
|
|
301
|
+
tuple
|
|
302
|
+
The tuple contains 2 lists made of X and Y points coordinates.
|
|
303
|
+
"""
|
|
304
|
+
try:
|
|
305
|
+
my_net_points = list(self.prim_obj.GetPolygonData().Points)
|
|
306
|
+
xt, yt = self._get_points_for_plot(my_net_points, arc_segments)
|
|
307
|
+
if not xt:
|
|
308
|
+
return []
|
|
309
|
+
x, y = GeometryOperators.orient_polygon(xt, yt, clockwise=True)
|
|
310
|
+
return x, y
|
|
311
|
+
except:
|
|
312
|
+
x = []
|
|
313
|
+
y = []
|
|
314
|
+
return x, y
|
|
315
|
+
|
|
316
|
+
def points_raw(self):
|
|
317
|
+
"""Return a list of Edb points.
|
|
318
|
+
|
|
319
|
+
Returns
|
|
320
|
+
-------
|
|
321
|
+
list
|
|
322
|
+
Edb Points.
|
|
323
|
+
"""
|
|
324
|
+
points = []
|
|
325
|
+
try:
|
|
326
|
+
my_net_points = list(self.prim_obj.GetPolygonData().Points)
|
|
327
|
+
for point in my_net_points:
|
|
328
|
+
points.append(point)
|
|
329
|
+
return points
|
|
330
|
+
except:
|
|
331
|
+
return points
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
class RectangleDotNet(PrimitiveDotNet):
|
|
335
|
+
"""Class representing a rectangle object."""
|
|
336
|
+
|
|
337
|
+
def __init__(self, api, prim_obj=None):
|
|
338
|
+
PrimitiveDotNet.__init__(self, api, prim_obj)
|
|
339
|
+
|
|
340
|
+
def create(self, layout, layer, net, rep_type, param1, param2, param3, param4, corner_rad, rotation):
|
|
341
|
+
"""Create a rectangle.
|
|
342
|
+
|
|
343
|
+
Parameters
|
|
344
|
+
----------
|
|
345
|
+
layout : :class:`Layout <ansys.edb.layout.Layout>`
|
|
346
|
+
Layout this rectangle will be in.
|
|
347
|
+
layer : str or :class:`Layer <ansys.edb.layer.Layer>`
|
|
348
|
+
Layer this rectangle will be on.
|
|
349
|
+
net : str or :class:`Net <ansys.edb.net.Net>` or None
|
|
350
|
+
Net this rectangle will have.
|
|
351
|
+
rep_type : :class:`RectangleRepresentationType`
|
|
352
|
+
Type that defines given parameters meaning.
|
|
353
|
+
param1 : :class:`Value <ansys.edb.utility.Value>`
|
|
354
|
+
X value of lower left point or center point.
|
|
355
|
+
param2 : :class:`Value <ansys.edb.utility.Value>`
|
|
356
|
+
Y value of lower left point or center point.
|
|
357
|
+
param3 : :class:`Value <ansys.edb.utility.Value>`
|
|
358
|
+
X value of upper right point or width.
|
|
359
|
+
param4 : :class:`Value <ansys.edb.utility.Value>`
|
|
360
|
+
Y value of upper right point or height.
|
|
361
|
+
corner_rad : :class:`Value <ansys.edb.utility.Value>`
|
|
362
|
+
Corner radius.
|
|
363
|
+
rotation : :class:`Value <ansys.edb.utility.Value>`
|
|
364
|
+
Rotation.
|
|
365
|
+
|
|
366
|
+
Returns
|
|
367
|
+
-------
|
|
368
|
+
:class:`pyedb.dotnet.edb_core.dotnet.primitive.RectangleDotNet`
|
|
369
|
+
|
|
370
|
+
Rectangle that was created.
|
|
371
|
+
"""
|
|
372
|
+
if isinstance(net, NetDotNet):
|
|
373
|
+
net = net.api_object
|
|
374
|
+
if isinstance(rep_type, int):
|
|
375
|
+
if rep_type == 1:
|
|
376
|
+
rep_type = self.edb_api.cell.primitive.RectangleRepresentationType.CenterWidthHeight
|
|
377
|
+
else:
|
|
378
|
+
rep_type = self.edb_api.cell.primitive.RectangleRepresentationType.LowerLeftUpperRight
|
|
379
|
+
param1 = self._app.edb_api.utility.value(param1)
|
|
380
|
+
param2 = self._app.edb_api.utility.value(param2)
|
|
381
|
+
param3 = self._app.edb_api.utility.value(param3)
|
|
382
|
+
param4 = self._app.edb_api.utility.value(param4)
|
|
383
|
+
corner_rad = self._app.edb_api.utility.value(corner_rad)
|
|
384
|
+
rotation = self._app.edb_api.utility.value(rotation)
|
|
385
|
+
return RectangleDotNet(
|
|
386
|
+
self._app,
|
|
387
|
+
self.api.Rectangle.Create(
|
|
388
|
+
layout, layer, net, rep_type, param1, param2, param3, param4, corner_rad, rotation
|
|
389
|
+
),
|
|
390
|
+
)
|
|
391
|
+
|
|
392
|
+
def get_parameters(self):
|
|
393
|
+
"""Get coordinates parameters.
|
|
394
|
+
|
|
395
|
+
Returns
|
|
396
|
+
-------
|
|
397
|
+
tuple[
|
|
398
|
+
:class:`RectangleRepresentationType`,
|
|
399
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
400
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
401
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
402
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
403
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
404
|
+
:class:`Value <ansys.edb.utility.Value>`
|
|
405
|
+
]
|
|
406
|
+
|
|
407
|
+
Returns a tuple of the following format:
|
|
408
|
+
|
|
409
|
+
**(representation_type, parameter1, parameter2, parameter3, parameter4, corner_radius, rotation)**
|
|
410
|
+
|
|
411
|
+
**representation_type** : Type that defines given parameters meaning.
|
|
412
|
+
|
|
413
|
+
**parameter1** : X value of lower left point or center point.
|
|
414
|
+
|
|
415
|
+
**parameter2** : Y value of lower left point or center point.
|
|
416
|
+
|
|
417
|
+
**parameter3** : X value of upper right point or width.
|
|
418
|
+
|
|
419
|
+
**parameter4** : Y value of upper right point or height.
|
|
420
|
+
|
|
421
|
+
**corner_radius** : Corner radius.
|
|
422
|
+
|
|
423
|
+
**rotation** : Rotation.
|
|
424
|
+
"""
|
|
425
|
+
return self.prim_obj.GetParameters()
|
|
426
|
+
|
|
427
|
+
def set_parameters(self, rep_type, param1, param2, param3, param4, corner_rad, rotation):
|
|
428
|
+
"""Set coordinates parameters.
|
|
429
|
+
|
|
430
|
+
Parameters
|
|
431
|
+
----------
|
|
432
|
+
rep_type : :class:`RectangleRepresentationType`
|
|
433
|
+
Type that defines given parameters meaning.
|
|
434
|
+
param1 : :class:`Value <ansys.edb.utility.Value>`
|
|
435
|
+
X value of lower left point or center point.
|
|
436
|
+
param2 : :class:`Value <ansys.edb.utility.Value>`
|
|
437
|
+
Y value of lower left point or center point.
|
|
438
|
+
param3 : :class:`Value <ansys.edb.utility.Value>`
|
|
439
|
+
X value of upper right point or width.
|
|
440
|
+
param4 : :class:`Value <ansys.edb.utility.Value>`
|
|
441
|
+
Y value of upper right point or height.
|
|
442
|
+
corner_rad : :class:`Value <ansys.edb.utility.Value>`
|
|
443
|
+
Corner radius.
|
|
444
|
+
rotation : :class:`Value <ansys.edb.utility.Value>`
|
|
445
|
+
Rotation.
|
|
446
|
+
"""
|
|
447
|
+
return self.prim_obj.SetParameters(
|
|
448
|
+
rep_type,
|
|
449
|
+
param1,
|
|
450
|
+
param2,
|
|
451
|
+
param3,
|
|
452
|
+
param4,
|
|
453
|
+
corner_rad,
|
|
454
|
+
rotation,
|
|
455
|
+
)
|
|
456
|
+
|
|
457
|
+
@property
|
|
458
|
+
def can_be_zone_primitive(self):
|
|
459
|
+
""":obj:`bool`: If a rectangle can be a zone.
|
|
460
|
+
|
|
461
|
+
Read-Only.
|
|
462
|
+
"""
|
|
463
|
+
return True
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
class CircleDotNet(PrimitiveDotNet):
|
|
467
|
+
"""Class representing a circle object."""
|
|
468
|
+
|
|
469
|
+
def __init__(self, api, prim_obj=None):
|
|
470
|
+
PrimitiveDotNet.__init__(self, api, prim_obj)
|
|
471
|
+
|
|
472
|
+
def create(self, layout, layer, net, center_x, center_y, radius):
|
|
473
|
+
"""Create a circle.
|
|
474
|
+
|
|
475
|
+
Parameters
|
|
476
|
+
----------
|
|
477
|
+
layout: :class:`Layout <ansys.edb.layout.Layout>`
|
|
478
|
+
Layout this circle will be in.
|
|
479
|
+
layer: str or :class:`Layer <ansys.edb.layer.Layer>`
|
|
480
|
+
Layer this circle will be on.
|
|
481
|
+
net: str or :class:`Net <ansys.edb.net.Net>` or None
|
|
482
|
+
Net this circle will have.
|
|
483
|
+
center_x: :class:`Value <ansys.edb.utility.Value>`
|
|
484
|
+
X value of center point.
|
|
485
|
+
center_y: :class:`Value <ansys.edb.utility.Value>`
|
|
486
|
+
Y value of center point.
|
|
487
|
+
radius: :class:`Value <ansys.edb.utility.Value>`
|
|
488
|
+
Radius value of the circle.
|
|
489
|
+
|
|
490
|
+
Returns
|
|
491
|
+
-------
|
|
492
|
+
:class:`pyedb.dotnet.edb_core.dotnet.primitive.CircleDotNet`
|
|
493
|
+
Circle object created.
|
|
494
|
+
"""
|
|
495
|
+
if isinstance(net, NetDotNet):
|
|
496
|
+
net = net.api_object
|
|
497
|
+
return CircleDotNet(
|
|
498
|
+
self._app,
|
|
499
|
+
self.api.Circle.Create(
|
|
500
|
+
layout,
|
|
501
|
+
layer,
|
|
502
|
+
net,
|
|
503
|
+
center_x,
|
|
504
|
+
center_y,
|
|
505
|
+
radius,
|
|
506
|
+
),
|
|
507
|
+
)
|
|
508
|
+
|
|
509
|
+
def get_parameters(self):
|
|
510
|
+
"""Get parameters of a circle.
|
|
511
|
+
|
|
512
|
+
Returns
|
|
513
|
+
-------
|
|
514
|
+
tuple[
|
|
515
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
516
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
517
|
+
:class:`Value <ansys.edb.utility.Value>`
|
|
518
|
+
]
|
|
519
|
+
|
|
520
|
+
Returns a tuple of the following format:
|
|
521
|
+
|
|
522
|
+
**(center_x, center_y, radius)**
|
|
523
|
+
|
|
524
|
+
**center_x** : X value of center point.
|
|
525
|
+
|
|
526
|
+
**center_y** : Y value of center point.
|
|
527
|
+
|
|
528
|
+
**radius** : Radius value of the circle.
|
|
529
|
+
"""
|
|
530
|
+
return self.prim_obj.GetParameters()
|
|
531
|
+
|
|
532
|
+
def set_parameters(self, center_x, center_y, radius):
|
|
533
|
+
"""Set parameters of a circle.
|
|
534
|
+
|
|
535
|
+
Parameters
|
|
536
|
+
----------
|
|
537
|
+
center_x: :class:`Value <ansys.edb.utility.Value>`
|
|
538
|
+
X value of center point.
|
|
539
|
+
center_y: :class:`Value <ansys.edb.utility.Value>`
|
|
540
|
+
Y value of center point.
|
|
541
|
+
radius: :class:`Value <ansys.edb.utility.Value>`
|
|
542
|
+
Radius value of the circle.
|
|
543
|
+
"""
|
|
544
|
+
self.prim_obj.SetParameters(
|
|
545
|
+
center_x,
|
|
546
|
+
center_y,
|
|
547
|
+
radius,
|
|
548
|
+
)
|
|
549
|
+
|
|
550
|
+
def get_polygon_data(self):
|
|
551
|
+
""":class:`PolygonData <ansys.edb.geometry.PolygonData>`: Polygon data object of the Circle object."""
|
|
552
|
+
return self.prim_obj.GetPolygonData()
|
|
553
|
+
|
|
554
|
+
def can_be_zone_primitive(self):
|
|
555
|
+
""":obj:`bool`: If a circle can be a zone."""
|
|
556
|
+
return True
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
class TextDotNet(PrimitiveDotNet):
|
|
560
|
+
"""Class representing a text object."""
|
|
561
|
+
|
|
562
|
+
def __init__(self, api, prim_obj=None):
|
|
563
|
+
PrimitiveDotNet.__init__(self, api, prim_obj)
|
|
564
|
+
|
|
565
|
+
def create(self, layout, layer, center_x, center_y, text):
|
|
566
|
+
"""Create a text object.
|
|
567
|
+
|
|
568
|
+
Parameters
|
|
569
|
+
----------
|
|
570
|
+
layout: :class:`Layout <ansys.edb.layout.Layout>`
|
|
571
|
+
Layout this text will be in.
|
|
572
|
+
layer: str or Layer
|
|
573
|
+
Layer this text will be on.
|
|
574
|
+
center_x: :class:`Value <ansys.edb.utility.Value>`
|
|
575
|
+
X value of center point.
|
|
576
|
+
center_y: :class:`Value <ansys.edb.utility.Value>`
|
|
577
|
+
Y value of center point.
|
|
578
|
+
text: str
|
|
579
|
+
Text string.
|
|
580
|
+
|
|
581
|
+
Returns
|
|
582
|
+
-------
|
|
583
|
+
:class:`pyedb.dotnet.edb_core.dotnet.primitive.TextDotNet`
|
|
584
|
+
The text Object that was created.
|
|
585
|
+
"""
|
|
586
|
+
return TextDotNet(
|
|
587
|
+
self._app,
|
|
588
|
+
self.api.Text.Create(
|
|
589
|
+
layout,
|
|
590
|
+
layer,
|
|
591
|
+
center_x,
|
|
592
|
+
center_y,
|
|
593
|
+
text,
|
|
594
|
+
),
|
|
595
|
+
)
|
|
596
|
+
|
|
597
|
+
def get_text_data(self):
|
|
598
|
+
"""Get the text data of a text.
|
|
599
|
+
|
|
600
|
+
Returns
|
|
601
|
+
-------
|
|
602
|
+
tuple[
|
|
603
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
604
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
605
|
+
str
|
|
606
|
+
]
|
|
607
|
+
Returns a tuple of the following format:
|
|
608
|
+
|
|
609
|
+
**(center_x, center_y, text)**
|
|
610
|
+
|
|
611
|
+
**center_x** : X value of center point.
|
|
612
|
+
|
|
613
|
+
**center_y** : Y value of center point.
|
|
614
|
+
|
|
615
|
+
**radius** : Text object's String value.
|
|
616
|
+
"""
|
|
617
|
+
return self.prim_obj.GetTextData()
|
|
618
|
+
|
|
619
|
+
def set_text_data(self, center_x, center_y, text):
|
|
620
|
+
"""Set the text data of a text.
|
|
621
|
+
|
|
622
|
+
Parameters
|
|
623
|
+
----------
|
|
624
|
+
center_x: :class:`Value <ansys.edb.utility.Value>`
|
|
625
|
+
X value of center point.
|
|
626
|
+
center_y: :class:`Value <ansys.edb.utility.Value>`
|
|
627
|
+
Y value of center point.
|
|
628
|
+
text: str
|
|
629
|
+
Text object's String value.
|
|
630
|
+
"""
|
|
631
|
+
return self.prim_obj.SetTextData(
|
|
632
|
+
center_x,
|
|
633
|
+
center_y,
|
|
634
|
+
text,
|
|
635
|
+
)
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
class PolygonDotNet(PrimitiveDotNet):
|
|
639
|
+
"""Class representing a polygon object."""
|
|
640
|
+
|
|
641
|
+
def __init__(self, api, prim_obj=None):
|
|
642
|
+
PrimitiveDotNet.__init__(self, api, prim_obj)
|
|
643
|
+
|
|
644
|
+
def create(self, layout, layer, net, polygon_data):
|
|
645
|
+
"""Create a polygon.
|
|
646
|
+
|
|
647
|
+
Parameters
|
|
648
|
+
----------
|
|
649
|
+
layout : :class:`Layout <ansys.edb.layout.Layout>`
|
|
650
|
+
Layout the polygon will be in.
|
|
651
|
+
layer : str or :class:`Layer <ansys.edb.layer.Layer>`
|
|
652
|
+
Layer this Polygon will be in.
|
|
653
|
+
net : str or :class:`Net <ansys.edb.net.Net>` or None
|
|
654
|
+
Net of the Polygon object.
|
|
655
|
+
polygon_data : :class:`PolygonData <ansys.edb.geometry.PolygonData>`
|
|
656
|
+
The outer contour of the Polygon.
|
|
657
|
+
|
|
658
|
+
Returns
|
|
659
|
+
-------
|
|
660
|
+
:class:`pyedb.dotnet.edb_core.dotnet.primitive.PolygonDotNet`
|
|
661
|
+
Polygon object created.
|
|
662
|
+
"""
|
|
663
|
+
if isinstance(net, NetDotNet):
|
|
664
|
+
net = net.api_object
|
|
665
|
+
return PolygonDotNet(self._app, self.api.Polygon.Create(layout, layer, net, polygon_data))
|
|
666
|
+
|
|
667
|
+
@property
|
|
668
|
+
def can_be_zone_primitive(self):
|
|
669
|
+
""":obj:`bool`: If a polygon can be a zone.
|
|
670
|
+
|
|
671
|
+
Read-Only.
|
|
672
|
+
"""
|
|
673
|
+
return True
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
class PathDotNet(PrimitiveDotNet):
|
|
677
|
+
"""Class representing a path object."""
|
|
678
|
+
|
|
679
|
+
def __init__(self, api, prim_obj=None):
|
|
680
|
+
PrimitiveDotNet.__init__(self, api, prim_obj)
|
|
681
|
+
|
|
682
|
+
def create(self, layout, layer, net, width, end_cap1, end_cap2, corner_style, points):
|
|
683
|
+
"""Create a path.
|
|
684
|
+
|
|
685
|
+
Parameters
|
|
686
|
+
----------
|
|
687
|
+
layout : :class:`Layout <ansys.edb.layout.Layout>`
|
|
688
|
+
Layout this Path will be in.
|
|
689
|
+
layer : str or :class:`Layer <ansys.edb.layer.Layer>`
|
|
690
|
+
Layer this Path will be on.
|
|
691
|
+
net : str or :class:`Net <ansys.edb.net.Net>` or None
|
|
692
|
+
Net this Path will have.
|
|
693
|
+
width: :class:`Value <ansys.edb.utility.Value>`
|
|
694
|
+
Path width.
|
|
695
|
+
end_cap1: :class:`PathEndCapType`
|
|
696
|
+
End cap style of path start end cap.
|
|
697
|
+
end_cap2: :class:`PathEndCapType`
|
|
698
|
+
End cap style of path end end cap.
|
|
699
|
+
corner_style: :class:`PathCornerType`
|
|
700
|
+
Corner style.
|
|
701
|
+
points : :class:`PolygonData <ansys.edb.geometry.PolygonData>` or center line point list.
|
|
702
|
+
Centerline polygonData to set.
|
|
703
|
+
|
|
704
|
+
Returns
|
|
705
|
+
-------
|
|
706
|
+
:class:`pyedb.dotnet.edb_core.dotnet.primitive.PathDotNet`
|
|
707
|
+
Path object created.
|
|
708
|
+
"""
|
|
709
|
+
if isinstance(net, NetDotNet):
|
|
710
|
+
net = net.api_object
|
|
711
|
+
width = self._app.edb_api.utility.value(width)
|
|
712
|
+
if isinstance(points, list):
|
|
713
|
+
points = self._app.edb_api.geometry.polygon_data.api_class(
|
|
714
|
+
convert_py_list_to_net_list([self._app.geometry.point_data(i) for i in points]), False
|
|
715
|
+
)
|
|
716
|
+
return PathDotNet(
|
|
717
|
+
self._app, self.api.Path.Create(layout, layer, net, width, end_cap1, end_cap2, corner_style, points)
|
|
718
|
+
)
|
|
719
|
+
|
|
720
|
+
@property
|
|
721
|
+
def center_line(self):
|
|
722
|
+
""":class:`PolygonData <ansys.edb.geometry.PolygonData>`: Center line for this Path."""
|
|
723
|
+
return self.prim_obj.GetCenterLine()
|
|
724
|
+
|
|
725
|
+
@center_line.setter
|
|
726
|
+
def center_line(self, center_line):
|
|
727
|
+
self.prim_obj.SetCenterLineMessage(center_line)
|
|
728
|
+
|
|
729
|
+
@property
|
|
730
|
+
def end_cap_style(self):
|
|
731
|
+
"""Get path end cap styles.
|
|
732
|
+
|
|
733
|
+
Returns
|
|
734
|
+
-------
|
|
735
|
+
tuple[
|
|
736
|
+
:class:`PathEndCapType`,
|
|
737
|
+
:class:`PathEndCapType`
|
|
738
|
+
]
|
|
739
|
+
|
|
740
|
+
Returns a tuple of the following format:
|
|
741
|
+
|
|
742
|
+
**(end_cap1, end_cap2)**
|
|
743
|
+
|
|
744
|
+
**end_cap1** : End cap style of path start end cap.
|
|
745
|
+
|
|
746
|
+
**end_cap2** : End cap style of path end end cap.
|
|
747
|
+
"""
|
|
748
|
+
return self._edb_object.GetEndCapStyle()
|
|
749
|
+
|
|
750
|
+
@end_cap_style.setter
|
|
751
|
+
def end_cap_style(self, end_cap1, end_cap2):
|
|
752
|
+
"""Set path end cap styles.
|
|
753
|
+
|
|
754
|
+
Parameters
|
|
755
|
+
----------
|
|
756
|
+
end_cap1: :class:`PathEndCapType`
|
|
757
|
+
End cap style of path start end cap.
|
|
758
|
+
end_cap2: :class:`PathEndCapType`
|
|
759
|
+
End cap style of path end end cap.
|
|
760
|
+
"""
|
|
761
|
+
self._edb_object.SetEndCapStyle(end_cap1, end_cap2)
|
|
762
|
+
|
|
763
|
+
@property
|
|
764
|
+
def get_clip_info(self):
|
|
765
|
+
"""Get data used to clip the path.
|
|
766
|
+
|
|
767
|
+
Returns
|
|
768
|
+
-------
|
|
769
|
+
tuple[:class:`PolygonData <ansys.edb.geometry.PolygonData>`, bool]
|
|
770
|
+
|
|
771
|
+
Returns a tuple of the following format:
|
|
772
|
+
|
|
773
|
+
**(clipping_poly, keep_inside)**
|
|
774
|
+
|
|
775
|
+
**clipping_poly** : PolygonData used to clip the path.
|
|
776
|
+
|
|
777
|
+
**keep_inside** : Indicates whether the part of the path inside the polygon is preserved.
|
|
778
|
+
"""
|
|
779
|
+
return self._edb_object.GetClipInfo()
|
|
780
|
+
|
|
781
|
+
@get_clip_info.setter
|
|
782
|
+
def get_clip_info(self, clipping_poly, keep_inside=True):
|
|
783
|
+
"""Set data used to clip the path.
|
|
784
|
+
|
|
785
|
+
Parameters
|
|
786
|
+
----------
|
|
787
|
+
clipping_poly: :class:`PolygonData <ansys.edb.geometry.PolygonData>`
|
|
788
|
+
PolygonData used to clip the path.
|
|
789
|
+
keep_inside: bool
|
|
790
|
+
Indicates whether the part of the path inside the polygon should be preserved.
|
|
791
|
+
"""
|
|
792
|
+
self._edb_object.SetClipInfo(
|
|
793
|
+
clipping_poly,
|
|
794
|
+
keep_inside,
|
|
795
|
+
)
|
|
796
|
+
|
|
797
|
+
@property
|
|
798
|
+
def corner_style(self):
|
|
799
|
+
""":class:`PathCornerType`: Path's corner style."""
|
|
800
|
+
return self.prim_obj.GetCornerStyle()
|
|
801
|
+
|
|
802
|
+
@corner_style.setter
|
|
803
|
+
def corner_style(self, corner_type):
|
|
804
|
+
self.prim_obj.SetCornerStyle(corner_type)
|
|
805
|
+
|
|
806
|
+
@property
|
|
807
|
+
def width(self):
|
|
808
|
+
""":class:`Value <ansys.edb.utility.Value>`: Path width."""
|
|
809
|
+
return self.prim_obj.GetWidth()
|
|
810
|
+
|
|
811
|
+
@width.setter
|
|
812
|
+
def width(self, width):
|
|
813
|
+
self.prim_obj.SetWidth(width)
|
|
814
|
+
|
|
815
|
+
@property
|
|
816
|
+
def miter_ratio(self):
|
|
817
|
+
""":class:`Value <ansys.edb.utility.Value>`: Miter ratio."""
|
|
818
|
+
return self.prim_obj.GetMiterRatio()
|
|
819
|
+
|
|
820
|
+
@miter_ratio.setter
|
|
821
|
+
def miter_ratio(self, miter_ratio):
|
|
822
|
+
self.prim_obj.SetMiterRatio(miter_ratio)
|
|
823
|
+
|
|
824
|
+
@property
|
|
825
|
+
def can_be_zone_primitive(self):
|
|
826
|
+
""":obj:`bool`: If a path can be a zone.
|
|
827
|
+
|
|
828
|
+
Read-Only.
|
|
829
|
+
"""
|
|
830
|
+
return True
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
class BondwireDotNet(PrimitiveDotNet):
|
|
834
|
+
"""Class representing a bondwire object."""
|
|
835
|
+
|
|
836
|
+
def __init__(self, api, prim_obj=None):
|
|
837
|
+
PrimitiveDotNet.__init__(self, api, prim_obj)
|
|
838
|
+
|
|
839
|
+
def create(
|
|
840
|
+
self,
|
|
841
|
+
layout,
|
|
842
|
+
bondwire_type,
|
|
843
|
+
definition_name,
|
|
844
|
+
placement_layer,
|
|
845
|
+
width,
|
|
846
|
+
material,
|
|
847
|
+
start_context,
|
|
848
|
+
start_layer_name,
|
|
849
|
+
start_x,
|
|
850
|
+
start_y,
|
|
851
|
+
end_context,
|
|
852
|
+
end_layer_name,
|
|
853
|
+
end_x,
|
|
854
|
+
end_y,
|
|
855
|
+
net,
|
|
856
|
+
):
|
|
857
|
+
"""Create a bondwire object.
|
|
858
|
+
|
|
859
|
+
Parameters
|
|
860
|
+
----------
|
|
861
|
+
layout : :class:`Layout <ansys.edb.layout.Layout>`
|
|
862
|
+
Layout this bondwire will be in.
|
|
863
|
+
bondwire_type : :class:`BondwireType`
|
|
864
|
+
Type of bondwire: kAPDBondWire or kJDECBondWire types.
|
|
865
|
+
definition_name : str
|
|
866
|
+
Bondwire definition name.
|
|
867
|
+
placement_layer : str
|
|
868
|
+
Layer name this bondwire will be on.
|
|
869
|
+
width : :class:`Value <ansys.edb.utility.Value>`
|
|
870
|
+
Bondwire width.
|
|
871
|
+
material : str
|
|
872
|
+
Bondwire material name.
|
|
873
|
+
start_context : :class:`CellInstance <ansys.edb.hierarchy.CellInstance>`
|
|
874
|
+
Start context: None means top level.
|
|
875
|
+
start_layer_name : str
|
|
876
|
+
Name of start layer.
|
|
877
|
+
start_x : :class:`Value <ansys.edb.utility.Value>`
|
|
878
|
+
X value of start point.
|
|
879
|
+
start_y : :class:`Value <ansys.edb.utility.Value>`
|
|
880
|
+
Y value of start point.
|
|
881
|
+
end_context : :class:`CellInstance <ansys.edb.hierarchy.CellInstance>`
|
|
882
|
+
End context: None means top level.
|
|
883
|
+
end_layer_name : str
|
|
884
|
+
Name of end layer.
|
|
885
|
+
end_x : :class:`Value <ansys.edb.utility.Value>`
|
|
886
|
+
X value of end point.
|
|
887
|
+
end_y : :class:`Value <ansys.edb.utility.Value>`
|
|
888
|
+
Y value of end point.
|
|
889
|
+
net : str or :class:`Net <ansys.edb.net.Net>` or None
|
|
890
|
+
Net of the Bondwire.
|
|
891
|
+
|
|
892
|
+
Returns
|
|
893
|
+
-------
|
|
894
|
+
:class:`pyedb.dotnet.edb_core.dotnet.primitive.BondwireDotNet`
|
|
895
|
+
Bondwire object created.
|
|
896
|
+
"""
|
|
897
|
+
if isinstance(net, NetDotNet):
|
|
898
|
+
net = net.api_object
|
|
899
|
+
return BondwireDotNet(
|
|
900
|
+
self._app,
|
|
901
|
+
self.api.Bondwire.Create(
|
|
902
|
+
layout,
|
|
903
|
+
net,
|
|
904
|
+
bondwire_type,
|
|
905
|
+
definition_name,
|
|
906
|
+
placement_layer,
|
|
907
|
+
width,
|
|
908
|
+
material,
|
|
909
|
+
start_context,
|
|
910
|
+
start_layer_name,
|
|
911
|
+
start_x,
|
|
912
|
+
start_y,
|
|
913
|
+
end_context,
|
|
914
|
+
end_layer_name,
|
|
915
|
+
end_x,
|
|
916
|
+
end_y,
|
|
917
|
+
),
|
|
918
|
+
)
|
|
919
|
+
|
|
920
|
+
def get_material(self, evaluated=True):
|
|
921
|
+
"""Get material of the bondwire.
|
|
922
|
+
|
|
923
|
+
Parameters
|
|
924
|
+
----------
|
|
925
|
+
evaluated : bool, optional
|
|
926
|
+
True if an evaluated material name is wanted.
|
|
927
|
+
|
|
928
|
+
Returns
|
|
929
|
+
-------
|
|
930
|
+
str
|
|
931
|
+
Material name.
|
|
932
|
+
"""
|
|
933
|
+
return self.prim_obj.GetMaterial(evaluated)
|
|
934
|
+
|
|
935
|
+
def set_material(self, material):
|
|
936
|
+
"""Set the material of a bondwire.
|
|
937
|
+
|
|
938
|
+
Parameters
|
|
939
|
+
----------
|
|
940
|
+
material : str
|
|
941
|
+
Material name.
|
|
942
|
+
"""
|
|
943
|
+
self.prim_obj.SetMaterial(material)
|
|
944
|
+
|
|
945
|
+
@property
|
|
946
|
+
def type(self):
|
|
947
|
+
""":class:`BondwireType`: Bondwire-type of a bondwire object."""
|
|
948
|
+
return self.prim_obj.GetType()
|
|
949
|
+
|
|
950
|
+
@type.setter
|
|
951
|
+
def type(self, bondwire_type):
|
|
952
|
+
self.prim_obj.SetType(bondwire_type)
|
|
953
|
+
|
|
954
|
+
@property
|
|
955
|
+
def cross_section_type(self):
|
|
956
|
+
""":class:`BondwireCrossSectionType`: Bondwire-cross-section-type of a bondwire object."""
|
|
957
|
+
return self.prim_obj.GetCrossSectionType()
|
|
958
|
+
|
|
959
|
+
@cross_section_type.setter
|
|
960
|
+
def cross_section_type(self, bondwire_type):
|
|
961
|
+
self.prim_obj.SetCrossSectionType(bondwire_type)
|
|
962
|
+
|
|
963
|
+
@property
|
|
964
|
+
def cross_section_height(self):
|
|
965
|
+
""":class:`Value <ansys.edb.utility.Value>`: Bondwire-cross-section height of a bondwire object."""
|
|
966
|
+
return self.prim_obj.GetCrossSectionHeight()
|
|
967
|
+
|
|
968
|
+
@cross_section_height.setter
|
|
969
|
+
def cross_section_height(self, height):
|
|
970
|
+
self.prim_obj.SetCrossSectionHeight(height)
|
|
971
|
+
|
|
972
|
+
def get_definition_name(self, evaluated=True):
|
|
973
|
+
"""Get definition name of a bondwire object.
|
|
974
|
+
|
|
975
|
+
Parameters
|
|
976
|
+
----------
|
|
977
|
+
evaluated : bool, optional
|
|
978
|
+
True if an evaluated (in variable namespace) material name is wanted.
|
|
979
|
+
|
|
980
|
+
Returns
|
|
981
|
+
-------
|
|
982
|
+
str
|
|
983
|
+
Bondwire name.
|
|
984
|
+
"""
|
|
985
|
+
return self.prim_obj.GetDefinitionName(evaluated)
|
|
986
|
+
|
|
987
|
+
def set_definition_name(self, definition_name):
|
|
988
|
+
"""Set the definition name of a bondwire.
|
|
989
|
+
|
|
990
|
+
Parameters
|
|
991
|
+
----------
|
|
992
|
+
definition_name : str
|
|
993
|
+
Bondwire name to be set.
|
|
994
|
+
"""
|
|
995
|
+
self.prim_obj.SetDefinitionName(definition_name)
|
|
996
|
+
|
|
997
|
+
def get_traj(self):
|
|
998
|
+
"""Get trajectory parameters of a bondwire object.
|
|
999
|
+
|
|
1000
|
+
Returns
|
|
1001
|
+
-------
|
|
1002
|
+
tuple[
|
|
1003
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
1004
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
1005
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
1006
|
+
:class:`Value <ansys.edb.utility.Value>`
|
|
1007
|
+
]
|
|
1008
|
+
|
|
1009
|
+
Returns a tuple of the following format:
|
|
1010
|
+
|
|
1011
|
+
**(x1, y1, x2, y2)**
|
|
1012
|
+
|
|
1013
|
+
**x1** : X value of the start point.
|
|
1014
|
+
|
|
1015
|
+
**y1** : Y value of the start point.
|
|
1016
|
+
|
|
1017
|
+
**x1** : X value of the end point.
|
|
1018
|
+
|
|
1019
|
+
**y1** : Y value of the end point.
|
|
1020
|
+
"""
|
|
1021
|
+
return self.prim_obj.GetTraj()
|
|
1022
|
+
|
|
1023
|
+
def set_traj(self, x1, y1, x2, y2):
|
|
1024
|
+
"""Set the parameters of the trajectory of a bondwire.
|
|
1025
|
+
|
|
1026
|
+
Parameters
|
|
1027
|
+
----------
|
|
1028
|
+
x1 : :class:`Value <ansys.edb.utility.Value>`
|
|
1029
|
+
X value of the start point.
|
|
1030
|
+
y1 : :class:`Value <ansys.edb.utility.Value>`
|
|
1031
|
+
Y value of the start point.
|
|
1032
|
+
x2 : :class:`Value <ansys.edb.utility.Value>`
|
|
1033
|
+
X value of the end point.
|
|
1034
|
+
y2 : :class:`Value <ansys.edb.utility.Value>`
|
|
1035
|
+
Y value of the end point.
|
|
1036
|
+
"""
|
|
1037
|
+
self.prim_obj.SetTraj(x1, y1, x2, y2)
|
|
1038
|
+
|
|
1039
|
+
@property
|
|
1040
|
+
def width(self):
|
|
1041
|
+
""":class:`Value <ansys.edb.utility.Value>`: Width of a bondwire object."""
|
|
1042
|
+
return self.prim_obj.GetWidthValue()
|
|
1043
|
+
|
|
1044
|
+
@width.setter
|
|
1045
|
+
def width(self, width):
|
|
1046
|
+
self.prim_obj.SetWidthValue(width)
|
|
1047
|
+
|
|
1048
|
+
def get_start_elevation(self, start_context):
|
|
1049
|
+
"""Get the start elevation layer of a bondwire object.
|
|
1050
|
+
|
|
1051
|
+
Parameters
|
|
1052
|
+
----------
|
|
1053
|
+
start_context : :class:`CellInstance <ansys.edb.hierarchy.CellInstance>`
|
|
1054
|
+
Start cell context of the bondwire.
|
|
1055
|
+
|
|
1056
|
+
Returns
|
|
1057
|
+
-------
|
|
1058
|
+
:class:`Layer <ansys.edb.layer.Layer>`
|
|
1059
|
+
Start context of the bondwire.
|
|
1060
|
+
"""
|
|
1061
|
+
return self.prim_obj.GetStartElevation(start_context)
|
|
1062
|
+
|
|
1063
|
+
def set_start_elevation(self, start_context, layer):
|
|
1064
|
+
"""Set the start elevation of a bondwire.
|
|
1065
|
+
|
|
1066
|
+
Parameters
|
|
1067
|
+
----------
|
|
1068
|
+
start_context : :class:`CellInstance <ansys.edb.hierarchy.CellInstance>`
|
|
1069
|
+
Start cell context of the bondwire. None means top level.
|
|
1070
|
+
layer : str or :class:`Layer <ansys.edb.layer.Layer>`
|
|
1071
|
+
Start layer of the bondwire.
|
|
1072
|
+
"""
|
|
1073
|
+
self.prim_obj.SetStartElevation(start_context, layer)
|
|
1074
|
+
|
|
1075
|
+
def get_end_elevation(self, end_context):
|
|
1076
|
+
"""Get the end elevation layer of a bondwire object.
|
|
1077
|
+
|
|
1078
|
+
Parameters
|
|
1079
|
+
----------
|
|
1080
|
+
end_context : :class:`CellInstance <ansys.edb.hierarchy.CellInstance>`
|
|
1081
|
+
End cell context of the bondwire.
|
|
1082
|
+
|
|
1083
|
+
Returns
|
|
1084
|
+
-------
|
|
1085
|
+
:class:`Layer <ansys.edb.layer.Layer>`
|
|
1086
|
+
End context of the bondwire.
|
|
1087
|
+
"""
|
|
1088
|
+
return self.prim_obj.GetEndElevation(end_context)
|
|
1089
|
+
|
|
1090
|
+
def set_end_elevation(self, end_context, layer):
|
|
1091
|
+
"""Set the end elevation of a bondwire.
|
|
1092
|
+
|
|
1093
|
+
Parameters
|
|
1094
|
+
----------
|
|
1095
|
+
end_context : :class:`CellInstance <ansys.edb.hierarchy.CellInstance>`
|
|
1096
|
+
End cell context of the bondwire. None means top level.
|
|
1097
|
+
layer : str or :class:`Layer <ansys.edb.layer.Layer>`
|
|
1098
|
+
End layer of the bondwire.
|
|
1099
|
+
"""
|
|
1100
|
+
self.prim_obj.SetEndElevation(end_context, layer)
|
|
1101
|
+
|
|
1102
|
+
|
|
1103
|
+
class PadstackInstanceDotNet(PrimitiveDotNet):
|
|
1104
|
+
"""Class representing a Padstack Instance object."""
|
|
1105
|
+
|
|
1106
|
+
def __init__(self, api, prim_obj=None):
|
|
1107
|
+
PrimitiveDotNet.__init__(self, api, prim_obj)
|
|
1108
|
+
|
|
1109
|
+
def create(
|
|
1110
|
+
self,
|
|
1111
|
+
layout,
|
|
1112
|
+
net,
|
|
1113
|
+
name,
|
|
1114
|
+
padstack_def,
|
|
1115
|
+
point,
|
|
1116
|
+
rotation,
|
|
1117
|
+
top_layer,
|
|
1118
|
+
bottom_layer,
|
|
1119
|
+
solder_ball_layer,
|
|
1120
|
+
layer_map,
|
|
1121
|
+
):
|
|
1122
|
+
"""Create a PadstackInstance object.
|
|
1123
|
+
|
|
1124
|
+
Parameters
|
|
1125
|
+
----------
|
|
1126
|
+
layout : :class:`Layout <ansys.edb.layout.Layout>`
|
|
1127
|
+
Layout this padstack instance will be in.
|
|
1128
|
+
net : :class:`Net <ansys.edb.net.Net>`
|
|
1129
|
+
Net of this padstack instance.
|
|
1130
|
+
name : str
|
|
1131
|
+
Name of padstack instance.
|
|
1132
|
+
padstack_def : PadstackDef
|
|
1133
|
+
Padstack definition of this padstack instance.
|
|
1134
|
+
rotation : :class:`Value <ansys.edb.utility.Value>`
|
|
1135
|
+
Rotation of this padstack instance.
|
|
1136
|
+
top_layer : :class:`Layer <ansys.edb.layer.Layer>`
|
|
1137
|
+
Top layer of this padstack instance.
|
|
1138
|
+
bottom_layer : :class:`Layer <ansys.edb.layer.Layer>`
|
|
1139
|
+
Bottom layer of this padstack instance.
|
|
1140
|
+
solder_ball_layer : :class:`Layer <ansys.edb.layer.Layer>`
|
|
1141
|
+
Solder ball layer of this padstack instance, or None for none.
|
|
1142
|
+
layer_map : :class:`LayerMap <ansys.edb.utility.LayerMap>`
|
|
1143
|
+
Layer map of this padstack instance. None or empty means do auto-mapping.
|
|
1144
|
+
|
|
1145
|
+
Returns
|
|
1146
|
+
-------
|
|
1147
|
+
:class:`pyedb.dotnet.edb_core.dotnet.primitive.PadstackInstanceDotNet`
|
|
1148
|
+
Padstack instance object created.
|
|
1149
|
+
"""
|
|
1150
|
+
if isinstance(net, NetDotNet):
|
|
1151
|
+
net = net.api_object
|
|
1152
|
+
if isinstance(point, list):
|
|
1153
|
+
point = self._app.geometry.point_data(point[0], point[1])
|
|
1154
|
+
return PadstackInstanceDotNet(
|
|
1155
|
+
self._app,
|
|
1156
|
+
self.api.PadstackInstance.Create(
|
|
1157
|
+
layout,
|
|
1158
|
+
net,
|
|
1159
|
+
name,
|
|
1160
|
+
padstack_def,
|
|
1161
|
+
point,
|
|
1162
|
+
rotation,
|
|
1163
|
+
top_layer,
|
|
1164
|
+
bottom_layer,
|
|
1165
|
+
solder_ball_layer,
|
|
1166
|
+
layer_map,
|
|
1167
|
+
),
|
|
1168
|
+
)
|
|
1169
|
+
|
|
1170
|
+
@property
|
|
1171
|
+
def padstack_def(self):
|
|
1172
|
+
""":class:`PadstackDef <ansys.edb.definition.padstack_def>`: PadstackDef of a Padstack Instance."""
|
|
1173
|
+
return self.prim_obj.GetPadstackDef()
|
|
1174
|
+
|
|
1175
|
+
@property
|
|
1176
|
+
def name(self):
|
|
1177
|
+
""":obj:`str`: Name of a Padstack Instance."""
|
|
1178
|
+
return self.prim_obj.GetName()
|
|
1179
|
+
|
|
1180
|
+
@name.setter
|
|
1181
|
+
def name(self, name):
|
|
1182
|
+
self.prim_obj.SetName(name)
|
|
1183
|
+
|
|
1184
|
+
def get_position_and_rotation(self):
|
|
1185
|
+
"""Get the position and rotation of a Padstack Instance.
|
|
1186
|
+
|
|
1187
|
+
Returns
|
|
1188
|
+
-------
|
|
1189
|
+
tuple[
|
|
1190
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
1191
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
1192
|
+
:class:`Value <ansys.edb.utility.Value>`
|
|
1193
|
+
]
|
|
1194
|
+
|
|
1195
|
+
Returns a tuple of the following format:
|
|
1196
|
+
|
|
1197
|
+
**(x, y, rotation)**
|
|
1198
|
+
|
|
1199
|
+
**x** : X coordinate.
|
|
1200
|
+
|
|
1201
|
+
**y** : Y coordinate.
|
|
1202
|
+
|
|
1203
|
+
**rotation** : Rotation in radians.
|
|
1204
|
+
"""
|
|
1205
|
+
return self.prim_obj.GetPositionAndRotation()
|
|
1206
|
+
|
|
1207
|
+
def set_position_and_rotation(self, x, y, rotation):
|
|
1208
|
+
"""Set the position and rotation of a Padstack Instance.
|
|
1209
|
+
|
|
1210
|
+
Parameters
|
|
1211
|
+
----------
|
|
1212
|
+
x : :class:`Value <ansys.edb.utility.Value>`
|
|
1213
|
+
x : X coordinate.
|
|
1214
|
+
y : :class:`Value <ansys.edb.utility.Value>`
|
|
1215
|
+
y : Y coordinate.
|
|
1216
|
+
rotation : :class:`Value <ansys.edb.utility.Value>`
|
|
1217
|
+
rotation : Rotation in radians.
|
|
1218
|
+
"""
|
|
1219
|
+
self.prim_obj.SetPositionAndRotation(x, y, rotation)
|
|
1220
|
+
|
|
1221
|
+
def get_layer_range(self):
|
|
1222
|
+
"""Get the top and bottom layers of a Padstack Instance.
|
|
1223
|
+
|
|
1224
|
+
Returns
|
|
1225
|
+
-------
|
|
1226
|
+
tuple[
|
|
1227
|
+
:class:`Layer <ansys.edb.layer.Layer>`,
|
|
1228
|
+
:class:`Layer <ansys.edb.layer.Layer>`
|
|
1229
|
+
]
|
|
1230
|
+
|
|
1231
|
+
Returns a tuple of the following format:
|
|
1232
|
+
|
|
1233
|
+
**(top_layer, bottom_layer)**
|
|
1234
|
+
|
|
1235
|
+
**top_layer** : Top layer of the Padstack instance
|
|
1236
|
+
|
|
1237
|
+
**bottom_layer** : Bottom layer of the Padstack instance
|
|
1238
|
+
"""
|
|
1239
|
+
return self.prim_obj.GetLayerRange()
|
|
1240
|
+
|
|
1241
|
+
def set_layer_range(self, top_layer, bottom_layer):
|
|
1242
|
+
"""Set the top and bottom layers of a Padstack Instance.
|
|
1243
|
+
|
|
1244
|
+
Parameters
|
|
1245
|
+
----------
|
|
1246
|
+
top_layer : :class:`Layer <ansys.edb.layer.Layer>`
|
|
1247
|
+
Top layer of the Padstack instance.
|
|
1248
|
+
bottom_layer : :class:`Layer <ansys.edb.layer.Layer>`
|
|
1249
|
+
Bottom layer of the Padstack instance.
|
|
1250
|
+
"""
|
|
1251
|
+
self.prim_obj.SetLayerRange(top_layer, bottom_layer)
|
|
1252
|
+
|
|
1253
|
+
@property
|
|
1254
|
+
def solderball_layer(self):
|
|
1255
|
+
""":class:`Layer <ansys.edb.layer.Layer>`: SolderBall Layer of Padstack Instance."""
|
|
1256
|
+
return self.prim_obj.GetSolderBallLayer()
|
|
1257
|
+
|
|
1258
|
+
@solderball_layer.setter
|
|
1259
|
+
def solderball_layer(self, solderball_layer):
|
|
1260
|
+
self.prim_obj.SetSolderBallLayer(solderball_layer)
|
|
1261
|
+
|
|
1262
|
+
@property
|
|
1263
|
+
def layer_map(self):
|
|
1264
|
+
""":class:`LayerMap <ansys.edb.utility.LayerMap>`: Layer Map of the Padstack Instance."""
|
|
1265
|
+
return self.prim_obj.GetLayerMap()
|
|
1266
|
+
|
|
1267
|
+
@layer_map.setter
|
|
1268
|
+
def layer_map(self, layer_map):
|
|
1269
|
+
self.prim_obj.SetLayerMap(layer_map)
|
|
1270
|
+
|
|
1271
|
+
def get_hole_overrides(self):
|
|
1272
|
+
"""Get the hole overrides of Padstack Instance.
|
|
1273
|
+
|
|
1274
|
+
Returns
|
|
1275
|
+
-------
|
|
1276
|
+
tuple[
|
|
1277
|
+
bool,
|
|
1278
|
+
:class:`Value <ansys.edb.utility.Value>`
|
|
1279
|
+
]
|
|
1280
|
+
|
|
1281
|
+
Returns a tuple of the following format:
|
|
1282
|
+
|
|
1283
|
+
**(is_hole_override, hole_override)**
|
|
1284
|
+
|
|
1285
|
+
**is_hole_override** : If padstack instance is hole override.
|
|
1286
|
+
|
|
1287
|
+
**hole_override** : Hole override diameter of this padstack instance.
|
|
1288
|
+
"""
|
|
1289
|
+
return self.prim_obj.GetHoleOverrides()
|
|
1290
|
+
|
|
1291
|
+
def set_hole_overrides(self, is_hole_override, hole_override):
|
|
1292
|
+
"""Set the hole overrides of Padstack Instance.
|
|
1293
|
+
|
|
1294
|
+
Parameters
|
|
1295
|
+
----------
|
|
1296
|
+
is_hole_override : bool
|
|
1297
|
+
If padstack instance is hole override.
|
|
1298
|
+
hole_override : :class:`Value <ansys.edb.utility.Value>`
|
|
1299
|
+
Hole override diameter of this padstack instance.
|
|
1300
|
+
"""
|
|
1301
|
+
self.prim_obj.SetHoleOverrides(is_hole_override, hole_override)
|
|
1302
|
+
|
|
1303
|
+
@property
|
|
1304
|
+
def is_layout_pin(self):
|
|
1305
|
+
""":obj:`bool`: If padstack instance is layout pin."""
|
|
1306
|
+
return self.prim_obj.GetIsLayoutPin()
|
|
1307
|
+
|
|
1308
|
+
@is_layout_pin.setter
|
|
1309
|
+
def is_layout_pin(self, is_layout_pin):
|
|
1310
|
+
self.prim_obj.SetIsLayoutPin(is_layout_pin)
|
|
1311
|
+
|
|
1312
|
+
def get_back_drill_type(self, from_bottom):
|
|
1313
|
+
"""Get the back drill type of Padstack Instance.
|
|
1314
|
+
|
|
1315
|
+
Parameters
|
|
1316
|
+
----------
|
|
1317
|
+
from_bottom : bool
|
|
1318
|
+
True to get drill type from bottom.
|
|
1319
|
+
|
|
1320
|
+
Returns
|
|
1321
|
+
-------
|
|
1322
|
+
:class:`BackDrillType`
|
|
1323
|
+
Back-Drill Type of padastack instance.
|
|
1324
|
+
"""
|
|
1325
|
+
return self.prim_obj.GetBackDrillType(from_bottom)
|
|
1326
|
+
|
|
1327
|
+
def get_back_drill_by_layer(self, from_bottom):
|
|
1328
|
+
"""Get the back drill by layer.
|
|
1329
|
+
|
|
1330
|
+
Parameters
|
|
1331
|
+
----------
|
|
1332
|
+
from_bottom : bool
|
|
1333
|
+
True to get drill type from bottom.
|
|
1334
|
+
|
|
1335
|
+
Returns
|
|
1336
|
+
-------
|
|
1337
|
+
tuple[
|
|
1338
|
+
bool,
|
|
1339
|
+
:class:`Value <ansys.edb.utility.Value>`,
|
|
1340
|
+
:class:`Value <ansys.edb.utility.Value>`
|
|
1341
|
+
]
|
|
1342
|
+
|
|
1343
|
+
Returns a tuple of the following format:
|
|
1344
|
+
|
|
1345
|
+
**(drill_to_layer, offset, diameter)**
|
|
1346
|
+
|
|
1347
|
+
**drill_to_layer** : Layer drills to. If drill from top, drill stops at the upper elevation of the layer.\
|
|
1348
|
+
If from bottom, drill stops at the lower elevation of the layer.
|
|
1349
|
+
|
|
1350
|
+
**offset** : Layer offset (or depth if layer is empty).
|
|
1351
|
+
|
|
1352
|
+
**diameter** : Drilling diameter.
|
|
1353
|
+
"""
|
|
1354
|
+
return self.prim_obj.GetBackDrillByLayer(from_bottom)
|
|
1355
|
+
|
|
1356
|
+
def set_back_drill_by_layer(self, drill_to_layer, offset, diameter, from_bottom):
|
|
1357
|
+
"""Set the back drill by layer.
|
|
1358
|
+
|
|
1359
|
+
Parameters
|
|
1360
|
+
----------
|
|
1361
|
+
drill_to_layer : :class:`Layer <ansys.edb.layer.Layer>`
|
|
1362
|
+
Layer drills to. If drill from top, drill stops at the upper elevation of the layer.
|
|
1363
|
+
If from bottom, drill stops at the lower elevation of the layer.
|
|
1364
|
+
offset : :class:`Value <ansys.edb.utility.Value>`
|
|
1365
|
+
Layer offset (or depth if layer is empty).
|
|
1366
|
+
diameter : :class:`Value <ansys.edb.utility.Value>`
|
|
1367
|
+
Drilling diameter.
|
|
1368
|
+
from_bottom : bool
|
|
1369
|
+
True to set drill type from bottom.
|
|
1370
|
+
"""
|
|
1371
|
+
self.prim_obj.SetBackDrillByLayer(drill_to_layer, offset, diameter, from_bottom)
|
|
1372
|
+
|
|
1373
|
+
def get_back_drill_by_depth(self, from_bottom):
|
|
1374
|
+
"""Get the back drill by depth.
|
|
1375
|
+
|
|
1376
|
+
Parameters
|
|
1377
|
+
----------
|
|
1378
|
+
from_bottom : bool
|
|
1379
|
+
True to get drill type from bottom.
|
|
1380
|
+
|
|
1381
|
+
Returns
|
|
1382
|
+
-------
|
|
1383
|
+
tuple[
|
|
1384
|
+
bool,
|
|
1385
|
+
:class:`Value <ansys.edb.utility.Value>`
|
|
1386
|
+
]
|
|
1387
|
+
Returns a tuple of the following format:
|
|
1388
|
+
|
|
1389
|
+
**(drill_depth, diameter)**
|
|
1390
|
+
|
|
1391
|
+
**drill_depth** : Drilling depth, may not align with layer.
|
|
1392
|
+
|
|
1393
|
+
**diameter** : Drilling diameter.
|
|
1394
|
+
"""
|
|
1395
|
+
return self.prim_obj.GetBackDrillByDepth(from_bottom)
|
|
1396
|
+
|
|
1397
|
+
def set_back_drill_by_depth(self, drill_depth, diameter, from_bottom):
|
|
1398
|
+
"""Set the back drill by Depth.
|
|
1399
|
+
|
|
1400
|
+
Parameters
|
|
1401
|
+
----------
|
|
1402
|
+
drill_depth : :class:`Value <ansys.edb.utility.Value>`
|
|
1403
|
+
Drilling depth, may not align with layer.
|
|
1404
|
+
diameter : :class:`Value <ansys.edb.utility.Value>`
|
|
1405
|
+
Drilling diameter.
|
|
1406
|
+
from_bottom : bool
|
|
1407
|
+
True to set drill type from bottom.
|
|
1408
|
+
"""
|
|
1409
|
+
self.prim_obj.SetBackDrillByDepth(drill_depth, diameter, from_bottom)
|
|
1410
|
+
|
|
1411
|
+
def get_padstack_instance_terminal(self):
|
|
1412
|
+
""":class:`TerminalInstance <ansys.edb.terminal.TerminalInstance>`: Padstack Instance's terminal."""
|
|
1413
|
+
return self.prim_obj.GetPadstackInstanceTerminal()
|
|
1414
|
+
|
|
1415
|
+
def is_in_pin_group(self, pin_group):
|
|
1416
|
+
"""Check if Padstack instance is in the Pin Group.
|
|
1417
|
+
|
|
1418
|
+
Parameters
|
|
1419
|
+
----------
|
|
1420
|
+
pin_group : :class:`PinGroup <ansys.edb.hierarchy.PinGroup>`
|
|
1421
|
+
Pin group to check if padstack instance is in.
|
|
1422
|
+
|
|
1423
|
+
Returns
|
|
1424
|
+
-------
|
|
1425
|
+
bool
|
|
1426
|
+
True if padstack instance is in pin group.
|
|
1427
|
+
"""
|
|
1428
|
+
return self.prim_obj.IsInPinGroup(pin_group)
|
|
1429
|
+
|
|
1430
|
+
@property
|
|
1431
|
+
def pin_groups(self):
|
|
1432
|
+
""":obj:`list` of :class:`PinGroup <ansys.edb.hierarchy.PinGroup>`: Pin groups of Padstack instance object.
|
|
1433
|
+
|
|
1434
|
+
Read-Only.
|
|
1435
|
+
"""
|
|
1436
|
+
return self.prim_obj.GetPinGroups()
|
|
1437
|
+
|
|
1438
|
+
|
|
1439
|
+
class BoardBendDef(PrimitiveDotNet):
|
|
1440
|
+
"""Class representing board bending definitions."""
|
|
1441
|
+
|
|
1442
|
+
def __init__(self, api, prim_obj=None):
|
|
1443
|
+
PrimitiveDotNet.__init__(self, api, prim_obj)
|
|
1444
|
+
|
|
1445
|
+
def create(self, zone_prim, bend_middle, bend_radius, bend_angle):
|
|
1446
|
+
"""Create a board bend definition.
|
|
1447
|
+
|
|
1448
|
+
Parameters
|
|
1449
|
+
----------
|
|
1450
|
+
zone_prim : :class:`Primitive <Primitive>`
|
|
1451
|
+
Zone primitive this board bend definition exists on.
|
|
1452
|
+
bend_middle : :term:`PointDataTuple`
|
|
1453
|
+
Tuple containing the starting and ending points of the line that represents the middle of the bend.
|
|
1454
|
+
bend_radius : :term:`ValueLike`
|
|
1455
|
+
Radius of the bend.
|
|
1456
|
+
bend_angle : :term:`ValueLike`
|
|
1457
|
+
Angle of the bend.
|
|
1458
|
+
|
|
1459
|
+
Returns
|
|
1460
|
+
-------
|
|
1461
|
+
BoardBendDef
|
|
1462
|
+
BoardBendDef that was created.
|
|
1463
|
+
"""
|
|
1464
|
+
return BoardBendDef(
|
|
1465
|
+
self._app,
|
|
1466
|
+
self.api.BoardBendDef.Create(
|
|
1467
|
+
zone_prim,
|
|
1468
|
+
bend_middle,
|
|
1469
|
+
bend_radius,
|
|
1470
|
+
bend_angle,
|
|
1471
|
+
),
|
|
1472
|
+
)
|
|
1473
|
+
|
|
1474
|
+
@property
|
|
1475
|
+
def boundary_primitive(self):
|
|
1476
|
+
""":class:`Primitive <Primitive>`: Zone primitive the board bend is placed on.
|
|
1477
|
+
|
|
1478
|
+
Read-Only.
|
|
1479
|
+
"""
|
|
1480
|
+
return cast(self.edb_api, self.prim_obj.GetBoundaryPrim())
|
|
1481
|
+
|
|
1482
|
+
@property
|
|
1483
|
+
def bend_middle(self):
|
|
1484
|
+
""":term:`PointDataTuple`: Tuple of the bend middle starting and ending points."""
|
|
1485
|
+
return self.prim_obj.GetBendMiddle()
|
|
1486
|
+
|
|
1487
|
+
@bend_middle.setter
|
|
1488
|
+
def bend_middle(self, bend_middle):
|
|
1489
|
+
self.prim_obj.SetBendMiddle(bend_middle)
|
|
1490
|
+
|
|
1491
|
+
@property
|
|
1492
|
+
def radius(self):
|
|
1493
|
+
""":term:`ValueLike`: Radius of the bend."""
|
|
1494
|
+
return self.prim_obj.GetRadius()
|
|
1495
|
+
|
|
1496
|
+
@radius.setter
|
|
1497
|
+
def radius(self, val):
|
|
1498
|
+
self.prim_obj.SetRadius(val)
|
|
1499
|
+
|
|
1500
|
+
@property
|
|
1501
|
+
def angle(self):
|
|
1502
|
+
""":term:`ValueLike`: Angle of the bend."""
|
|
1503
|
+
return self.prim_obj.GetAngle()
|
|
1504
|
+
|
|
1505
|
+
@angle.setter
|
|
1506
|
+
def angle(self, val):
|
|
1507
|
+
self.prim_obj.SetAngle(val)
|
|
1508
|
+
|
|
1509
|
+
@property
|
|
1510
|
+
def bent_regions(self):
|
|
1511
|
+
""":obj:`list` of :class:`PolygonData <ansys.edb.geometry.PolygonData>`: Bent region polygons.
|
|
1512
|
+
|
|
1513
|
+
Collection of polygon data representing the areas bent by this bend definition.
|
|
1514
|
+
|
|
1515
|
+
Read-Only.
|
|
1516
|
+
"""
|
|
1517
|
+
return self.prim_obj.GetBentRegions()
|