-
Notifications
You must be signed in to change notification settings - Fork 24
/
short seg.il
63 lines (48 loc) · 1.34 KB
/
short seg.il
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
axlCmdRegister("seg" 'short_seg)
defun(short_seg ()
file = axlTempFile()
port = outfile(file)
flag = 0
minLen = 2.00
stmp = axlUIPrompt("\324\312\320\355\327\356\320\241\317\337\263\244" "2.00")
if(stmp != nil then
minLen = atof(stmp)
if(minLen == nil then
axlUIConfirm("\312\344\310\353\316\336\320\247\243\254\262\311\323\303\304\254\310\317\326\265\241\243(2.0)")
minLen = 2.00
)
axlSetFindFilter(
?enabled list("noall" "clinesegs" "pins" "vias" "shapes")
?onButtons list("noall" "clinesegs")
)
;printf("select segs...\n")
axlAddSelectAll()
all = axlGetSelSet()
axlClearSelSet()
axlSetFindFilter(
?onButtons list("noall" "pins" "vias" "shapes")
)
;printf("all segs selected, prepare to select pins...\n")
foreach(i all
strt = car(i->startEnd)
end = cadr(i->startEnd)
distance = axlDistance(strt end)
if(distance < minLen then
if(axlSingleSelectPoint(strt) then
axlClearSelSet()
else
if(flag == 0 then flag = 1)
axlHighlightObject(i)
;printf("one seg detected...\n")
fprintf(port, "Segment @ %L\n", strt)
)
)
)
if(flag == 0 then fprintf(port, "\n\316\264\267\242\317\326\315\344\325\333\241\243\n"))
close(port)
axlUIWExpose(axlUIViewFileCreate(file "\274\354\262\351\261\250\270\346" nil))
else
printf("Cancelled\n")
)
)
;END