Scaling in one direction only
Scaling in one direction only
(OP)
Is it possible to scale one in the x direction and not in the y direction?
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
Scaling in one direction only
|
RE: Scaling in one direction only
what do you want to scale?
You can convert objects into blocks.
blocks can be scaled with two different values.
Lothar
ADT 2004
RE: Scaling in one direction only
CODE
;--------------------------------------------------
; ERROR TRAPPING
;--------------------------------------------------
(defun errtrap (msg)
(cond
((not msg))
(
(member msg '("Function cancelled" "quit / exit abort"))
(command "undo" "")
)
(
(princ (strcat "\nError: " msg))
(command "undo" "")
)
);cond
);defun
;--------------------------------------------------
; MAIN ROUTINE
;--------------------------------------------------
(defun c:scaleaxis (/ *error* *ss1 bspt ax mult refpt refdx newdx)
(command "._undo" "end" "._undo" "begin")
(setq *error* errtrap)
(setq ss1 (ssget))
(setq bspt (getpoint "\nSelect basepoint: "))
(initget "X Y Z")
(if
(not
(setq ax (getkword "\nSpecify axis to scale: <X> "))
);not
(setq ax "X")
);if
(if
(not
(setq mult (getreal "\nEnter scale factor or <Reference>: "))
);not
(progn
(setq refpt1 (getpoint "\nSpecify reference length: "))
(setq refdx (getdist refpt1 "\nSpecify second point: "))
(setq newdx (getdist refpt1 "\nSpecify new length: "))
(setq mult (/ newdx refdx))
);progn
);if
(setvar "expert" 2)
(setvar "explmode" 1)
(command "._-block" "SCALETEMP" bspt ss1 "")
(command "._-insert" "SCALETEMP" ax mult bspt "0")
(command "._explode" "last" "")
(command "._-purge" "blocks" "SCALETEMP" "n")
(setvar "expert" 1)
(command "._undo" "end")
(princ)
(*error* nil)
)
____________________
Acad2006, Terramodel
RE: Scaling in one direction only
The scaleaxis is a bit (depending on the scale) or a lot over my head> But nothing beats a failure but a try.
Thanks to both of you. Happy thanksgiving
RE: Scaling in one direction only