File: changeclearsize-sel.script

package info (click to toggle)
pcb 1%3A4.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 29,760 kB
  • sloc: ansic: 138,451; sh: 8,447; yacc: 5,135; pascal: 4,820; makefile: 2,039; perl: 580; lex: 439; awk: 116; lisp: 86; tcl: 63; xml: 20
file content (70 lines) | stat: -rw-r--r-- 1,915 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Change the soldermask and polygon clearances for selected objects.
#
# This test operates on clearance.pcb. This file should be saved with the
# soldermask layer enabled and two of four columns of pins/pads/vias
# selected.
#
# This test has three parts:
#  * Part 1 sets the clearance to a specific value
#  * Part 2 sets the clearance to zero
#  * Part 3 sets the polygon clearance to something small, so as to invoke
#    the minimum clearance as defined by the DRC rules.
#
# Author: Chad Parker <parker.charles@gmail.com>
#
# Change Log:
#   * 20180506: Chad Parker <parker.charles@gmail.com>
#               Initial revision.
#

#
# PART 1: Set the soldermask and polygon clearances to specific values
#

# Set the SM clearance to non-zero
ChangeClearSize(Selected, 0.5mm)

# Turn the SM layer off so ChangeClearSize will affect polygon clearance
Display(ToggleMask)

# Set the poly clearance to non-zero
ChangeClearSize(Selected, 0.5mm)

SaveTo(LayoutAs, clearance-non-zero.pcb)

#
# PART 2: Set the soldermask and polygon clearances to zero
#

# Set the poly clearances to zero
ChangeClearSize(Selected, -1mm)

# Turn the mask back on
Display(ToggleMask)

# Set the SM clearance to zero
ChangeClearSize(Selected, 0)

SaveTo(LayoutAs, clearance-zero.pcb)

#
# PART 3:
# Set the polygon clearance to something small, which will enforce a minimum
# clearance. Solder mask doesn't have this enforcement. This test may need
# to change in the future if the enforcement changes as I'd like it to.
#

# Turn the mask back off
Display(ToggleMask)

# Set the poly clearances to the minimum value
ChangeClearSize(Selected, 0)

SaveTo(LayoutAs, clearance-min.pcb)

# Note: If the script is to be used in conjunction with an exporter, then
# Quit() should not be called. If it needs to be used both with and without
# an exporter, then add --action-string Quit() to the invocation for the
# script only test.
Quit()