pyedb 0.5.2__py3-none-any.whl → 0.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyedb might be problematic. Click here for more details.

Files changed (108) hide show
  1. pyedb/__init__.py +2 -3
  2. pyedb/dotnet/application/Variables.py +22 -0
  3. pyedb/dotnet/edb.py +51 -15
  4. pyedb/dotnet/edb_core/cell/hierarchy/model.py +39 -0
  5. pyedb/dotnet/edb_core/components.py +23 -1
  6. pyedb/dotnet/edb_core/configuration.py +175 -60
  7. pyedb/dotnet/edb_core/definition/component_def.py +24 -3
  8. pyedb/dotnet/edb_core/definition/component_model.py +22 -0
  9. pyedb/dotnet/edb_core/definition/definition_obj.py +24 -4
  10. pyedb/dotnet/edb_core/definition/definitions.py +22 -1
  11. pyedb/dotnet/edb_core/definition/package_def.py +23 -3
  12. pyedb/dotnet/edb_core/dotnet/database.py +22 -0
  13. pyedb/dotnet/edb_core/dotnet/layout.py +22 -0
  14. pyedb/dotnet/edb_core/dotnet/primitive.py +22 -0
  15. pyedb/dotnet/edb_core/edb_data/components_data.py +112 -3
  16. pyedb/dotnet/edb_core/edb_data/connectable.py +22 -0
  17. pyedb/dotnet/edb_core/edb_data/control_file.py +22 -0
  18. pyedb/dotnet/edb_core/edb_data/design_options.py +23 -0
  19. pyedb/dotnet/edb_core/edb_data/edbvalue.py +23 -0
  20. pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +22 -0
  21. pyedb/dotnet/edb_core/edb_data/hfss_simulation_setup_data.py +22 -0
  22. pyedb/dotnet/edb_core/edb_data/layer_data.py +22 -0
  23. pyedb/dotnet/edb_core/edb_data/nets_data.py +23 -1
  24. pyedb/dotnet/edb_core/edb_data/obj_base.py +23 -0
  25. pyedb/dotnet/edb_core/edb_data/padstacks_data.py +42 -0
  26. pyedb/dotnet/edb_core/edb_data/ports.py +22 -0
  27. pyedb/dotnet/edb_core/edb_data/primitives_data.py +62 -7
  28. pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +22 -0
  29. pyedb/dotnet/edb_core/edb_data/simulation_setup.py +22 -0
  30. pyedb/dotnet/edb_core/edb_data/siwave_simulation_setup_data.py +22 -0
  31. pyedb/dotnet/edb_core/edb_data/sources.py +23 -3
  32. pyedb/dotnet/edb_core/edb_data/terminals.py +22 -0
  33. pyedb/dotnet/edb_core/edb_data/utilities.py +25 -2
  34. pyedb/dotnet/edb_core/edb_data/variables.py +23 -0
  35. pyedb/dotnet/edb_core/general.py +22 -0
  36. pyedb/dotnet/edb_core/hfss.py +23 -1
  37. pyedb/dotnet/edb_core/layout.py +68 -35
  38. pyedb/dotnet/edb_core/layout_validation.py +24 -2
  39. pyedb/dotnet/edb_core/materials.py +22 -0
  40. pyedb/dotnet/edb_core/net_class.py +22 -0
  41. pyedb/dotnet/edb_core/nets.py +27 -5
  42. pyedb/dotnet/edb_core/padstack.py +22 -0
  43. pyedb/dotnet/edb_core/siwave.py +22 -0
  44. pyedb/dotnet/edb_core/stackup.py +22 -0
  45. pyedb/edb_logger.py +22 -0
  46. pyedb/generic/constants.py +22 -0
  47. pyedb/generic/data_handlers.py +0 -1
  48. pyedb/generic/design_types.py +24 -0
  49. pyedb/generic/general_methods.py +22 -2
  50. pyedb/generic/plot.py +3 -13
  51. pyedb/generic/settings.py +22 -0
  52. pyedb/ipc2581/bom/bom.py +22 -0
  53. pyedb/ipc2581/bom/bom_item.py +22 -0
  54. pyedb/ipc2581/bom/characteristics.py +22 -0
  55. pyedb/ipc2581/bom/refdes.py +22 -0
  56. pyedb/ipc2581/content/color.py +22 -0
  57. pyedb/ipc2581/content/content.py +22 -0
  58. pyedb/ipc2581/content/dictionary_color.py +22 -0
  59. pyedb/ipc2581/content/dictionary_fill.py +22 -0
  60. pyedb/ipc2581/content/dictionary_line.py +22 -0
  61. pyedb/ipc2581/content/entry_color.py +22 -0
  62. pyedb/ipc2581/content/entry_line.py +22 -0
  63. pyedb/ipc2581/content/fill.py +22 -0
  64. pyedb/ipc2581/content/layer_ref.py +22 -0
  65. pyedb/ipc2581/content/standard_geometries_dictionary.py +22 -0
  66. pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +22 -0
  67. pyedb/ipc2581/ecad/cad_data/cad_data.py +22 -0
  68. pyedb/ipc2581/ecad/cad_data/component.py +22 -0
  69. pyedb/ipc2581/ecad/cad_data/drill.py +22 -0
  70. pyedb/ipc2581/ecad/cad_data/feature.py +22 -0
  71. pyedb/ipc2581/ecad/cad_data/layer.py +22 -0
  72. pyedb/ipc2581/ecad/cad_data/layer_feature.py +22 -0
  73. pyedb/ipc2581/ecad/cad_data/logical_net.py +22 -0
  74. pyedb/ipc2581/ecad/cad_data/outline.py +22 -0
  75. pyedb/ipc2581/ecad/cad_data/package.py +22 -0
  76. pyedb/ipc2581/ecad/cad_data/padstack_def.py +22 -0
  77. pyedb/ipc2581/ecad/cad_data/padstack_hole_def.py +22 -0
  78. pyedb/ipc2581/ecad/cad_data/padstack_instance.py +22 -0
  79. pyedb/ipc2581/ecad/cad_data/padstack_pad_def.py +22 -0
  80. pyedb/ipc2581/ecad/cad_data/path.py +22 -0
  81. pyedb/ipc2581/ecad/cad_data/phy_net.py +22 -0
  82. pyedb/ipc2581/ecad/cad_data/pin.py +22 -0
  83. pyedb/ipc2581/ecad/cad_data/polygon.py +22 -0
  84. pyedb/ipc2581/ecad/cad_data/profile.py +22 -0
  85. pyedb/ipc2581/ecad/cad_data/stackup.py +22 -0
  86. pyedb/ipc2581/ecad/cad_data/stackup_group.py +22 -0
  87. pyedb/ipc2581/ecad/cad_data/stackup_layer.py +22 -0
  88. pyedb/ipc2581/ecad/cad_data/step.py +22 -0
  89. pyedb/ipc2581/ecad/cad_header.py +22 -0
  90. pyedb/ipc2581/ecad/ecad.py +22 -0
  91. pyedb/ipc2581/ecad/spec.py +22 -0
  92. pyedb/ipc2581/history_record.py +22 -0
  93. pyedb/ipc2581/ipc2581.py +22 -0
  94. pyedb/ipc2581/logistic_header.py +22 -0
  95. pyedb/misc/aedtlib_personalib_install.py +22 -0
  96. pyedb/misc/downloads.py +22 -0
  97. pyedb/misc/misc.py +22 -0
  98. pyedb/misc/siw_feature_config/emc/component_tags.py +3 -5
  99. pyedb/misc/siw_feature_config/emc/net_tags.py +1 -3
  100. pyedb/misc/siw_feature_config/emc/tag_library.py +5 -4
  101. pyedb/misc/siw_feature_config/emc/xml_generic.py +1 -2
  102. pyedb/misc/siw_feature_config/emc_rule_checker_settings.py +55 -30
  103. pyedb/siwave.py +6 -4
  104. {pyedb-0.5.2.dist-info → pyedb-0.7.0.dist-info}/METADATA +1 -1
  105. pyedb-0.7.0.dist-info/RECORD +130 -0
  106. pyedb-0.5.2.dist-info/RECORD +0 -130
  107. {pyedb-0.5.2.dist-info → pyedb-0.7.0.dist-info}/LICENSE +0 -0
  108. {pyedb-0.5.2.dist-info → pyedb-0.7.0.dist-info}/WHEEL +0 -0
