Metric system

Post questions on how to use or achieve an effect in Inkscape.
HumpAhead
Posts: 2
Joined: Wed May 30, 2012 11:54 pm

Metric system

Postby HumpAhead » Thu May 31, 2012 12:13 am

Hi all,

I like Inkscape very much, I really do, and have been using it for quite some time. Yet recently, I needed to make some technical drawings through Python scripts and and was searching the web for some explication on why it is so difficult to have the width of a box or a line fixed (locked, nailed, glued, soldered) permanently at 2.00000 cm, I fell upon a discussion where there were lots of talk about pixels and inches but no exact information concerning a concrete (sure, reliable, absolute) solution to my problem.

So here it is : is there a CAD flavour of Inkscape ? Is there a may for me to compile my own version of Inkscape to have it take the metric system as default, the way I want it too ? Any of you can throw me some links on this forum about that issue ? Is there at least a group of frustrated people with the same problem ?

Thank you for any hints.

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

Re: Metric system

Postby brynn » Thu May 31, 2012 2:24 am

Image
Welcome to InkscapeForum!

A lot of people use Inkscape for CAD type applications. Of course it's not a true CAD software, but a CAD version of Inkscape is an interesting idea. You certainly can compile Inkscape yourself, but I have no idea how to do it. And neither do I know what would be involved in making it all metric. I guess you would just remove any non-metric units from the interface.

I'm curious what you mean about concrete units though. In what situations do you find that a centimeter is not a centimeter?

I recently learned that the Inkcape units are not the same as in real life. For example, an Inkscape inch is not equal to a real inch. However, to my understanding, that's because of the resolution of the screen that you're using to use Inkscape. I could be wrong about this, but I think if you printed an Inkscape file, it would print real inches. I don't know if this is a realistic solution, but I wonder if you could change your screen resolution to make Inkscape units the same as the real units?

Is that what you're looking for -- to have what you see on the screen the same as real measurements? Or is it somewhere within Inkscape where you find units are inconsistent?

Except for one recent message that I alluded to, I haven't heard any other complaints about this.

HumpAhead
Posts: 2
Joined: Wed May 30, 2012 11:54 pm

Re: Metric system

Postby HumpAhead » Thu May 31, 2012 7:58 am

Isn't it complicated enough that a second has been defined as :

"the duration of 9,192,631,770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the caesium 133 atom",

which in turn serves to define the metre as :

"the length of the path travelled by light in vacuum during a time interval of 1 ⁄ 299,792,458 of a second",

which should finally allow me (and anyone else in the world except perhaps in America and other colonies of the British Empire) to "understand" and reproduce objets of the same physical dimensions.

When I define a bench as being 200 cm long, isn't it ridiculous to ask me if I "actually" meant 158 cm or 215 cm ?

Is there any other way to say this ?

I mean , has the distance between our individual pairs of eyeballs any influence on the universal height of the Eiffiel Tower ?

Whatever device we use to display the representation of a drawing, at whatever definition, in whichever zooming ratio, there must be a way of "LOCKING" the width and height of a rectangle, in the unit of our choice to serve as "absolute reference" !

This is how I wish to "DEFINE" the dimensions of my rectangle : "256 cm X 152 cm". That simple.

Defining "absolute" colours is already a headache, so when some smart guy tells me a millimetre is anything between 0 and infinity, I go crazy. I need to eat every day : this is what I mean by "concrete".

If I draw a 100 mm square (fill with no stroke) in a document whose dimensions are also defined in mm, examining the XML content, I get 354.33072 as height and width, even if inkscape : document-units has been clearly defined as mm. I understand the necessity of Inkscape Unit as the display base unit (I suppose).

Okay. So 100 mm = 354.33072 hoplalas ! Fine ! If that is the case, I'd then expect 1.0 mm to be 3.5433072 hoplalas or even 1.0 holala to be something like 0.28222221319111140010665741880918 mm.

I should get 8.000 mm square if I directly modify the XML width and height values to be 28.346457 hoplalas.

Then I save the SVG file, modify (by hand in notepad) the values to 58.464568. I shoud get 16.500 mm. (Doing it while typing this comment) !

And, well, what do you know : effectively, when opening the file and verifying the dimensions of the square in mm this eveving at home, I get 16.500, something I couldn't get on the computer at my work this morning.

I'll check that out and confirm.

Thanks !
:-))

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

Re: Metric system

Postby brynn » Thu May 31, 2012 9:51 am

I'm sorry if you felt a bit miffed by my comments. I didn't mean to sound offensive.

The purpose of my questions was to identify where you are comparing the measurements. I wanted to know if you were seeing some descrepancy A - within Inkscape itself, B - between Inkscape and a printed document, C - between Inkscape and the screen you're using, or D - between Inkscape and some other app.

So it sounds like you are seeing something in the XML Editor (yes? either the XML Editor or some XML source code somewhere) that is not what you expected. Is that correct?

Next I need to say that I only understand XML in the most general way. I've picked up a few tidbits of details, here and there, but I certainly can't explain the math behind Inkscape's features, or the XML that describes it.

One of the tidbits I've picked up.....well, to be precise, this isn't really a detail or a fact. But recently someone else posted a similar question. It turns out that what that person thought were the dimensions of the object, in the XML editor, were not the dimensions of the object, but something else. Even though the attributes were called "x" and "y", they weren't dimensions.

So at this point, someone else will have to chime in, to ask you exactly which attributes that you're looking at, and what kind of object. Then they will be able to explain A - if they are the measurements that you think they are, B - if they're not what you thought, then what they actually are, and C - answer any other questions you might have.

Personally, I've never been able to find measurements and dimensions, in the XML Editor. The info quite likely is in there somewhere, and that I just haven't learned how to find it yet. It seems odd to me, since the first thing I learned about vector graphics, is that it's not defined by pixels, but instead by angles and lengths. What I suspect, is that the math is very complicated, and there's some sort of system for describing it in XML code, that is not obvious or elementary :D

But I digress :| If you wanted to submit a simple SVG file, it might be helpful in your discussion with that person. Just a thought :D

rich2005
Posts: 55
Joined: Fri Mar 30, 2012 9:06 pm

Re: Metric system

Postby rich2005 » Thu May 31, 2012 9:24 pm

It sounds as if the Python scripts the OP uses might be the problem.

As far as I can see, Inkscape handles metric perfectly well.

This screenshot is a 100mm x 100mm square, saved as a dxf and imported into windows HyCAD (freeware)

http://i.imgur.com/1hUmO.jpg

It dimensions in HyCAD correctly.

A further try, exporting as a 300 dpi .png raster file.
Import that into LibreOffice Draw, it scales correctly according to LO Draw rulers. Print it and the printed square measures 100mm x100mm

Edit: On the other hand, I can find difficulties importing a .dxf file and a .svg file from HyCAD into Inkscape and maintaining scale. Do not know if this is HyCAD or Inkscape problem.


Return to “Help with using Inkscape”