马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
前一段时间在测图时,要画水涯线,找一个陡坎线后,发现方向常反,找一点资料,写了下面的东东,提出来供大家PP
**线形反向***
(defun c:fx()
(setq ss(ssget) mun 0)
(repeat (sslength ss)
(setq entl-y (ssname ss mun))
(command "pedit" entl-y "d" "")
(setq entl(entget entl-y))
(if (= "POLYLINE" (cdr(assoc 0 entl))) (command "pedit" entl-y "lt" "on" "x"))
(if (= 10 (car (nth 13 entl))) (setq nn 13))
(if (= 10 (car (nth 12 entl))) (setq nn 12))
(setq lt-name(cdr(assoc 6 entl)) la-name (cdr (assoc 8 entl)))
(setq W_list '())
(setq elem (cdr (nth nn entl)))
(setq w_list (append w_list (list elem)))
(while (not (null elem))
(setq nn(+ nn 4))
(setq elem (cdr (nth nn entl)))
(if (= (car (nth nn entl)) 10)
(setq w_list (append w_list (list elem))) ;构建实体坐标表
)
)
(setq w_list (reverse w_list))
(setq pt1 (car W_list))
(command "pline" pt1)
(while w_list
(setq w_list(cdr w_list))
(setq pt (car w_list))
(command pt)
)
(command "")
(command "chprop" (entlast) "" "lt" lt-name "la" la-name "")
(command "pedit" (entlast) "lt" "on" "s" "")
(command "erase" entl-y "")
(setq mun (+ mun 1))
)
)
广告位,后台可以设置,支持js
您好,您暂时不能浏览帖子的全部内容,请 登录
| 没有账号? 请 注册