Jump to content

LISP Code for Rectangle With Radiused Corners


Recommended Posts

Posted (edited)

I'm looking for a method using VLISP to draw a rectangle with radiused corners, all for of them. I can do a standard rectangle no problem but we have a need to have the corners radiused. Picking the location with GETPOINT is also no trouble. If I recall there is a way to do this using VLISP. The code will contain a few variables for the height and width and the location. But how does one get the corners to radius. Or would drawings a polyline be a better method?

 

Okay, a little testing and I think I have it. Will report back once I'm at a computer where one can do LISP coding without interference.

 

 

Edited by Bill Tillman
Posted
  1. Rectangle p1 p2
  2. ask for fillet radius
  3. fillet command with polyline option
  4. profit ??
  • Like 2
Posted

The RECTANG command is already have fillet option within so you need to specify it only once then draw the rectangle required.

  • Like 5
Posted

Command: RECTANG

Specify first corner point or [Chamfer/Elevation/Fillet/Thickness/Width]: f
Specify fillet radius for rectangles <10.0000>:
Specify first corner point or [Chamfer/Elevation/Fillet/Thickness/Width]:
Specify other corner point or [Area/Dimensions/Rotation]:

Posted

image.png.64a7be3f1deecb736f0bf47ca1bad12c.png

(if (not AH:getvalsm)(load "Multi Getvals.lsp"))
(setq ans (AH:getvalsm (list "Enter values " "Length " 5 4 "20" "Height " 5 4 "5" "Radius " 5 4 "2" )))
(setq len (atof (car ans)) ht (atof (cadr ans)) rad (atof (caddr ans)))

Bill pretty sure you have a copy of multi getvals.lsp

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...