Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Curved line length

Status
Not open for further replies.

cphi

Geotechnical
Aug 21, 2003
31
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.
 
Replies continue below

Recommended for you

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)
)
 
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, [URL unfurl="true"]http://www.cadstudio.cz[/URL]

(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
 
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
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor