## Re: [Inkscape-user] force relative coordinates

 Re: [Inkscape-user] force relative coordinates From: A. da Mek - 2011-06-23 06:42:00 ```> Any reason why Inkscape's "precision setting" option limits "significant > figures" instead of "decimal places"? Probably because objects and groups can be transformed and the precision would be dependent on the scale. > Placing a limit on "significant figures" forces arbitrarily higher > precision for coordinates near the origin of the drawing. Thus the use of relative coordinates is much better. Albeit it gives higher precision for short segments, however it can be an advantage if the fine details are stored with higher absolute precision than large shapes. Maybe it would be best to relate the precision not to individual coordinates but to the bounding box of the path. > Precision drops logarithmically (in discrete jumps) as the coordinates > move away from the origin. > > E.g. Consider the following horizontal path created with a numeric > precision of "8". > d="M > 0.17036585,0 > 243.56794,0 > 507.68921,0 > 801.52616,0 > 1128.1785,0" > Note how the first coordinate has eight decimal places while the last > coordinate has four decimal places. The extra precision on the lower > valued coordinates leads to necessary file bloat. When a drawing has > thousands of points this bloat becomes significant. It seems to me that it is not so significant. Consider an image 1000 x 1000 units. Then on average, only 9% of coordinates will have 1 extra place and only 1% of them 2 or more extra places. (BTW, the workaround with translating the layer would solve this problem too.) P.A. ```

### Thread view

 Re: [Inkscape-user] force relative coordinates From: crjw - 2011-06-23 01:26:22 ```>(BTW, the entry "Numeric precision" has a misleading tooltip "How many >digits to write after the decimal dot", whereas the value evidetly means the >total number of valid digits.) Any reason why Inkscape's "precision setting" option limits "significant figures" instead of "decimal places"? Placing a limit on "significant figures" forces arbitrarily higher precision for coordinates near the origin of the drawing. Precision drops logarithmically (in discrete jumps) as the coordinates move away from the origin. E.g. Consider the following horizontal path created with a numeric precision of "8". d="M 0.17036585,0 243.56794,0 507.68921,0 801.52616,0 1128.1785,0" Note how the first coordinate has eight decimal places while the last coordinate has four decimal places. The extra precision on the lower valued coordinates leads to necessary file bloat. When a drawing has thousands of points this bloat becomes significant. I would prefer it if inkscape could let me create paths where each coordinate had a set number of decimal places like this: d="M 0.1704,0 243.5679,0 507.6892,0 801.5262,0 1128.1785,0" -crjw ```
 Re: [Inkscape-user] force relative coordinates From: A. da Mek - 2011-06-23 06:42:00 ```> Any reason why Inkscape's "precision setting" option limits "significant > figures" instead of "decimal places"? Probably because objects and groups can be transformed and the precision would be dependent on the scale. > Placing a limit on "significant figures" forces arbitrarily higher > precision for coordinates near the origin of the drawing. Thus the use of relative coordinates is much better. Albeit it gives higher precision for short segments, however it can be an advantage if the fine details are stored with higher absolute precision than large shapes. Maybe it would be best to relate the precision not to individual coordinates but to the bounding box of the path. > Precision drops logarithmically (in discrete jumps) as the coordinates > move away from the origin. > > E.g. Consider the following horizontal path created with a numeric > precision of "8". > d="M > 0.17036585,0 > 243.56794,0 > 507.68921,0 > 801.52616,0 > 1128.1785,0" > Note how the first coordinate has eight decimal places while the last > coordinate has four decimal places. The extra precision on the lower > valued coordinates leads to necessary file bloat. When a drawing has > thousands of points this bloat becomes significant. It seems to me that it is not so significant. Consider an image 1000 x 1000 units. Then on average, only 9% of coordinates will have 1 extra place and only 1% of them 2 or more extra places. (BTW, the workaround with translating the layer would solve this problem too.) P.A. ```
 Re: [Inkscape-user] force relative coordinates From: Jasper van de Gronde - 2011-06-23 08:56:24 ```On 23-06-11 08:25, A. da Mek wrote: >> Any reason why Inkscape's "precision setting" option limits "significant >> figures" instead of "decimal places"? > > Probably because objects and groups can be transformed and the precision > would be dependent on the scale. You can also turn that argument around and say that the current system is not translation invariant. Basically there is no clear winner and the current system is usually more than good enough. I could see how it might be interesting to be able to make all values snap to a certain grid though, which would essentially limit "decimal places" (only a bit more general). >> Placing a limit on "significant figures" forces arbitrarily higher >> precision for coordinates near the origin of the drawing. > > Thus the use of relative coordinates is much better. Albeit it gives higher > precision for short segments, however it can be an advantage if the fine > details are stored with higher absolute precision than large shapes. Nope. Inkscape goes to great lengths to ensure that when relative coordinates are used the points on the path have the exact same precision as when absolute coordinates are used. First of all, if absolute coordinates are "good enough", then relative coordinates should not need to be better. Secondly, relative coordinates are used in Inkscape to reduce the size of path data, so using an effectively higher precision than with absolute coordinates defeats their purpose. Finally, in practice it causes no end of trouble to use a different discretization for relative coordinates than for absolute coordinates. > Maybe it would be best to relate the precision not to individual coordinates > but to the bounding box of the path. Ah yes, I've thought about things like that as well, but when thinking this through you quickly realize that it would be way better to use a local feature size... To make a long story short, it doesn't take long to get to a point where it becomes obvious that it might be best to simply stick to a certain number of significant digits and be done with it. After all, the default of 8 digits is quite enough for pretty much any drawing. But hey, if you've got a good suggestion, let's hear it. ```

## Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks