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
@@ -0,0 +1,1279 @@
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
+ This module contains the ``EdbHfss`` class.
25
+ """
26
+ import math
27
+ import warnings
28
+
29
+ from ansys.edb.core.geometry.polygon_data import PolygonData as GrpcPolygonData
30
+
31
+ from pyedb.generic.general_methods import generate_unique_name
32
+ from pyedb.grpc.database.simulation_setup.hfss_simulation_setup import (
33
+ HfssSimulationSetup,
34
+ )
35
+ from pyedb.grpc.database.utility.hfss_extent_info import HfssExtentInfo
36
+ from pyedb.modeler.geometry_operators import GeometryOperators
37
+
38
+
39
+ class Hfss(object):
40
+ """Manages EDB method to configure Hfss setup accessible from `Edb.hfss` property."""
41
+
42
+ def __init__(self, p_edb):
43
+ self._pedb = p_edb
44
+
45
+ @property
46
+ def hfss_extent_info(self):
47
+ """HFSS extent information."""
48
+ return HfssExtentInfo(self._pedb)
49
+
50
+ @property
51
+ def _logger(self):
52
+ return self._pedb.logger
53
+
54
+ @property
55
+ def _edb(self):
56
+ """EDB object.
57
+
58
+ Returns
59
+ -------
60
+ Ansys.Ansoft.Edb
61
+ """
62
+ return self._pedb
63
+
64
+ @property
65
+ def _active_layout(self):
66
+ return self._pedb.active_layout
67
+
68
+ @property
69
+ def _layout(self):
70
+ return self._pedb.layout
71
+
72
+ @property
73
+ def _cell(self):
74
+ return self._pedb.cell
75
+
76
+ @property
77
+ def _db(self):
78
+ return self._pedb.active_db
79
+
80
+ @property
81
+ def excitations(self):
82
+ """Get all excitations."""
83
+ return self._pedb.excitations
84
+
85
+ @property
86
+ def sources(self):
87
+ """Get all sources."""
88
+ return self._pedb.sources
89
+
90
+ @property
91
+ def probes(self):
92
+ """Get all probes."""
93
+ return self._pedb.probes
94
+
95
+ def _create_edge_terminal(self, prim_id, point_on_edge, terminal_name=None, is_ref=False):
96
+ """Create an edge terminal.
97
+
98
+ . deprecated:: pyedb 0.28.0
99
+ Use :func:`_create_edge_terminal` is move to pyedb.grpc.database.excitations._create_edge_terminal instead.
100
+
101
+ Parameters
102
+ ----------
103
+ prim_id : int
104
+ Primitive ID.
105
+ point_on_edge : list
106
+ Coordinate of the point to define the edge terminal.
107
+ The point must be on the target edge but not on the two
108
+ ends of the edge.
109
+ terminal_name : str, optional
110
+ Name of the terminal. The default is ``None``, in which case the
111
+ default name is assigned.
112
+ is_ref : bool, optional
113
+ Whether it is a reference terminal. The default is ``False``.
114
+
115
+ Returns
116
+ -------
117
+ Edb.Cell.Terminal.EdgeTerminal
118
+ """
119
+ warnings.warn(
120
+ "`_create_edge_terminal` is deprecated and is now located here "
121
+ "`pyedb.grpc.core.excitations._create_edge_terminal` instead.",
122
+ DeprecationWarning,
123
+ )
124
+ return self._pedb.excitations._create_edge_terminal(
125
+ prim_id=prim_id, point_on_edge=point_on_edge, terminal_name=terminal_name, is_ref=is_ref
126
+ )
127
+
128
+ def get_trace_width_for_traces_with_ports(self):
129
+ """Retrieve the trace width for traces with ports.
130
+
131
+ Returns
132
+ -------<
133
+ dict
134
+ Dictionary of trace width data.
135
+ """
136
+ nets = {}
137
+ for net in self._pedb.excitations_nets:
138
+ nets[net] = self._pedb.nets.nets[net].get_smallest_trace_width()
139
+ return nets
140
+
141
+ def create_circuit_port_on_pin(self, pos_pin, neg_pin, impedance=50, port_name=None):
142
+ """Create Circuit Port on Pin.
143
+
144
+ . deprecated:: pyedb 0.28.0
145
+ Use :func:`pyedb.grpc.core.excitations.create_circuit_port_on_pin` instead.
146
+
147
+ Parameters
148
+ ----------
149
+ pos_pin : Object
150
+ Edb Pin
151
+ neg_pin : Object
152
+ Edb Pin
153
+ impedance : float
154
+ Port Impedance
155
+ port_name : str, optional
156
+ Port Name
157
+
158
+ Returns
159
+ -------
160
+ str
161
+ Port Name.
162
+
163
+ """
164
+ warnings.warn(
165
+ "`create_circuit_port_on_pin` is deprecated and is now located here "
166
+ "`pyedb.grpc.core.excitations.create_circuit_port_on_pin` instead.",
167
+ DeprecationWarning,
168
+ )
169
+ return self._pedb.excitations.create_circuit_port_on_pin(pos_pin, neg_pin, impedance, port_name)
170
+
171
+ def create_voltage_source_on_pin(self, pos_pin, neg_pin, voltage_value=3.3, phase_value=0, source_name=""):
172
+ """Create a voltage source.
173
+
174
+ . deprecated:: pyedb 0.28.0
175
+ Use :func:`pyedb.grpc.core.excitations.create_voltage_source_on_pin` instead.
176
+
177
+ Parameters
178
+ ----------
179
+ pos_pin : Object
180
+ Positive Pin.
181
+ neg_pin : Object
182
+ Negative Pin.
183
+ voltage_value : float, optional
184
+ Value for the voltage. The default is ``3.3``.
185
+ phase_value : optional
186
+ Value for the phase. The default is ``0``.
187
+ source_name : str, optional
188
+ Name of the source. The default is ``""``.
189
+
190
+ Returns
191
+ -------
192
+ str
193
+ Source Name.
194
+
195
+ Examples
196
+ --------
197
+
198
+ >>> from pyedb import Edb
199
+ >>> edbapp = Edb("myaedbfolder", "project name", "release version")
200
+ >>> pins =edbapp.components.get_pin_from_component("U2A5")
201
+ >>> edbapp.hfss.create_voltage_source_on_pin(pins[0], pins[1],50,"source_name")
202
+ """
203
+ warnings.warn(
204
+ "`create_voltage_source_on_pin` is deprecated and is now located here "
205
+ "`pyedb.grpc.core.excitations.create_voltage_source_on_pin` instead.",
206
+ DeprecationWarning,
207
+ )
208
+ return self._pedb.excitations.create_voltage_source_on_pin(
209
+ pos_pin, neg_pin, voltage_value, phase_value, source_name
210
+ )
211
+
212
+ def create_current_source_on_pin(self, pos_pin, neg_pin, current_value=0.1, phase_value=0, source_name=""):
213
+ """Create a current source.
214
+
215
+ . deprecated:: pyedb 0.28.0
216
+ Use :func:`pyedb.grpc.core.excitations.create_current_source_on_pin` instead.
217
+
218
+ Parameters
219
+ ----------
220
+ pos_pin : Object
221
+ Positive Pin.
222
+ neg_pin : Object
223
+ Negative Pin.
224
+ current_value : float, optional
225
+ Value for the current. The default is ``0.1``.
226
+ phase_value : optional
227
+ Value for the phase. The default is ``0``.
228
+ source_name : str, optional
229
+ Name of the source. The default is ``""``.
230
+
231
+ Returns
232
+ -------
233
+ str
234
+ Source Name.
235
+
236
+ Examples
237
+ --------
238
+
239
+ >>> from pyedb import Edb
240
+ >>> edbapp = Edb("myaedbfolder", "project name", "release version")
241
+ >>> pins =edbapp.components.get_pin_from_component("U2A5")
242
+ >>> edbapp.hfss.create_current_source_on_pin(pins[0], pins[1],50,"source_name")
243
+ """
244
+ warnings.warn(
245
+ "`create_current_source_on_pin` is deprecated and is now located here "
246
+ "`pyedb.grpc.core.excitations.create_current_source_on_pin` instead.",
247
+ DeprecationWarning,
248
+ )
249
+ return self._pedb.excitations.create_current_source_on_pin(
250
+ pos_pin, neg_pin, current_value, phase_value, source_name
251
+ )
252
+
253
+ def create_resistor_on_pin(self, pos_pin, neg_pin, rvalue=1, resistor_name=""):
254
+ """Create a Resistor boundary between two given pins.
255
+
256
+ . deprecated:: pyedb 0.28.0
257
+ Use :func:`pyedb.grpc.core.excitations.create_resistor_on_pin` instead.
258
+
259
+ Parameters
260
+ ----------
261
+ pos_pin : Object
262
+ Positive Pin.
263
+ neg_pin : Object
264
+ Negative Pin.
265
+ rvalue : float, optional
266
+ Resistance value. The default is ``1``.
267
+ resistor_name : str, optional
268
+ Name of the resistor. The default is ``""``.
269
+
270
+ Returns
271
+ -------
272
+ str
273
+ Name of the Resistor.
274
+
275
+ Examples
276
+ --------
277
+
278
+ >>> from pyedb import Edb
279
+ >>> edbapp = Edb("myaedbfolder", "project name", "release version")
280
+ >>> pins =edbapp.components.get_pin_from_component("U2A5")
281
+ >>> edbapp.hfss.create_resistor_on_pin(pins[0], pins[1],50,"res_name")
282
+ """
283
+ warnings.warn(
284
+ "`create_resistor_on_pin` is deprecated and is now located here "
285
+ "`pyedb.grpc.core.excitations.create_resistor_on_pin` instead.",
286
+ DeprecationWarning,
287
+ )
288
+ return self._pedb.excitations.create_resistor_on_pin(pos_pin, neg_pin, rvalue, resistor_name)
289
+
290
+ def create_circuit_port_on_net(
291
+ self,
292
+ positive_component_name,
293
+ positive_net_name,
294
+ negative_component_name=None,
295
+ negative_net_name="GND",
296
+ impedance_value=50,
297
+ port_name="",
298
+ ):
299
+ """Create a circuit port on a NET.
300
+
301
+ . deprecated:: pyedb 0.28.0
302
+ Use :func:`pyedb.grpc.core.excitations.create_circuit_port_on_net` instead.
303
+
304
+ It groups all pins belonging to the specified net and then applies the port on PinGroups.
305
+
306
+ Parameters
307
+ ----------
308
+ positive_component_name : str
309
+ Name of the positive component.
310
+ positive_net_name : str
311
+ Name of the positive net.
312
+ negative_component_name : str, optional
313
+ Name of the negative component. The default is ``None``, in which case the name of
314
+ the positive net is assigned.
315
+ negative_net_name : str, optional
316
+ Name of the negative net name. The default is ``"GND"``.
317
+ impedance_value : float, optional
318
+ Port impedance value. The default is ``50``.
319
+ port_name : str, optional
320
+ Name of the port. The default is ``""``.
321
+
322
+ Returns
323
+ -------
324
+ str
325
+ The name of the port.
326
+ """
327
+
328
+ warnings.warn(
329
+ "`create_circuit_port_on_net` is deprecated and is now located here "
330
+ "`pyedb.grpc.core.excitations.create_circuit_port_on_net` instead.",
331
+ DeprecationWarning,
332
+ )
333
+ return self._pedb.source_excitation.create_circuit_port_on_net(
334
+ positive_component_name,
335
+ positive_net_name,
336
+ negative_component_name,
337
+ negative_net_name,
338
+ impedance_value,
339
+ port_name,
340
+ )
341
+
342
+ def create_voltage_source_on_net(
343
+ self,
344
+ positive_component_name,
345
+ positive_net_name,
346
+ negative_component_name=None,
347
+ negative_net_name="GND",
348
+ voltage_value=3.3,
349
+ phase_value=0,
350
+ source_name="",
351
+ ):
352
+ """Create a voltage source.
353
+
354
+ . deprecated:: pyedb 0.28.0
355
+ Use :func:`pyedb.grpc.core.excitations.create_voltage_source_on_net` instead.
356
+
357
+ Parameters
358
+ ----------
359
+ positive_component_name : str
360
+ Name of the positive component.
361
+ positive_net_name : str
362
+ Name of the positive net.
363
+ negative_component_name : str, optional
364
+ Name of the negative component. The default is ``None``, in which case the name of
365
+ the positive net is assigned.
366
+ negative_net_name : str, optional
367
+ Name of the negative net. The default is ``"GND"``.
368
+ voltage_value : float, optional
369
+ Value for the voltage. The default is ``3.3``.
370
+ phase_value : optional
371
+ Value for the phase. The default is ``0``.
372
+ source_name : str, optional
373
+ Name of the source. The default is ``""``.
374
+
375
+ Returns
376
+ -------
377
+ str
378
+ Source Name.
379
+ """
380
+
381
+ warnings.warn(
382
+ "`create_voltage_source_on_net` is deprecated and is now located here "
383
+ "`pyedb.grpc.core.excitations.create_voltage_source_on_net` instead.",
384
+ DeprecationWarning,
385
+ )
386
+ return self._pedb.source_excitation.create_voltage_source_on_net(
387
+ positive_component_name,
388
+ positive_net_name,
389
+ negative_component_name,
390
+ negative_net_name,
391
+ voltage_value,
392
+ phase_value,
393
+ source_name,
394
+ )
395
+
396
+ def create_current_source_on_net(
397
+ self,
398
+ positive_component_name,
399
+ positive_net_name,
400
+ negative_component_name=None,
401
+ negative_net_name="GND",
402
+ current_value=0.1,
403
+ phase_value=0,
404
+ source_name="",
405
+ ):
406
+ """Create a current source.
407
+
408
+ . deprecated:: pyedb 0.28.0
409
+ Use :func:`pyedb.grpc.core.excitations.create_current_source_on_net` instead.
410
+
411
+ Parameters
412
+ ----------
413
+ positive_component_name : str
414
+ Name of the positive component.
415
+ positive_net_name : str
416
+ Name of the positive net.
417
+ negative_component_name : str, optional
418
+ Name of the negative component. The default is ``None``, in which case the name of
419
+ the positive net is assigned.
420
+ negative_net_name : str, optional
421
+ Name of the negative net. The default is ``"GND"``.
422
+ current_value : float, optional
423
+ Value for the current. The default is ``0.1``.
424
+ phase_value : optional
425
+ Value for the phase. The default is ``0``.
426
+ source_name : str, optional
427
+ Name of the source. The default is ``""``.
428
+
429
+ Returns
430
+ -------
431
+ str
432
+ Source Name.
433
+ """
434
+
435
+ warnings.warn(
436
+ "`create_current_source_on_net` is deprecated and is now located here "
437
+ "`pyedb.grpc.core.excitations.create_current_source_on_net` instead.",
438
+ DeprecationWarning,
439
+ )
440
+ return self._pedb.excitations.create_current_source_on_net(
441
+ positive_component_name,
442
+ positive_net_name,
443
+ negative_component_name,
444
+ negative_net_name,
445
+ current_value,
446
+ phase_value,
447
+ source_name,
448
+ )
449
+
450
+ def create_coax_port_on_component(self, ref_des_list, net_list, delete_existing_terminal=False):
451
+ """Create a coaxial port on a component or component list on a net or net list.
452
+ The name of the new coaxial port is automatically assigned.
453
+
454
+ . deprecated:: pyedb 0.28.0
455
+ Use :func:`pyedb.grpc.core.excitations.create_coax_port_on_component` instead.
456
+
457
+ Parameters
458
+ ----------
459
+ ref_des_list : list, str
460
+ List of one or more reference designators.
461
+
462
+ net_list : list, str
463
+ List of one or more nets.
464
+
465
+ Returns
466
+ -------
467
+ bool
468
+ ``True`` when successful, ``False`` when failed.
469
+
470
+ """
471
+ warnings.warn(
472
+ "`create_coax_port_on_component` is deprecated and is now located here "
473
+ "`pyedb.grpc.core.excitations.create_coax_port_on_component` instead.",
474
+ DeprecationWarning,
475
+ )
476
+ return self._pedb.source_excitation.create_coax_port_on_component(
477
+ ref_des_list, net_list, delete_existing_terminal
478
+ )
479
+
480
+ def create_differential_wave_port(
481
+ self,
482
+ positive_primitive_id,
483
+ positive_points_on_edge,
484
+ negative_primitive_id,
485
+ negative_points_on_edge,
486
+ port_name=None,
487
+ horizontal_extent_factor=5,
488
+ vertical_extent_factor=3,
489
+ pec_launch_width="0.01mm",
490
+ ):
491
+ """Create a differential wave port.
492
+
493
+ . deprecated:: pyedb 0.28.0
494
+ Use :func:`pyedb.grpc.core.excitations.create_differential_wave_port` instead.
495
+
496
+ Parameters
497
+ ----------
498
+ positive_primitive_id : int, EDBPrimitives
499
+ Primitive ID of the positive terminal.
500
+ positive_points_on_edge : list
501
+ Coordinate of the point to define the edge terminal.
502
+ The point must be close to the target edge but not on the two
503
+ ends of the edge.
504
+ negative_primitive_id : int, EDBPrimitives
505
+ Primitive ID of the negative terminal.
506
+ negative_points_on_edge : list
507
+ Coordinate of the point to define the edge terminal.
508
+ The point must be close to the target edge but not on the two
509
+ ends of the edge.
510
+ port_name : str, optional
511
+ Name of the port. The default is ``None``.
512
+ horizontal_extent_factor : int, float, optional
513
+ Horizontal extent factor. The default value is ``5``.
514
+ vertical_extent_factor : int, float, optional
515
+ Vertical extent factor. The default value is ``3``.
516
+ pec_launch_width : str, optional
517
+ Launch Width of PEC. The default value is ``"0.01mm"``.
518
+
519
+ Returns
520
+ -------
521
+ tuple
522
+ The tuple contains: (port_name, pyedb.dotnet.database.edb_data.sources.ExcitationDifferential).
523
+
524
+ """
525
+ warnings.warn(
526
+ "`create_differential_wave_port` is deprecated and is now located here "
527
+ "`pyedb.grpc.core.excitations.create_differential_wave_port` instead.",
528
+ DeprecationWarning,
529
+ )
530
+ return self._pedb.excitations.create_differential_wave_port(
531
+ positive_primitive_id,
532
+ positive_points_on_edge,
533
+ negative_primitive_id,
534
+ negative_points_on_edge,
535
+ port_name,
536
+ horizontal_extent_factor,
537
+ vertical_extent_factor,
538
+ pec_launch_width,
539
+ )
540
+
541
+ def create_bundle_wave_port(
542
+ self,
543
+ primitives_id,
544
+ points_on_edge,
545
+ port_name=None,
546
+ horizontal_extent_factor=5,
547
+ vertical_extent_factor=3,
548
+ pec_launch_width="0.01mm",
549
+ ):
550
+ """Create a bundle wave port.
551
+
552
+ . deprecated:: pyedb 0.28.0
553
+ Use :func:`pyedb.grpc.core.excitations.create_bundle_wave_port` instead.
554
+
555
+ Parameters
556
+ ----------
557
+ primitives_id : list
558
+ Primitive ID of the positive terminal.
559
+ points_on_edge : list
560
+ Coordinate of the point to define the edge terminal.
561
+ The point must be close to the target edge but not on the two
562
+ ends of the edge.
563
+ port_name : str, optional
564
+ Name of the port. The default is ``None``.
565
+ horizontal_extent_factor : int, float, optional
566
+ Horizontal extent factor. The default value is ``5``.
567
+ vertical_extent_factor : int, float, optional
568
+ Vertical extent factor. The default value is ``3``.
569
+ pec_launch_width : str, optional
570
+ Launch Width of PEC. The default value is ``"0.01mm"``.
571
+
572
+ Returns
573
+ -------
574
+ tuple
575
+ The tuple contains: (port_name, pyedb.egacy.database.edb_data.sources.ExcitationDifferential).
576
+ """
577
+ warnings.warn(
578
+ "`create_bundle_wave_port` is deprecated and is now located here "
579
+ "`pyedb.grpc.core.excitations.create_bundle_wave_port` instead.",
580
+ DeprecationWarning,
581
+ )
582
+ self._pedb.excitations.create_bundle_wave_port(
583
+ primitives_id, points_on_edge, port_name, horizontal_extent_factor, vertical_extent_factor, pec_launch_width
584
+ )
585
+
586
+ def create_hfss_ports_on_padstack(self, pinpos, portname=None):
587
+ """Create an HFSS port on a padstack.
588
+
589
+ . deprecated:: pyedb 0.28.0
590
+ Use :func:`pyedb.grpc.core.excitations.create_hfss_ports_on_padstack` instead.
591
+
592
+ Parameters
593
+ ----------
594
+ pinpos :
595
+ Position of the pin.
596
+
597
+ portname : str, optional
598
+ Name of the port. The default is ``None``.
599
+
600
+ Returns
601
+ -------
602
+ bool
603
+ ``True`` when successful, ``False`` when failed.
604
+ """
605
+ warnings.warn(
606
+ "`create_hfss_ports_on_padstack` is deprecated and is now located here "
607
+ "`pyedb.grpc.core.excitations.create_hfss_ports_on_padstack` instead.",
608
+ DeprecationWarning,
609
+ )
610
+ return self._pedb.excitations.create_hfss_ports_on_padstack(pinpos, portname)
611
+
612
+ def create_edge_port_on_polygon(
613
+ self,
614
+ polygon=None,
615
+ reference_polygon=None,
616
+ terminal_point=None,
617
+ reference_point=None,
618
+ reference_layer=None,
619
+ port_name=None,
620
+ port_impedance=50.0,
621
+ force_circuit_port=False,
622
+ ):
623
+ """Create lumped port between two edges from two different polygons. Can also create a vertical port when
624
+ the reference layer name is only provided. When a port is created between two edge from two polygons which don't
625
+ belong to the same layer, a circuit port will be automatically created instead of lumped. To enforce the circuit
626
+ port instead of lumped,use the boolean force_circuit_port.
627
+
628
+ . deprecated:: pyedb 0.28.0
629
+ Use :func:`pyedb.grpc.core.excitations.create_edge_port_on_polygon` instead.
630
+
631
+
632
+ Parameters
633
+ ----------
634
+ polygon : The EDB polygon object used to assign the port.
635
+ Edb.Cell.Primitive.Polygon object.
636
+
637
+ reference_polygon : The EDB polygon object used to define the port reference.
638
+ Edb.Cell.Primitive.Polygon object.
639
+
640
+ terminal_point : The coordinate of the point to define the edge terminal of the port. This point must be
641
+ located on the edge of the polygon where the port has to be placed. For instance taking the middle point
642
+ of an edge is a good practice but any point of the edge should be valid. Taking a corner might cause unwanted
643
+ port location.
644
+ list[float, float] with values provided in meter.
645
+
646
+ reference_point : same as terminal_point but used for defining the reference location on the edge.
647
+ list[float, float] with values provided in meter.
648
+
649
+ reference_layer : Name used to define port reference for vertical ports.
650
+ str the layer name.
651
+
652
+ port_name : Name of the port.
653
+ str.
654
+
655
+ port_impedance : port impedance value. Default value is 50 Ohms.
656
+ float, impedance value.
657
+
658
+ force_circuit_port ; used to force circuit port creation instead of lumped. Works for vertical and coplanar
659
+ ports.
660
+ """
661
+
662
+ warnings.warn(
663
+ "`create_edge_port_on_polygon` is deprecated and is now located here "
664
+ "`pyedb.grpc.core.excitations.create_edge_port_on_polygon` instead.",
665
+ DeprecationWarning,
666
+ )
667
+ return self._pedb.excitations.create_edge_port_on_polygon(
668
+ polygon,
669
+ reference_polygon,
670
+ terminal_point,
671
+ reference_point,
672
+ reference_layer,
673
+ port_name,
674
+ port_impedance,
675
+ force_circuit_port,
676
+ )
677
+
678
+ def create_wave_port(
679
+ self,
680
+ prim_id,
681
+ point_on_edge,
682
+ port_name=None,
683
+ impedance=50,
684
+ horizontal_extent_factor=5,
685
+ vertical_extent_factor=3,
686
+ pec_launch_width="0.01mm",
687
+ ):
688
+ """Create a wave port.
689
+
690
+ . deprecated:: pyedb 0.28.0
691
+ Use :func:`pyedb.grpc.core.excitations.create_wave_port` instead.
692
+
693
+ Parameters
694
+ ----------
695
+ prim_id : int, Primitive
696
+ Primitive ID.
697
+ point_on_edge : list
698
+ Coordinate of the point to define the edge terminal.
699
+ The point must be on the target edge but not on the two
700
+ ends of the edge.
701
+ port_name : str, optional
702
+ Name of the port. The default is ``None``.
703
+ impedance : int, float, optional
704
+ Impedance of the port. The default value is ``50``.
705
+ horizontal_extent_factor : int, float, optional
706
+ Horizontal extent factor. The default value is ``5``.
707
+ vertical_extent_factor : int, float, optional
708
+ Vertical extent factor. The default value is ``3``.
709
+ pec_launch_width : str, optional
710
+ Launch Width of PEC. The default value is ``"0.01mm"``.
711
+
712
+ Returns
713
+ -------
714
+ tuple
715
+ The tuple contains: (Port name, pyedb.dotnet.database.edb_data.sources.Excitation).
716
+
717
+ """
718
+ warnings.warn(
719
+ "`create_source_on_component` is deprecated and is now located here "
720
+ "`pyedb.grpc.core.excitations.create_source_on_component` instead.",
721
+ DeprecationWarning,
722
+ )
723
+ self._pedb.source_excitation.create_wave_port(
724
+ prim_id,
725
+ point_on_edge,
726
+ port_name,
727
+ impedance,
728
+ horizontal_extent_factor,
729
+ vertical_extent_factor,
730
+ pec_launch_width,
731
+ )
732
+
733
+ def create_edge_port_vertical(
734
+ self,
735
+ prim_id,
736
+ point_on_edge,
737
+ port_name=None,
738
+ impedance=50,
739
+ reference_layer=None,
740
+ hfss_type="Gap",
741
+ horizontal_extent_factor=5,
742
+ vertical_extent_factor=3,
743
+ pec_launch_width="0.01mm",
744
+ ):
745
+ """Create a vertical edge port.
746
+
747
+ . deprecated:: pyedb 0.28.0
748
+ Use :func:`pyedb.grpc.core.excitations.create_edge_port_vertical` instead.
749
+
750
+ Parameters
751
+ ----------
752
+ prim_id : int
753
+ Primitive ID.
754
+ point_on_edge : list
755
+ Coordinate of the point to define the edge terminal.
756
+ The point must be on the target edge but not on the two
757
+ ends of the edge.
758
+ port_name : str, optional
759
+ Name of the port. The default is ``None``.
760
+ impedance : int, float, optional
761
+ Impedance of the port. The default value is ``50``.
762
+ reference_layer : str, optional
763
+ Reference layer of the port. The default is ``None``.
764
+ hfss_type : str, optional
765
+ Type of the port. The default value is ``"Gap"``. Options are ``"Gap"``, ``"Wave"``.
766
+ horizontal_extent_factor : int, float, optional
767
+ Horizontal extent factor. The default value is ``5``.
768
+ vertical_extent_factor : int, float, optional
769
+ Vertical extent factor. The default value is ``3``.
770
+ radial_extent_factor : int, float, optional
771
+ Radial extent factor. The default value is ``0``.
772
+ pec_launch_width : str, optional
773
+ Launch Width of PEC. The default value is ``"0.01mm"``.
774
+
775
+ Returns
776
+ -------
777
+ str
778
+ Port name.
779
+ """
780
+ warnings.warn(
781
+ "`create_edge_port_vertical` is deprecated and is now located here "
782
+ "`pyedb.grpc.core.excitations.create_edge_port_vertical` instead.",
783
+ DeprecationWarning,
784
+ )
785
+ return self._pedb.source_excitation.create_edge_port_vertical(
786
+ prim_id,
787
+ point_on_edge,
788
+ port_name,
789
+ impedance,
790
+ reference_layer,
791
+ hfss_type,
792
+ horizontal_extent_factor,
793
+ vertical_extent_factor,
794
+ pec_launch_width,
795
+ )
796
+
797
+ def create_edge_port_horizontal(
798
+ self,
799
+ prim_id,
800
+ point_on_edge,
801
+ ref_prim_id=None,
802
+ point_on_ref_edge=None,
803
+ port_name=None,
804
+ impedance=50,
805
+ layer_alignment="Upper",
806
+ ):
807
+ """Create a horizontal edge port.
808
+
809
+ . deprecated:: pyedb 0.28.0
810
+ Use :func:`pyedb.grpc.core.excitations.create_edge_port_horizontal` instead.
811
+
812
+ Parameters
813
+ ----------
814
+ prim_id : int
815
+ Primitive ID.
816
+ point_on_edge : list
817
+ Coordinate of the point to define the edge terminal.
818
+ The point must be on the target edge but not on the two
819
+ ends of the edge.
820
+ ref_prim_id : int, optional
821
+ Reference primitive ID. The default is ``None``.
822
+ point_on_ref_edge : list, optional
823
+ Coordinate of the point to define the reference edge
824
+ terminal. The point must be on the target edge but not
825
+ on the two ends of the edge. The default is ``None``.
826
+ port_name : str, optional
827
+ Name of the port. The default is ``None``.
828
+ impedance : int, float, optional
829
+ Impedance of the port. The default value is ``50``.
830
+ layer_alignment : str, optional
831
+ Layer alignment. The default value is ``Upper``. Options are ``"Upper"``, ``"Lower"``.
832
+
833
+ Returns
834
+ -------
835
+ str
836
+ Name of the port.
837
+ """
838
+ warnings.warn(
839
+ "`create_edge_port_horizontal` is deprecated and is now located here "
840
+ "`pyedb.grpc.core.excitations.create_edge_port_horizontal` instead.",
841
+ DeprecationWarning,
842
+ )
843
+ return self._pedb.excitations.create_edge_port_horizontal(
844
+ prim_id, point_on_edge, ref_prim_id, point_on_ref_edge, port_name, impedance, layer_alignment
845
+ )
846
+
847
+ def create_lumped_port_on_net(self, nets, reference_layer, return_points_only, digit_resolution, at_bounding_box):
848
+ """Create an edge port on nets. This command looks for traces and polygons on the
849
+ nets and tries to assign vertical lumped port.
850
+
851
+ . deprecated:: pyedb 0.28.0
852
+ Use :func:`pyedb.grpc.core.excitations.create_lumped_port_on_net` instead.
853
+
854
+ Parameters
855
+ ----------
856
+ nets : list, optional
857
+ List of nets, str or Edb net.
858
+
859
+ reference_layer : str, Edb layer.
860
+ Name or Edb layer object.
861
+
862
+ return_points_only : bool, optional
863
+ Use this boolean when you want to return only the points from the edges and not creating ports. Default
864
+ value is ``False``.
865
+
866
+ digit_resolution : int, optional
867
+ The number of digits carried for the edge location accuracy. The default value is ``6``.
868
+
869
+ at_bounding_box : bool
870
+ When ``True`` will keep the edges from traces at the layout bounding box location. This is recommended when
871
+ a cutout has been performed before and lumped ports have to be created on ending traces. Default value is
872
+ ``True``.
873
+
874
+ Returns
875
+ -------
876
+ bool
877
+ ``True`` when successful, ``False`` when failed.
878
+ """
879
+ warnings.warn(
880
+ "`create_lumped_port_on_net` is deprecated and is now located here "
881
+ "`pyedb.grpc.core.excitations.create_lumped_port_on_net` instead.",
882
+ DeprecationWarning,
883
+ )
884
+ return self._pedb.excitations.create_lumped_port_on_net(
885
+ nets, reference_layer, return_points_only, digit_resolution, at_bounding_box
886
+ )
887
+
888
+ def create_vertical_circuit_port_on_clipped_traces(self, nets=None, reference_net=None, user_defined_extent=None):
889
+ """Create an edge port on clipped signal traces.
890
+
891
+ . deprecated:: pyedb 0.28.0
892
+ Use :func:`pyedb.grpc.core.excitations.create_vertical_circuit_port_on_clipped_traces` instead.
893
+
894
+ Parameters
895
+ ----------
896
+ nets : list, optional
897
+ String of one net or EDB net or a list of multiple nets or EDB nets.
898
+
899
+ reference_net : str, Edb net.
900
+ Name or EDB reference net.
901
+
902
+ user_defined_extent : [x, y], EDB PolygonData
903
+ Use this point list or PolygonData object to check if ports are at this polygon border.
904
+
905
+ Returns
906
+ -------
907
+ [[str]]
908
+ Nested list of str, with net name as first value, X value for point at border, Y value for point at border,
909
+ and terminal name.
910
+ """
911
+ warnings.warn(
912
+ "`create_source_on_component` is deprecated and is now located here "
913
+ "`pyedb.grpc.core.excitations.create_source_on_component` instead.",
914
+ DeprecationWarning,
915
+ )
916
+ return self._pedb.source_excitation.create_vertical_circuit_port_on_clipped_traces(
917
+ nets, reference_net, user_defined_extent
918
+ )
919
+
920
+ def get_layout_bounding_box(self, layout=None, digit_resolution=6):
921
+ """Evaluate the layout bounding box.
922
+
923
+ Parameters
924
+ ----------
925
+ layout :
926
+ Edb layout.
927
+
928
+ digit_resolution : int, optional
929
+ Digit Resolution. The default value is ``6``.
930
+
931
+ Returns
932
+ -------
933
+ list
934
+ [lower left corner X, lower left corner, upper right corner X, upper right corner Y].
935
+ """
936
+ if not layout:
937
+ layout = self._active_layout
938
+ layout_obj_instances = layout.layout_instance.query_layout_obj_instances()
939
+ tuple_list = []
940
+ for lobj in layout_obj_instances:
941
+ lobj_bbox = lobj.get_bbox()
942
+ tuple_list.append(lobj_bbox)
943
+ _bbox = GrpcPolygonData.bbox_of_polygons(tuple_list)
944
+ layout_bbox = [
945
+ round(_bbox[0].x.value, digit_resolution),
946
+ round(_bbox[0].y.value, digit_resolution),
947
+ round(_bbox[1].x.value, digit_resolution),
948
+ round(_bbox[1].y.value, digit_resolution),
949
+ ]
950
+ return layout_bbox
951
+
952
+ def configure_hfss_extents(self, simulation_setup=None):
953
+ """Configure the HFSS extent box.
954
+
955
+ . deprecated:: pyedb 0.28.0
956
+ Use :func:`self._pedb.utility.simulation_configuration.ProcessSimulationConfiguration.configure_hfss_extents`
957
+ instead.
958
+
959
+ Parameters
960
+ ----------
961
+ simulation_setup :
962
+ Edb_DATA.SimulationConfiguration object
963
+
964
+ Returns
965
+ -------
966
+ bool
967
+ True when succeeded, False when failed.
968
+ """
969
+ warnings.warn(
970
+ "`configure_hfss_extents` is deprecated and is now located here "
971
+ "`pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration.configure_hfss_extents`"
972
+ "instead.",
973
+ DeprecationWarning,
974
+ )
975
+ return self._pedb.utility.simulation_configuration.ProcessSimulationConfiguration.configure_hfss_extents(
976
+ simulation_setup
977
+ )
978
+
979
+ def configure_hfss_analysis_setup(self, simulation_setup=None):
980
+ """
981
+ Configure HFSS analysis setup.
982
+
983
+ . deprecated:: pyedb 0.28.0
984
+ Use :func:
985
+ `pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration.configure_hfss_analysis_setup`
986
+ instead.
987
+
988
+
989
+ Parameters
990
+ ----------
991
+ simulation_setup :
992
+ Edb_DATA.SimulationConfiguration object
993
+
994
+ Returns
995
+ -------
996
+ bool
997
+ True when succeeded, False when failed.
998
+ """
999
+ warnings.warn(
1000
+ "`configure_hfss_analysis_setup` is deprecated and is now located here "
1001
+ "`pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration."
1002
+ "configure_hfss_analysis_setup` instead.",
1003
+ DeprecationWarning,
1004
+ )
1005
+ self._pedb.utility.simulation_configuration.ProcessSimulationConfiguration.configure_hfss_analysis_setup(
1006
+ simulation_setup
1007
+ )
1008
+
1009
+ def _setup_decade_count_sweep(self, sweep, start_freq="1", stop_freq="1MHz", decade_count="10"):
1010
+ start_f = GeometryOperators.parse_dim_arg(start_freq)
1011
+ if start_f == 0.0:
1012
+ start_f = 10
1013
+ self._logger.warning("Decade Count sweep does not support DC value, defaulting starting frequency to 10Hz")
1014
+
1015
+ stop_f = GeometryOperators.parse_dim_arg(stop_freq)
1016
+ decade_cnt = GeometryOperators.parse_dim_arg(decade_count)
1017
+ freq = start_f
1018
+ sweep.Frequencies.Add(str(freq))
1019
+
1020
+ while freq < stop_f:
1021
+ freq = freq * math.pow(10, 1.0 / decade_cnt)
1022
+ sweep.Frequencies.Add(str(freq))
1023
+
1024
+ def trim_component_reference_size(self, simulation_setup=None, trim_to_terminals=False):
1025
+ """Trim the common component reference to the minimally acceptable size.
1026
+
1027
+ . deprecated:: pyedb 0.28.0
1028
+ Use :func:
1029
+ `pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration.trim_component_reference_size`
1030
+ instead.
1031
+
1032
+ Parameters
1033
+ ----------
1034
+ simulation_setup :
1035
+ Edb_DATA.SimulationConfiguration object
1036
+
1037
+ trim_to_terminals :
1038
+ bool.
1039
+ True, reduce the reference to a box covering only the active terminals (i.e. those with
1040
+ ports).
1041
+ False, reduce the reference to the minimal size needed to cover all pins
1042
+
1043
+ Returns
1044
+ -------
1045
+ bool
1046
+ True when succeeded, False when failed.
1047
+ """
1048
+
1049
+ warnings.warn(
1050
+ "`trim_component_reference_size` is deprecated and is now located here "
1051
+ "`pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration."
1052
+ "trim_component_reference_size` instead.",
1053
+ DeprecationWarning,
1054
+ )
1055
+ self._pedb.utility.simulation_configuration.ProcessSimulationConfiguration.trim_component_reference_size(
1056
+ simulation_setup
1057
+ )
1058
+
1059
+ def set_coax_port_attributes(self, simulation_setup=None):
1060
+ """Set coaxial port attribute with forcing default impedance to 50 Ohms and adjusting the coaxial extent radius.
1061
+
1062
+ . deprecated:: pyedb 0.28.0
1063
+ Use :func:
1064
+ `pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration.set_coax_port_attributes`
1065
+ instead.
1066
+
1067
+ Parameters
1068
+ ----------
1069
+ simulation_setup :
1070
+ Edb_DATA.SimulationConfiguration object.
1071
+
1072
+ Returns
1073
+ -------
1074
+ bool
1075
+ True when succeeded, False when failed.
1076
+ """
1077
+ warnings.warn(
1078
+ "`set_coax_port_attributes` is deprecated and is now located here "
1079
+ "`pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration."
1080
+ "set_coax_port_attributes` instead.",
1081
+ DeprecationWarning,
1082
+ )
1083
+ self._pedb.utility.simulation_configuration.ProcessSimulationConfiguration.set_coax_port_attributes(
1084
+ simulation_setup
1085
+ )
1086
+
1087
+ def _get_terminals_bbox(self, comp, l_inst, terminals_only):
1088
+ terms_loi = []
1089
+ if terminals_only:
1090
+ term_list = []
1091
+ for pin in comp.pins:
1092
+ padstack_instance_term = pin.get_padstack_instance_terminal()
1093
+ if not padstack_instance_term.is_null:
1094
+ term_list.append(padstack_instance_term)
1095
+ for tt in term_list:
1096
+ term_param = tt.get_parameters()
1097
+ if term_param:
1098
+ loi = l_inst.get_layout_obj_instance(term_param[0], None)
1099
+ terms_loi.append(loi)
1100
+ else:
1101
+ pin_list = comp.pins
1102
+ for pi in pin_list:
1103
+ loi = l_inst.get_layout_obj_instance(pi, None)
1104
+ terms_loi.append(loi)
1105
+
1106
+ if len(terms_loi) == 0:
1107
+ return None
1108
+
1109
+ terms_bbox = []
1110
+ for loi in terms_loi:
1111
+ # Need to account for the coax port dimension
1112
+ bb = loi.GetBBox()
1113
+ ll = [bb[0].x.value, bb[0].y.value]
1114
+ ur = [bb[1].x.value, bb[1].y.value]
1115
+ # dim = 0.26 * max(abs(UR[0]-LL[0]), abs(UR[1]-LL[1])) # 0.25 corresponds to the default 0.5
1116
+ # Radial Extent Factor, so set slightly larger to avoid validation errors
1117
+ dim = 0.30 * max(abs(ur[0] - ll[0]), abs(ur[1] - ll[1])) # 0.25 corresponds to the default 0.5
1118
+ terms_bbox.append(GrpcPolygonData([ll[0] - dim, ll[1] - dim, ur[0] + dim, ur[1] + dim]))
1119
+ return GrpcPolygonData.bbox_of_polygons(terms_bbox)
1120
+
1121
+ def get_ports_number(self):
1122
+ """Return the total number of excitation ports in a layout.
1123
+
1124
+ Parameters
1125
+ ----------
1126
+ None
1127
+
1128
+ Returns
1129
+ -------
1130
+ int
1131
+ Number of ports.
1132
+
1133
+ """
1134
+ warnings.warn(
1135
+ "`get_ports_number` is deprecated and is now located here "
1136
+ "`pyedb.grpc.core.excitation.get_ports_number` instead.",
1137
+ DeprecationWarning,
1138
+ )
1139
+ self._pedb.excitations.get_ports_number()
1140
+
1141
+ def layout_defeaturing(self, simulation_setup=None):
1142
+ """Defeature the layout by reducing the number of points for polygons based on surface deviation criteria.
1143
+
1144
+ . deprecated:: pyedb 0.28.0
1145
+ Use :func:
1146
+ `pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration.layout_defeaturing`
1147
+ instead.
1148
+
1149
+ Parameters
1150
+ ----------
1151
+ simulation_setup : Edb_DATA.SimulationConfiguration object
1152
+
1153
+ Returns
1154
+ -------
1155
+ bool
1156
+ ``True`` when successful, ``False`` when failed.
1157
+
1158
+ """
1159
+ warnings.warn(
1160
+ "`layout_defeaturing` is deprecated and is now located here "
1161
+ "`pyedb.grpc.core.utility.simulation_configuration.ProcessSimulationConfiguration."
1162
+ "layout_defeaturing` instead.",
1163
+ DeprecationWarning,
1164
+ )
1165
+ self._pedb.utility.simulation_configuration.ProcessSimulationConfiguration.layout_defeaturing(simulation_setup)
1166
+
1167
+ def create_rlc_boundary_on_pins(self, positive_pin=None, negative_pin=None, rvalue=0.0, lvalue=0.0, cvalue=0.0):
1168
+ """Create hfss rlc boundary on pins.
1169
+
1170
+ . deprecated:: pyedb 0.28.0
1171
+ Use :func:`pyedb.grpc.core.excitations.create_rlc_boundary_on_pins` instead.
1172
+
1173
+ Parameters
1174
+ ----------
1175
+ positive_pin : Positive pin.
1176
+ Edb.Cell.Primitive.PadstackInstance
1177
+
1178
+ negative_pin : Negative pin.
1179
+ Edb.Cell.Primitive.PadstackInstance
1180
+
1181
+ rvalue : Resistance value
1182
+
1183
+ lvalue : Inductance value
1184
+
1185
+ cvalue . Capacitance value.
1186
+
1187
+ Returns
1188
+ -------
1189
+ bool
1190
+ ``True`` when successful, ``False`` when failed.
1191
+
1192
+ """
1193
+ warnings.warn(
1194
+ "`create_rlc_boundary_on_pins` is deprecated and is now located here "
1195
+ "`pyedb.grpc.core.create_rlc_boundary_on_pins.get_ports_number` instead.",
1196
+ DeprecationWarning,
1197
+ )
1198
+ return self._pedb.source_excitation.create_rlc_boundary_on_pins(
1199
+ positive_pin, negative_pin, rvalue, lvalue, cvalue
1200
+ )
1201
+
1202
+ def add_setup(
1203
+ self,
1204
+ name=None,
1205
+ distribution="linear",
1206
+ start_freq=0,
1207
+ stop_freq=20e9,
1208
+ step_freq=1e6,
1209
+ discrete_sweep=False,
1210
+ ):
1211
+ """Add a HFSS analysis to EDB.
1212
+
1213
+ Parameters
1214
+ ----------
1215
+ name : str, optional
1216
+ Setup name.
1217
+ Sweep type. `"interpolating"` or `"discrete"`.
1218
+ distribution : str, optional
1219
+ Type of the sweep. The default is `"linear"`. Options are:
1220
+ - `"linear"`
1221
+ - `"linear_count"`
1222
+ - `"decade_count"`
1223
+ - `"octave_count"`
1224
+ - `"exponential"`
1225
+ start_freq : str, float, optional
1226
+ Starting frequency. The default is ``0``.
1227
+ stop_freq : str, float, optional
1228
+ Stopping frequency. The default is ``20e9``.
1229
+ step_freq : str, float, int, optional
1230
+ Frequency step. The default is ``1e6``. or used for `"decade_count"`, "linear_count"`, "octave_count"`
1231
+ distribution. Must be integer in that case.
1232
+ discrete_sweep : bool, optional
1233
+ Whether the sweep is discrete. The default is ``False``.
1234
+
1235
+ Returns
1236
+ -------
1237
+ :class:`HfssSimulationSetup`
1238
+ Setup object class.
1239
+ """
1240
+ from ansys.edb.core.simulation_setup.hfss_simulation_setup import (
1241
+ HfssSimulationSetup as GrpcHfssSimulationSetup,
1242
+ )
1243
+ from ansys.edb.core.simulation_setup.simulation_setup import (
1244
+ SweepData as GrpcSweepData,
1245
+ )
1246
+
1247
+ if not name:
1248
+ name = generate_unique_name("HFSS_pyedb")
1249
+ if name in self._pedb.setups:
1250
+ self._pedb.logger.error(f"HFSS setup {name} already defined.")
1251
+ return False
1252
+ setup = GrpcHfssSimulationSetup.create(self._pedb.active_cell, name)
1253
+ start_freq = self._pedb.number_with_units(start_freq, "Hz")
1254
+ stop_freq = self._pedb.number_with_units(stop_freq, "Hz")
1255
+ if distribution.lower() == "linear":
1256
+ distribution = "LIN"
1257
+ elif distribution.lower() == "linear_count":
1258
+ distribution = "LINC"
1259
+ elif distribution.lower() == "exponential":
1260
+ distribution = "ESTP"
1261
+ elif distribution.lower() == "decade_count":
1262
+ distribution = "DEC"
1263
+ elif distribution.lower() == "octave_count":
1264
+ distribution = "OCT"
1265
+ else:
1266
+ distribution = "LIN"
1267
+ sweep_name = f"sweep_{len(setup.sweep_data) + 1}"
1268
+ sweep_data = [
1269
+ GrpcSweepData(
1270
+ name=sweep_name, distribution=distribution, start_f=start_freq, end_f=stop_freq, step=step_freq
1271
+ )
1272
+ ]
1273
+ if discrete_sweep:
1274
+ sweep_data[0].type = sweep_data[0].type.DISCRETE_SWEEP
1275
+ for sweep in setup.sweep_data:
1276
+ sweep_data.append(sweep)
1277
+ # TODO check bug #441 status
1278
+ # setup.sweep_data = sweep_data
1279
+ return HfssSimulationSetup(self._pedb, setup)