pyedb 0.38.0__py3-none-any.whl → 0.39.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 (205) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/common/nets.py +53 -139
  3. pyedb/configuration/cfg_components.py +1 -1
  4. pyedb/configuration/cfg_general.py +4 -2
  5. pyedb/configuration/cfg_modeler.py +1 -1
  6. pyedb/configuration/cfg_package_definition.py +1 -1
  7. pyedb/configuration/cfg_padstacks.py +1 -1
  8. pyedb/configuration/cfg_ports_sources.py +56 -23
  9. pyedb/configuration/configuration.py +18 -1
  10. pyedb/dotnet/{application → database}/Variables.py +21 -21
  11. pyedb/dotnet/{edb_core → database}/cell/connectable.py +5 -5
  12. pyedb/dotnet/{edb_core → database}/cell/hierarchy/component.py +11 -11
  13. pyedb/dotnet/{edb_core → database}/cell/hierarchy/hierarchy_obj.py +1 -1
  14. pyedb/dotnet/{edb_core → database}/cell/hierarchy/model.py +1 -1
  15. pyedb/dotnet/{edb_core → database}/cell/layout.py +17 -17
  16. pyedb/dotnet/{edb_core → database}/cell/layout_obj.py +3 -3
  17. pyedb/dotnet/{edb_core → database}/cell/primitive/bondwire.py +1 -1
  18. pyedb/dotnet/{edb_core → database}/cell/primitive/path.py +4 -4
  19. pyedb/dotnet/{edb_core → database}/cell/primitive/primitive.py +14 -14
  20. pyedb/dotnet/{edb_core → database}/cell/terminal/bundle_terminal.py +2 -2
  21. pyedb/dotnet/{edb_core → database}/cell/terminal/edge_terminal.py +4 -4
  22. pyedb/dotnet/{edb_core → database}/cell/terminal/padstack_instance_terminal.py +2 -2
  23. pyedb/dotnet/{edb_core → database}/cell/terminal/pingroup_terminal.py +2 -2
  24. pyedb/dotnet/{edb_core → database}/cell/terminal/point_terminal.py +2 -2
  25. pyedb/dotnet/{edb_core → database}/cell/terminal/terminal.py +11 -11
  26. pyedb/dotnet/{edb_core → database}/cell/voltage_regulator.py +2 -2
  27. pyedb/dotnet/{edb_core → database}/components.py +101 -124
  28. pyedb/dotnet/{edb_core → database}/definition/component_def.py +5 -5
  29. pyedb/dotnet/{edb_core → database}/definition/component_model.py +1 -1
  30. pyedb/dotnet/{edb_core → database}/definition/definition_obj.py +1 -1
  31. pyedb/dotnet/{edb_core → database}/definition/definitions.py +2 -2
  32. pyedb/dotnet/{edb_core → database}/definition/package_def.py +4 -4
  33. pyedb/dotnet/{edb_core → database}/dotnet/database.py +8 -8
  34. pyedb/dotnet/{edb_core → database}/dotnet/primitive.py +9 -9
  35. pyedb/dotnet/{edb_core → database}/edb_data/control_file.py +12 -12
  36. pyedb/dotnet/{edb_core → database}/edb_data/hfss_extent_info.py +7 -7
  37. pyedb/dotnet/{edb_core → database}/edb_data/nets_data.py +10 -13
  38. pyedb/dotnet/{edb_core → database}/edb_data/padstacks_data.py +16 -16
  39. pyedb/dotnet/{edb_core → database}/edb_data/ports.py +4 -4
  40. pyedb/dotnet/{edb_core → database}/edb_data/primitives_data.py +5 -5
  41. pyedb/dotnet/{edb_core → database}/edb_data/raptor_x_simulation_setup_data.py +4 -4
  42. pyedb/dotnet/{edb_core → database}/edb_data/simulation_configuration.py +10 -10
  43. pyedb/dotnet/{edb_core → database}/edb_data/sources.py +4 -4
  44. pyedb/dotnet/{edb_core → database}/edb_data/variables.py +1 -1
  45. pyedb/dotnet/{edb_core → database}/geometry/polygon_data.py +4 -4
  46. pyedb/dotnet/{edb_core → database}/hfss.py +8 -8
  47. pyedb/dotnet/{edb_core → database}/layout_obj_instance.py +1 -1
  48. pyedb/dotnet/{edb_core → database}/layout_validation.py +2 -2
  49. pyedb/dotnet/{edb_core → database}/materials.py +23 -8
  50. pyedb/dotnet/{edb_core → database}/modeler.py +27 -27
  51. pyedb/dotnet/{edb_core → database}/net_class.py +8 -8
  52. pyedb/dotnet/{edb_core → database}/nets.py +12 -12
  53. pyedb/dotnet/{edb_core → database}/padstack.py +15 -15
  54. pyedb/dotnet/{edb_core → database}/sim_setup_data/data/mesh_operation.py +1 -1
  55. pyedb/dotnet/{edb_core → database}/sim_setup_data/data/settings.py +3 -3
  56. pyedb/dotnet/{edb_core → database}/sim_setup_data/data/sim_setup_info.py +2 -2
  57. pyedb/dotnet/{edb_core → database}/sim_setup_data/data/simulation_settings.py +1 -1
  58. pyedb/dotnet/{edb_core → database}/sim_setup_data/data/siw_dc_ir_settings.py +1 -1
  59. pyedb/dotnet/{edb_core → database}/sim_setup_data/data/sweep_data.py +1 -1
  60. pyedb/dotnet/{edb_core → database}/siwave.py +10 -10
  61. pyedb/dotnet/{edb_core → database}/stackup.py +12 -12
  62. pyedb/dotnet/{edb_core → database}/utilities/hfss_simulation_setup.py +15 -15
  63. pyedb/dotnet/{edb_core → database}/utilities/obj_base.py +1 -1
  64. pyedb/dotnet/{edb_core → database}/utilities/simulation_setup.py +3 -3
  65. pyedb/dotnet/{edb_core → database}/utilities/siwave_simulation_setup.py +6 -6
  66. pyedb/dotnet/edb.py +117 -112
  67. pyedb/generic/design_types.py +26 -19
  68. pyedb/generic/general_methods.py +1 -1
  69. pyedb/generic/plot.py +0 -2
  70. pyedb/grpc/database/__init__.py +1 -0
  71. pyedb/grpc/database/components.py +2354 -0
  72. pyedb/grpc/database/control_file.py +1277 -0
  73. pyedb/grpc/database/definition/component_def.py +218 -0
  74. pyedb/grpc/database/definition/component_model.py +39 -0
  75. pyedb/grpc/database/definition/component_pin.py +32 -0
  76. pyedb/grpc/database/definition/materials.py +1207 -0
  77. pyedb/grpc/database/definition/n_port_component_model.py +34 -0
  78. pyedb/grpc/database/definition/package_def.py +227 -0
  79. pyedb/grpc/database/definition/padstack_def.py +842 -0
  80. pyedb/grpc/database/definitions.py +70 -0
  81. pyedb/grpc/database/general.py +43 -0
  82. pyedb/grpc/database/geometry/__init__.py +0 -0
  83. pyedb/grpc/database/geometry/arc_data.py +93 -0
  84. pyedb/grpc/database/geometry/point_3d_data.py +79 -0
  85. pyedb/grpc/database/geometry/point_data.py +30 -0
  86. pyedb/grpc/database/geometry/polygon_data.py +133 -0
  87. pyedb/grpc/database/hfss.py +1279 -0
  88. pyedb/grpc/database/hierarchy/__init__.py +0 -0
  89. pyedb/grpc/database/hierarchy/component.py +1301 -0
  90. pyedb/grpc/database/hierarchy/model.py +31 -0
  91. pyedb/grpc/database/hierarchy/netlist_model.py +30 -0
  92. pyedb/grpc/database/hierarchy/pin_pair_model.py +128 -0
  93. pyedb/grpc/database/hierarchy/pingroup.py +245 -0
  94. pyedb/grpc/database/hierarchy/s_parameter_model.py +33 -0
  95. pyedb/grpc/database/hierarchy/spice_model.py +48 -0
  96. pyedb/grpc/database/layers/__init__.py +0 -0
  97. pyedb/grpc/database/layers/layer.py +57 -0
  98. pyedb/grpc/database/layers/stackup_layer.py +410 -0
  99. pyedb/grpc/database/layout/__init__.py +0 -0
  100. pyedb/grpc/database/layout/cell.py +30 -0
  101. pyedb/grpc/database/layout/layout.py +196 -0
  102. pyedb/grpc/database/layout/voltage_regulator.py +149 -0
  103. pyedb/grpc/database/layout_validation.py +319 -0
  104. pyedb/grpc/database/modeler.py +1468 -0
  105. pyedb/grpc/database/net/__init__.py +0 -0
  106. pyedb/grpc/database/net/differential_pair.py +138 -0
  107. pyedb/grpc/database/net/extended_net.py +340 -0
  108. pyedb/grpc/database/net/net.py +198 -0
  109. pyedb/grpc/database/net/net_class.py +93 -0
  110. pyedb/grpc/database/nets.py +633 -0
  111. pyedb/grpc/database/padstacks.py +1500 -0
  112. pyedb/grpc/database/ports/__init__.py +0 -0
  113. pyedb/grpc/database/ports/ports.py +396 -0
  114. pyedb/grpc/database/primitive/__init__.py +3 -0
  115. pyedb/grpc/database/primitive/bondwire.py +181 -0
  116. pyedb/grpc/database/primitive/circle.py +75 -0
  117. pyedb/grpc/database/primitive/padstack_instance.py +1116 -0
  118. pyedb/grpc/database/primitive/path.py +346 -0
  119. pyedb/grpc/database/primitive/polygon.py +276 -0
  120. pyedb/grpc/database/primitive/primitive.py +739 -0
  121. pyedb/grpc/database/primitive/rectangle.py +146 -0
  122. pyedb/grpc/database/simulation_setup/__init__.py +0 -0
  123. pyedb/grpc/database/simulation_setup/adaptive_frequency.py +33 -0
  124. pyedb/grpc/database/simulation_setup/hfss_advanced_meshing_settings.py +32 -0
  125. pyedb/grpc/database/simulation_setup/hfss_advanced_settings.py +59 -0
  126. pyedb/grpc/database/simulation_setup/hfss_dcr_settings.py +35 -0
  127. pyedb/grpc/database/simulation_setup/hfss_general_settings.py +61 -0
  128. pyedb/grpc/database/simulation_setup/hfss_settings_options.py +78 -0
  129. pyedb/grpc/database/simulation_setup/hfss_simulation_settings.py +118 -0
  130. pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +355 -0
  131. pyedb/grpc/database/simulation_setup/hfss_solver_settings.py +34 -0
  132. pyedb/grpc/database/simulation_setup/mesh_operation.py +34 -0
  133. pyedb/grpc/database/simulation_setup/raptor_x_advanced_settings.py +34 -0
  134. pyedb/grpc/database/simulation_setup/raptor_x_general_settings.py +33 -0
  135. pyedb/grpc/database/simulation_setup/raptor_x_simulation_settings.py +64 -0
  136. pyedb/grpc/database/simulation_setup/raptor_x_simulation_setup.py +125 -0
  137. pyedb/grpc/database/simulation_setup/siwave_dcir_simulation_setup.py +34 -0
  138. pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +119 -0
  139. pyedb/grpc/database/simulation_setup/sweep_data.py +32 -0
  140. pyedb/grpc/database/siwave.py +1023 -0
  141. pyedb/grpc/database/source_excitations.py +2572 -0
  142. pyedb/grpc/database/stackup.py +2574 -0
  143. pyedb/grpc/database/terminal/__init__.py +0 -0
  144. pyedb/grpc/database/terminal/bundle_terminal.py +218 -0
  145. pyedb/grpc/database/terminal/edge_terminal.py +51 -0
  146. pyedb/grpc/database/terminal/padstack_instance_terminal.py +171 -0
  147. pyedb/grpc/database/terminal/pingroup_terminal.py +162 -0
  148. pyedb/grpc/database/terminal/point_terminal.py +99 -0
  149. pyedb/grpc/database/terminal/terminal.py +470 -0
  150. pyedb/grpc/database/utility/__init__.py +3 -0
  151. pyedb/grpc/database/utility/constants.py +25 -0
  152. pyedb/grpc/database/utility/heat_sink.py +124 -0
  153. pyedb/grpc/database/utility/hfss_extent_info.py +448 -0
  154. pyedb/grpc/database/utility/layout_statistics.py +277 -0
  155. pyedb/grpc/database/utility/rlc.py +80 -0
  156. pyedb/grpc/database/utility/simulation_configuration.py +3305 -0
  157. pyedb/grpc/database/utility/sources.py +388 -0
  158. pyedb/grpc/database/utility/sweep_data_distribution.py +83 -0
  159. pyedb/grpc/database/utility/xml_control_file.py +1277 -0
  160. pyedb/grpc/edb.py +4152 -0
  161. pyedb/grpc/edb_init.py +481 -0
  162. pyedb/grpc/rpc_session.py +177 -0
  163. pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +3 -2
  164. pyedb/ipc2581/ecad/cad_data/feature.py +4 -3
  165. pyedb/ipc2581/ecad/cad_data/layer_feature.py +32 -20
  166. pyedb/ipc2581/ecad/cad_data/outline.py +3 -2
  167. pyedb/ipc2581/ecad/cad_data/package.py +4 -3
  168. pyedb/ipc2581/ecad/cad_data/path.py +82 -31
  169. pyedb/ipc2581/ecad/cad_data/polygon.py +122 -60
  170. pyedb/ipc2581/ecad/cad_data/profile.py +13 -12
  171. pyedb/ipc2581/ecad/cad_data/step.py +53 -21
  172. pyedb/ipc2581/ipc2581.py +47 -49
  173. pyedb/modeler/geometry_operators.py +1 -1
  174. {pyedb-0.38.0.dist-info → pyedb-0.39.1.dist-info}/METADATA +5 -2
  175. pyedb-0.39.1.dist-info/RECORD +288 -0
  176. pyedb-0.38.0.dist-info/RECORD +0 -195
  177. /pyedb/dotnet/{edb_core → database}/__init__.py +0 -0
  178. /pyedb/dotnet/{application → database/cell}/__init__.py +0 -0
  179. /pyedb/dotnet/{edb_core/cell → database/cell/hierarchy}/__init__.py +0 -0
  180. /pyedb/dotnet/{edb_core → database}/cell/hierarchy/netlist_model.py +0 -0
  181. /pyedb/dotnet/{edb_core → database}/cell/hierarchy/pin_pair_model.py +0 -0
  182. /pyedb/dotnet/{edb_core → database}/cell/hierarchy/s_parameter_model.py +0 -0
  183. /pyedb/dotnet/{edb_core → database}/cell/hierarchy/spice_model.py +0 -0
  184. /pyedb/dotnet/{edb_core → database}/cell/primitive/__init__.py +0 -0
  185. /pyedb/dotnet/{edb_core/cell/hierarchy → database/cell/terminal}/__init__.py +0 -0
  186. /pyedb/dotnet/{edb_core/cell/terminal → database/definition}/__init__.py +0 -0
  187. /pyedb/dotnet/{edb_core/definition → database/dotnet}/__init__.py +0 -0
  188. /pyedb/dotnet/{edb_core/dotnet → database/edb_data}/__init__.py +0 -0
  189. /pyedb/dotnet/{edb_core → database}/edb_data/design_options.py +0 -0
  190. /pyedb/dotnet/{edb_core → database}/edb_data/edbvalue.py +0 -0
  191. /pyedb/dotnet/{edb_core → database}/edb_data/layer_data.py +0 -0
  192. /pyedb/dotnet/{edb_core → database}/edb_data/utilities.py +0 -0
  193. /pyedb/dotnet/{edb_core → database}/general.py +0 -0
  194. /pyedb/dotnet/{edb_core/edb_data → database/geometry}/__init__.py +0 -0
  195. /pyedb/dotnet/{edb_core → database}/geometry/point_data.py +0 -0
  196. /pyedb/dotnet/{edb_core → database}/sim_setup_data/__init__.py +0 -0
  197. /pyedb/dotnet/{edb_core → database}/sim_setup_data/data/__init__.py +0 -0
  198. /pyedb/dotnet/{edb_core → database}/sim_setup_data/data/adaptive_frequency_data.py +0 -0
  199. /pyedb/dotnet/{edb_core/geometry → database/sim_setup_data/io}/__init__.py +0 -0
  200. /pyedb/dotnet/{edb_core → database}/sim_setup_data/io/siwave.py +0 -0
  201. /pyedb/dotnet/{edb_core → database}/utilities/__init__.py +0 -0
  202. /pyedb/dotnet/{edb_core → database}/utilities/heatsink.py +0 -0
  203. /pyedb/{dotnet/edb_core/sim_setup_data/io → grpc/database/definition}/__init__.py +0 -0
  204. {pyedb-0.38.0.dist-info → pyedb-0.39.1.dist-info}/LICENSE +0 -0
  205. {pyedb-0.38.0.dist-info → pyedb-0.39.1.dist-info}/WHEEL +0 -0
