createStair.il
已有 166 次阅读|
2025-8-5 16:50
|系统分类:芯片设计|
skill
useLayer = leGetEntryLayer() ;list("M1" "drawing")
procedure(u_createStairLine(leftHeight rightHeight lineLength stepH)
prog((cv points diffH stepCont stepLength currentX currentY)
cv = geGetEditCellView()
points = list(list(0, 0))
points = append1(points list(0, leftHeight))
diffH = leftHeight - rightHeight
stepCont = int(diffH / stepH)
stepLength = int(lineLength / stepCont)
currentX = 0
currentY = leftHeight
for(i 1 stepCont
currentX = currentX + stepLength
points = append1(points list(currentX,currentY))
currentX = currentX + stepH
currentY = currentY - stepH
points = append1(points list(currentX,currentY))
);for
points = append1(points list(currentX, 0))
dbCreatePolygon(cv useLayer points)
printf("%d %d %d %f\n", leftHeight rightHeight lineLength stepH)
;printf("points = ")
;print(points)
printf("points = %L", points)
);prog
);procedure
u_createStairLine(10 5 30 0.5)