本帖最后由 作者 于 2005-9-25 9:28:22 编辑
其实用不了这么麻烦..
单就复线而言只要判断顶点的增量坐标(相对坐标列表,即后一点相对于前一点的坐标增量)是否一致.并且凸度列表一致就可以了..
判断很多也是没有意义的看一下这段
(defun hy_samepoly(en1 en2);;t nil相同返回T不同返回NIL (if (and (equal (mapcar '(lambda(x y) (list (- (car y) (car x)) (- (cadr y) (cadr x)))) (massoc 10 (entget en1)) (append (cdr (massoc 10 (entget en1))) (list (car (massoc 10 (entget en1)))))) (mapcar '(lambda(x y) (list (- (car y) (car x)) (- (cadr y) (cadr x)))) (massoc 10 (entget en2)) (append (cdr (massoc 10 (entget en2))) (list (car (massoc 10 (entget en2)))))) 0.000001) (equal (massoc 42 (entget en1)) (massoc 42 (entget en2)) 0.000001) ) t nil)
)
(defun massoc (key alist / x nlist) (foreach x alist (if (eq key (car x)) (setq nlist (cons (cdr x) nlist)) ) ) ) |