@@ -1,13 +1,34 @@
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
+
1
23
  from pyedb.dotnet.edb_core.edb_data.obj_base import ObjBase
2
- from pyedb.generic.general_methods import pyedb_function_handler
3
24
 
4
25
 
5
26
  class DefinitionObj(ObjBase):
6
27
  """Base class for definition objects."""
7
-
28
+
8
29
  def __init__(self, pedb, edb_object):
9
30
  super().__init__(pedb, edb_object)
10
-
31
+
11
32
  @property
12
33
  def definition_obj_type(self):
13
34
  return self._edb_object.GetDefinitionObjType()
@@ -15,4 +36,3 @@ class DefinitionObj(ObjBase):
15
36
  @property
16
37
  def name(self):
17
38
  return self._edb_object.GetName()
18
-
@@ -1,4 +1,25 @@
1
- import os
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
+
2
23
  from pyedb.dotnet.edb_core.definition.component_def import EDBComponentDef
3
24
  from pyedb.dotnet.edb_core.definition.package_def import PackageDef
4
25
  from pyedb.generic.general_methods import pyedb_function_handler
@@ -1,8 +1,28 @@
1
- import os
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.
2
22
 
23
+ from pyedb.dotnet.edb_core.dotnet.database import PolygonDataDotNet
3
24
  from pyedb.dotnet.edb_core.edb_data.obj_base import ObjBase