File without changes
@@ -0,0 +1,396 @@
1
+ # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
2
+ # SPDX-License-Identifier: MIT
3
+ #
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ # SOFTWARE.
22
+
23
+ from ansys.edb.core.utility.value import Value as GrpcValue
24
+
25
+ from pyedb.dotnet.database.cell.terminal.terminal import Terminal
26
+ from pyedb.grpc.database.terminal.bundle_terminal import BundleTerminal
27
+ from pyedb.grpc.database.terminal.edge_terminal import EdgeTerminal
28
+ from pyedb.grpc.database.terminal.padstack_instance_terminal import (
29
+ PadstackInstanceTerminal,
30
+ )
31
+
32
+
33
+ class GapPort(EdgeTerminal):
34
+ """Manages gap port properties.
35
+
36
+ Parameters
37
+ ----------
38
+ pedb : pyedb.edb.Edb
39
+ EDB object from the ``Edblib`` library.
40
+ edb_object : Ansys.Ansoft.Edb.Cell.Terminal.EdgeTerminal
41
+ Edge terminal instance from EDB.
42
+
43
+ Examples
44
+ --------
45
+ This example shows how to access the ``GapPort`` class.
46
+ >>> from pyedb import Edb
47
+ >>> edb = Edb("myaedb.aedb")
48
+ >>> gap_port = edb.ports["gap_port"]
49
+ """
50
+
51
+ def __init__(self, pedb, edb_object):
52
+ super().__init__(pedb, edb_object)
53
+
54
+ @property
55
+ def magnitude(self):
56
+ """Magnitude.
57
+
58
+ Returns
59
+ -------
60
+ float
61
+ Magnitude value.
62
+ """
63
+ return self._edb_object.source_amplitude.value
64
+
65
+ @property
66
+ def phase(self):
67
+ """Phase.
68
+
69
+ Returns
70
+ -------
71
+ float
72
+ Phase value.
73
+ """
74
+ return self._edb_object.source_phase.value
75
+
76
+ @property
77
+ def renormalize(self):
78
+ """Whether renormalize is active.
79
+
80
+ Returns
81
+ -------
82
+ bool
83
+ """
84
+ return self._edb_object.port_post_processing_prop.do_renormalize
85
+
86
+ @property
87
+ def deembed(self):
88
+ """Deembed gap port.
89
+
90
+ Returns
91
+ -------
92
+ bool
93
+
94
+ """
95
+ return self._edb_object.port_post_processing_prop.do_deembed
96
+
97
+ @property
98
+ def renormalize_z0(self):
99
+ """Renormalize Z0 value (real, imag).
100
+
101
+ Returns
102
+ -------
103
+ Tuple(float, float)
104
+ (Real value, Imaginary value).
105
+ """
106
+ return (
107
+ self._edb_object.port_post_processing_prop.renormalizion_z0[0],
108
+ self._edb_object.port_post_processing_prop.renormalizion_z0[1],
109
+ )
110
+
111
+
112
+ class CircuitPort(GapPort):
113
+ """Manages gap port properties.
114
+ Parameters
115
+ ----------
116
+ pedb : pyedb.edb.Edb
117
+ EDB object from the ``Edblib`` library.
118
+ edb_object : Ansys.Ansoft.Edb.Cell.Terminal.EdgeTerminal
119
+ Edge terminal instance from EDB.
120
+ Examples
121
+ --------
122
+ This example shows how to access the ``GapPort`` class.
123
+ """
124
+
125
+ def __init__(self, pedb, edb_object):
126
+ super().__init__(pedb, edb_object)
127
+
128
+
129
+ class WavePort(EdgeTerminal):
130
+ """Manages wave port properties.
131
+
132
+ Parameters
133
+ ----------
134
+ pedb : pyedb.edb.Edb
135
+ EDB object from the ``Edblib`` library.
136
+ edb_object : Ansys.Ansoft.Edb.Cell.Terminal.EdgeTerminal
137
+ Edge terminal instance from EDB.
138
+
139
+ Examples
140
+ --------
141
+ This example shows how to access the ``WavePort`` class.
142
+
143
+ >>> from pyedb import Edb
144
+ >>> edb = Edb("myaedb.aedb")
145
+ >>> exc = edb.ports
146
+ """
147
+
148
+ def __init__(self, pedb, edb_terminal):
149
+ super().__init__(pedb, edb_terminal.msg)
150
+
151
+ @property
152
+ def horizontal_extent_factor(self):
153
+ """Horizontal extent factor.
154
+
155
+ Returns
156
+ -------
157
+ float
158
+ Extent value.
159
+ """
160
+ return self._hfss_port_property["Horizontal Extent Factor"]
161
+
162
+ @horizontal_extent_factor.setter
163
+ def horizontal_extent_factor(self, value):
164
+ self.p = p
165
+ p = self.p
166
+ p["Horizontal Extent Factor"] = value
167
+
168
+ @property
169
+ def vertical_extent_factor(self):
170
+ """Vertical extent factor.
171
+
172
+ Returns
173
+ -------
174
+ float
175
+ Vertical extent value.
176
+
177
+ """
178
+ return self._hfss_port_property["Vertical Extent Factor"]
179
+
180
+ @vertical_extent_factor.setter
181
+ def vertical_extent_factor(self, value):
182
+ p = self._hfss_port_property
183
+ p["Vertical Extent Factor"] = value
184
+ self._hfss_port_property = p
185
+
186
+ @property
187
+ def pec_launch_width(self):
188
+ """Launch width for the printed electronic component (PEC).
189
+
190
+ Returns
191
+ -------
192
+ float
193
+ Pec launch width value.
194
+ """
195
+ return self._hfss_port_property["PEC Launch Width"]
196
+
197
+ @pec_launch_width.setter
198
+ def pec_launch_width(self, value):
199
+ p = self._hfss_port_property
200
+ p["PEC Launch Width"] = value
201
+ self._hfss_port_property = p
202
+
203
+ @property
204
+ def deembed(self):
205
+ """Whether deembed is active.
206
+
207
+ Returns
208
+ -------
209
+ bool
210
+
211
+ """
212
+ return self._edb_object.port_post_processing_prop.do_deembed
213
+
214
+ @deembed.setter
215
+ def deembed(self, value):
216
+ p = self._edb_object.port_post_processing_prop
217
+ p.DoDeembed = value
218
+ self._edb_object.port_post_processing_prop = p
219
+
220
+ @property
221
+ def deembed_length(self):
222
+ """Deembed Length.
223
+
224
+ Returns
225
+ -------
226
+ float
227
+ deembed value.
228
+ """
229
+ return self._edb_object.port_post_processing_prop.deembed_length.value
230
+
231
+ @deembed_length.setter
232
+ def deembed_length(self, value):
233
+ p = self._edb_object.port_post_processing_prop
234
+ p.deembed_length = GrpcValue(value)
235
+ self._edb_object.port_post_processing_prop = p
236
+
237
+
238
+ class ExcitationSources(Terminal):
239
+ """Manage sources properties.
240
+
241
+ Parameters
242
+ ----------
243
+ pedb : pyedb.edb.Edb
244
+ Edb object from Edblib.
245
+ edb_terminal : Ansys.Ansoft.Edb.Cell.Terminal.EdgeTerminal
246
+ Edge terminal instance from Edb.
247
+
248
+
249
+
250
+ Examples
251
+ --------
252
+ This example shows how to access this class.
253
+ >>> from pyedb import Edb
254
+ >>> edb = Edb("myaedb.aedb")
255
+ >>> all_sources = edb.sources
256
+ >>> print(all_sources["VSource1"].name)
257
+
258
+ """
259
+
260
+ def __init__(self, pedb, edb_terminal):
261
+ Terminal.__init__(self, pedb, edb_terminal)
262
+
263
+
264
+ class BundleWavePort(BundleTerminal):
265
+ """Manages bundle wave port properties.
266
+
267
+ Parameters
268
+ ----------
269
+ pedb : pyedb.edb.Edb
270
+ EDB object from the ``Edblib`` library.
271
+ edb_object : Ansys.Ansoft.Edb.Cell.Terminal.BundleTerminal
272
+ BundleTerminal instance from EDB.
273
+
274
+ """
275
+
276
+ def __init__(self, pedb, edb_object):
277
+ super().__init__(pedb, edb_object)
278
+
279
+ @property
280
+ def _wave_port(self):
281
+ """ "Wave port.
282
+
283
+
284
+ Returns
285
+ -------
286
+ :class:`WavePort <pyedb.grpc.ports.ports.WavePort>`
287
+
288
+ """
289
+ return WavePort(self._pedb, self.terminals[0]._edb_object)
290
+
291
+ @property
292
+ def horizontal_extent_factor(self):
293
+ """Horizontal extent factor.
294
+
295
+ Returns
296
+ -------
297
+ float
298
+ Horizontal extent value.
299
+ """
300
+ return self._wave_port.horizontal_extent_factor
301
+
302
+ @horizontal_extent_factor.setter
303
+ def horizontal_extent_factor(self, value):
304
+ self._wave_port.horizontal_extent_factor = value
305
+
306
+ @property
307
+ def vertical_extent_factor(self):
308
+ """Vertical extent factor.
309
+
310
+ Returns
311
+ -------
312
+ float
313
+ Vertical extent value.
314
+ """
315
+ return self._wave_port.vertical_extent_factor
316
+
317
+ @vertical_extent_factor.setter
318
+ def vertical_extent_factor(self, value):
319
+ self._wave_port.vertical_extent_factor = value
320
+
321
+ @property
322
+ def pec_launch_width(self):
323
+ """Launch width for the printed electronic component (PEC).
324
+
325
+ Returns
326
+ -------
327
+ float
328
+ Width value.
329
+ """
330
+ return self._wave_port.pec_launch_width
331
+
332
+ @pec_launch_width.setter
333
+ def pec_launch_width(self, value):
334
+ self._wave_port.pec_launch_width = value
335
+
336
+ @property
337
+ def deembed(self):
338
+ """Whether deembed is active.
339
+
340
+ Returns
341
+ -------
342
+ bool
343
+ """
344
+ return self._wave_port.deembed
345
+
346
+ @deembed.setter
347
+ def deembed(self, value):
348
+ self._wave_port.deembed = value
349
+
350
+ @property
351
+ def deembed_length(self):
352
+ """Deembed Length.
353
+
354
+ Returns
355
+ -------
356
+ float
357
+ Length value.
358
+ """
359
+ return self._wave_port.deembed_length
360
+
361
+ @deembed_length.setter
362
+ def deembed_length(self, value):
363
+ self._wave_port.deembed_length = value
364
+
365
+
366
+ class CoaxPort(PadstackInstanceTerminal):
367
+ """Manages bundle wave port properties.
368
+
369
+ Parameters
370
+ ----------
371
+ pedb : pyedb.edb.Edb
372
+ EDB object from the ``Edblib`` library.
373
+ edb_object : Ansys.Ansoft.Edb.Cell.Terminal.PadstackInstanceTerminal
374
+ PadstackInstanceTerminal instance from EDB.
375
+
376
+ """
377
+
378
+ def __init__(self, pedb, edb_object):
379
+ super().__init__(pedb, edb_object)
380
+
381
+ @property
382
+ def radial_extent_factor(self):
383
+ """Radial extent factor.
384
+
385
+ Returns
386
+ -------
387
+ float
388
+ Radial extent value.
389
+ """
390
+ return self._hfss_port_property["Radial Extent Factor"]
391
+
392
+ @radial_extent_factor.setter
393
+ def radial_extent_factor(self, value):
394
+ p = self._hfss_port_property
395
+ p["Radial Extent Factor"] = value
396
+ self._hfss_port_property = p
@@ -0,0 +1,3 @@
1
+ from pathlib import Path
2
+
3
+ workdir = Path(__file__).parent
@@ -0,0 +1,181 @@
1
+ # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
2
+ # SPDX-License-Identifier: MIT
3
+ #
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ # SOFTWARE.
22
+
23
+ from ansys.edb.core.primitive.primitive import (
24
+ BondwireCrossSectionType as GrpcBondwireCrossSectionType,
25
+ )
26
+ from ansys.edb.core.primitive.primitive import Bondwire as GrpcBondWire
27
+ from ansys.edb.core.primitive.primitive import BondwireType as GrpcBondWireType
28
+ from ansys.edb.core.utility.value import Value as GrpcValue
29
+
30
+
31
+ class Bondwire(GrpcBondWire):
32
+ """Class representing a bond-wire object."""
33
+
34
+ def __init__(self, _pedb, edb_object):
35
+ super().__init__(edb_object.msg)
36
+ self._pedb = _pedb
37
+ self._edb_object = edb_object
38
+
39
+ @property
40
+ def material(self):
41
+ """Bondwire material
42
+
43
+ Returns
44
+ -------
45
+ str
46
+ Material name.
47
+
48
+ """
49
+ return self.get_material().value
50
+
51
+ @material.setter
52
+ def material(self, value):
53
+ self.set_material(value)
54
+
55
+ # def __create(self, **kwargs):
56
+ # return Bondwire.create(
57
+ # self._pedb.layout,
58
+ # kwargs.get("net"),
59
+ # self._bondwire_type[kwargs.get("bondwire_type")],
60
+ # kwargs.get("definition_name"),
61
+ # kwargs.get("placement_layer"),
62
+ # kwargs.get("width"),
63
+ # kwargs.get("material"),
64
+ # kwargs.get("start_context"),
65
+ # kwargs.get("start_layer_name"),
66
+ # kwargs.get("start_x"),
67
+ # kwargs.get("start_y"),
68
+ # kwargs.get("end_context"),
69
+ # kwargs.get("end_layer_name"),
70
+ # kwargs.get("end_x"),
71
+ # kwargs.get("end_y"),
72
+ # )
73
+
74
+ @property
75
+ def type(self):
76
+ """str: Bondwire-type of a bondwire object. Supported values for setter: `"apd"`, `"jedec4"`, `"jedec5"`,
77
+ `"num_of_type"`"""
78
+ return super().type.name.lower()
79
+
80
+ @type.setter
81
+ def type(self, bondwire_type):
82
+ mapping = {
83
+ "apd": GrpcBondWireType.APD,
84
+ "jedec4": GrpcBondWireType.JEDEC4,
85
+ "jedec5": GrpcBondWireType.JEDEC5,
86
+ "num_of_type": GrpcBondWireType.NUM_OF_TYPE,
87
+ }
88
+ super(Bondwire, self.__class__).type.__set__(self, mapping[bondwire_type])
89
+
90
+ @property
91
+ def cross_section_type(self):
92
+ """str: Bondwire-cross-section-type of a bondwire object. Supported values for setter: `"round",
93
+ `"rectangle"`
94
+
95
+ Returns
96
+ -------
97
+ str
98
+ cross section type.
99
+ """
100
+ return super().cross_section_type.name.lower()
101
+
102
+ @cross_section_type.setter
103
+ def cross_section_type(self, cross_section_type):
104
+ mapping = {"round": GrpcBondwireCrossSectionType.ROUND, "rectangle": GrpcBondwireCrossSectionType.RECTANGLE}
105
+ super(Bondwire, self.__class__).cross_section_type.__set__(self, mapping[cross_section_type])
106
+
107
+ @property
108
+ def cross_section_height(self):
109
+ """float: Bondwire-cross-section height of a bondwire object.
110
+
111
+ Returns
112
+ -------
113
+ float
114
+ Cross section height.
115
+ """
116
+ return super().cross_section_height.value
117
+
118
+ @cross_section_height.setter
119
+ def cross_section_height(self, cross_section_height):
120
+ super(Bondwire, self.__class__).cross_section_height.__set__(self, GrpcValue(cross_section_height))
121
+
122
+ # @property
123
+ # def trajectory(self):
124
+ # """Get trajectory parameters of a bondwire object.
125
+ #
126
+ # Returns
127
+ # -------
128
+ # tuple[float, float, float, float]
129
+ #
130
+ # Returns a tuple of the following format:
131
+ # **(x1, y1, x2, y2)**
132
+ # **x1** : X value of the start point.
133
+ # **y1** : Y value of the start point.
134
+ # **x1** : X value of the end point.
135
+ # **y1** : Y value of the end point.
136
+ # """
137
+ # return [i.value for i in self.get_traj()]
138
+ #
139
+ # @trajectory.setter
140
+ # def trajectory(self, value):
141
+ # values = [GrpcValue(i) for i in value]
142
+ # self.set_traj(values[0], values[1], values[2], values[3])
143
+
144
+ @property
145
+ def width(self):
146
+ """:class:`Value <ansys.edb.utility.Value>`: Width of a bondwire object.
147
+
148
+ Returns
149
+ -------
150
+ float
151
+ Width value.
152
+ """
153
+ return super().width.value
154
+
155
+ @width.setter
156
+ def width(self, width):
157
+ super(Bondwire, self.__class__).width.__set__(self, GrpcValue(width))
158
+
159
+ # @property
160
+ # def start_elevation(self):
161
+ # layer = self.get_start_elevation(self._pedb.active_cell)
162
+ # return layer.name
163
+ #
164
+ # @start_elevation.setter
165
+ # def start_elevation(self, layer):
166
+ # if not layer in self._pedb.stackup.layers:
167
+ # return
168
+ # layer = self._pedb.stackup.layers[layer]
169
+ # self.set_start_elevation(self._pedb.active_cell, layer)
170
+ #
171
+ # @property
172
+ # def end_elevation(self):
173
+ # layer = self.get_end_elevation(self._pedb.active_cell)
174
+ # return layer.name
175
+ #
176
+ # @end_elevation.setter
177
+ # def end_elevation(self, layer):
178
+ # if not layer in self._pedb.stackup.layers:
179
+ # return
180
+ # layer = self._pedb.stackup.layers[layer]
181
+ # self.set_end_elevation(self._pedb.active_cell, layer)
@@ -0,0 +1,75 @@
1
+ # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
2
+ # SPDX-License-Identifier: MIT
3
+ #
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ # SOFTWARE.
22
+
23
+
24
+ from ansys.edb.core.primitive.primitive import Circle as GrpcCircle
25
+ from ansys.edb.core.utility.value import Value as GrpcValue
26
+
27
+ from pyedb.grpc.database.primitive.primitive import Primitive
28
+
29
+
30
+ class Circle(GrpcCircle, Primitive):
31
+ def __init__(self, pedb, edb_object):
32
+ GrpcCircle.__init__(self, edb_object.msg)
33
+ Primitive.__init__(self, pedb, edb_object)
34
+ self._pedb = pedb
35
+
36
+ def get_parameters(self):
37
+ """Returns parameters.
38
+
39
+ Returns
40
+ -------
41
+ tuple[
42
+ :class:`.Value`,
43
+ :class:`.Value`,
44
+ :class:`.Value`
45
+ ]
46
+
47
+ Returns a tuple in this format:
48
+
49
+ **(center_x, center_y, radius)**
50
+
51
+ **center_x** : X value of center point.
52
+
53
+ **center_y** : Y value of center point.
54
+
55
+ **radius** : Radius value of the circle.
56
+
57
+
58
+ """
59
+ params = super().get_parameters()
60
+ return params[0].value, params[1].value, params[2].value
61
+
62
+ def set_parameters(self, center_x, center_y, radius):
63
+ """Set parameters.
64
+
65
+ Parameters
66
+ ----------
67
+ center_x : float
68
+ Center x value.
69
+ center_y : float
70
+ Center y value
71
+ radius : float
72
+ Circle radius.
73
+
74
+ """
75
+ super().set_parameters(GrpcValue(center_x), GrpcValue(center_y), GrpcValue(radius))