Draw a specific perimeter

Discussion in 'AutoCAD' started by John Callaway, Mar 22, 2009.

  1. Using R-14, how do I draw a circle or a rectangle with an exact
    perimeter?

    JPC
     
    John Callaway, Mar 22, 2009
    #1
  2. John Callaway

    BruceF Guest

    Press F1 for HELP and read about it.... See Circle or Rectang.

    BruceF
     
    BruceF, Mar 22, 2009
    #2
  3. I realize you can get the circumference/perimeter after you draw with
    the area command, however I did not see anything in the help dialog
    that tells you how to create a circle/rectangle with a specific
    circumference or perimeter. Any further help is appreciated.

    JPC
     
    John Callaway, Mar 22, 2009
    #3
  4. John Callaway

    BruceF Guest

    Okay... If I understand you correctly then you need to use Absolute
    Coordinates then...

    For an Rectangle, say you want one that is 50 units long X 75 units High..

    You enter your RECTANG command... Pick the First Point... then type in
    the following:
    @50,75
    (the press the Return key)

    This @ X, Y works also for things such as lines, plines, etc.

    As to a Circle circumference, I don't think AutoCAD has that built into
    it. You'll need to do some simple Math to figure this out...

    The circumference of a circle can be found by multiplying pi (which is
    equal to 3.14) by the diameter of the circle.

    So if a circle has a diameter of 4, its circumference is 3.14*4 = 12.56

    If you know the radius, the diameter is twice as large.

    So work what your Diameter is to be for a given circumference.

    BruceF
     
    BruceF, Mar 23, 2009
    #4
  5. Since I am using R-14 and changing the circumference in the properties
    list won't work can you point me to a lisp routine that I can run?

    JPC
     
    John Callaway, Mar 25, 2009
    #5
  6. John Callaway

    BruceF Guest

    Since I am using R-14 and changing the circumference in the properties
    I quickly wrote this up... cut and paste it into a plain Text file and
    rename it to:
    CircC.lsp


    ; Draw a Circle with a Given Circumference
    (defun C:CircC ( / pt1 pt2 pt3 cclcirc ccldia)

    ; pi = 3.14159265
    ; Math Formula is:
    ; Circle Diameter X pi = Circumference

    ; Get Circumference
    (setq cclcirc (getreal "\nEnter Circle Circumference: "))

    ; Get Circle Diameter... then divide by 2 to get Radius
    (setq cclDia (/ (/ cclcirc 2) pi))

    ; Pick Circle Center Point
    (setq pt1 (getpoint "\nPick Circle Center Start Point: "))

    ; Calculate 2nd Point for Circle Command
    (setq pt2 (polar pt1 (+ 1 (/ pi 2.0)) ccldia))
    (setq pt3 (polar pt1 (- 1 (/ pi 2.0)) ccldia))

    ; Draw Circle
    (command "_circle" "2p" pt2 pt3)

    ) ;defun



    IF you want to, you can rename the Lisp File to what ever you want to of
    course (I usually keep the command line and lisp file the same). You
    can also change the command to fire this up by changing the 'CircC' that
    is in the line:
    (defun C:CircC ( / pt1 pt2 pt3 cclcirc ccldia)

    You MUST keep the prefix '(defun C:' in place.

    BruceF
     
    BruceF, Mar 25, 2009
    #6
  7. Thanks Bruce, it works great! Is seems to default to inch settings. Is
    it possible to add a line to allow for foot settings?

    JPC
     
    John Callaway, Mar 25, 2009
    #7
  8. John Callaway

    BruceF Guest

    Thanks Bruce, it works great! Is seems to default to inch settings. Is
    Ah! Silly me...

    Make this simple change:

    Change the word getreal to getdist. Then you can now enter Feet, Feet +
    Inches, or Inches.

    GetReal is asking for a REAL number... GetDist is asking for a Distance
    (which is what you want). So any valid Distance entry should work.

    Regards,

    BruceF
     
    BruceF, Mar 26, 2009
    #8
  9. Works great!! Thanks again.
    JPC
     
    John Callaway, Mar 26, 2009
    #9
  10. John Callaway

    Guest Guest

    for a circle

    ( / perimeter 6.283185307195864)

    say the perimeter is 0.1

    enter this for the circle radius.

    The zero to the left of the dicimal point is required.

    someone here could probably show you how to write an AutoLisp macro.

    ( / 0.1 6.283185307195864)

    Bob
     
    Guest, Apr 4, 2009
    #10
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.