4
25
  from pyedb.generic.general_methods import pyedb_function_handler
5
- from pyedb.dotnet.edb_core.dotnet.database import PolygonDataDotNet
6
26
 
7
27
 
8
28
  class PackageDef(ObjBase):
@@ -83,7 +103,7 @@ class PackageDef(ObjBase):
83
103
  return self._edb_object.GetTheta_JC().ToDouble()
84
104
 
85
105
  @theta_jc.setter
86
- def theta_jc(self,value):
106
+ def theta_jc(self, value):
87
107
  value = self._pedb.edb_value(value)
88
108
  self._edb_object.SetTheta_JC(value)
89
109
 
@@ -1,3 +1,25 @@
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
+
1
23
  """Database."""
2
24
  import os
3
25
  import re
@@ -1,3 +1,25 @@
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
+
1
23
  from pyedb.dotnet.edb_core.dotnet.database import NetDotNet
2
24
  from pyedb.dotnet.edb_core.dotnet.primitive import cast
3
25
  from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
@@ -1,3 +1,25 @@
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
+
1
23
  """Primitive."""
2
24
  from pyedb.dotnet.edb_core.dotnet.database import NetDotNet, PolygonDataDotNet
3
25
  from pyedb.dotnet.edb_core.general import convert_py_list_to_net_list
@@ -1,9 +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
+
1
23
  import logging
2
24
  import re
3
25
  import warnings
4
26
 
27
+ from pyedb.dotnet.edb_core.cell.hierarchy.model import PinPairModel, SPICEModel
5
28
  from pyedb.dotnet.edb_core.definition.package_def import PackageDef
6
- from pyedb.dotnet.edb_core.cell.hierarchy.model import PinPairModel
7
29
  from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
8
30
  from pyedb.generic.general_methods import is_ironpython
9
31
 
@@ -175,6 +197,11 @@ class EDBComponent(object):
175
197
  """``ComponentProperty`` object."""
176
198
  return self.edbcomponent.GetComponentProperty().Clone()
177
199
 
200
+ @component_property.setter
201
+ def component_property(self, value):
202
+ if value:
203
+ self.edbcomponent.SetComponentProperty(value)
204
+
178
205
  @property
179
206
  def _edb_model(self): # pragma: no cover
180
207
  return self.component_property.GetModel().Clone()
@@ -195,6 +222,8 @@ class EDBComponent(object):
195
222
  model_type = edb_object.ToString().split(".")[-1]
