pcb_apply_dnp_paste_exclusion
Suppress stencil paste on Not-Fitted (DNP) components by collapsing surface pad apertures, preventing paste deposits on empty pads and bridging rework.
Instructions
Suppress stencil paste on Not-Fitted (DNP) components.
The remediation half of audit_variant_not_fitted. A Not-Fitted
component is on the BOM as a placeholder and must NOT receive
paste: the SMT line would otherwise deposit paste on empty pads,
and the bridging that follows shows up as rework.
With no designators this asks audit_variant_not_fitted
for the components Not Fitted in the project's CURRENT variant,
so the selection follows the variant you actually have open.
Pass an explicit list to override that.
Mechanism: each surface pad gets a manual PasteMaskExpansion of minus its larger dimension, which collapses the stencil aperture whatever the pad shape. Through-hole pads are left alone and counted separately, since they have no aperture to suppress.
Reversible: restore=True discards the manual override so
Altium recomputes the expansion from the design rules.
RESTORE THE SAME LIST YOU APPLIED. restore will NOT guess:
called without designators it refuses and tells you what to
pass. That is deliberate. Resolving a restore from the current
variant means excluding under one variant, switching, then
restoring, and leaving any component that was excluded but is
fitted in the new variant with its aperture still suppressed.
Nothing would report it: the call succeeds, the pad looks
ordinary in the editor, and the part comes back from assembly
unsoldered.
The apply reply lists every component it touched in items.
Pass those designators back to restore. If you really do want
the current variant's Not-Fitted list, ask for it with
use_current_variant=True and you own the choice.
Apply is unaffected: with no designators it uses the current
variant's Not-Fitted list, which is the whole point of applying.
Mismatch is visible either way. components_requested versus
components_matched in the reply reports how many of the
names you passed were actually found on this board.
Args:
designators: Components to treat. Omit on an apply to use
the current variant's Not-Fitted list. Required on a
restore unless use_current_variant is set.
restore: Undo a previous exclusion instead of applying one.
dry_run: Report which components WOULD be treated and change
nothing. Worth using first: this edits the board, and a
wrong variant selection would strip paste off parts that
are meant to be fitted.
use_current_variant: Allow a restore with no designators
to resolve from the variant open right now. Off by
default because that is the failure above.
Returns:
Dict with restored, components_requested,
components_matched, pads_changed,
pads_skipped_through_hole and per-component items.
In dry-run mode: dry_run, designators and source.
On a refused restore: {"ok": False, "reason": ...} and
nothing is read from or written to the board.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| restore | No | ||
| designators | No | ||
| use_current_variant | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||