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

Re: Maths Calculation Problem


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

Sorry, just to make things a bit simpler and a lot less scary-looking, here's the same values rounded.

Object 1: bounds: {523.0, 520.0, 749.0, 465.0}, width: 226.0, height: 55.0.
Object 2: bounds: {500.0, 570.0, 737.0, 515.0}, width: 237.0, height: 55.0.



On 14 Nov 2008, at 17:10, Simon Topliss wrote:

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 (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden

_______________________________________________ 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: KOENIG Yvan <email@hidden>
References: 
 >Maths Calculation Problem (From: Simon Topliss <email@hidden>)

  • Prev by Date: Re: Maths Calculation Problem
  • Next by Date: Re: create duplicate event in iCal
  • Previous by thread: Re: Maths Calculation Problem
  • Next by thread: Re: Maths Calculation Problem
  • Index(es):
    • Date
    • Thread