Coordinate troubles

Post questions on how to use or achieve an effect in Inkscape.
Wed
Posts: 30
Joined: Tue Nov 18, 2008 10:55 am

Coordinate troubles

Postby Wed » Tue Nov 18, 2008 11:18 am

I came across this topic in my search for answers http://www.inkscapeforum.com/viewtopic.php?f=28&t=776&start=0&st=0&sk=t&sd=a&hilit=coordinates. It explains my frustration, but it doesn't help me.

I use the XML editor to define my elements for precision work. Now I need to make a design based on millimeters. Making a rectangle in the XML editor and translate it to mm in the toolbar is very unpractical. It is also next to impossible to stick the upper left corner of the design to the upper left corner of the paper.

Even if px is used in the toolbar, the values seem to differ from the XML editor values.

Any help is much appreciated.

By the way, will there be a possibility to use mm as the unit throughout the WHOLE design? That means even in the XML editor.

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

Re: Coordinate troubles

Postby dvlierop » Wed Nov 19, 2008 7:50 am

I cannot answer all your questions, but ...

In recent development builds there is an option to snap to the page border, maybe that will help?

And have you turned off the scaling of the stroke (which is on by default and changes the stroke when changing the dimensions)?

By default Inkscape uses visual bounding boxes (see preferences -> tools), but the SVG file uses the geometric bounding box. So the dimensions should differ by exactly the width of the stroke. The field in the selector toolbar allow you to enter the width/height of the visual bounding box only, so the values in these fields will always differ from the ones in the SVG file... unless you don't use a stroke.

There is no way to set all units in a single place, but I would like that option too. No one is currently working on that, so don't expect it any time soon :-(

Wed
Posts: 30
Joined: Tue Nov 18, 2008 10:55 am

Re: Coordinate troubles

Postby Wed » Thu Nov 20, 2008 3:09 am

dvlierop wrote:I cannot answer all your questions, but ...

I appreciate a good try!
dvlierop wrote:And have you turned off the scaling of the stroke (which is on by default and changes the stroke when changing the dimensions)?

No I haven't. Now that you mention it, it sort of seems logical that it affects the result. But at the same time, the nodes should be positioned where I put them, regardless of the stroke width ... I can't decide which should/ought to take precedence.
dvlierop wrote:By default Inkscape uses visual bounding boxes (see preferences -> tools), but the SVG file uses the geometric bounding box. So the dimensions should differ by exactly the width of the stroke.

Or one half? No sorry, there is one half on either side adding up to one whole width ...
dvlierop wrote: The field in the selector toolbar allow you to enter the width/height of the visual bounding box only, so the values in these fields will always differ from the ones in the SVG file... unless you don't use a stroke.

Annoying, but I understand.
dvlierop wrote:There is no way to set all units in a single place, but I would like that option too. No one is currently working on that, so don't expect it any time soon :-(

What I miss the most is being able to work with mm in the XML editor.

Else, I'm very happy with Inkscape!

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

Re: Coordinate troubles

Postby dvlierop » Thu Nov 20, 2008 8:05 am

This is something I just realized and just tested, but when entering values through the XML editor, you can just append the values with "mm". So enter for example "100mm". Inkscape will convert this immediately to pixels though, so you won't be able to read them back in mm, only in px. But at least you can enter the values in the unit you desire.

See http://www.w3.org/TR/SVG/coords.html#Units

Wed
Posts: 30
Joined: Tue Nov 18, 2008 10:55 am

Re: Coordinate troubles

Postby Wed » Thu Nov 20, 2008 8:50 am

I was happy there for a few moments. But now I have tried quite a few ways to enter coordinates with my favourite unit. The values are interpreted without regard to the unit. Thanks for the link, it was most informtive.

Does it matter that I use version 0.46 on Debian Lenny?

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Coordinate troubles

Postby microUgly » Thu Nov 20, 2008 9:43 am

I haven't read this thread in detail, but if you're the only one using this file, it doesn't really matter what units it uses provided you know what you want. If Inkscape is forcing pixels on you, then when you print or export it, set the resolution to 1px per mm. Because it's a vector you can decide how large that pixel is in real world units at any time.

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

Re: Coordinate troubles

Postby dvlierop » Fri Nov 21, 2008 12:09 am

Wed wrote:Does it matter that I use version 0.46 on Debian Lenny?


It shouldn't. I've tested v0.45.1 on XP and latest SVN on Linux, but it works for both over here. I noticed though that you must not use a space inbetween the value and the unit, so you should use "100mm" and not "100 mm".

Wed
Posts: 30
Joined: Tue Nov 18, 2008 10:55 am

Re: Coordinate troubles

Postby Wed » Fri Nov 21, 2008 3:32 am

I tried every combination I could possibly come up with. For some combination, it would even insert a M and an extra coordinate. Inky still disregarded my mm's.


Return to “Help with using Inkscape”