Jump to content

scaling while preserving positioning


Recommended Posts

I have 100s of polygons on a 2D sheet. I need to scale all of them while preserving their x,y coordinates. My presumption would be to select all of them, while keeping them ungrouped, and then use Scale Objects.... However, even when the objects are not grouped, Scale Objects treats them as if they were and scales not just the individual objects, but the space between them. How can I scale multiple selected objects, while preserving their absolute position?

Link to comment

Peter,

I think that is the frustration, the desire is to not maintan relative distance but rather absolute distance. Say you had 6x6 columns under a deck, and through the magic of engineers you could reduce them to 4x4s you would want to shrink them all in place. (lets pretend this is a magic world ands we wouldn't have to worry about holding to an outside edge or corner...)

Link to comment

Ion,

If what you say is true (in terms of the original question) then I can think of only two options:

1) redraw (or resize) them all - ARRG!

2) (next time) use SYMBOLS instead of just polys, then you could resize all of them (if they are all the same symbol) with a couple of clicks.

Oh, and PS: That's why I charge by the hour! Design & drafting work are just like that - there's always changes! But you gotta remind your clients that it's still WAY less expensive for YOU to make the changes than for the contractor, once the job starts.

Peter

Link to comment

Otherwise, this would be easily solved with a script, but determining which point of the polygons should be kept in place is rather difficult. If centrepoint (of the bounding box, ie not the real centroid) is OK, here's the script:

PROCEDURE ScaleMultiple; { ? Petri Sakkinen 2003 }

VAR

active : STRING;

scalingFactor : REAL;

i, n : INTEGER;

selectedObj : ARRAY[1..1000] OF HANDLE;

PROCEDURE MakeArray (h : HANDLE);

BEGIN

i := i + 1;

selectedObj := h;

END;

PROCEDURE ScaleEach;

BEGIN

FOR n := 1 TO i DO BEGIN

SETSELECT(selectedObj[n]);

SCALE(scalingFactor, scalingFactor);

SETDSELECT(selectedObj[n]);

END;

END;

PROCEDURE RestoreSelection;

BEGIN

FOR n := 1 TO i DO

SETSELECT(selectedObj[n]);

END;

BEGIN

scalingFactor := REALDIALOG('Scaling factor', '1');

IF NOT DIDCANCEL THEN BEGIN

i := 0;

active := GETLNAME(ACTLAYER);

FOREACHOBJECT(MakeArray, ((SEL = TRUE) & (L = active)));

DSELECTALL;

ScaleEach;

RestoreSelection;

END;

END;

RUN(ScaleMultiple);

[ 09-04-2003, 10:13 PM: Message edited by: Petri Sakkinen ]

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...