Author Topic: Find the base point of an arc  (Read 2124 times)

0 Members and 1 Guest are viewing this topic.

Coder

  • Swamp Rat
  • Posts: 827
Find the base point of an arc
« on: August 09, 2015, 09:13:36 AM »
Hello guys.

I need to draw arc with entmake , I have the start and end points but I don't know how to get the base point with the radius value to be able draw it .

Anyone can help please ?

Thanks in advance.  :-)

mianbaoche

  • Guest
« Last Edit: August 09, 2015, 09:42:23 AM by Q1241274614 »

hmspe

  • Bull Frog
  • Posts: 362
Re: Find the base point of an arc
« Reply #2 on: August 09, 2015, 10:13:08 AM »
If you know the start point, end point, and radius it would be far easier to use

(COMMAND "ARC" start_point "R" radius end_point)


"Science is the belief in the ignorance of experts." - Richard Feynman

Coder

  • Swamp Rat
  • Posts: 827
Re: Find the base point of an arc
« Reply #3 on: August 09, 2015, 12:53:43 PM »
Hi guys ,

I need to use entmake while I know ONLY the start and end points and radius is 90 or -90 .

Thanks

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Find the base point of an arc
« Reply #4 on: August 09, 2015, 12:58:03 PM »

Coder

  • Swamp Rat
  • Posts: 827
Re: Find the base point of an arc
« Reply #5 on: August 10, 2015, 03:50:06 AM »
Thank you Lee for that link , it is very great work and description for all to follow.  :-)

I have a different request maybe , how can I get the base point when I know the start and end points and the angle is 90 degree ?

Many thanks.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Find the base point of an arc
« Reply #6 on: August 10, 2015, 04:42:06 AM »
Thank you Lee for that link , it is very great work and description for all to follow.  :-)

Thanks  :-)

I have a different request maybe , how can I get the base point when I know the start and end points and the angle is 90 degree ?

If the angle is 90 degrees, then your start & end points will lie on two diagonally opposite corners of a square with side length equal to the radius, with the two possible arc centers on the other two corners.

There are many ways to calculate the positions of the two possible centers, here is one way:
Code - Auto/Visual Lisp: [Select]
  1. (defun 90arccenter ( p1 p2 / a d )
  2.     (setq a (angle p1 p2)
  3.           d (/ (distance p1 p2) 2)
  4.     )
  5.     (mapcar '(lambda ( x ) (polar (polar p1 a d) ((eval x) a (/ pi 2)) d)) '(+ -))
  6. )
« Last Edit: August 10, 2015, 04:48:23 AM by Lee Mac »

Coder

  • Swamp Rat
  • Posts: 827
Re: Find the base point of an arc
« Reply #7 on: August 10, 2015, 07:14:51 AM »
Great as always  ;-)

Thank you Lee.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Find the base point of an arc
« Reply #8 on: August 10, 2015, 09:27:45 AM »
You're welcome!  :-)