Jump to content
psyfr3ak

how can I scale an object only on one dimension?

Recommended Posts

psyfr3ak

hello

i have a picture with a diagram, and i want to scale it diferently on X and Y axe. maybe with extend? if this is the command please explain me how.

thanks

Share this post


Link to post
Share on other sites
Shiloh

or you could insert it as a block and deform the x-y coordinates at insertion

Share this post


Link to post
Share on other sites
Hoozin

If you know what scales it needs and you're talking about putting in a raster image, you can choose 1-Dimensional scales on the insertion prompt.

 

If it's something else, block it and change the X and Y Scales in the properties window.

Share this post


Link to post
Share on other sites
Tiger

Noticed that the scaleaxis.lisp has been remove, so here it is a agian - no idea who the author is and it changes everything to lines but it is a simple way to scale everything in one direction.

 

;;;SCALEAXIS.LSP

;--------------------------------------------------
; 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)
)

Share this post


Link to post
Share on other sites
LCE

As others have said, block it, set axis scale and then explode it if you need.

Share this post


Link to post
Share on other sites
stianhaugli

Hi, This is my first post in your forum :-)

I see this is becoming a rather old thread, but i'd like to mention a Lisp we've called "fit.lsp". it works with autocad 2000 - 2010, and it quite neately solves the problem.

 

We wrote this little piece long ago, and I thought I'd share it

You can download it from our site. (i just got blocked by your forum saying only users with 9 posts or more can post weblinks, so here it is - in Morse Code) 3xw dot xordesign dot com and click the Toolbox.

 

maybe someone (with the magic 9) could re post a proper link?

 

I havent "kelvinated" the lisps as i dont mind you guys reading the code and are sharing under one condition: Do Not remove the credentials (please?)

 

Pleaes dont look at the rest of the site. we dont have much time to update it ..

best

STIAN

Share this post


Link to post
Share on other sites
PatientWolf

At least with Mechanical Desktop, you can use the comand AMSCALEXY. Select the object to be scaled. Then follow the command prompts to independently enter the X and Y scaling factors. I find this so useful, I am surprised it is not included in the menus.

Share this post


Link to post
Share on other sites
PatientWolf

To keep a value just use a scaling factor of 1.

Share this post


Link to post
Share on other sites
netsonicyxf

The website http://www.xordesig.com isn't available anymore, a

nyone has that Fit.lsp?

Share this post


Link to post
Share on other sites
ReMark

You're lucky I'm such a pack rat.

 

FIT.lsp.txt

 

Download the file to your desktop. Right-click on it and use the RENAME command to remove this portion of the file name and you are good to go.

 

You know how to load a lisp routine in AutoCAD right?

Share this post


Link to post
Share on other sites
anthpro

I have an image with a small skew, so I have rotate my image and calculated the correct x- axis scale in order to remove it.

When the scale is set to 1 (or a number bigger than 1.01 or smaller than 0.9999) the base point is in the correct position.

UzQU6k0B1klSJwhEziaOY6nKWszLWGl3sQDLd8l3Mzay5M9fc0NeVam9upZquUSZ3Qw6A2gBIgH46qPa52CQYwl4vxfdSI22b8jZN_PkDPqy3Wk5zVYTh2tQnOAWOUm4GvQm1bRpdzXhgwbIB9QdgcE8-JwXNtldp4rkObST1dGbhHg5FsobENegpaaLAhpNahJ0BS2x4YI-mwRzeG4Bo3KKdsPl5QLWgBk-FHkA6Lp56l0-8kW1AbVGgUbXSIi6jBcz48FmFJzjH2k14hZ3OjETnMAmOOpdUfAtLt1_jAIWN6WTdJkkp-QtiRZgxmbxKGYf12l5abC-NDchCuJPtjL54VLMsGt4AFPt_WAyOjgt_SG8fQpFVSj7EmhUx-KkYqAMENBXduDiQmvM-wD7ZfkeyeFFx0i7d-Iaj1XlGVMUKBfrJmSpmBQx-B_1QZEca55In3qciSuU8cu3xVzVEmYlXVMMs6xcIekGzNvN7WzVhjUXZ6Fj3POjoe0vWG833dI-PjiiKiKQxM5M-t4MXDMngJM7mhhnfKEQrrgK9rMOJttPxBR94nOYfYBI3hZ0-4puOuyLVkRDG_XkMNzrSu3uxKYCjT5CIAYbLN7u_WzjTOVS=w457-h297-no

When I set the scale to 1.001, my base point moves! (the base point is on the cross-hairs, shown with a blue dot)

06LgJIE7x2JYsrcSa5f6VdbIStoCPMfsYWIrGh-PJ2A9ElmT4ZDdbbHySsLVl0pLTAhFTzYiffTpD9WaxbxRTR0ATu33YiqzgRM4P1FgMgTi8QJTTEVu7mNqnwvpRPOWAxpezk9HZ_xxrdohYt0Yo-cV3WMW426tPduXFN-VgdB73mMFuFXtAXj5-pAhXzklmtlDEYlnAuHOYUS71_FGlGfDtzf6Gx--xOAbzopilJidw-2f0GzgyZ_B9EyhzEkmB2SA91XYVT2ZJnmfIGkvP6PEIuCXYZ9uOcnTGAGCXF1cYFYalxwCep8fDH1n-42E51Zk2dEld40-STFaNxJ9vG7cMXGN2dOk6Y_eFYgcbPEdlodgeegSARG6ZXvEHoKEXK2mGWgDBrVd9IfDbswxv9GTvCHbSowzSAgckzuEL0sdAjhZefUN5D4X0N_rcyYrXQ6Hwso_M2Qqc_2ThGjggrn2u77aVkW-yc6zDkLRLFmwulGJwOm8vuXOPpKOt3ptlcqdevt_JlBOvehJGkrNTF93mfsaM658UDr_DTPV1gsIrAE9iITrjwT27g4iDRqfCQJxgIbVJSIXChSqn0_L6b1GkwoWNTOAvgpDGCkpvWqqr766=w457-h297-no

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×