Hello…
Our Asian board suppliers require track expansion on soldermask exposed pads and vias to reduce the effects of galvanic corrosion. Our requirement definition is linewidths <= .19mm, must be increased to .2mm
To identify these within the allegro board, I repurposed the check_short_segs.il code to:
create a report
ignore vias (our vias are plugged, so expansion is not required)
report first cline segment on a pin (xy & width)
report only TOP & BOTTOM (expansion not required internally)
Although this report does help identify segments that are too small and their location, I’d like to add additional user option switches, but I’m not a code person and my Source-link and forum searches have not provide the insight to accomplish this.
I’d like to include switches for user variables:
/r report .19 ( <= user linewidth ) Run a report with a user defined min linewidth, 0.19mm default
/c change .20 (new linewidth ) Execute a change linewidth from the reported linewidths to a user definable width.
/d distance .20(track 2 pad edge intersect + distance) Change length of first segment to track & pad intersect plus user defined distance before changing /c linewidth.
Any help would be greatly appreciated.
Thanks, Ken
; ##################################################
; Repurposed check_short_segs.il file to identify cline width of first pad entry segment on pins only.
; 02May2017 Ken
; Usage:
; To use this file, load it from the APD/Allegro command line or allegro.ilinit file
; and then issue the command
;
;
;
axlCmdRegister("fst" 'First_Seg_Track_Expansion )
defun(First_Seg_Track_Expansion ()
; Open the log file and print the header info
; ###########################################
board_name = axlGetDrawingName()
rep_time = getCurrentTime()
First_Cline_Segment_Rep=outfile("./First_Cline_Segment.log" "w")
fprintf(First_Cline_Segment_Rep "First Cline Segment Report\n\n")
fprintf(First_Cline_Segment_Rep "Time: %s\n", rep_time)
fprintf(First_Cline_Segment_Rep "Design: %s\n", board_name)
fprintf(First_Cline_Segment_Rep "--------------------------------------------------------------------------\n\n")
fprintf(First_Cline_Segment_Rep "-Layer--------------Location--------Width---------------------------------\n\n")
; Set up the find filter and select all the nets
; ##############################################
; axlSetFindFilter(?enabled '(noall invisible pins vias) ?onButtons '(noall pins vias)) ;save for ref;
axlSetFindFilter(?enabled '(noall invisible pins vias) ?onButtons '(noall pins))
axlClearSelSet()
axlAddSelectAll()
l_pin_via=axlGetSelSet()
axlClearSelSet()
foreach(pv l_pin_via
unless(pv->isMech
pin_branch=pv->branch
pin_loc=pv->xy
foreach(child pin_branch->children
if(child->objType == "path" then
foreach(seg child->segments
seg_startEnd=seg->startEnd
seg_start=car(seg_startEnd)
seg_end=cadr(seg_startEnd)
if(pin_loc==seg_start||pin_loc==seg_end then
seg_layer=seg->layer
seg_width=seg->width
if(seg_width <=.18 then
if(seg_layer == "ETCH/TOP" || seg_layer == "ETCH/BOTTOM" then
fprintf(First_Cline_Segment_Rep "%s \t%L\t%L\n" seg_layer pin_loc seg_width)
);endif
);endif
);endif
);foreach seg
);endif child
);foreach child
);unless pv->isMech
);foreach pv
; Close the log file, refresh the graphics, and open a viewlog
; ############################################################
close(First_Cline_Segment_Rep)
axlShell("redisplay")
axlShell("viewlog ./First_Cline_Segment.log")
)
procedure(rbg_get_segLen( l_coords ) ;This section left in for possible future reference / use;
let( (x1 x2 y1 y2 x_len y_len h)
x1=xCoord(car(l_coords))
x2=xCoord(cadr(l_coords))
y1=yCoord(car(l_coords))
y2=yCoord(cadr(l_coords))
x_len=x2-x1
y_len=y2-y1
h=sqrt(x_len**2+y_len**2)
)
);endproc
procedure(rbg_get_pin_radius(pin_id chk_layer)
;let( (l_pads pad pad_box px1 px2)
pin_rad=0
l_pads=pin_id->definition->pads
foreach(pad l_pads
if(pad->type=="REGULAR"&&pad->layer==chk_layer then
pad_box=pad->bBox
px1=xCoord(car(pad_box))
px2=xCoord(cadr(pad_box))
);endif
);foreach
pin_rad=abs((px2-px1)/2)
;)
);endproc
;end defun - First_Seg_Track_Expansion