Arc tangent to line and arc

AllenJessup
Mentor
Mentor

Arc tangent to line and arc

AllenJessup
Mentor
Mentor

I thought this would be simple but I can't get it to work.

 

I'm trying to draw an arc that's tangent to a line at a specific point and tangent to an arc. I drew the line, started the arc command, hit enter to force the arc tangent to the line at the endpont and then tried to use a Tangent OSnap to hit tangent to the arc. This is what I got. Note the Tangent snap at the midpoint of the arc.

 

tan.PNG

 

If I accept the Tangent snap it does draw the new arc to the midpoint of the existing arc. Definitely not tangent.  Does this mean there is no solution? I think I'm missing something. I'm usually aiming for a set radius and have no trouble. This is kind of a Best Fit situation. The only criteria are that the new arc be tangent to the red line at the intersection with the yellow line and tangent to the red arc.

 

Allen

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Reply
31,932 Views
105 Replies
Replies (105)

Neilw_05
Mentor
Mentor
Now if we open it up to using alignments then we have better tools for a solution.
Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes

Neilw_05
Mentor
Mentor
John,

Unless I don't understand your solution, the problem with using a fillet is we don't have a way to constrain the end of the arc to be at the end of the line.
Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes

Joe-Bouza
Mentor
Mentor
I made that mistake; I thought the radius was know.
Matt's method hold the constraint and is a graphical solution

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes

Joe-Bouza
Mentor
Mentor
That is the tool for the solution

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes

mathewkol
Advisor
Advisor

Allen, I tried it on your data set and it worked.  I actually had to move the curve end point a few times to get it to the EXACT point, but it did work.

Matt Kolberg
SolidCAD Professional Services
http://www.solidcad.ca /
0 Likes

Neilw_05
Mentor
Mentor
It is a solution IF you have C3D. If plain Autocad then no.
Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes

Joe-Bouza
Mentor
Mentor
This is true. IMHO, with out it you are left with trial an error.
No radius, no tangent length, no delta, no MO, no arc length, etc. there appears to be a severe lack of information to work it out mathematically and or construction lines

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes

Joe-Bouza
Mentor
Mentor
I did too, and it took about 45 seconds

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes

Pointdump
Mentor
Mentor

Matt,

 

"This is actually a pretty easy thing to accomplish."

 

I tried your method with Allen's drawing, and I couldn't get it to work. When I try to use Free Curve Fillet, I get "Cannot create a free entity, no alignment sub-entities currently exist".

 

Free.png

 

I have a knack for being "the last guy to get it".

 

Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
0 Likes

Anonymous
Not applicable

@Anonymous wrote:

FYI that other "horrible" CAD platform does this nicely.

Zing...  I concur, not an issue at all in that other "not to be spoken of" platform.

0 Likes

doni49
Mentor
Mentor

@Anonymous wrote:
It is a solution IF you have C3D. If plain Autocad then no.

In the following image, the yellow line labeled as side C is a line drawn perpendicular at the end of the red line.  The white line labeled side B is drawn from the same end of the red line to the center point of the existing arc.  Which means that we know the length of side B and angle a.

We know that the point of tangency for these two arcs will be somewhere along a line drawn between the center points of the two arcs.  Therefore, we know that side A is equal to the lengh of side C plus radius of the existing arc (A = r + C).

 

AJessup_COSINES.png

 

So if you can figure out the value of C from the following, you'd have your radius.  It's been a while since I've done any algebra this complicated but it SEEMS doable.

 

AJessupFormula.png

Law Of Cosines.png

 



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Pointdump
Mentor
Mentor

Don,

 

"It's been a while since I've done any algebra..."

 

Me too. If it weren't for AutoCAD and computers, we'd probably all be Geometers and carry Slide Rules in our Pocket Protectors. I sometimes wonder if technology helps or hinders our thinking.

 

Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
0 Likes

Joe-Bouza
Mentor
Mentor

Hi Dave

 

Did you draw both the fixed curve and line in the same direction? Example: draw fixed 3point curve left to right>> draw fixed line left to right>> create free curve>> pick fixed curve then fixed line.

 

 

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Pointdump
Mentor
Mentor

Joe,

 

