328302216 发表于 2011-12-15 15:17
有没有把断的合并成一条直线的程序啊!!比如两条直线首尾相连的合并成一条 - ;
- (defun ss-sslist (ss / n en enlis)
- (setq n (sslength ss))
- (repeat n
- (setq en (ssname ss (setq n (1- n))))
- (setq enlis (cons en enlis))
- )
- )
- (defun c:test (/ ss)
- (setvar "CMDECHO" 0)
- (command "undo" "be")
- (setq ss (ssget))
- (setq ss (ss-sslist ss))
- (foreach x ss
- (mapcar '(lambda (y)
- (command "join" x y "")
- )
- ss
- )
- )
- (command "undo" "e")
- (setvar "CMDECHO" 1)
- (princ)
- )
|