Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a design rule only for inner/outer layers is not possible #116

Open
chfriedrich opened this issue Jun 7, 2024 · 1 comment
Open

Comments

@chfriedrich
Copy link

When I create a custom Rule in KiCad, I can use the syntax

(rule "HV to HV (IL)"
	(layer inner)
	(constraint clearance (min 2.4mm))
	(condition "..."))

to limit its scope to all inner layers.

This is not possible with kiutils, because the layers member is a string, which gets parsed to

(rule "HV to HV (IL)"
	(layer "inner")
	(constraint clearance (min 2.4mm))
	(condition "..."))

with the word inner in appostrophs, which is not understood by kicad.

@chfriedrich
Copy link
Author

I fixed this temporarily now by changing the if condition in line 187 of dru.py to

        if self.layer is not None:
            if self.layer == 'inner' or self.layer == 'outer':
                expression += f'{indents}  (layer {dequote(self.layer)})\n'
            else:
                expression += f'{indents}  (layer "{dequote(self.layer)}")\n'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant