Author Topic: Getting the angle ...  (Read 2521 times)

0 Members and 1 Guest are viewing this topic.

Hangman

  • Swamp Rat
  • Posts: 566
Getting the angle ...
« on: April 13, 2006, 06:15:23 PM »
How can I get an angle of two defined points ??

an example:
Code: [Select]
(setq A (getpoint ... ))
(setq B (getpoint ... ))
(setq ang1 (getangle A B))

This gives an error as getangle is waiting for user input.
I can't give user input to get the angle.  Any ideas to get this angle ??

Thanks.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Getting the angle ...
« Reply #1 on: April 13, 2006, 06:19:59 PM »
Perhaps try
Code: [Select]
(SETQ A    (GETPOINT)
      B    (GETPOINT)
      ang1 (ANGLE A B)
)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: Getting the angle ...
« Reply #2 on: April 13, 2006, 10:18:46 PM »
getangle...
asks you for two points or a numeric angle
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Getting the angle ...
« Reply #3 on: April 13, 2006, 11:26:51 PM »
just to clarify Jürg's post, try these ...   

Code: [Select]
(setq ang2 (getangle "\nSelect 2 points"))

(setq ang3 (getangle "\nEnter decimal degrees to convert to radians. "))

and compare them with the previously posted functionality.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Re: Getting the angle ...
« Reply #4 on: April 14, 2006, 09:30:35 AM »
just to clarify Jürg's post, try these ...
Thanks Kerry,
early in the morning after a birthday party :doa:
I was not in the mood to write a comprehensive explanation...
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18

Hangman

  • Swamp Rat
  • Posts: 566
Re: Getting the angle ...
« Reply #5 on: April 14, 2006, 03:27:41 PM »
Thanks Kerry.  Now that you've mentioned the
Quote
(SETQ A    (GETPOINT)
        B    (GETPOINT)
        ang1 (ANGLE A B)
)
I have found this all reference all over the place.  I'm a blind draftsman.   8-)

Anyhow, my sitiation is that I have two points from a previous creation.  So I can't ask the user to pick the two points for the angle.  Your post was most helpful.  Thanks again.
Hangman  8)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Drafting Board, Mechanical Arm, KOH-I-NOOR 0.7mm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~