Computing total area inside all paths

Post questions on how to use or achieve an effect in Inkscape.
chrisjj
Posts: 153
Joined: Thu Jan 17, 2013 10:45 am

Computing total area inside all paths

Postby chrisjj » Sat Apr 06, 2013 3:59 am

Can anyone suggest a was to find the approximate total area within all paths?

Some may overlap. E.g. the answer for this:

Image

is 8 sq.mm.

My current solution is to set all to partially transparent black, then in an external program, sum the blackness. Not great.

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Computing total area inside all paths

Postby ragstian » Sat Apr 06, 2013 4:14 am

Hi.

See my Convex-hull script.
http://www.inkscapeforum.com/viewtopic.php?f=5&t=13622

Run the script and then do an - Extension - Visualize Path - Measure Path - Area.
If you just want the area of the paths themselves - Select all paths - Duplicate - Union - Extension - Visualize Path - Measure Path - Area

Good Luck

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

chrisjj
Posts: 153
Joined: Thu Jan 17, 2013 10:45 am

Re: Computing total area inside all paths

Postby chrisjj » Sat Apr 06, 2013 6:20 am

Thanks Ragnar, but neither method handles overlaps.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Computing total area inside all paths

Postby Lazur » Sat Apr 06, 2013 6:55 am

There is the object and column function for reorganising the objects to make overlaps disappear in the object menu.

chrisjj
Posts: 153
Joined: Thu Jan 17, 2013 10:45 am

Re: Computing total area inside all paths

Postby chrisjj » Sat Apr 06, 2013 7:10 am

Aha! So a solution is:

To find total area inside all paths (and optionally objects):

1 Save drawing (because the following is destructive)
2 Select all
3 If you want to include objects too, do Path > Object to path)
4 Object > Align and Distribute > Remove overlaps [button]
5 Path > Union
6 Extension > Visualize Path > Measure Path > Area
7 Read results from text that appears in drawing

A quick test shows that works fine. Thanks both!


Return to “Help with using Inkscape”