Skip to content

Commit 8150cd5

Browse files
hui-zhou-apre-commit-ci[bot]pyansys-ci-bot
authored
REFACTOR: EDB CFG cutout (#1706)
* REFACCTOR: EDB CFG cutout * MISC: Auto fixes from pre-commit.com hooks For more information, see https://pre-commit.ci * chore: adding changelog file 1706.miscellaneous.md [dependabot-skip] --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com>
1 parent 89d080d commit 8150cd5

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
EDB CFG cutout

src/pyedb/configuration/cfg_operations.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@
2727
# from pyedb.configuration.cfg_common import CfgBase
2828

2929

30+
class CfgAutoIdentifyNets(BaseModel):
31+
enabled: bool = False
32+
resistor_below: float | str | None = 100
33+
inductor_below: float | str | None = 1
34+
capacitor_above: float | str | None = "10nF"
35+
36+
3037
class CfgCutout(BaseModel):
31-
auto_identify_nets: Optional[Dict] = {
32-
"enabled": False,
33-
"resistor_below": 100,
34-
"inductor_below": 1,
35-
"capacitor_above": 1,
36-
}
38+
auto_identify_nets: CfgAutoIdentifyNets | None = CfgAutoIdentifyNets()
3739
signal_list: Optional[List[str]] = None
3840
reference_list: Optional[List[str]] = None
3941
extent_type: Optional[str] = "ConvexHull"

src/pyedb/dotnet/database/net_class.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,11 @@ def auto_identify_power(self, resistor_below=10, inductor_below=1, capacitor_abo
246246
resistor_below, inductor_below, capacitor_above, exception_list, True, True
247247
)
248248

249+
def clean(self):
250+
"""Remove all extended nets."""
251+
for net in self.items.values():
252+
net.delete()
253+
249254

250255
class EdbDifferentialPairs(EdbCommon, object):
251256
"""Manages EDB methods for managing nets accessible from the ``Edb.differential_pairs`` property.

0 commit comments

Comments
 (0)