196
223
  if model_type == "PinPairModel":
197
224
  return PinPairModel(self._pedb, edb_object)
225
+ elif model_type == "SPICEModel":
226
+ return SPICEModel(self._pedb, edb_object)
198
227
 
199
228
  @model.setter
200
229
  def model(self, value):
@@ -242,6 +271,7 @@ class EDBComponent(object):
242
271
  self.package_def = name
243
272
 
244
273
  from pyedb.dotnet.edb_core.dotnet.database import PolygonDataDotNet
274
+
245
275
  polygon = PolygonDataDotNet(self._pedb).create_from_bbox(self.component_instance.GetBBox())
246
276
  self.package_def._edb_object.SetExteriorBoundary(polygon)
247
277
  return True
@@ -297,6 +327,84 @@ class EDBComponent(object):
297
327
  return self.component_property.GetSolderBallProperty().GetHeight()
298
328
  return None
299
329
 
330
+ @solder_ball_height.setter
331
+ def solder_ball_height(self, value):
332
+ if "GetSolderBallProperty" in dir(self.component_property) and value:
333
+ sball_height = round(self._edb.utility.Value(value).ToDouble(), 9)
334
+ cmp_property = self.component_property
335
+ solder_ball_prop = cmp_property.GetSolderBallProperty().Clone()
336
+ solder_ball_prop.SetHeight(self._get_edb_value(sball_height))
337
+ cmp_property.SetSolderBallProperty(solder_ball_prop)
338
+ self.component_property = cmp_property
339
+
340
+ @property
341
+ def solder_ball_shape(self):
342
+ """Solder ball shape."""
343
+ if "GetSolderBallProperty" in dir(self.component_property):
344
+ shape = self.component_property.GetSolderBallProperty().GetShape()
345
+ if shape.value__ == 0:
346
+ return "None"
347
+ elif shape.value__ == 1:
348
+ return "Cylinder"
349
+ elif shape.value__ == 2:
350
+ return "Spheroid"
351
+
352
+ @solder_ball_shape.setter
353
+ def solder_ball_shape(self, value):
354
+ shape = None
355
+ if isinstance(value, str):
356
+ if value.lower() == "cylinder":
357
+ shape = self._edb.definition.SolderballShape.Cylinder
358
+ elif value.lower() == "none":
359
+ shape = self._edb.definition.SolderballShape.NoSolderball
360
+ elif value.lower() == "spheroid":
361
+ shape = self._edb.definition.SolderballShape.Spheroid
362
+ if isinstance(value, int):
363
+ if value == 0:
364
+ shape = self._edb.definition.SolderballShape.NoSolderball
365
+ elif value == 1:
366
+ shape = self._edb.definition.SolderballShape.Cylinder
367
+ elif value == 2:
368
+ shape = self._edb.definition.SolderballShape.Spheroid
369
+ if shape:
370
+ cmp_property = self.component_property
371
+ solder_ball_prop = cmp_property.GetSolderBallProperty().Clone()
372
+ solder_ball_prop.SetShape(shape)
373
+ cmp_property.SetSolderBallProperty(solder_ball_prop)
374
+ self.component_property = cmp_property
375
+
376
+ @property
377
+ def solder_ball_diameter(self):
378
+ """Solder ball diameter"""
379
+ if "GetSolderBallProperty" in dir(self.component_property):
380
+ result = self.component_property.GetSolderBallProperty().GetDiameter()
381
+ succeed = result[0]
382
+ diameter = result[1]
383
+ mid_diameter = result[2]
384
+ if succeed:
385
+ return diameter, mid_diameter
386
+
387
+ @solder_ball_diameter.setter
388
+ def solder_ball_diameter(self, value):
389
+ diameter = None
390
+ mid_diameter = None # used with spheroid shape
391
+ if isinstance(value, tuple) or isinstance(value, list):
392
+ if len(value) == 2:
393
+ diameter = self._get_edb_value(value[0])
394
+ mid_diameter = self._get_edb_value(value[1])
395
+ elif len(value) == 1:
396
+ diameter = self._get_edb_value(value[0])
397
+ mid_diameter = self._get_edb_value(value[0])
398
+ if isinstance(value, str):
399
+ diameter = self._get_edb_value(value)
400
+ mid_diameter = self._get_edb_value(value)
401
+ if diameter and mid_diameter:
402
+ cmp_property = self.component_property
403
+ solder_ball_prop = cmp_property.GetSolderBallProperty().Clone()
404
+ solder_ball_prop.SetDiameter(diameter, mid_diameter)
405
+ cmp_property.SetSolderBallProperty(solder_ball_prop)
406
+ self.component_property = cmp_property
407
+
300
408
  @property
