在多段线上增加一个节点.doc

  1. 1、本文档共3页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
;;在多段线上增加一个节点 ;;TUTOCAD2010版如果把(setq x2 (nth 1 (nth (+ i 5) enttym))) 改为(setq x2 (nth 1 (nth (+ i 4) enttym)))就变为2005版 (defun c:ja(/ zsu sel tym enttym d1 d2 d3 d4 d5 zongb zongb1 d0 zb newd2 c70 b40 b41 b42 x1 y1 x2 y2 x y xn yn dq dn d9 ang0 ang1 ang2) ;;(defun c:ja () (command _.properties) (while (setq sel (entsel \n在多段线上增加一个节点)) (setq tym (car sel)) (setq enttym (entget tym)) (setq d9 (last sel)) (setq d0 (osnap d9 _NEA)) (setq d0 (list (nth 0 d0) (nth 1 d0))) (setq b40 (assoc 40 enttym)) (setq b41 (assoc 41 enttym)) (setq b42 (assoc 42 enttym)) (setq c70 (CDR (assoc 70 enttym))) ;(if (or (= c70 1)(= c70 129))(setq xhcs (sslength enttym) (setq zongb nil) (setq zsu 0) (setq i -1) (setq x0 (nth 1 (assoc 10 enttym))) (setq y0 (nth 2 (assoc 10 enttym))) (setq dq (list x0 y0)) (setq xn (nth 1 (assoc 10 (reverse enttym)))) (setq yn (nth 2 (assoc 10 (reverse enttym)))) (setq dn (list xn yn)) (setq j 8000) (SETQ PP 0) (SETQ DS(CDR (assoc 90 enttym))) (repeat (length enttym) (setq i (+ i 1)) (setq zb (nth i enttym)) (setq zongb (append zongb (list zb))) (setq j (+ j 1)) (if (= j 3) (progn (setq zongb (append zongb zongb1)) (setq j 8000) ) ) ;(if (and (= (car zb) 10) ( (distance dn (cdr zb)) 0.0000001)) (if (and (= (car zb) 10) ( PP DS)) (progn (SETQ PP(+ PP 1)) (setq x1 (nth 1 zb)) (setq y1 (nth 2 zb)) (setq d1 (list x1 y1)) (setq x2 (nth 1 (nth (+ i 5) enttym))) (setq y2 (nth 2 (nth (+ i 5) enttym))) (setq d2 (list x2 y2)) (setq ang0 (angle d1 d2)) (setq ang0 (+ ang0 (/ pi 2))) (setq d3 (polar d0 ang0 0.00001)) (setq d4 (polar d0 (+ ang0 pi) 0.00001)) (setq d5 (inters d1 d2 d3 d4)) (if (/= d5 nil) (progn (setq j 0) (setq zongb1 (list (cons 10 d0) b40 b41 b42)) ;(setq newd d0) ) ) ) ) ) (if (or (= c70 1) (= c70 129)) (progn

文档评论(0)

ktj823 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档