Hi there,
Sometimes, it is necessary to measure the area of an object or arbitrarily shaped path.
For this Inkscape has the function:
Extensions | Visualize Path | Measure Path
Measurement Type: Area
Length Unit: mm
This seems not to work with Inkscape 0.91pre3 r13670
I get an error message and no result:
Traceback (most recent call last):
File "measure.py", line 266, in <module>
e.affect()
File "C:\Program Files\Inkscape\share\extensions\inkex.py", line 268, in affect
self.effect()
File "measure.py", line 186, in effect
factor = float(doc.get('width'))/float(vieww)
ValueError: invalid literal for float(): 210mm
How can this be fixed?
It seems to work somehow with Inkscape 0.48.5, however, it produces sometimes wrong results.
Example:
Document units are mm.
- Draw a circle, drag the size to 1.0x1.0mm
- Measure area
Result: 0.784 mm2 = pi/4 (correct!)
- Resize the circle by entering numbers for Width and Height to 2.0x2.0mm
- Measure area
Result: still 0.784 mm2 (wrong!)
Somewhere it says that you have to convert objects to paths.
Actually, for rectangles the "measure area" doesn't give you any value back unless you convert it to a path.
So for the circle, I would also prefer to have no result instead of a wrong result!
OK:
- Convert the circle to a path
- Measure area again
Result: still 0.784 mm2 (wrong!)
- Drag/move the circle around
- Measure area again
Result: 3.142 mm2 (correct!)
So, this seems to be some updating problem...?!
Measuring area: Error in V0.91 / wrong values in V0.48.5
Re: Measuring area: Error in V0.91 / wrong values in V0.48.5
I found this bug report: https://bugs.launchpad.net/inkscape/+bug/803791 (warning - long read)
Does that seem to describe your issues?
Edit
And there's another bug that might be related -- I'm not sure https://bugs.launchpad.net/inkscape/+bug/676393
Does that seem to describe your issues?
Edit
And there's another bug that might be related -- I'm not sure https://bugs.launchpad.net/inkscape/+bug/676393
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Measuring area: Error in V0.91 / wrong values in V0.48.5
well, the description sounds similar...
I can't follow all the details.
At the end on 2015-02-21 it says
status: Fix Committed → Fix Released
Fact is, that I still do get strange results in 0.48.5 and it still doesn't work at all in V0.91
Does anybody know of a workaround? Maybe with other programs? With some exported formats DXF, PS, or others...?
Thanks for any hints.
I can't follow all the details.
At the end on 2015-02-21 it says
status: Fix Committed → Fix Released
Fact is, that I still do get strange results in 0.48.5 and it still doesn't work at all in V0.91
Does anybody know of a workaround? Maybe with other programs? With some exported formats DXF, PS, or others...?
Thanks for any hints.
Win7/64, Inkscape 0.92.2
Re: Measuring area: Error in V0.91 / wrong values in V0.48.5
You said you're using version 0.91pre3 r13670. That's the last pre-release for 0.91. (I think a pre-release is something like a beta version....in my simplistic understanding.) So the fix was applied to the new stable 0.91 (which I think is 0.91 r13725).
There's no way for the fix to apply retroactively to 0.48.5 or to the pre-release version. You'll need to test with the stable version.
Also, I seem to recall reading a bug report about using mm units and very small values, such as 0 to 5 mm. I don't know if it would apply to that extension.....I think it might be about stroke widths or dimensions. It's a vague recollection, as far as the details. But I'm certain that I read about it somewhere.
Anyway, try with the stable 0.91. And good luck
There's no way for the fix to apply retroactively to 0.48.5 or to the pre-release version. You'll need to test with the stable version.
Also, I seem to recall reading a bug report about using mm units and very small values, such as 0 to 5 mm. I don't know if it would apply to that extension.....I think it might be about stroke widths or dimensions. It's a vague recollection, as far as the details. But I'm certain that I read about it somewhere.
Anyway, try with the stable 0.91. And good luck

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Measuring area: Error in V0.91 / wrong values in V0.48.5
Thanks, brynn!
Sorry, one should always check first whether one has the latest version.
The calculated areas seem to be correct now.
However, it is not clear to me where the result is placed (when using option "fixed angle" and offset 0px).
Sometimes it's far away from the object even outside the page frame.
Sorry, one should always check first whether one has the latest version.
The calculated areas seem to be correct now.
However, it is not clear to me where the result is placed (when using option "fixed angle" and offset 0px).
Sometimes it's far away from the object even outside the page frame.
Win7/64, Inkscape 0.92.2
Re: Measuring area: Error in V0.91 / wrong values in V0.48.5
Are you using a custom template, perhaps with the orientation changed from default portrait to landscape? Or maybe you've made some various tranformations in the file? There's a long standing bug involving the transform attribute, that causes most extensions to place the results far away from the path or objects involved. You can avoid it by moving the path/object to a new layer.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design