📄 clinecut.il
字号:
p4y = cYend
p2x = p1x + ((hty - p1y)/cslope)
p2y = hty
p3x = p2x - (cutwidth / cslope)
p3y = hty - cutwidth
cline1 = list(list(p1x p1y) list(p2x p2y))
cline2 = list(list(p3x p3y) list(p4x p4y))
etchlayer = cseg->layer
segnetname = cseg->net->name
segwidth = cseg->width
axlDeleteObject(cseg)
if(p3x < p4x then
axlDBCreateLine(cline1 segwidth etchlayer segnetname)
axlDBCreateLine(cline2 segwidth etchlayer segnetname)
else
axlDBCreateLine(cline1 segwidth etchlayer segnetname)
); endif
); end of negative top boundary line
(;; Slope Crosses Positive Bottom Horizontal Boundary line.
(cXend > vlx && cXend < vrx && cYend > hby && cYend < hty && cYbeg < hby)
if(debug then
axlUIWPrint(nil " - Found Positive line crossing BOTTOM Horizontal line. -")
); endif
p1x = cXbeg
p1y = cYbeg
p4x = cXend
p4y = cYend
p2x = p1x + ((hby - p1y)/cslope)
p2y = hby
p3x = p2x + (cutwidth / cslope)
p3y = hby + cutwidth
cline1 = list(list(p1x p1y) list(p2x p2y))
cline2 = list(list(p3x p3y) list(p4x p4y))
etchlayer = cseg->layer
segnetname = cseg->net->name
segwidth = cseg->width
axlDeleteObject(cseg)
;; if the boundary line crosses too close to the end
;; of the cline segment the intermediate x/y location (P3x,P3y)
;; may be greater than the end of the segment (p4x,p4y). If
;; this is the case then just delete the entire section from the
;; boundary line.
if( p4x > p3x then
axlDBCreateLine(cline1 segwidth etchlayer segnetname)
axlDBCreateLine(cline2 segwidth etchlayer segnetname)
else
axlDBCreateLine(cline1 segwidth etchlayer segnetname)
); endif
); End positive slope crossing bottom horizontal boundary line.
(;; Slope Crosses Negative Bottom Horizontal Boundary line.
(cXbeg > vlx && cXbeg < vrx && cYbeg < hty && cYbeg > hby && cYend < hby)
if(debug then
axlUIWPrint(nil " - Found Negative line crossing BOTTOM Horizontal line. -")
); endif
p1x = cXbeg
p1y = cYbeg
p4x = cXend
p4y = cYend
p3x = p4x - ( (hby - p4y) / abs(cslope))
p3y = hby
p2x = p3x - (cutwidth / abs(cslope))
p2y = p3y + cutwidth
cline1 = list(list(p1x p1y) list(p2x p2y))
cline2 = list(list(p3x p3y) list(p4x p4y))
etchlayer = cseg->layer
segnetname = cseg->net->name
segwidth = cseg->width
axlDeleteObject(cseg)
if(p1x < p2x then
axlDBCreateLine(cline1 segwidth etchlayer segnetname)
axlDBCreateLine(cline2 segwidth etchlayer segnetname)
else
axlDBCreateLine(cline2 segwidth etchlayer segnetname)
); endif
); End negative slope crossing bottom horizontal boundary line.
(;; slope crosses both vertical lines
(cXbeg < vlx && cXend > vrx) &&
(ylint > hby && ylint < hty) &&
(yrint > hby && yrint < hty)
if(debug then
axlUIWPrint(nil " - Crosses BOTH Vertical Lines")
); endif
;; crosses left vline
p1x = cXbeg
p1y = cYbeg
p4x = cXend
p4y = cYend
p2x = vlx
p2y = p1y + (cslope * (vlx - p1x))
p3x = cutwidth + vlx
p3y = p2y + (cslope * cutwidth)
;; crosses right vline
p5x = vrx - cutwidth
p5y = p1y + cslope * (p5x - p1x)
p6x = vrx
p6y = (cslope * cutwidth) + p5y
cline1 = list(list(p1x p1y) list(p2x p2y))
cline2 = list(list(p3x p3y) list(p5x p5y))
cline3 = list(list(p6x p6y) list(p4x p4y))
etchlayer = cseg->layer
segnetname = cseg->net->name
segwidth = cseg->width
axlDeleteObject(cseg)
axlDBCreateLine(cline1 segwidth etchlayer segnetname)
if(p3x < p5x then
axlDBCreateLine(cline2 segwidth etchlayer segnetname)
); endif
axlDBCreateLine(cline3 segwidth etchlayer segnetname)
); end of slope crosses both vertical lines
(;; positive slope crosses both horizontal lines
cYbeg < hby && cYend > hty && xtint > vlx && xtint < vrx && xbint > vlx && xbint < vrx
if(debug then
axlUIWPrint(nil " - Positive slope Crosses BOTH top and bottom horizontal lines.")
); endif
p1x = cXbeg
p1y = cYbeg
p4x = cXend
p4y = cYend
p2x = xbint
p2y = hby
p3y = cutwidth + p2y
p3x = ((p3y - p2y) / cslope) + p2x
p5y = hty - cutwidth
p5x = xtint - (cutwidth / cslope)
p6x = xtint
p6y = hty
cline1 = list(list(p1x p1y) list(p2x p2y))
cline2 = list(list(p3x p3y) list(p5x p5y))
cline3 = list(list(p6x p6y) list(p4x p4y))
etchlayer = cseg->layer
segnetname = cseg->net->name
segwidth = cseg->width
axlDeleteObject(cseg)
axlDBCreateLine(cline1 segwidth etchlayer segnetname)
if( p3y < p5y then
axlDBCreateLine(cline2 segwidth etchlayer segnetname)
); endif
axlDBCreateLine(cline3 segwidth etchlayer segnetname)
); end of positive slope crosses both horizontal lines
(;; negative slope crosses both horizontal lines
cYbeg > hty && cYend < hby && xtint > vlx && xtint < vrx && xbint > vlx && xbint < vrx
if(debug then
axlUIWPrint(nil " - Negative slope crosses both top and bottom horizontal lines.")
); endif
p1x = cXbeg
p1y = cYbeg
p4x = cXend
p4y = cYend
p2x = xtint
p2y = hty
p3y = p2y - cutwidth
p3x = ((p2y - p3y) / abs(cslope)) + p2x
p5y = hby + cutwidth
p5x = xbint - (cutwidth / abs(cslope))
p6x = xbint
p6y = hby
cline1 = list(list(p1x p1y) list(p2x p2y))
cline2 = list(list(p3x p3y) list(p5x p5y))
cline3 = list(list(p6x p6y) list(p4x p4y))
etchlayer = cseg->layer
segnetname = cseg->net->name
segwidth = cseg->width
axlDeleteObject(cseg)
axlDBCreateLine(cline1 segwidth etchlayer segnetname)
if( p3y > p5y then
axlDBCreateLine(cline2 segwidth etchlayer segnetname)
); endif
axlDBCreateLine(cline3 segwidth etchlayer segnetname)
); end negative slope
(;; slope crosses left vline AND top hline
ylint < hty && ylint > hby && xtint > vlx && xtint < vrx
if(debug then
axlUIWPrint(nil " - Slope crosses LEFT vline and TOP hline")
); endif
p1x = cXbeg
p1y = cYbeg
p4x = cXend
p4y = cYend
p2x = vlx
p2y = ylint
p3x = vlx + cutwidth
p3y = p2y + ((p3x - p2x) * cslope)
p6y = hty
p6x = p4x - ( (p4y - p6y)/cslope )
p5y = hty - cutwidth
p5x = p6x - ( (p6y - p5y)/cslope )
cline1 = list(list(p1x p1y) list(p2x p2y))
cline2 = list(list(p3x p3y) list(p5x p5y))
cline3 = list(list(p6x p6y) list(p4x p4y))
etchlayer = cseg->layer
segnetname = cseg->net->name
segwidth = cseg->width
axlDeleteObject(cseg)
axlDBCreateLine(cline1 segwidth etchlayer segnetname)
if( p5x > p3x then
axlDBCreateLine(cline2 segwidth etchlayer segnetname)
); endif
axlDBCreateLine(cline3 segwidth etchlayer segnetname)
); end slope crossing left vline and top hline
( ;; slope crosses left vline and bottom hline
ylint < hty && ylint > hby && xbint > vlx && xbint < vrx && cYend < hby
if(debug then
axlUIWPrint(nil " - Slope crosses LEFT vline and BOTTOM hline")
); endif
p1x = cXbeg
p1y = cYbeg
p4x = cXend
p4y = cYend
p2x = vlx
p2y = ylint
p3x = vlx + cutwidth
p3y = p2y - ((p3x - p2x) * abs(cslope))
p6y = hby
p6x = p4x - ( (p6y - p4y)/abs(cslope) )
p5y = hby + cutwidth
p5x = p6x - ( (p5y - p6y)/abs(cslope) )
cline1 = list(list(p1x p1y) list(p2x p2y))
cline2 = list(list(p3x p3y) list(p5x p5y))
cline3 = list(list(p6x p6y) list(p4x p4y))
etchlayer = cseg->layer
segnetname = cseg->net->name
segwidth = cseg->width
axlDeleteObject(cseg)
axlDBCreateLine(cline1 segwidth etchlayer segnetname)
if( p5x > p3x then
axlDBCreateLine(cline2 segwidth etchlayer segnetname)
); endif
axlDBCreateLine(cline3 segwidth etchlayer segnetname)
); end of slope crossing left vline and top hline
( ;; slope crossing right vline and top hline
yrint < hty && yrint > hby && xtint > vlx && xtint < vrx && cYbeg > hty && cXend > vrx
if(debug then
axlUIWPrint(nil " - Slope crosses RIGHT vline and TOP hline")
); endif
p1x = cXbeg
p1y = cYbeg
p4x = cXend
p4y = cYend
p2x = xtint
p2y = hty
p3x = p2x + (cutwidth / abs(cslope))
p3y = p2y - cutwidth
p6y = yrint
p6x = vrx
p5x = p6x - cutwidth
p5y = p6y + (abs(cslope) * cutwidth)
cline1 = list(list(p1x p1y) list(p2x p2y))
cline2 = list(list(p3x p3y) list(p5x p5y))
cline3 = list(list(p6x p6y) list(p4x p4y))
etchlayer = cseg->layer
segnetname = cseg->net->name
segwidth = cseg->width
axlDeleteObject(cseg)
axlDBCreateLine(cline1 segwidth etchlayer segnetname)
if( p5x > p3x then
axlDBCreateLine(cline2 segwidth etchlayer segnetname)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -