kwok 发表于 2013-2-7 19:57
谢谢,不过p1点始终于是在左上角,
可以让开始框选的第一点做为p1点吗,如你的代码的getpoint"第一点,不管从 ...
- (defun c:tt (/ P1 A P2 LL UR P3 P4 PL)
- (setq p1 (getpoint "\n第一点:")
- a p1
- )
- (setq p2 (getcorner p1 "\n对角点:"))
- (setq ll (apply 'mapcar (list 'min p1 p2))
- ur (apply 'mapcar (list 'max p1 p2))
- )
- (setq p1 (list (car ll) (cadr ur) (caddr ll))
- p2 ur
- p3 (list (car ur) (cadr ll) (caddr ll))
- p4 ll
- )
- (setq pl (list p1 p2 p3 p4))
- (while (not (equal a (car pl) 1e-6))
- (setq pl (reverse (cons (car pl) (reverse (cdr pl)))))
- )
- )
|