bobaobo的个人空间 https://blog.eetop.cn/?1780277 [收藏] [复制] [分享] [RSS]

日志

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)


点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 2

    关注
  • 2

    粉丝
  • 1

    好友
  • 1

    获赞
  • 0

    评论
  • 10

    访问数
关闭

站长推荐 上一条 /3 下一条


手机版| 小黑屋| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-9-10 17:45 , Processed in 0.014684 second(s), 7 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部