明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2178|回复: 1

xyp1964

[复制链接]
发表于 2013-5-15 00:45:45 | 显示全部楼层 |阅读模式
请问问直线延伸代码我为什么用不起了!
(defun c:zxys (/ ilst ll1 ll2)
  (cmdla0)
  ;; __________________________________________________________________
  (defun main-pro (/ ss i s1)
    (if (setq s0 (car (entsel "\n选择边界线<退出>: ")))
      (progn
(redraw s0 3)
(princ "\n选择区域直线: ")
(setq ss (if (= bo4 "1")
     (ssget (list '(0 . "line") (cons 8 (nth (atoi po1) lst1))))
     (ssget '((0 . "line")))
   )
)
(if ss
   (progn
     (setq ptn '() i -1)
     (if (ssmemb s0 ss)
       (ssdel s0 ss)
     )
     (while (setq s1 (ssname ss (setq i (1+ i))))
       (if (not (xyp-get-Inters s0 s1 0))
  (setq pt  (car (xyp-get-Inters s1 s0 3))
        ptn (cons pt ptn)
        s1  (xyp-LinePtSub s1 pt)
  )
  (if (and (= bo2 "1")
    (setq ptn1 (xyp-get-Inters s0 s1 0))
    (= (length ptn1) 1)
      )
    (setq s1 (xyp-LinePtSub s1 (car ptn1)))
  )
       )
     )
     (if (and ptn (= bo1 "1") (xyp-etype s0 "LINE"))
       (setq ptn (cdr (xyp-Max-Pt2pt ptn))
      s0 (xyp-SubUpd s0 10 (car ptn))
      s0 (xyp-SubUpd s0 11 (cadr ptn))
       )
     )
   )
)
(redraw s0 4)
      )
    )
  )
  ;; __________________________________________________________________
  (defun abo4 ()
    (xyp-Dcl-Gettile '("bo4"))
    (cond ((= bo4 "1") (mode_tile "po1" 0) (mode_tile "k01" 0))
   ((= bo4 "0") (mode_tile "po1" 1) (mode_tile "k01" 1))
    )
  )
  (defun ak01 ()
    (if (setq s1 (car (entsel "\n选择<退出>: ")))
      (setq la (xyp-get-dxf 8 s1)
     po1 (itoa (- (length lst1) (length (member la lst1))))
      )
    )
    (sub)
  )
  ;; __________________________________________________________________
  (setq ll1 '(bo1 po1 bo4 bo2)
ll2 '("1" "0" "1" "1")
  )
  (defun ajbcs () (xyp-Multiple-Settile ll1 ll2))
  (xyp-initSet ll1 ll2)
  (setq lst1 (xyp-get-layers)
ilst '(("bo1" "边界延伸" "bool")
        ("bo2" "短边消除" "bool")
        ":row{"
        ("bo4" "图层过滤" "bool" "(abo4)")
        ("po1" "" "poplist" "lst1" "8")
        ("k01" "" "i6" "-15" "2" "xyp1964(szx)" "(ak01)")
        "}"
        "spacer;"
        ("" "" "user""(abo4)")
        ("jbcs" "缺省参数" "button1" "(ajbcs)")
        "spacer;"
        "ioc"
       )
  )
  (if (= (xyp-Dcl-Init Ilst "【直线延伸】" t) 1)
    (main-pro)
  )
  (cmdla1)
)

发表于 2013-5-24 20:07:10 | 显示全部楼层
要院长的工具箱支持
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-6 09:48 , Processed in 0.180617 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表