本帖最后由 cq4920 于 2023-9-5 23:38 编辑
- ;;117.3 [功能] 返回当前视窗左下角和右上角 坐标
- (defun viewpnts (/ A B C D X)
- (setq d (getvar "screensize")) ;屏像素
- (setq b (* (getvar "viewsize") 0.5) ;viewsize屏竖长
- a (* b (/ (car d) (cadr d))) ;屏横长
- x (trans (getvar "viewctr") 1 2) ;屏中点viewctr
- c (list (- (car x) a) (- (cadr x) b) 0.0)
- d (list (+ (car x) a) (+ (cadr x) b) 0.0)
- )
- (list (trans c 2 1) (trans d 2 1))
- )
|