17

In Inkscape, is there a way to automatically calculate the space / area a shape occupies? I am representing data in complex shapes and I need a way to scale them accordingly.

18

To automatically obtain the area of a shape in pixel, cm and so on simply select the shape, go to Extensions > Visualise Path > Measure Path ... and select the desired output. It does not work for objects though (for example rectangles drawn with the Create rectangles and squares tool). Convert them to paths before (Path > Object to Path).

| improve this answer | |
  • The indications are all good, but nothing happens either with Length, Area, or Center of Mass. I have Inkscape 0.91. – miguelmorin Nov 3 '18 at 17:43
  • 1
    It works for me on Inkscape 0.92.3. However, it does not appear to support anything other than regular paths. For example, I was not able to get results for an entire group, but it worked for individual paths once I ungrouped them. – cxw Apr 3 '19 at 11:56
0

Does not work for me:

Traceback (most recent call last):
  File "measure.py", line 341, in <module>
    e.affect()
  File "inkex.py", line 283, in affect
    self.effect()
  File "measure.py", line 219, in effect
    factor = self.unittouu(doc.get('width'))/float(vieww)
  File "inkex.py", line 387, in unittouu
    p = param.match(string)
TypeError: expected string or buffer

I tried with Objects transformed to Paths, and with newly created Paths. Same result.

| improve this answer | |
  • Welcome to GraphicDesign SX. Your post is not an answer to the question but a comment on another answer. Please familiarize yourself with our guidelines by reading how to post good questions and answers, and what not to post: graphicdesign.stackexchange.com/help – Philipp Jul 2 '18 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.