Jump to content

Recommended Posts

Posted

Does anyone have a lisp routine that can create a polyline from a given area & one given x or y distance? We have a list of room areas that we must have the exact SF & fit several of these rooms into an existing floor plan. It is very tedious to change a vertex to get the SF.

Posted

Have you tried using parametric feature? You should be able to do it, but you need to be good in math 8)

Posted (edited)

I created this code for regular polygons. Please don't laugh... this is my 2nd AutoLISP code :D

 

; This LISP will create regular polygon by defining polygon area and number of sides
; Created by Edwin Prakoso
; Website: http://cad-notes.com

(defun c:polyarea (/ n a apt)
 (setq n (getint "\nNumber of Polygon Sides: "))
 (setq a (getreal "\nExpected Area: "))
 (setq apt (sqrt (/ (/ a (/ (sin(/ pi n)) (cos(/ pi n)))) n))) ;calculating apothem for circumscribed polygon
 (setq ptloc (getpoint "\nPick Location: "))
 (command "_POLYGON" n ptloc "C" apt) 
)

Edited by edwinprakoso

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