Draw ARC to length?

Discussion in 'AutoCAD' started by Holly, Oct 20, 2004.

  1. Holly

    Holly Guest

    Hi all,
    Has anyone got a routine they don't mind sharing to draw an ARC to specified length using START, CENTRE, RADIUS and LENGTH?

    Why: I need to draw an arc of a specific length, from a given start point, with the length of arc being drawn about a given centre point.

    Thanks in advance,
    HOLLY x

    VanAcad2004, Win2000NT
     
    Holly, Oct 20, 2004
    #1
  2. Holly

    Ian A. White Guest

    Draw the arc at the correct radius and then use the LENGTHEN command to
    set its length.
     
    Ian A. White, Oct 20, 2004
    #2
  3. Maybe this screen-menu item will get you started. It's not based on the
    center point, but rather start point, starting direction, radius and length,
    with choice of which direction it's curving. for use in property boundary
    layouts which often have curves as tangent continuations of preceding lines.
    (But the tangent continuation direction is only the default -- you can give
    it a different direction.) At least it shows a way of calculating the angle
    based on the radius and length along the curve, so maybe you can take it
    from there.

    The (L) in the heading means it's using the "Length" along the arc.

    [There's more to it that I left out, about writing in the property-boundary
    type metes and bounds text, if you want that.]

    Add Layer controls, etc., as desired. Watch for word wrap.

    [-->Draw ARC (L)]^C^C^P(if (< (getvar "OSMODE") 16384) (setvar "OSMODE" (+
    (getvar "OSMODE") 16384))) +
    (setq angu (getvar "AUNITS")) (setvar "AUNITS" 3) +
    (setq pt1 (getpoint "Starting Point <end of previous>: ")) \(if (= pt1 nil)
    (setq pt1 (getvar "LASTPOINT"))) +
    (setq arcrad (getdist pt1 "Radius: ")) \(setq dir (getangle pt1 "Starting
    Direction <tangent continuation>: ")) \+
    (if (= dir nil) (setq dir (getvar "LASTANGLE"))) (setq length (getdist
    "Distance Along Curve: ")) \+
    (setq curve (strcase (getstring "Curving Left (CCW) or Right (CW) (L/R)?
    <L>: "))) \(setq sweep (/ length arcrad) offset (/ pi 2)) +
    (if (= curve "R") (setq sweep (- sweep) offset (- offset) angl 50) (setq
    angl 51)) (setq dir2 (+ dir offset) arcctr (polar pt1 dir2 arcrad)) +
    (command "ARC" pt1 "C" arcctr "A" sweep)
     
    Kent Cooper, AIA, Oct 20, 2004
    #3
  4. Holly

    Holly Guest

    Not my code but works perfectly, if anyone still interested.
    Type ARCLEN at command line.

    HOLLY x

    ;;;---------------------------------------------------
    (defun c:arclen (/ omnu pt1 pt2 d1 d2 a1 a2)
    (setq omnu (getvar "MENUECHO"))
    (while (not (setq pt1 (getpoint "\nStart point: ")))
    (princ "\nNo start point selected... ")
    )
    (while (not (setq pt2 (getpoint pt1 "\nCenter: ")))
    (princ "\nNo center point selected... ")
    )
    (setq d1 (distance pt1 pt2)
    d2 (* d1 2 pi))
    (while (or (>= a2 360) (= a2 nil))
    (initget 7)
    (setq a1 (getreal "\nArc length: ")
    a2 (/ (* 180 a1) (* pi d1)))
    (if (>= a2 360) (princ (strcat "\n*Invalid*\nArc length must
    be less than "
    (rtos d2))))
    )
    (setvar "MENUECHO" 2)
    (command "ARC" pt1 "C" pt2 "A" a2)
    (setvar "MENUECHO" omnu)
    (princ)
    )
    ;;;---------------------------------------------------
     
    Holly, Oct 21, 2004
    #4
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.