• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Adobe Illustrator Path Area
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adobe Illustrator Path Area


  • Subject: Re: Adobe Illustrator Path Area
  • From: "koenig.yvan" <email@hidden>
  • Date: Wed, 07 May 2014 22:24:19 +0200


Le 07/05/2014 à 09:51, Robert Stott <email@hidden> a écrit :

Hi,

I’m trying to find the area of a closed path in Adobe Illustrator. The following script works for a simple square:

tell application "Adobe Illustrator"
tell front document

set theAreas to area of path item 1

end tell
end tell


However, it gives some strange results for even slightly more complex path items. For example, if I make a square of 100x100pt then I get an area of 10000pt as I’d expect. 

If I duplicate the square, position it so the corners of two squares just slightly overlap then combine them to make one object (using Pathfinder>Unite) then I’d expect an area of just under 20000pt. (2*10000pt minus the overlap area). Instead, I get the result -1.9977919921875E+4. A minus area? Really? 

Am I doing something dumb, perhaps misunderstanding what the ‘area’ property is? Is there a better method of determining the area of a closed path item?

I’d appreciate your ideas on this one!

Thanks in advance
Rob

What if you create three squares and assemble them to build a single path ?
Maybe you will get a positive value.
I'm just guessing that maybe grouping an even number of objects give a negative value and that grouping an odd number returns a positive one.
In such a case you will have 
(1) to file a bug report to Adobe
(2) use the ABS value of the result.

Yvan KOENIG (VALLAURIS, France) mercredi 7 mai 2014 22:23:10




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Adobe Illustrator Path Area
  • Next by Date: Re: Mavericks and UI Elements
  • Previous by thread: Re: Adobe Illustrator Path Area
  • Next by thread: Mavericks and UI Elements
  • Index(es):
    • Date
    • Thread