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,31 @@
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.hierarchy.model import Model as GrpcModel
24
+
25
+
26
+ class Model(GrpcModel):
27
+ """Manages model :class:`Model <ansys.edb.core.hierarchy.model.Model>`."""
28
+
29
+ def __init__(self, pedb):
30
+ super().__init__(self.msg)
31
+ self._pedb = pedb
@@ -0,0 +1,30 @@
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.hierarchy.netlist_model import NetlistModel as GrpcNetlistModel
24
+
25
+
26
+ class NetlistModel(GrpcNetlistModel):
27
+ """Manage :class:`NetlistModel <ansys.edb.core.hierarchy.netlist_model.NetlistModel>`."""
28
+
29
+ def __init__(self):
30
+ super().__init__(self.msg)
@@ -0,0 +1,128 @@
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.hierarchy.pin_pair_model import PinPairModel
25
+ from ansys.edb.core.hierarchy.pin_pair_model import PinPairModel as GrpcPinPairModel
26
+ from ansys.edb.core.utility.value import Value as GrpcValue
27
+
28
+
29
+ class PinPairModel(GrpcPinPairModel):
30
+ """Manage pin pair model."""
31
+
32
+ def __init__(self, pedb, edb_object):
33
+ self._pedb_comp = pedb
34
+ super().__init__(edb_object.msg)
35
+
36
+ @property
37
+ def rlc(self):
38
+ """Rlc mdodel.
39
+
40
+ Returns
41
+ -------
42
+ Tuple
43
+
44
+ """
45
+ return super().rlc(self.pin_pairs()[0])
46
+
47
+ @property
48
+ def rlc_enable(self):
49
+ """Enable model.
50
+
51
+ Returns
52
+ -------
53
+ List[Renabled(bool), Lenabled(bool), Cenabled(bool)].
54
+
55
+ """
56
+ return [self.rlc.r_enabled, self.rlc.l_enabled, self.rlc.c_enabled]
57
+
58
+ @rlc_enable.setter
59
+ def rlc_enable(self, value):
60
+ self.rlc.r_enabled = GrpcValue(value[0])
61
+ self.rlc.l_enabled = GrpcValue(value[1])
62
+ self.rlc.c_enabled = GrpcValue(value[2])
63
+
64
+ @property
65
+ def resistance(self):
66
+ """Resistance.
67
+
68
+ Returns
69
+ -------
70
+ float
71
+ Resistance value.
72
+
73
+ """
74
+ return self.rlc.r.value
75
+
76
+ @resistance.setter
77
+ def resistance(self, value):
78
+ self.rlc.r = GrpcValue(value)
79
+
80
+ @property
81
+ def inductance(self):
82
+ """Inductance.
83
+
84
+ Returns
85
+ -------
86
+ float
87
+ Inductance value.
88
+
89
+ """
90
+ return self.rlc.l.value
91
+
92
+ @inductance.setter
93
+ def inductance(self, value):
94
+ self.rlc.l = GrpcValue(value)
95
+
96
+ @property
97
+ def capacitance(self):
98
+ """Capacitance.
99
+
100
+ Returns
101
+ -------
102
+ float
103
+ Capacitance value.
104
+
105
+ """
106
+ return self.rlc.c.value
107
+
108
+ @capacitance.setter
109
+ def capacitance(self, value):
110
+ self.rlc.c = GrpcValue(value)
111
+
112
+ @property
113
+ def rlc_values(self): # pragma: no cover
114
+ """Rlc value.
115
+
116
+ Returns
117
+ -------
118
+ List[float, float, float]
119
+ [R value, L value, C value].
120
+
121
+ """
122
+ return [self.rlc.r.value, self.rlc.l.value, self.rlc.c.value]
123
+
124
+ @rlc_values.setter
125
+ def rlc_values(self, values): # pragma: no cover
126
+ self.rlc.r = GrpcValue(values[0])
127
+ self.rlc.l = GrpcValue(values[1])
128
+ self.rlc.c = GrpcValue(values[2])
@@ -0,0 +1,245 @@
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.hierarchy.pin_group import PinGroup as GrpcPinGroup
25
+ from ansys.edb.core.terminal.terminals import BoundaryType as GrpcBoundaryType
26
+ from ansys.edb.core.utility.value import Value as GrpcValue
27
+
28
+ from pyedb.generic.general_methods import generate_unique_name
29
+ from pyedb.grpc.database.hierarchy.component import Component
30
+ from pyedb.grpc.database.net.net import Net
31
+ from pyedb.grpc.database.primitive.padstack_instance import PadstackInstance
32
+ from pyedb.grpc.database.terminal.pingroup_terminal import PinGroupTerminal
33
+
34
+
35
+ class PinGroup(GrpcPinGroup):
36
+ """Manages pin groups."""
37
+
38
+ def __init__(self, pedb, edb_pin_group=None):
39
+ if edb_pin_group:
40
+ super().__init__(edb_pin_group.msg)
41
+ self._pedb = pedb
42
+
43
+ @property
44
+ def _active_layout(self):
45
+ """Active layout.
46
+
47
+ Returns
48
+ -------
49
+ :class:`Layout <ansys.edb.core.layout.layout.Layout>`
50
+ Active layout.
51
+
52
+ """
53
+ return self._pedb.active_layout
54
+
55
+ @property
56
+ def component(self):
57
+ """Component.
58
+
59
+ Return
60
+ ------
61
+ :class:`Component <pyedb.grpc.database.hierarchy.component.Component>`
62
+ Pin group component.
63
+ """
64
+ return Component(self._pedb, super().component)
65
+
66
+ @component.setter
67
+ def component(self, value):
68
+ if isinstance(value, Component):
69
+ super(PinGroup, self.__class__).component.__set__(self, value)
70
+
71
+ @property
72
+ def pins(self):
73
+ """Pin group pins.
74
+
75
+ Returns
76
+ -------
77
+ List[:class:`PadstackInstance <pyedb.grpc.database.primitive.padstack_instance.PadstackInstance>`].
78
+ """
79
+ return [PadstackInstance(self._pedb, i) for i in super().pins]
80
+
81
+ @property
82
+ def net(self):
83
+ """Net.
84
+
85
+ Returns
86
+ -------
87
+ :class:`Net <ansys.edb.core.net.net.Net>`.
88
+ """
89
+ return Net(self._pedb, super().net)
90
+
91
+ @net.setter
92
+ def net(self, value):
93
+ if isinstance(value, Net):
94
+ super(PinGroup, self.__class__).net.__set__(self, value)
95
+
96
+ @property
97
+ def net_name(self):
98
+ """Net name.
99
+
100
+ Returns
101
+ -------
102
+ str
103
+ Net name.
104
+
105
+ """
106
+ return self.net.name
107
+
108
+ # @property
109
+ # def terminal(self):
110
+ # """Terminal."""
111
+ # term = PinGroupTerminal(self._pedb, self.get_pin_group_terminal()) # TODO check method is missing
112
+ # return term if not term.is_null else None
113
+
114
+ def create_terminal(self, name=None):
115
+ """Create a terminal.
116
+
117
+ Parameters
118
+ ----------
119
+ name : str, optional
120
+ Name of the terminal.
121
+
122
+ Returns
123
+ -------
124
+ :class:`PinGroupTerminal <pyedb.grpc.database.terminal.pingroup_terminal.PinGroupTerminal>`.
125
+ Pin group terminal.
126
+
127
+ """
128
+ if not name:
129
+ name = generate_unique_name(self.name)
130
+ term = PinGroupTerminal.create(
131
+ layout=self._active_layout, name=name, pin_group=self, net=self.net, is_ref=False
132
+ )
133
+ return PinGroupTerminal(self._pedb, term)
134
+
135
+ def _json_format(self):
136
+ """Format json.
137
+
138
+ Returns
139
+ -------
140
+ Dict
141
+ """
142
+ dict_out = {"component": self.component, "name": self.name, "net": self.net, "node_type": self.node_type}
143
+ return dict_out
144
+
145
+ def create_current_source_terminal(self, magnitude=1.0, phase=0, impedance=1e6):
146
+ """Create current source terminal.
147
+
148
+ Parameters
149
+ ----------
150
+ magnitude : float or int, optional
151
+ Source magnitude, default value ``1.0``.
152
+ phase : float or int, optional
153
+ Source phase, default value ``0.0``.
154
+ impedance : float, optional
155
+ Source impedance, default value ``1e6``.
156
+
157
+ Returns
158
+ -------
159
+ :class:`PinGroupTerminal <pyedb.grpc.database.terminal.pingroup_terminal.PinGroupTerminal>`.
160
+ Pin group terminal.
161
+
162
+ """
163
+ terminal = self.create_terminal()
164
+ terminal.boundary_type = GrpcBoundaryType.CURRENT_SOURCE
165
+ terminal.source_amplitude = GrpcValue(magnitude)
166
+ terminal.source_phase = GrpcValue(phase)
167
+ terminal.impedance = GrpcValue(impedance)
168
+ return terminal
169
+
170
+ def create_voltage_source_terminal(self, magnitude=1, phase=0, impedance=0.001):
171
+ """Create voltage source terminal.
172
+
173
+ Parameters
174
+ ----------
175
+ magnitude : float or int, optional
176
+ Source magnitude, default value ``1.0``.
177
+ phase : float or int, optional
178
+ Source phase, default value ``0.0``.
179
+ impedance : float, optional
180
+ Source impedance, default value ``1e-3``.
181
+
182
+ Returns
183
+ -------
184
+ :class:`PinGroupTerminal <pyedb.grpc.database.terminal.pingroup_terminal.PinGroupTerminal>`.
185
+ Pin group terminal.
186
+
187
+ """
188
+ terminal = self.create_terminal()
189
+ terminal.boundary_type = GrpcBoundaryType.VOLTAGE_SOURCE
190
+ terminal.source_amplitude = GrpcValue(magnitude)
191
+ terminal.source_phase = GrpcValue(phase)
192
+ terminal.impedance = GrpcValue(impedance)
193
+ return terminal
194
+
195
+ def create_voltage_probe_terminal(self, impedance=1e6):
196
+ """Create voltage probe terminal.
197
+
198
+ Parameters
199
+ ----------
200
+ impedance : float, optional
201
+ Probe impedance, default value ``1e6``.
202
+
203
+ Returns
204
+ -------
205
+ :class:`PinGroupTerminal <pyedb.grpc.database.terminal.pingroup_terminal.PinGroupTerminal>`.
206
+ Pin group terminal.
207
+
208
+ """
209
+ terminal = self.create_terminal()
210
+ terminal.boundary_type = GrpcBoundaryType.VOLTAGE_PROBE
211
+ terminal.impedance = GrpcValue(impedance)
212
+ return terminal
213
+
214
+ def create_port_terminal(self, impedance=50):
215
+ """Create port terminal.
216
+
217
+ Parameters
218
+ ----------
219
+ impedance : float, optional
220
+ Port impedance, default value ``50``.
221
+
222
+ Returns
223
+ -------
224
+ :class:`PinGroupTerminal <pyedb.grpc.database.terminal.pingroup_terminal.PinGroupTerminal>`.
225
+ Pin group terminal.
226
+
227
+ """
228
+ terminal = self.create_terminal()
229
+ terminal.boundary_type = GrpcBoundaryType.PORT
230
+ terminal.impedance = GrpcValue(impedance)
231
+ terminal.is_circuit_port = True
232
+ return terminal
233
+
234
+ # def delete(self):
235
+ # """Delete active pin group.
236
+ #
237
+ # Returns
238
+ # -------
239
+ # bool
240
+ #
241
+ # """
242
+ # terminal = self.get_pin_group_terminal() # TODO check method exists in grpc
243
+ # self.delete()
244
+ # terminal.delete()
245
+ # return True
@@ -0,0 +1,33 @@
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.hierarchy.sparameter_model import (
24
+ SParameterModel as GrpcSParameterModel,
25
+ )
26
+
27
+
28
+ class SparamModel(GrpcSParameterModel): # pragma: no cover
29
+ """Manage :class:`SParameterModel <ansys.edb.core.hierarchy.sparameter_model.SParameterModel>`"""
30
+
31
+ def __init__(self, edb_model):
32
+ super().__init__(self.msg)
33
+ self._edb_model = edb_model
@@ -0,0 +1,48 @@
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.hierarchy.spice_model import SPICEModel as GrpcSpiceModel
24
+
25
+
26
+ class SpiceModel(GrpcSpiceModel): # pragma: no cover
27
+ """Manage :class:`SpiceModel <ansys.edb.core.hierarchy.spice_model.SpiceModel>`"""
28
+
29
+ def __init__(self, edb_object=None, name=None, file_path=None, sub_circuit=None):
30
+ if edb_object:
31
+ super().__init__(edb_object)
32
+ elif name and file_path:
33
+ if not sub_circuit:
34
+ sub_circuit = name
35
+ edb_object = GrpcSpiceModel.create(name=name, path=file_path, sub_circuit=sub_circuit)
36
+ super().__init__(edb_object.msg)
37
+
38
+ @property
39
+ def name(self):
40
+ """Model name.
41
+
42
+ Returns
43
+ -------
44
+ str
45
+ Model name.
46
+
47
+ """
48
+ return self.model_name
File without changes
@@ -0,0 +1,57 @@
1
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
3
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
5
+ # SOFTWARE.
6
+
7
+ from __future__ import absolute_import
8
+
9
+ from ansys.edb.core.layer.layer import Layer as GrpcLayer
10
+ from ansys.edb.core.layer.layer import LayerType as GrpcLayerType
11
+
12
+
13
+ class Layer(GrpcLayer):
14
+ """Manages Layer."""
15
+
16
+ def __init__(self, pedb, edb_object=None, name="", layer_type="undefined", **kwargs):
17
+ super().__init__(edb_object.msg)
18
+ self._pedb = pedb
19
+ self._name = name
20
+ self._color = ()
21
+ self._type = ""
22
+ if edb_object:
23
+ self._cloned_layer = self.clone()
24
+ else:
25
+ layer_type_mapping = {
26
+ "conducting_layer": GrpcLayerType.CONDUCTING_LAYER,
27
+ "air_lines_layer": GrpcLayerType.AIRLINES_LAYER,
28
+ "errors_layer": GrpcLayerType.ERRORS_LAYER,
29
+ "symbol_layer": GrpcLayerType.SYMBOL_LAYER,
30
+ "measure_layer": GrpcLayerType.MEASURE_LAYER,
31
+ "assembly_layer": GrpcLayerType.ASSEMBLY_LAYER,
32
+ "silkscreen_layer": GrpcLayerType.SILKSCREEN_LAYER,
33
+ "solder_mask_layer": GrpcLayerType.SOLDER_MASK_LAYER,
34
+ "solder_paste_layer": GrpcLayerType.SOLDER_PASTE_LAYER,
35
+ "glue_layer": GrpcLayerType.GLUE_LAYER,
36
+ "wirebond_layer": GrpcLayerType.WIREBOND_LAYER,
37
+ "user_layer": GrpcLayerType.USER_LAYER,
38
+ "siwave_hfss_solver_regions": GrpcLayerType.SIWAVE_HFSS_SOLVER_REGIONS,
39
+ "postprocessing_layer": GrpcLayerType.POST_PROCESSING_LAYER,
40
+ "outline_layer": GrpcLayerType.OUTLINE_LAYER,
41
+ "layer_types_count": GrpcLayerType.LAYER_TYPES_COUNT,
42
+ "undefined_layer_type": GrpcLayerType.UNDEFINED_LAYER_TYPE,
43
+ }
44
+ if layer_type in layer_type_mapping:
45
+ self.create(name=name, lyr_type=layer_type_mapping[layer_type])
46
+ self.update(**kwargs)
47
+
48
+ def update(self, **kwargs):
49
+ for k, v in kwargs.items():
50
+ if k in dir(self):
51
+ self.__setattr__(k, v)
52
+ else:
53
+ self._pedb.logger.error(f"{k} is not a valid layer attribute")
54
+
55
+ @property
56
+ def _layer_name_mapping_reversed(self):
57
+ return {j: i for i, j in self._layer_name_mapping.items()}