珊格图象纠正 }6RT,O g
(defun mzz() 3{raKM6F
(setq scl0 (getvar "ltscale") ) \jW)Xy
(setq scl scl0) 1ZJ4*b n
(setq aa (rtos (* scl0 1000) 2 0)) ~yJ4qp-
(setq yy1 nil) ]rd/;kg.S
(setq aa (strcat "测图比例尺:" aa ">:") ) %:6?Y%`*[
(setq scl1 (getint aa)) *ck}|RhR
(if (and (> scl1 100) (< scl1 1000000))(progn AWr}"r?s
(setq scl (/ scl1 1000.0)) YZ#V#[j'^
(command"ltscale" scl) .;/L2Jv
)) D _X8-
) S^RUw
(mzz) &!.HuRiuC
(defun c:tt() r2*<\ax
(mzz) iMP
) <T,A&`/
(defun c:imatab() Zp`T
;(setq im (entsel "\n选择定位影象>:" )) `ue[q!Qq
(setq im (ssget )) suJ_nb
(initget "1 2 3") khd5 Cf[
(setq opt (getkword S[M4ukYK
"\n1:4*5 /2: 5*5 /3: :通用算法 ")) 'aJgLws*w
(tab2) -xmf'c9P
) Lrz3
4k}e28
(defun tab2() UP1?5Q=H]Q
(setq p1 (getpoint "\n选择定位点1>:")) Q}%tt=KD
(setq p3 (getpoint "\n输入定位点1绝对坐标>:")) Gu(lI ~
(setq p2 (getpoint "\n选择定位点2>:")) *}b]rjsj
O0l^*nZ46t
(cond hP?fMW$V
((= opt "1") (setq p4 (list (+ (nth 0 p3) (* 500 scl)) (+ (nth 1 p3) (* 400 scl))) ) ) e&Y0}oY
((= opt "2") (setq p4 (list (+ (nth 0 p3) (* 500 scl)) (+ (nth 1 p3) (* 500 scl))))) ^~ =9
((= opt "3") (setq p4 (getpoint "\n输入定位点2绝对坐标>:"))) ^z1IN-Tm/
) BW[5o3
i
s}x>J8hK
=y ]Jl,_.
(sbtab) dFW=9ru+MQ
(command "rectang" p3 p4) mxTk+j=
(setq object (entlast)) |qcD;
(xd object "999998") IxSV? k
(command "change" object "" "p" "la" "0" "C" 1 "" "") ( `' 8Ww
(command"change" object "" "p" "lt" "continuous" "") Aw^yH+ae
(command"pedit" object "w" 0 "") 6/ g%\ka
Rz <OF^Iy
) ,+/zH'U}
(defun sbtab() +}7fg82)
(setq ang_r (- (angle p3 p4 ) (angle p1 p2) ) ) ;|ub!z9GG
(setq a (/ (distance p3 p4) (distance p1 p2) )) y+mElG$F
(command "scale" im "" p1 a) IY(h~O
(command "rotate" im "" p1 (angtos ang_r 2 8)) To"dG&h
(command "move" im "" p1 p3) `{<frB@
(command "transparency" im "" "on") :1fagaPg
(command "zoom" "e" ) vL_zvXA
(command "draworder" im "" "b") (princ) Eyh|a.)-
)