moving a box to specific coordinates, from center!

Post questions on how to use or achieve an effect in Inkscape.
JackMayol

moving a box to specific coordinates, from center!

Postby JackMayol » Thu Jul 09, 2009 12:38 am

Hi,
I want to move specific forms (boxes, circles, etc.) to a specific coordinate (let's take the example of the coordinates 0,0).
I want that when changing the coordinates of the form, that the new coordinate 0,0 is taken at the center and not at the lower left edge of the box...
Any clue how to do that?
I hope my question was clear enough.

Thx in advance
Jack

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: moving a box to specific coordinates, from center!

Postby brynn » Mon Jul 13, 2009 2:59 am

I'm not sure I understand your question.

Are you looking for a setting of some kind, that makes (0,0) the center of your image/object? I don't think there is.

Or are you asking how to achieve making (0,0) the center? You would take the dimensions of the object, divide each width and height by 2, then move the object to the place where the bottom left corner of the bounding box lies at....negative....let's see....

(Width/2) x -1, and
(Height/2) x -1

Or else, if this doesn't answer your question, could you clarify your quesiton?

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: moving a box to specific coordinates, from center!

Postby ~suv » Mon Jul 13, 2009 4:33 pm

upgrade! ;-)

from the Release notes for 0.47:
There is a new toolbar to control the snapping options and modes. Use View > Show/Hide > Snap controls bar to show or hide this toolbar.


Using snapping modes 'Snapping to and from centers of bounding boxes' and 'Snap from and to centers of objects' does what you need (movement relative to the center of an object) - AFAIK the center being calculated based on the bounding box, which might not always be what you want (e.g. with grouped objects?). There's also a mode 'Snap from and to an item's rotation center'.

hth, ~suv

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: moving a box to specific coordinates, from center!

Postby brynn » Tue Jul 14, 2009 3:33 am

There is a new toolbar to control the snapping options and modes. Use View > Show/Hide > Snap controls bar to show or hide this toolbar


Awesome!

JackMayol

Re: moving a box to specific coordinates, from center!

Postby JackMayol » Tue Jul 14, 2009 5:16 pm

Thx guys for your answer,
niiice, I had only a dev version of 0.46. Switching to 0.47 will fix my problem then.
Very useful upgrade imo.
Thanks again

JackMayol

Re: moving a box to specific coordinates, from center!

Postby JackMayol » Tue Jul 14, 2009 6:03 pm

Hi again,
hmm actually that's not what I was looking for.
Here an example:

Image

As you can see I can snap the center of the circle to the 0,0 coordinates I want. but I don't want to drag it, I want to enter the coordinates of the circle, so that his center will be (0,0) and NOT (-7,6;-7,6) as shown in the picture. It takes the bottom left corner of the box, but I need the center of this circle (or box).
I could just use (Width/2) x -1, and (Height/2) x -1 but I don't want, it's too complicated if I have several object I want to move to specific coordinates.

JackMayol

Re: moving a box to specific coordinates, from center!

Postby JackMayol » Tue Jul 14, 2009 6:06 pm

hmm troubles with picture links. Sorry for the inconveniences.

inkscape_rot.jpg - 0.03MB

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: moving a box to specific coordinates, from center!

Postby ~suv » Tue Jul 14, 2009 9:18 pm

JackMayol wrote:I had only a dev version of 0.46. Switching to 0.47 will fix my problem then.
sorry, no - the recent devel builds include the 0.47 features.
JackMayol wrote:I want to enter the coordinates of the circle, so that his center will be (0,0)
AFAIK you can do it by dragging and using snapping modes, but not yet by entering the coordinates of the translated center in the Tool Controls bar.

Did you experiment with the 'Objects > Transform…' dialog? I think I read recently that those transforms can be applied to the rotation center somehow, but I'd have to search for more details and I'm pretty sure that I'm mixing up 'move' and 'rotate' commands here. Maybe 'Matrix' transformations can do the job, but that's far beyond my math skills.

alexandre
Posts: 2
Joined: Mon Sep 14, 2009 1:09 am

Re: moving a box to specific coordinates, from center!

Postby alexandre » Mon Sep 14, 2009 2:02 am

Hi all,

I have the same problem. I need to draw some forms with accuracy, but I don't know how to do it. I started to use this program recently. I am reading the manual as far as possible... thus, if I discovery some functionality or method about this I will post here.
Another thing, it would be very nice if Inkscape has a command line like the AutoCad or the Qcad. This incrise the productivity. Inkscape is good program (and free) and I would not like to install another program only because of some limited tools. I'm enjoying working with Inkscape and I believe that in future such tools will be available.
Is there a site where we can to post sugestions for new Inkscape version?

My regards, Alexandre.

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

Re: moving a box to specific coordinates, from center!

Postby prkos » Mon Sep 14, 2009 6:18 am

You can always use grid to position objects precisely where you want them, and you can enter a number in the boxes for width and height in the Selector tool toolbar.

Inkscape does have command line, you can read about it in the guide or search google, I'm sure something will come up ;)

Wishlists are reported in the bug tracker https://bugs.launchpad.net/inkscape/ although you can post them here on the forum first if you need to discuss them.
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

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: moving a box to specific coordinates, from center!

Postby ~suv » Mon Sep 14, 2009 8:15 am

alexandre wrote:it would be very nice if Inkscape has a command line like the AutoCad
prkos wrote:Inkscape does have command line
yes, but not interactively as in AutoCAD, where you could (AFAIR) type all commands (instead of using the slower GUI interface with mouse and keyboard input mixed) and AutoLisp functions (defined on-the-fly or loaded from file) to create and edit all elements in the drawing. For me this was among the most powerful features of AutoCAD (back when Autodesk still maintained a unix version of acad ;-)

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: moving a box to specific coordinates, from center!

Postby ~suv » Fri Sep 18, 2009 2:07 pm

alexandre wrote:it would be very nice if Inkscape has a command line like the AutoCad or the Qcad. […] Is there a site where we can to post sugestions for new Inkscape version?
There is a blueprint for a new feature to allow users to enter commands to Inkscape in a text-based format:
Blueprint: “Allow Inkscape to draw using a string as input
Inkscape Wiki: Specification for command line drawing

alexandre
Posts: 2
Joined: Mon Sep 14, 2009 1:09 am

Re: moving a box to specific coordinates, from center!

Postby alexandre » Wed Sep 23, 2009 4:14 am

Ok ~suv! I have been using the Inkscape for engineering purpose, thus it was good to read this blueprint. I will be waiting for it. Thank you for your contribute.


Return to “Help with using Inkscape”