在多段线上增加一个节点.doc_第1页
在多段线上增加一个节点.doc_第2页
在多段线上增加一个节点.doc_第3页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

;在多段线上增加一个节点;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(setq d1 dn)(setq d2 dq)(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 8000) (SETQ I -1) (setq zongb nil) (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 (EQUAL DN (CDR ZB) 0.000000001)(PROGN (SETQ J 0) (setq zongb1 (list (cons 10 d0) b40 b41 b42);(setq newd d0) ) ) ) ) );(entmod zongb) (command PSELECT tym ) (setq newd2 nil) (SETQ NEWD2 (GETPOINT d0 请移动到正确位置:) (if(/= newd2 nil) (progn(setq newd2 (list (nth 0 n

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论