Jump to content

Is there a script to draw truncated cone template?


vanowm

Recommended Posts

I'm looking for a script that would create a template (flat drawing) for a truncated cone, from 3 inputs: top/bottom diameter and height, like this:

http://www.hampsonlife.com/conecalculator.php?dT=10&dB=40&h=25&form1=Calculate

 

I've created a javascript that generates .dxf file, it works fine, but before I waste my time convert it into lisp, I was wondering if there is already such script available? My search didn't produce any results.

 

Thank you.

Link to comment
Share on other sites

Updated the lisp to create 1 closed polyline.

(cond
  ((and (> r1 0) (> r2 0))
    (setvar 'cmdecho 0)
    (command "_.pline" "_non" p1 "_A" "_S" "_non" p2 "_non" p3)
    (command "_L" "_non" p6 "_A" "_S" p5 "_non" P4 "_L" "_CL")
    (setvar 'cmdecho 1)
  )
  (t
    (setvar 'cmdecho 0)
    (command "_.pline" "_non" p1 "_A" "_S" "_non" p2 "_non" p3)
    (command "_L" "_non" ip "_CL")
    (setvar 'cmdecho 1)
  )
)

 

Edited by mhupp
Combin a line
  • Like 1
Link to comment
Share on other sites

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