How to find the tangent line of a specific point on an arc?

How to find the tangent line of a specific point on an arc?

Anonymous
Not applicable
5,180 Views
8 Replies
Message 1 of 9

How to find the tangent line of a specific point on an arc?

Anonymous
Not applicable

How to find the tangent line of a specific point on an arc?

0 Likes
5,181 Views
8 Replies
Replies (8)
Message 2 of 9

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> How to find the tangent line of a specific point on an arc?

It's 90° rotated based on the connection between the arc-center your your "point on arc"

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 3 of 9

rkmcswain
Mentor
Mentor

Here is one way.

0 Likes
Message 4 of 9

Kent1Cooper
Consultant
Consultant

You can use AlignSnapAng.lsp, available here, to set the Snap angle to the tangent direction, and draw something like a Line with Ortho turned on.

 

EDIT:  Or, load up this little function I just made [I have it as a file called TanFrom.lsp, an alteration of PerFrom.lsp for the same kind of thing but perpendicular]:

 

(defun tf (/ ent)
  (strcat
    "<"
    (angtos
      (angle
        '(0 0 0)
        (vlax-curve-getFirstDeriv
          (setq ent (car (nentselp (getvar 'lastpoint)))); entity
          (vlax-curve-getParamAtPoint
            ent
            (osnap (getvar 'lastpoint) "_nea")
          ); ...Param
        ); ...FirstDeriv
      ); angle
      (getvar 'aunits) 8
    ); angtos
  ); strcat
); defun
(vl-load-com)

Then start a Line [or Polyline or locate a Copy or Move base point, etc.] at whatever point, and type (tf) [including the parentheses], and it will lock the Line's direction to the tangent direction from the curve [or parallel to a straight thing] at that point.

 

Kent Cooper, AIA
Message 5 of 9

GrantsPirate
Mentor
Mentor

Rotate and move UCS, draw line.


GrantsPirate
Piping and Mech. Designer
EXPERT ELITE MEMBER
Always save a copy of the drawing before trying anything suggested here.
----------------------------------------------------------------------------
If something I wrote can be interpreted two ways, and one of the ways makes you sad or angry, I meant the other one.

0 Likes
Message 6 of 9

GrantsPirate
Mentor
Mentor

Kent - I tried your lisp but it errors out with

; error: bad argument type: numberp: nil


GrantsPirate
Piping and Mech. Designer
EXPERT ELITE MEMBER
Always save a copy of the drawing before trying anything suggested here.
----------------------------------------------------------------------------
If something I wrote can be interpreted two ways, and one of the ways makes you sad or angry, I meant the other one.

0 Likes
Message 7 of 9

Kent1Cooper
Consultant
Consultant

@GrantsPirate wrote:

Kent - I tried your lisp but it errors out with

; error: bad argument type: numberp: nil


Works for me [AutoCAD 2016, on two different computers], drawing Lines starting on Arcs, Circles, Polyline arc segments, even Polyline line segments and Lines, and in Move displacement.

 

The only "number" values are (getvar 'aunits) [I don't think it's possible for that to be nil], the 8 [clearly not], and the Parameter  at the nearest point on the object, which seems like the only thing that could be causing that error.  I can't think of how you could be getting a nil return on that -- I tried picking a Line start point too far from a curve to Osnap to, and I got an error, but not that one.  Are you actually starting something at a location along a path object first, and then  typing in the (tf), the way it's built to work?

 

A shortcoming, though a different issue:  It works for the start  of something, but [for example] in the middle  of a Line command drawing more than one in series, if I have a Line ending  on an Arc [or whatever] and type in (tf) for the next Line, it uses the previous piece of Line rather than the Arc for the direction.

Kent Cooper, AIA
0 Likes
Message 8 of 9

Bob_Zurunkle
Advisor
Advisor

Couldn't one draw a line from the center of the arc to the point in question on said arc....and then rotate that line 90 degrees at the intersection?

If by some odd chance my nattering was useful -- that's great, glad to help. But if it actually solved your issue, then please mark my solution as accepted 🙂
Message 9 of 9

Kent1Cooper
Consultant
Consultant

@Bob_Zurunkle wrote:

Couldn't one draw a line from the center of the arc to the point in question on said arc....and then rotate that line 90 degrees at the intersection?


That was @Alfred.NESWADBA's suggestion in Post 2, and is the basis for @rkmcswain's illustration in Post 3.  By comparison, for the start of something, my (tf) function locks directly into the tangent direction in drawing it in the first place, without the need to draw something and then change it [nor to alter the UCS as in @GrantsPirate's suggestion].  BUT the OP didn't say anything about what they want to do  with the information once they "find the tangent line" [a somewhat ambiguous wording] -- any of the suggestions so far, or none, could be the best for what they need.  They may not even need to draw  anything using it, but simply to report the angle, or use it in a calculation for something else, etc.  @Anonymous, can you elaborate?

Kent Cooper, AIA
0 Likes