×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Curved line length

Curved line length

Curved line length

(OP)
How do I determine the length of a curved line? For instance, I need to determine the length along the curved line between two points on that line. I am using ACAD 2000 or 2004LT.  I am also not well educated in using AutoCAD.  Thanks for the help.

RE: Curved line length

You need to trim the arc at the points, then do List or Area.  If the arc is part of a polyline and the endpoints of the arc are on the polyline, List may give you the segment length.  Otherwise, you need a macro like this:
(DEFUN C:DV3 (/ p1 p2 p3 p4 x1 x2 x3 y1 y2 y3 adj dx dy opp om ang rad arc ark) ; Dimension END to END along an ark
 (SetVar "CMDECHO" 0)
 (Setq om (GetVar "OSMODE"))
 (COMMAND "Osnap" "END")
 (setq p1 (getpoint "\nSnap to first END: ")
       p2 (getpoint "\nSnap to second END: ")
 )
 (COMMAND "Osnap" "CEN")
 (setq p4 (getpoint "\nPick a point on the arc: "))
 (COMMAND "Osnap" "NON")
 (setq p3 (getpoint "\nPoint to dimension location: ")
       x1 (- (car p1) (car p4))
       y1 (- (cadr p1) (cadr p4))
       x2 (- (car p2) (car p4))
       y2 (- (cadr p2) (cadr p4))
       x3 ( / ( + x2 x1 ) 2.0000 )
       y3 ( / ( + y2 y1 ) 2.0000 )
       adj ( sqrt ( + ( * x3 x3 ) ( * y3 y3 )))
       dx ( - x3 x2 )
       dy ( - y3 y2 )
       opp ( sqrt ( + ( * dx dx ) ( * dy dy )))
       ang ( atan ( / opp adj ))
       rad ( getvar "Userr2")
       arc ( * rad ang 2.0000 )
       ark (rtos arc)
 )
 (COMMAND "DIM1" "ANG" "" P4 P1 P2 P3 ARK P3)
 (COMMAND "DIM1" "HOM" "L" "")
 (COMMAND "DIM1" "TE" "L" PAUSE)
 (SetVar "OSMODE" om)
 (SetVar "CMDECHO" 0)
 (princ)
)

RE: Curved line length

Here's a lisp routine to dimension the length of an arc. Can't be used in LT though.

CODE

;Arc dimension    (^v^) CAD Studio, http://www.cadstudio.cz

(defun C:DIMARC ( / pt1 pt2 cen a1 a2 D1 D2 p r oldOs)
 (setq oldOs (getvar "OSMODE"))
 (prompt "Pick 2 points on an arc - ")
 (setvar "OSMODE" 512)
 (while (not cen)
  (setq    pt1 (getpoint "1st pt: ")
    cen (osnap pt1 "_CEN")
  )
  (if (not cen) (alert "Doesn't lie on an arc, retry")
        (setq pt2 (getpoint cen " 2nd pt: ")))
 );while

 (setvar "OSMODE" 0)
 (setq a1 (angle cen pt1) a2 (angle cen pt2) ad (abs (- a2 a1))
    r (distance pt1 cen)
    D1 (* r ad)
    D2 (* r (- (* 2 pi) ad))
 )
 (prompt (strcat "\nArc length: " (rtos D1) ",   complementar arc: " (rtos D2)))

 (command "_DIMANGULAR" "" cen pt1 pt2 "_T" (rtos D1) pause)

 (setvar "OSMODE" oldOs)
 (prin1)
)

(princ "\nDIMARC command loaded.")
(princ)

____________________
Acad2005, Terramodel

RE: Curved line length

modify -> lengthen

select line or arc, reports length

experiment with command options

hope this helps

Intel P4 3.0 GHZ
512 DDRAM
Win 2000 Pro
Autocad 14, 2002 with EP 2.3.1

RE: Curved line length

If the line is continuous do a LIST command, pick the curve with the cursor and do a history check of that line. Length will be indicated.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources