• 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
Maths Calculation Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Maths Calculation Problem


  • Subject: Maths Calculation Problem
  • From: Simon Topliss <email@hidden>
  • Date: Fri, 14 Nov 2008 17:10:33 +0000

Hi All,

I'm trying to work out whether two text frames (or any two objects) intersect each other in Illustrator but I'm struggling with the maths.

I'm sure there's a basic formula that games developers and/or mathmagicians use to achieve this but I'm terrible at maths. I think in pictures!

Anyway, if I have two objects that do indeed intersect and the values are:

Object 1: bounds: {523.7314453125, 520.07958984375, 750.03515625, 464.88330078125}, width: 226.3037109375, height: 55.1962890625.
Object 2: bounds: {501.5654296875, 569.4541015625, 738.6728515625, 514.2578125}, width: 237.107421875, height: 55.1962890625.


How would I write the AppleScript function to return true if they do intersect and false if they don't?

I know the subject is slightly OT but the solution will be used in an AppleScript program! Many thanks to anyone who can help.

Simon
_______________________________________________
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
  • Follow-Ups:
    • Re: Maths Calculation Problem
      • From: Simon Topliss <email@hidden>
    • Re: Maths Calculation Problem
      • From: Emmanuel Levy <email@hidden>
  • Prev by Date: Re: Help Book
  • Next by Date: Re: Maths Calculation Problem
  • Previous by thread: Re: Delete message in Mail
  • Next by thread: Re: Maths Calculation Problem
  • Index(es):
    • Date
    • Thread