Author Topic: Angle between UCS & WCS  (Read 3517 times)

0 Members and 1 Guest are viewing this topic.

csgoh

  • Newt
  • Posts: 176
Angle between UCS & WCS
« on: November 05, 2005, 12:11:34 AM »
How can one find the angle between a local UCS  and WCS? Is there a system variable for this angle?
Thanks.

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: Angle between UCS & WCS
« Reply #1 on: November 05, 2005, 04:51:03 AM »
How can one find the angle between a local UCS  and WCS? Is there a system variable for this angle?
(defun MeGetUcsAngle ()
 (angle
  (trans '(0.0 0.0 0.0) 1 0)
  (trans '(1.0 0.0 0.0) 1 0)
 )
)

(defun MeTransAng2Ucs (Ang / OriPnt)
 (setq OriPnt '(0.0 0.0 0.0))
 (angle
  (trans OriPnt 0 1)
  (trans (polar OriPnt Ang 1.0) 0 1)
 )
)
« Last Edit: November 05, 2005, 05:12:53 AM by Jürg Menzi »
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18

csgoh

  • Newt
  • Posts: 176
Re: Angle between UCS & WCS
« Reply #2 on: November 05, 2005, 05:13:25 AM »
Thanks.

David Bethel

  • Swamp Rat
  • Posts: 656
Re: Angle between UCS & WCS
« Reply #3 on: November 06, 2005, 03:18:59 PM »
How about UCSXDIR & UCSYDIR. 

I don't think that you can state the angle between coordinate systems in a single value without specifing which axis you need to compare.  Angles are after all 2 dimensional values.  -David
R12 Dos - A2K