[Solved] Square rotated - rotate back to zeero again

Post questions on how to use or achieve an effect in Inkscape.
User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

[Solved] Square rotated - rotate back to zeero again

Postby Grobe » Fri Oct 22, 2010 12:30 pm

Hi.

I have a rectangle that I've moved and rotated several times. I want to rotate it back to it's original rotation position.

I can get it almost there, but I cannot manage it so that the bottom segment is perfectly in paralell to grid lines.

Thanks
Last edited by Grobe on Wed Oct 27, 2010 5:31 am, edited 2 times in total.
:lol:

Uktrunie
Posts: 154
Joined: Sun Jul 18, 2010 4:48 am

Re: Square rotated - rotate back to zeero again

Postby Uktrunie » Fri Oct 22, 2010 10:07 pm

Well, for the lack of a better solution... For a Rectagle object (not path) I think you can delete the transform attribute.

Open the XML dialog. Then find your object there (usually just select it in your drawing and it will be selected in the XML dialog). Then you'll see a "transform" attribute and a "matrix" value associated with it. If you delete that, the rotation is gone. Only problem is, as you might guess, it will also delete any other skew or pan that you might have applied to the object.

The problem is, as I said before, it doesn't work with paths...

Lets wait for one of the wise guys around here to come and give us the answer. :)

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: Square rotated - rotate back to zeero again

Postby Grobe » Sat Oct 23, 2010 12:01 am

Thanks.

That's a workaround I can live with. I found that it also lost it's position, but that's that's not a big deal.

First I actually didn't got clear of the idea and replaced all numbers by 0 in the matrix tag. I quickly found that wasn't right to do because the square then turned into a zeero-sized spot in the upper left corner :mrgreen:

But if there is other ways to achieve this, I'll like to know :)
:lol:

dvlierop
Posts: 139
Joined: Sat Sep 08, 2007 4:25 am

Re: [workaround] Square rotated - rotate back to zeero again

Postby dvlierop » Tue Oct 26, 2010 9:25 pm

As of recently, in the development builds only for now, Inkscape has a new feature: it now also snaps when rotating an object with the selector tool. This should allow you to align any set of two nodes to a guide, using any angle for the guide you want to.

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: [workaround] Square rotated - rotate back to zeero again

Postby prkos » Tue Oct 26, 2010 11:13 pm

That is so awesome!
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: [workaround] Square rotated - rotate back to zeero again

Postby Grobe » Wed Oct 27, 2010 4:26 am

dvlierop wrote:As of recently, in the development builds only for now, Inkscape has a new feature: it now also snaps when rotating an object with the selector tool. This should allow you to align any set of two nodes to a guide, using any angle for the guide you want to.
That's not a solution. If you have an object that is rotated 13,3249875446 degrees, your method won't bring it back to 0 degrees rotation.
:lol:

dvlierop
Posts: 139
Joined: Sat Sep 08, 2007 4:25 am

Re: [workaround] Square rotated - rotate back to zeero again

Postby dvlierop » Wed Oct 27, 2010 5:07 am

Yes it can. Suppose you have a line at 13,32 degrees, with a cusp node at each end. Now you create a guide at 0 degrees, and snap one of the nodes to that guide. Next you move (snap) the rotation center to that same node, and finally you rotate the line until the other node snaps to the guide. Both nodes will now be at the guide, and therefore the line will be at 0 degrees.

Or did I misunderstand you?

Edit: The only boundary condition is that there is something horizontal in your object when the object is at zero degrees. So this workflow should do for your rectangle.

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: [workaround] Square rotated - rotate back to zeero again

Postby Grobe » Wed Oct 27, 2010 5:30 am

dvlierop

No you didn't misunderstood me. I just didn't get that idea of myself. Your method is clever and easy when you explained how to :D

Thanks ;)
:lol:


Return to “Help with using Inkscape”