Author Topic: Figuring Points....  (Read 2153 times)

0 Members and 1 Guest are viewing this topic.

rugaroo

  • Bull Frog
  • Posts: 378
  • The Other CAD Guy
Figuring Points....
« on: October 08, 2004, 11:31:26 PM »
Ok, it has been a while since I have been able to sit down and write anything.

Here is what I am having a problem with:



Now I know that this is a simple math question, but for me to turn it into lisp is a little bit harder than I thought.

Ok, the following vars are know A, B, C, C2.
If the user draws a line from the corner of AC to BC, but then wants to insert a point or node at the corner of C2 and B+X, if the distance and angle of C2 is know, how would I get it to insert the point in the manner of:

Code: [Select]
command: line
command:From: pt1 <-User given pnt ~ AC
command:To: pt2     <-User given pnt ~ BC
command:point
command:Place point: <-Point to be calculated from the known length of C2 which is a var that is stored in the lisp, along with the angle of the line from using getangle between pt1 and pt2.


I dont have any code or anything cause it is all written on paper right now...lisp and paper just dont work too well together. lol. but I just cant seem to calculate the point for the node. how could i generate this point so i can store it and use it as needed??[/code]
LDD06-09 | C3D 04-19 | Infraworks 360 | VS2012-VS2017

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Figuring Points....
« Reply #1 on: October 08, 2004, 11:55:16 PM »
If I understand your question correctly I believe you can use the polar function.
(polar pt ang dist)
So it might look something like this;
Code: [Select]

(polar p2 (angle pt2 pt1) c2)


Nice graphic rug. :D
TheSwamp.org  (serving the CAD community since 2003)

rugaroo

  • Bull Frog
  • Posts: 378
  • The Other CAD Guy
Figuring Points....
« Reply #2 on: October 09, 2004, 12:53:58 AM »
as always mark..you have helped me yet again :)..thanks...you will see the results soon.
LDD06-09 | C3D 04-19 | Infraworks 360 | VS2012-VS2017