Draw a specific perimeter

John said:
Using R-14, how do I draw a circle or a rectangle with an exact perimeter?

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

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

BruceF

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
 
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.

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
 
"John Callaway" wrote:

On Sun, 22 Mar 2009 04:28:24 GMT, BruceF wrote:

>John Callaway wrote:
>> Using R-14, how do I draw a circle or a rectangle with an exact
>> perimeter?
>
>Press F1 for HELP and read about it.... See Circle or Rectang.
>
>BruceF

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 ...
It's actually very easy with the properties window (all AutoCAD ca. R. 2000 and higher) once you accept that there's no need for the circle etc. to begin just right - you change it. Draw a circle with any convenient diameter first. Then, pick and look for "circumference" in the list of properties. Go to that line and type in the circumference you want, then hit enter. The circle changes immediately to that circumference. Same issue for other properties. Sure, you have to draw something different first, but irrelevant since it can be changed immediately.

For rectangles, REM there is an infinite set of different combinations having a given perimeter, so use the suggestions in this thread about precalculation and specification from a given side.

Even better about the properties window, you can pick all the circles in a region or the whole drawing and make them all a certain diameter, or color, or combinations etc. It's a very powerful command. AutoLisp or Diesel routines add even more power.
 
It's actually very easy with the properties window (all AutoCAD ca. R. 2000 and higher) once you accept that there's no need for the circle etc. to begin just right - you change it. Draw a circle with any convenient diameter first. Then, pick and look for "circumference" in the list of properties. Go to that line and type in the circumference you want, then hit enter. The circle changes immediately to that circumference. Same issue for other properties. Sure, you have to draw something different first, but irrelevant since it can be changed immediately.

For rectangles, REM there is an infinite set of different combinations having a given perimeter, so use the suggestions in this thread about precalculation and specification from a given side.

Even better about the properties window, you can pick all the circles in a region or the whole drawing and make them all a certain diameter, or color, or combinations etc. It's a very powerful command. AutoLisp or Diesel routines add even more power.

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
 
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?

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
 
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
 
Thanks Bruce, it works great! Is seems to default to inch settings. Is
it possible to add a line to allow for foot settings?

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
 
Works great!! Thanks again.
JPC
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
 
John Callaway said:
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

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
 
John Callaway wrote:
On Thu, 26 Mar 2009 00:25:38 GMT, BruceF wrote:

Works great!! Thanks again.
JPC

>> Thanks Bruce, it works great! Is seems to default to inch settings. Is
>> it possible to add a line to allow for foot settings?
> Ah! Silly me...
>
> Make this simple change:
>
>>> ; Get Circumference
...

Subject: LinuxCAD 2009 www.LinuxCAD.com Overwhels by new features.

Truly industrial quality Computer Aided Design program now.

Produce drawings with better quality and license cost savings.

Evereything is there.

Draw, Edit, 2D, 3D, Shading, export import, multitasking full use of todays fast PC-s.

Trust me whatever industry mechanical,archgitectural or electric/electronic, you'll get your work done with LinuxCAD.

LinuxCAD finally has done it, or shall I say I have done it.

Boris Tkachenko

see for yourself: www.LinuxCAD.com

And dont you try to call it spam, this is not some sort of madoff or wall street to you, this is typed with my own hands using my real identity.

Thank you.
 

Latest threads

Back
Top