Very Interesting!

Thanks!!!

absar ahmed
design / direction / consultancy
+92 321 2226399  /  twitter


On Sat, 1 Dec 2018 at 02:53, Karen Ackoff <[log in to unmask]> wrote:
This question came up on my user group forum, and I thought it might be of interest to some here.

I refer to Adobe Illustrator (2018) here.

The question was - how do I calculate the area of an open curve? Some discussion ensued, and one user commented that an open curve does not have an area… but if you choose to fill the open curve, you will see that it does.

In early versions of Illustrator you could bring up something called an “Object Tree” by opening the DeBugging palette - Command+Option+Shift+F12. But trying this, nothing happened. The Properties panel provides width, height and X- and Y-axis info. But the area of a shape or open curve is not provided.

So not shying away from a challenge, this is what I came up with:

  1. I opened TextEdit (NotePad for PC folks). I chose Format > Plain Text.
  2. Paste this code into the document: alert("Area & Length (inches)\nArea: " + (Math.abs(app.activeDocument.selection[0].area/5184).toFixed(3)) + "\nLength: " + (app.activeDocument.selection[0].length/72).toFixed(3)); 
  3. For reference: this script came from: http://blog.k8baldwin.com/Finding-areas-and-lengths-in-Illustrator-td4.html
  4. Save the script as “AreaLength.JS”. 
  5. In Illustrator, create the desired shape or curve. Select it.
  6. File > Scripts and choose the script you just made. The length and area will be displayed. For an example, see here: http://karenackoff.net/z-misc/calculate-area.png

I’m sure with some tweaking the script could be adapted further. But I thought it was a nifty trick.

Enjoy. K

________________________________________________

Need to leave or subscribe to the Sciart-L listserv? Follow the instructions at
http://www.gnsi.org/resources/reviews/gnsi-sciart-l-listserv

________________________________________________

Need to leave or subscribe to the Sciart-L listserv? Follow the instructions at
http://www.gnsi.org/resources/reviews/gnsi-sciart-l-listserv