Can Inkscape calculate the area of an object? How?
If it can't, does anyone have any ideas or links?
Thanks!
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Inkscape Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Hello,
Try Extensions>
Please note that the object must be a path. If you want to measure a circle, rectangle, etc. you must convert it to a path first (Path>Object to Path).
Regards.
Revision history for this message
|
#2 |
Thanks, but there's no "area" subfolder in "Measure path", just linear with inch, mm, cm and numerical options.
Am I just missing an extension? Or do you know of some sort of script and how to set it up?
Appreciate getting to the bottom of this!
Revision history for this message
|
#3 |
Oops, I forgot that area measurement is a new 0.48 feature, which is not yet out...
It's just a question of days or weeks, but you can download a snapshot at http://
Regards.
Revision history for this message
|
#4 |
I'm running Inkscape on a Mac OS 10.4... will that work?
Revision history for this message
|
#5 |
The OSX snapshots are in http://
But I'm not a Mac expert, and thus I really don't know if it works on 10.4.
Revision history for this message
|
#6 |
Unfortunately there are no snapshot builds available for Mac OS X 10.4 Tiger. The packages on modevia work on Leopard (PPC, Intel) and Snow Leopard (Intel) only.
Revision history for this message
|
#7 |
You can however download the extension files and put a copy of them into either the user extension folder ('~/.config/
Download links:
extension definition file 'measure.inx':
<http://
python script 'measure.py':
<http://
[1] to access so-called dot-folders (hidden folders), use the 'Go > Go to Folder…' ('Shift+Cmd+G') feature of the Finder and enter the path (without quotes) into the dialog box:
'~/.config/
[2] to access a folder inside an application bundle, browse to the application in the Finder, right-click (or control-click) the application icon and choose 'Show Package Contents' from the context menu.
@JazzyNico - hmm, does measure.py depend on other updated extension files (compared to 0.47)?
Revision history for this message
|
#9 |
Well... inserted the ext, the window popped up, opted for "area" and got the following message...
Traceback (most recent call last):
File "Contents/
locale.
File "/System/
locale.Error: unsupported locale setting
Which is similar to what I got when I tried measuring the length of the path with the original ext.
I'm no programmer, so I'm not up-to-date on whether this means kiss it off or keep on trying to wiggle something?
Revision history for this message
|
#10 |
There's a patch attached as temporary workaround for this issue (seems specific to using the system python on osx) to Bug #406662 in Inkscape: “measure path command has major problems on my drawings” <https:/
See Comment #7 for details (change tested on 10.5 Leopard only).
Revision history for this message
|
#11 |
> @JazzyNico - hmm, does measure.py depend on other updated extension files (compared to 0.47)?
Yes, inkex.py (in 0.47, measure.py uses its own unit conversion code, in 0.48 it uses inkex's ones), bezmisc and cubicsuperpath must be updated too.
Links:
http://
http://
http://
I think that's all ;)
Revision history for this message
|
#12 |
Just to be sure...
where do I cache these files?
In the Extensions folder? ...Python folder? Or elsewhere?
Appreciate all the feedback!
Revision history for this message
|
#13 |
> where do I cache these files? In the Extensions folder?
Yes! All extension files are in the extension folder.
Revision history for this message
|
#14 |
I think copying all 5 files into the extensions folder inside the application bundle is best:
'/Applications/
Before overwriting (replacing) the existing files, it might be advisable to make a backup copy of the 'extensions' folder so you can restore it just in case it doesn't work.
Revision history for this message
|
#15 |
No, I'm still getting the same error message as above.
Maybe it's the osx.4.
Also tried the suv's patch, but the link explanation
<https:/
wasn't clear enough for my limited programming experience.
There was no existing "inkscape-orig.sh" so I tried creating a new txt, pasting the patch and labelling accordingly... but...
$cd, $cp and $ patch mean nothing to me. It didn't work.
Hmmph!
Revision history for this message
|
#16 |
Does this help?
<https:/
Revision history for this message
|
#17 |
I'm over my head.
Don't know enough about Terminal or Unix pr anu programming for that matter.
But I appreciate the effort...
Revision history for this message
|
#18 |
This is an old question, but the extension didn't work for me on 0.48. It gave some error about the XML being too deeply nested to parse. After poking around a little, I fixed it by adding a parser flag to /usr/share/
*** inkex.py.orig 2012-12-29 14:03:29.000000000 -0800
--- inkex.py 2013-08-27 15:06:39.339886770 -0700
***************
*** 136,142 ****
except:
! self.document = etree.parse(stream)
def getposinlayer(
--- 136,143 ----
except:
! p = etree.XMLParser
! self.document = etree.parse(
def getposinlayer(
Revision history for this message
|
#19 |
Hmm. Thanks are in order I suppose even if the answer is (for me) more
enigmatic than Sphinx riddles or Turing codes.
The oldness of the question could be indicative of the need for a more
precise solution.
Could you clue me in to just what am I supposed to do with said patch?
Like where on virtual earth does it live?
Thanks! Again!
On 8/28/13 12:26 AM, dave m. wrote:
> Your question #117450 on Inkscape changed:
> https:/
>
> dave m. posted a new comment:
> This is an old question, but the extension didn't work for me on 0.48.
> It gave some error about the XML being too deeply nested to parse.
> After poking around a little, I fixed it by adding a parser flag to
> /usr/share/
>
> *** inkex.py.orig 2012-12-29 14:03:29.000000000 -0800
> --- inkex.py 2013-08-27 15:06:39.339886770 -0700
> ***************
> *** 136,142 ****
> stream = open(self.
> except:
> stream = sys.stdin
> ! self.document = etree.parse(stream)
> stream.close()
>
> def getposinlayer(
> --- 136,143 ----
> stream = open(self.
> except:
> stream = sys.stdin
> ! p = etree.XMLParser
> ! self.document = etree.parse(
> stream.close()
>
> def getposinlayer(
>
Revision history for this message
|
#20 |
@David M - the patch posted by dave m. is not related to your question earlier (i.e. it does not address the known issue with $LANG with the OS X package of Inkscape 0.48.2).
dave m. meanwhile has committed his patch in the bug tracker (where it really belongs, and will be taken care of by Inkscape developers):
- Bug #1217602 'Measure Path fails with "XML too deep" error'
<https:/
Revision history for this message
|
#21 |
Just in case you guys fix the area issue, let me pose another question:
what would it take to calculate the central point (in terms of balance -
assuming uniform thickness) of a shape?
Maybe this has already been done somewhere somehow... but it's beyond me....
Thanks and good luck!
On 9/5/13 10:41 AM, ~suv wrote:
> Your question #117450 on Inkscape changed:
> https:/
>
> ~suv posted a new comment:
> @David M - the patch posted by dave m. is not related to your question
> earlier (i.e. it does not address the known issue with $LANG with the OS
> X package of Inkscape 0.48.2).
>
> dave m. meanwhile has committed his patch in the bug tracker (where it really belongs, and will be taken care of by Inkscape developers):
> - Bug #1217602 'Measure Path fails with "XML too deep" error'
> <https:/
>
Revision history for this message
|
#22 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.