301
409
  def solder_ball_placement(self):
302
410
  """Solder ball placement if available.."""
@@ -806,7 +914,7 @@ class EDBComponent(object):
806
914
  return True
807
915
 
808
916
  @pyedb_function_handler()
809
- def assign_spice_model(self, file_path, name=None):
917
+ def assign_spice_model(self, file_path, name=None, sub_circuit_name=None):
810
918
  """Assign Spice model to this component.
811
919
 
812
920
  Parameters
@@ -834,6 +942,8 @@ class EDBComponent(object):
834
942
  model = self._edb.cell.hierarchy._hierarchy.SPICEModel()
835
943
  model.SetModelPath(file_path)
836
944
  model.SetModelName(name)
945
+ if sub_circuit_name:
946
+ model.SetSubCkt(sub_circuit_name)
837
947
  terminal = 1
838
948
  for pn in pinNames:
839
949
  model.AddTerminalPinPair(pn, str(terminal))
@@ -903,7 +1013,6 @@ class EDBComponent(object):
903
1013
  model.SetReferenceNet(reference_net)
904
1014
  return self._set_model(model)
905
1015
 
906
-
907
1016
  @pyedb_function_handler()
908
1017
  def assign_rlc_model(self, res=None, ind=None, cap=None, is_parallel=False):
909
1018
  """Assign RLC to this component.
@@ -1,3 +1,25 @@
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
+
1
23
  from pyedb.dotnet.edb_core.edb_data.obj_base import ObjBase
2
24
  from pyedb.generic.general_methods import pyedb_function_handler
3
25
 
@@ -1,3 +1,25 @@
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
+
1
23
  import copy
2
24
  import os
3
25
  import re
@@ -1,3 +1,26 @@
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
+
1
24
  class EdbDesignOptions:
2
25
  def __init__(self, active_cell):
3
26
  self._active_cell = active_cell
@@ -1,3 +1,26 @@
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
+
1
24
  class EdbValue:
2
25
  """Class defining Edb Value properties."""
3
26
 
@@ -1,3 +1,25 @@
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
+
1
23
  from pyedb.dotnet.edb_core.edb_data.edbvalue import EdbValue
2
24
  from pyedb.dotnet.edb_core.edb_data.primitives_data import cast
3
25
  from pyedb.dotnet.edb_core.general import convert_pytuple_to_nettuple
@@ -1,3 +1,25 @@
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
+
1
23
  from pyedb.dotnet.clr_module import Tuple
2
24
  from pyedb.dotnet.edb_core.edb_data.simulation_setup import (
3
25
  BaseSimulationSetup,
@@ -1,3 +1,25 @@
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
+
1
23
  from __future__ import absolute_import
2
24
 
3
25
  import re
@@ -1,3 +1,25 @@
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
+
1
23
  from pyedb.dotnet.edb_core.dotnet.database import (
2
24
  DifferentialPairDotNet,
3
25
  ExtendedNetDotNet,
@@ -243,7 +265,7 @@ class EDBExtendedNetData(ExtendedNetDotNet):
243
265
  if set(comp_obj.nets).issubset(set(nets)):
244
266
  res[comp_name] = comp_obj
245
267
  return res
246
-
268
+
247
269
  @property
248
270
  def shunt_rlc(self):
249
271
  """Dictionary of shunt RLC components."""
@@ -1,3 +1,26 @@
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
+
1
24
  class ObjBase(object):
2
25
  """Manages EDB functionalities for a base object."""
3
26