;;贴一个缩放的例子
;;by LUCAS
(defun C:TT () (setq E (car (entsel))) (setq C (getpoint "\n指定基准点: ")) (setq B (getreal "\n指定比例係数: ")) (vla-transformby (vlax-ename->vla-object E) (vlax-tmatrix (MREV B C) ) ) (princ) )
;;建立缩放转换矩阵 ;;USAGEMREV 10 '(2 2 0)) ;;B=缩放倍率,C=基准点 (defun MREV (B C / U V W) (append (mapcar '(lambda (V W) (reverse (cons (- W (* B W)) (cdr (reverse (mapcar '(lambda (U) (* B U)) V))) ) ) ) '((1.0 0.0 0.0 0.0) (0.0 1.0 0.0 0.0) (0.0 0.0 1.0 0.0) ) C ) '((0.0 0.0 0.0 1.0)) ) )
|