Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Arc tangent to line and arc

105 REPLIES 105
SOLVED
Reply
Message 1 of 106
AllenJessup
28062 Views, 105 Replies

Arc tangent to line and arc

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

Tags (2)
105 REPLIES 105
Message 41 of 106
HorizontalCurveGuy
in reply to: doni49


@doni49 wrote:

@HorizontalCurveGuy wrote:

here is the solution for "c"

 


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

 

 

I can appreciate critisism but draw the line at condesention

 

The polynomial is expanded correctly. I did miss a negative while factoring, and c calcs out to 16 and change pretty close to graphical solution or c= 16.285 m. dead on!

 


algebra.png

 

cosine.png

Message 42 of 106
doni49
in reply to: HorizontalCurveGuy

Ok I stand corrected as to the "derailed" part and I apologize.  I misunderstood part of what you had written.  But the reason I was looking at it that closely is that when I plugged my numbers into the formula you provided, I wasn't getting valid numbers.

 

Here are the numbers I'm testing with.  Using your formula, I'm getting C = 66.9.  But I also used the lisp routine that I provided above to create the circle.  It IS tangent at the red curve and the end of the red line.  But the radius is 36.89.

 

Algebra2.png

 

Test4.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.

Message 43 of 106
doni49
in reply to: doni49

Hmmm.

 

It must be something to do with the way I entered the formul in excel.  Because I just calc'd it manually using the windows calculator and it came out right.

 

NICE!

 

EDIT:  As someone who regularly uses Excel to calculate things like this, this is a little worrisome.  I just tracked down the error and it's not an issue with how I entered it.

 

Given the angle 108.92089064, Windows Calculator is reporting one value as the cosine while Excel reports a completely different value for the cosine.

 

This gets even MORE strange.  Autolisp reports that the cosine of this angle is the SAME AS what Excel is reporting. 

 

Command: (cos 108.92089064)
-0.510653

 

ExcelCosProblem.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.

Message 44 of 106
doni49
in reply to: doni49


@doni49 wrote:

EDIT:  As someone who regularly uses Excel to calculate things like this, this is a little worrisome.  I just tracked down the error and it's not an issue with how I entered it.

 

Given the angle 108.92089064, Windows Calculator is reporting one value as the cosine while Excel reports a completely different value for the cosine.

 

This gets even MORE strange.  Autolisp reports that the cosine of this angle is the SAME AS what Excel is reporting. 

 

Command: (cos 108.92089064)
-0.510653

 

 


 

Ok. Crisis averted. I finally realized the cosine Excel and Autolisp are reporting are both based on RADIANS. I've worked with Autolisp long enough that I should have remembered that.



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.

Message 45 of 106
HorizontalCurveGuy
in reply to: doni49

No problem. I have a jerky knee too.

 

We have different values. Mine correspond to the civil3d alignment solution.

 

Where di you get you values? I opened alans file, as is in meters

 

figureForCosine.png

Message 46 of 106
doni49
in reply to: HorizontalCurveGuy

Now that HCG has kindly figured out what the formula would be, I've created a lisp routine to automate the task.  It prompts you for the existing arc and the line (you need to pick it near the end of the line that you want to hold as the tangent point).  It will use the forumula provided by HCG to figure out the radius of the new arc.

 

Having done all of that, it will draw a new circle tangent to the arc and the line (at the end point of the line).

 

CircTantoArcLineTest2.png

 

CircTantoArcLineTest3.pngCircTantoArcLineTest1.png

 

 

 

(defun dtr (d) ; Degrees to Radians
  (/ (* d pi) 180.0))(defun rtd (r) ; Radians to Degrees
  (/ (* r 180.0) pi))
