-
Notifications
You must be signed in to change notification settings - Fork 83
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
Allow packages to fix parameters #784
Allow packages to fix parameters #784
Conversation
Looks great overall! Some more suggestions: I think not many packages will use this new feature, so bumping the version isn't always necessary. For this, the |
Thanks for the comments! I added dynamic versioning and switched to a checkbox in the parameter windows: e80720c |
@carrotIndustries any more thoughts on this? |
LGTM, just squash the two last commits, then I'll merge it |
e80720c
to
4d44c7f
Compare
Done, thanks for the high-quality PR! |
This change allows packages and pads to define fixed parameters, which cannot be overwritten by a board's parameter rule. This can be useful in a number of situations, such as a package that wants to define a courtyard excess based on IPC density level, or has specific solder and paste mask settings that are recommended by the manufacturer. While these results can also be obtained by manually defining the courtyard boundary or a adding a shape on the mask layer, parametric definitions are much nicer.
This change bumps the pool version to 1, and adds
parameters_fixed
as a field in packages and pads. When the board pushes its parameter rule to packages viaPackage::apply_parameter_set
, the parameter ID is checked against the set of fixed parameters. When both a pad and package fix the same parameter, the pad's value will take precedence.In the parameter set editor UI, the option to fix a parameter is an additional button that appears with the pin icon, which is similarly used in many other programs. When multiple pads are selected in the parameter editor, using the
All
button will copy the fixed field to all pads, and clicking theAll
button on a fixed parameter will also copy it to all pads.While fixed parameters could conceptually apply to padstacks, padstacks also allow required parameters that must be defined by a pad. Having a parameter that is both fixed (at the padstack level) and required of pads using it would be somewhat contradictory, so padstacks cannot define fixed parameters.