I tried "tracing" the curve and line, in several direction combinations. I tried Create Alignment From Objects, but I got the "no sub-entities" message. If I "converted" the alignment to a sub-entity, then the Free Curve Fillet kinda worked, but I got a bewildering command line prompt asking me if the "angle" was greater or less than 180 degrees. I randomly selected "greater than" (where this "angle" is, I don't know) and hilarity ensued with a tortured figure-8 alignment.

I've never done a "real world" alignment. Just tutorials in the Help Section and books. I thought I had a pretty good bead on things, but now I realize the depths of my ignorance. I've got my head buried in the Help Section right now.

 

Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
0 Likes

Pointdump
Mentor
Mentor

Joe,

 

I just now followed your instructions to the letter and achieved a sorta success. Like Matt mentioned, you have to grip edit the little curve several times to make it "stick" to the end of the line:

 

Money.png

 

Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
0 Likes

doni49
Mentor
Mentor

The following lisp routine has been tested in 2014 and will create the desired circle (you'll have to trim the circle when it's done).  It doesn't do any error checking so if you pick the wrong end of the line for example, it will have unexpected results.  Maybe someone else can come up with a shorter command name for it.

 

(defun rtd (r) ; Radians to Degrees
  (/ (* r 180.0) pi))

(defun dtr (d) ; Degrees to Radians
  (/ (* d pi) 180.0))


(defun c:CircleTantoArcLine( / pt_S pt_E line1 ptnew pt1 pt2 tst1 tst2 oldtst2 inc rad center line pt)
  (setq circ1(entget (car (entsel "Pick Existing Arc:  "))))
  (setq center(cdr(assoc 10 circ1)))
  (setq rad (cdr(assoc 40 circ1)))
  (setq line1(entsel "Pick existing Line (near the tangent end):  "))
  (setq line (entget (car line1)))

  (setq pt (cadr line1))

  (setq pt_S(cdr (assoc 10 line)))(setq pt_E(cdr (assoc 11 line)))

  (if (< (distance pt pt_S)(distance pt pt_E))(setq pt1 pt_S pt2 pt_E)(setq pt1 pt_E pt2 pt_S))

  (setq inc 10)
  (setq tst1 T)
  (setq oldTst2 1)
  (while tst1
    (setq tst2 oldTst2)(setq ptNew (polar pt1 (- (angle pt1 pt2) (dtr 90)) tst2))
    (while (<= (distance ptnew pt1) (- (distance ptnew center) rad))
      (setq oldTst2 tst2)(setq ptNew (polar pt1 (- (angle pt1 pt2) (dtr 90))(setq tst2 (+ inc tst2))))
      
    )
    (setq inc (* inc 0.1))
    
    (if (equal (distance ptnew pt1)(- (distance ptnew center) rad) 0.00000001) (setq tst1 nil))
  )
  (command "circle" ptnew pt1)
)

 

 



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

0 Likes

doni49
Mentor
Mentor

Here are a few tests run from the lisp routine.

 

Test2.png

 

Test3.pngTest1.png

 

 



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

0 Likes

doni49
Mentor
Mentor

I did some more checking and found that if you're dealing with really large numbers, then the lisp routine could get stuck in what seems like an endless loop (but in reality, it's just got a lot of checks to do).

 

Heres a slightly modified version that addresses the issue.  It's been tested with everything from extremely small numbers to extremely large numbers.  The change is marked in RED.

 

(defun c:CircleTantoArcLine( / pt_S pt_E line1 ptnew pt1 pt2 tst1 tst2 oldtst2 inc rad center line pt)
  (setq circ1(entget (car (entsel "Pick Existing Arc:  "))))
  (setq center(cdr(assoc 10 circ1)))
  (setq rad (cdr(assoc 40 circ1)))
  (setq line1(entsel "Pick existing Line (near the tangent end):  "))
  (setq line (entget (car line1)))

  (setq pt (cadr line1))

  (setq pt_S(cdr (assoc 10 line)))(setq pt_E(cdr (assoc 11 line)))

  (if (< (distance pt pt_S)(distance pt pt_E))(setq pt1 pt_S pt2 pt_E)(setq pt1 pt_E pt2 pt_S))

  (setq inc 10000)
  (setq tst1 T)
  (setq oldTst2 1)
  (while tst1
    (setq tst2 oldTst2)(setq ptNew (polar pt1 (- (angle pt1 pt2) (dtr 90)) tst2))
    (while (<= (distance ptnew pt1) (- (distance ptnew center) rad))
      (setq oldTst2 tst2)(setq ptNew (polar pt1 (- (angle pt1 pt2) (dtr 90))(setq tst2 (+ inc tst2))))
      
    )
    (setq inc (* inc 0.1))
    
    (if (equal (distance ptnew pt1)(- (distance ptnew center) rad) 0.00000001) (setq tst1 nil))
  )
  (command "circle" ptnew pt1)
)

 



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

0 Likes

Anonymous
Not applicable

here is the solution for "c"

 

LawOfCosine001.jpg

0 Likes

doni49
Mentor
Mentor

@Anonymous wrote:

here is the solution for "c"

 


Thanks for trying but that doesn't produce the correct results.  The first place it derails is .......

 

 

Algebra.png

 



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

0 Likes