arc length

Discussion in 'AutoCAD' started by shaw.n, Jul 1, 2004.

  1. shaw.n

    shaw.n Guest

    is there anything available that i can choose an arc length?
    i need to be able to select 2 points, then select an arc length and the arc be placed between the 2 points at my specified length......
     
    shaw.n, Jul 1, 2004
    #1
  2. This was discussed a few months ago (you should be able to find it on the
    web newsgroup site). As I recall, there were some ways to get close, but no
    way to do it with precision.

    Kent Cooper, AIA


    arc be placed between the 2 points at my specified length......
     
    Kent Cooper, AIA, Jul 1, 2004
    #2
  3. shaw.n

    BillZ Guest

    Kent is correct,
    Here is a program that I experimented with.
    As the angle nears 0 the accuracy suffers.
    Maybe it will work for what you want.

    ;03/09/04 Bill Zondlo
    ;program to get chord and arc length
    ;then figure included angle, radius and center point.
    ;
    (defun c:arc_2p (/ ctr d h k pt1 pt2 rad s theta x)
    (initget 1)
    (setq pt1 (getpoint "\nFirst point:") ;first arc point.
    )
    (initget 1)
    (setq pt2 (getpoint pt1 "\nSecond point:") ;end of arc point (chord).
    )
    (prompt (strcat "\n Length of Chord: < " (rtos (distance pt1 pt2) 2 4) " > ")) ;screen prompt
    (initget 7)
    (setq s (getdist "\nEnter Length of Arc: < inches >") ;
    )
    (setq chord (distance pt1 pt2)
    k (/ chord s)
    y (- 1.0 k)
    x (- 24.0 (* 24.0 k))
    )
    (cond ((> s chord)
    ;---;
    (repeat 8
    (if (not (equal x 0.0 1e-5))
    (setq x (- x (/ (- (sin x)(* k x))(- (cos x) k))) ;Newton's Method - if arc lengths are not close to chord length.
    )
    )
    ) ;end repeat.
    ;---;
    (if (or (minusp x) ;if arc length is close to chord length.
    (equal x 0.0 1e-5))
    (setq x (sqrt (* (* 6.0 y)(+ 1 ;accuracy suffers on arc lengths that are very
    (/ (* 3.0 y) 20.0) ;much longer than the chord or that are very
    (/ (* 321.0 (* y 2.0)) 5600.0) ;close to chord length.
    (/ (* 3197.0 (* y 3.0)) 112000.0)
    (/ (* 445617.0 (* y 4.0)) 27596800.0)
    (/ (* 1766784699.0 (* y 5.0)) 179379200000.0)
    )
    )
    )
    ) ;end setq
    ) ;end minusp if
    ;---;
    (setq theta (* x 2.0)
    rad (/ s theta)
    d (* rad (cos x)) ;center to chord distance.
    h (- rad d) ;bulge distance (if needed).
    ctr (polar pt1 (+ (angle pt1 pt2)(atan d (* (distance pt1 pt2) 0.5))) rad)
    )
    (entmake (list (cons 0 "ARC")(cons 8 "0")(cons 10 ctr)(cons 40 rad)(cons 50 (angle ctr pt1))(cons 51 (angle ctr pt2))))
    )
    ((<= s chord)
    (prompt "\nArc length is shorter or equal to chord.")
    )
    ) ;end cond.
    (princ)
    )

    HTH

    Bill
     
    BillZ, Jul 1, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.