Preserve offsets in group transformation

Post questions on how to use or achieve an effect in Inkscape.
Brice
Posts: 4
Joined: Wed May 18, 2016 2:19 am

Preserve offsets in group transformation

Postby Brice » Fri Jul 22, 2016 5:18 am

Hello, is there a way to preserve the offsets between objects during the transformation of a group :?:

For example, a first rectangle R1 of 100*100, a second rectangle R2 of 96*96 centered on R1, R1 is at 2, 2, i group these objects and i resize the group to 50*50. Now R2 is at 1,1. How keep R2 to 2,2 ?

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Preserve offsets in group transformation

Postby Lazur » Fri Jul 22, 2016 6:17 am

Hi.

There is no way doing that -dynamic blocks are far from inkscape's capabilities.
My guess is the closest thing could be writing a custom extension that could be involved in the lpe-s later on... not so likely it will ever happen.

Brice
Posts: 4
Joined: Wed May 18, 2016 2:19 am

Re: Preserve offsets in group transformation

Postby Brice » Fri Jul 22, 2016 7:12 am

Ok, thanks.

Polygon
Posts: 393
Joined: Thu Dec 19, 2013 3:27 am

Re: Preserve offsets in group transformation

Postby Polygon » Fri Jul 22, 2016 7:04 pm

Ho could this be mathematically possible? Either R1 will be scaled to 50% or R2 but not both at the same time when trying to maintain the gap.
What might be easier is to to take a rectangle with 2px contour and scaled to 100x100px via transformation (shift+cmd+M) and then with "disabled contour scaling" resize via Transformation panel to 50%. Just a proposal.

Cheers
P.

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Preserve offsets in group transformation

Postby v1nce » Fri Jul 22, 2016 9:20 pm

As others I don't see how it would be supposed to work.

Maybe what's the closest on what you're trying to achieve is to select all the objects and scale them (shit+ctrl+M) with making sure you tick the "apply to each object separately".
If you don't tick this, your selection will behave as a group (same as what you did)and the scaling wil affect the group as a whole.
If you check it the each object will be scaled invidually around their center.

But anyways, whichever method you use, the results will be identical if your two objects share the same center.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Preserve offsets in group transformation

Postby Lazur » Fri Jul 22, 2016 10:09 pm

Scaling keeps proportions, and the offset you want to preserve is out of that proportion.
It'd take a "smart object" where R1 and R2 is chained together by a "spacer object" aligned to their corners. Can be done manually, can still have it on screen with 0% opacity but it won't be automated.

Haven't tried it but maybe something similar can be achieved by filters though.
There is the image filter primitive that lets you render different objects at the filtered object's origins -needs some special care to work adjusting filtered area, imput object's placement etc.
If you can scale the objects without scaling the filter it could work.
Like you have R1 inside a group, R2 aligned to the top left corner of the page borders-necessary for the filter-, in that vein on a new layer hidden,
apply a filter on the group of R1 with image, offset and compositing filter primitives, and
scale R1 inside the group and R2 too (preserving its top left alignment...).
That doesn't sound a solution that would achieve the look easier than manual adjustment, but three times more complicated.

Brice
Posts: 4
Joined: Wed May 18, 2016 2:19 am

Re: Preserve offsets in group transformation

Postby Brice » Sat Jul 23, 2016 7:18 am

That is not for a specific purpose, sometimes when i combine finished shapes for create other shapes i would just like preserve some distances, that is a general use. But maybe that it is more complicated that what i think. A bounds panel associated to a group, with markers defined by the user, could be used for indicate to Inkscape the distances to preserve, and if it is not possible beyond these constraints the group would just not be resized.
Thank you for the answers.


Return to “Help with using Inkscape”