(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 SideB(distance pt1 center))
  (setq ang (abs(- (angle pt1 center) (angle pt2 pt1) (dtr 90))))

  (setq newRad(/(- (* SideB SideB) (* rad rad)) (* 2 (+ (* SideB (cos ang)) rad))))

  (setq ptNew (polar pt1 (- (angle pt1 pt2) (dtr 90)) newRad))
  (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.

Message 47 of 106
AllenJessup
in reply to: AllenJessup

Hello everyone and thanks for all the effort that's been put in to this. I've been off since last Wednesday and am the only one in the Engineering office today. That may mean a very calm day of a very busy day. I've got some emails to catch up on and then I can start working with the posted answers. I'll let you know how that goes.

 

Thanks again.

 

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

Message 48 of 106

That formula gets me close. It would most likely be right on if I carried everything out a few more decimals.

 

Thank you!

 

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

Message 49 of 106

Close? Are you saying Euclid was only close? <G>

Its exact.

You do have to go out a few decimals and thats only do the the nature of the existing geometry. And it matches precisely to a C3d alignment solution
Message 50 of 106

I never new Euclid personally. When was he posting to the forum?

 

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

Message 51 of 106
AllenJessup
in reply to: doni49

Don,

 

I'm trying to use your lisp. When I try to load it I get the "error: malformed list on input" message. I'm working in C3D 2014 SP2. Any thought?

 

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

Message 52 of 106
doni49
in reply to: AllenJessup

Allen,

 

Did you try the lisp routine?  That will not require you to enter anything so there's no need to worry about "how far out" you go with decimals.

 

EDIT:  I posted this message when I read the messages on page 5 (I didn't even know there was a page 6).  Then I saw Allen's post above.

 

I ran the lisp routine in my file before posting it.  But I'll try again.

 

I'm using 2014 SP2 here as well.



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.

Message 53 of 106

Trust me, its correct. And I believe Doni's lisp is using the formula.

 

16.268449m

 

Point of tangency coordinate accurate to 5 decimal places.

 

Message 54 of 106
doni49
in reply to: HorizontalCurveGuy


@HorizontalCurveGuy wrote:

Trust me, its correct. And I believe Doni's lisp is using the formula.

 

16.268449m

 

 


Yes.  It does.

 

Allen,

 

Did you get the code from this post?  Just to be sure, I even copy/pasted from the post into notepad, saved it and loaded the resulting file (as opposed to using the lisp file I had before posting).

 

http://forums.autodesk.com/t5/autocad-civil-3d-general/arc-tangent-to-line-and-arc/m-p/5377711/highl...



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.

Message 55 of 106
doni49
in reply to: AllenJessup


@AllenJessup wrote:

Don,

 

I'm trying to use your lisp. When I try to load it I get the "error: malformed list on input" message. I'm working in C3D 2014 SP2. Any thought?

 

Allen


I've been thinking about this some more.  A malformed list would indicate that there's a missing parenthesis.  Are you sure you copied everything that was in the code box?

Try downloading the attached file and then use that.

 

 



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.

Message 56 of 106
AllenJessup
in reply to: doni49

My mistake. I missed the closing parenthesis in the copy pate.

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

Message 57 of 106
AllenJessup
in reply to: doni49

OK. The Lisp comes out with the same answer as the formula,16.4048. However I'm still missing tangency to the arc by 0.05783658m. The tangency on the line is perfect. I'm going to start a gain and see if I can figure why I'm seeing that.

 

For some reason I've been having trouble with arcs in this drawing. I have a SR open with Autodesk regarding fillet results that don't quite fit.

 

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

Message 58 of 106
Neilw_05
in reply to: AllenJessup

You can use parametric constraints to create a precise graphical solution and then use the graphics to check the LISP 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
Message 59 of 106
doni49
in reply to: AllenJessup

That's really odd.  I'm going to attach the file I used for testing.  You know how sometimes when you zoom in, two shapes that DO intersect look like they don't?  Well I did that at the intersection of my circle and the original red arc line.  I was zoomed in so close that the distance "between them" was 0.000005" -- but yet acad still shows they intersect.

 

The red line and arc are what I started with and the white circle is what the lisp routine created.



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.

Message 60 of 106
AllenJessup
in reply to: AllenJessup

If I start from scratch with a copy of the original line and arc. The lisp works fine and has the same result. You just have to watch out because it's not immediately obvious that the original arc has to be extended to the tangent point.

 

In my posted drawing I found that the yellow line had been moved away from the end of the red line by 0.01. When I use the lisp it grabs the endpoint of the yellow line and has troubles. The problem was the entities.

 

This now verifies the solution in 2 ways.

 

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report