- ;; 绘制多段线并加凸度
- (defun pline (p0 pts lst-td / p0 pl ptn x)
- (setq ptn (mapcar '(lambda (x) (mapcar '+ p0 x)) pts)
- ptn (reverse ptn)
- )
- (command "pline")
- (foreach pt ptn (command "non" pt))
- (command "")
- (setq pl (vlax-ename->vla-object (entlast)))
- (set-pl-td pl lst-td)
- )
- ;; 设置多点凸度值函数
- (defun set-pl-td (pl lst-td / n td)
- (if lst-td
- (foreach temp lst-td
- (setq n (car temp)
- td (cadr temp)
- )
- (vla-setBulge pl n td)
- )
- )
- )
- ;; 绘制扶梯主程序
- (defun c:tt (/ bp l1 l2 l3 l4 pts1 pts2 pts3 pts4 ptsx1 ptsx2 ptsx3 tl1 tl2 tl3)
- (setq bp (getpoint "\n确定基点: ")
- pts1 '((-2826 0 0)
- (-2846.31 106.185 0)
- (-2827.908 200 0)
- (-2797.37 250 0)
- (-2776 250 0)
- (-2776 150 0)
- (-2776 0 0)
- )
- l1 (pline bp pts1 '((3 0.2)))
- pts2 '((-2797.37 250 0)
- (-2876 250 0)
- (-2876 950 0)
- (-829 950 0)
- (820.3194 507.8838 0)
- )
- l2 (pline bp pts2 '((0 0.1325) (2 1)))
- pts3 '((-2827.908 200 0)
- (-2876 200 0)
- (-2876 1000 0)
- (-816.2831 1000 0)
- (833.7169 557.8838 0)
- )
- l3 (pline bp pts3 '((0 0.1325) (2 1)))
- pts4 '((-2776 150 0) (-193.7822 150 0))
- l4 (pline bp pts4 '((0 0)))
- ptsx1 '((0 0 0)
- (-5450 0 0)
- (-5450 -80 0)
- (-4950 -80 0)
- (-4950 0 0)
- )
- tl1 (pline bp ptsx1 '((0 0)))
- ptsx2 '((-5150 -80 0) (-5150 -1305 0) (296.3263 -1305.0000 0))
- tl2 (pline bp ptsx2 '((0 0)))
- ptsx3 '((-5200 -80 0) (-5200 -1700 0))
- tl3 (pline bp ptsx3 '((0 0)))
- )
- (princ)
- )
|