Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Computer Aided Design - CAD > IntelliCAD software > Re: Help me out...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 8 Topic 300 of 366
Post > Topic >>

Re: Help me out on CADMAX Please

by F. George McDuffee <gmcduffee@[EMAIL PROTECTED] > Sep 14, 2006 at 01:48 PM

On Thu, 14 Sep 2006 10:04:30 GMT, "jg" <jg@[EMAIL PROTECTED]
> wrote:

>Ah you're not designing it, just drawing it in 3d. In a 2d drawing it
would 
>normally be just 2 lines representing the outer and root diameters but
you 
>can't really get away with that in 3d. I only know the traditional way of

>developing a helix - divide the diameter into 12 parts and project the 
>corners of the pie to intersect with lines on equal divisions along the 
>shank.
>
>"LS" <lasithasenadheera@[EMAIL PROTECTED]
> wrote in message 
>news:W%3Og.1560$7I1.830@[EMAIL PROTECTED]
>> Thanks for replying. My thread type is ANSI 1/4"-28 and I want to know
how 
>> to put threads on a rounded surface. You can see similar design at
bottom 
>> (gland nut) of following drawing.
>>
http://www.cadmax.com/gallery/_search.cfm?GalleryID=5&StartRow=1&MaxRows=15&Product=
>> If you know specific steps to get there, that would be great.
>> I really appreciate your comments.
>>
>> Lasitha
>>
>> LS wrote:
>>> I intend to design a stud as a part of my drawing. I have no idea how
to 
>>> do it. Please help me and tell me how to design a stud, for an
example, 
>>> with 1/4"-28 threads.
>>>
>>> Thank you very much.
>>>
>>> Lasitha 
>
==============
You want an add-in program to generate the helix.  Actually it
won't be a true smooth helix but a short line approximation of a
true helix.

Most versions of AutoCad and the clones have hooks for both stand
alone programming languages such as BASIC and C and built-in LISP
interpreters.

I did not write the following programs.

========= 3-d helix =========
(defun c:helix (/ revs divs cen rad rinc sta ht hinc revcnt r
x y a z)
;
; ****tion to creat a 3d spiral
; in the form of a 3dpoly (a zero-width wire spring)
;
(graphscr)
(setq revs(getreal"\nnumber of revolutions? ")
divs(getint"\nnumber of divisions per revolution? ")
cen(getpoint"\ncenter of bottom loop? ")
rad(getdist"\nbeginning radius? ")
rinc(getdist"\nradius increment? ")
sta(getangle"\nstarting angle? ")
ht(getdist"\nbeginning height between loops? ")
hinc(getdist"\nheight increment? ")
sta (/(* sta pi)180.0) a sta z (caddr cen) r 0 revcnt 0)
(command "3dpoly")
(while(< r revs)
(setq x(+(car cen)(* rad(cos a)))
y(+(cadr cen)(* rad(sin a))))
(command (list x y z))
(setq a(+ a(/(* 2.0 pi)divs))
z(+ Z(/ ht divs))
r(+ r(/ 1.0 divs))
revcnt(1+ revcnt)
rad(+ rad(/ rinc divs)))
(if(equal revcnt divs)
(setq ht(+ ht hinc) revcnt 0))
)
(command "")
)
===================================
============ 2-d helix or spiral ===========
;
;       Display spiral
;
;       Designed and implemented by Kelvin R. Throop on 1985
January 85
;
;       (cspiral <# rotations> <base point> <growth per rotation>
;                <points per circle>)
;
(defun cspiral (ntimes bpoint cfac lppass / ang dist tp ainc dinc
circle bs cs)
        (setq cs (getvar "cmdecho"))
        (setq bs (getvar "blipmode"))
        (setvar "blipmode" 0)
        (setvar "cmdecho" 0)
        (setq circle (* 3.141596235 2))
        (setq ainc (/ circle lppass))
        (setq dinc (/ cfac lppass))
        (setq ang 0.0)
        (setq dist 0.0)
        (command "pline" bpoint)
        (repeat ntimes
           (repeat lppass
              (setq tp (polar bpoint (setq ang (+ ang ainc))
                          (setq dist (+ dist dinc))))
              (command tp)
           )
        )
        (command)
        (setvar "blipmode" bs)
        (setvar "cmdecho" cs)
        nil
)
;
;       Interactive spiral generation
;
(defun C:SPIRAL ( / nt bp cf lp)
        (prompt "\nCentre point: ")
        (setq bp (getpoint))
        (prompt "\nNumber of rotations: ")
        (setq nt (getint))
        (prompt "\nGrowth per rotation: ")
        (setq cf (getdist bp))
        (prompt "\nPoints per rotation: ")
        (setq lp (getint))
        (cond ((null lp) (setq lp 30)))
        (cspiral nt bp cf lp)
)
=================================
For more details see you program do***entation.

(1) cut and paste the above programs into seperate text files
with the extension .lsp  using a text only ASCII editor like
notepad that does not add formatting or extra non-printing
characters.

(2) at your cad program command prompt type >load filename [with
drive and path as required]<

(3) to start the program you will need to  type in the name of
the function, in this case <helix> or <cspiral> at your cad
system command prompt *NOT* the name of the file you created from
step (1) and that you loaded the program with.

FWIW -- This is controlled by the line < defun c:helix (/ revs
divs cen rad rinc sta ht hinc revcnt r x y a z) > so you can
change the name after the c: if you want/need to.  If you load
two LISP programs with the same c: name the last one will
overwrite the first, even if the file names are different.

Good luck on your project.  LISP and other program add-ins can
greatly expand the functionality and productivity of the basic
cad program.  Google on <LISP OR lsp Autocad download> for an
enormous number of free and share ware add-ins.

Please let the group know if you found this helpful, and the
grade you get.



Unka George (George McDuffee)
......................................................................
The arbitrary rule of a just and enlightened prince is always bad. 
His virtues are the most dangerous and the surest form of seduction: 
they lull a people imperceptibly into the habit of loving, respecting, 
and serving his successor, whoever that successor may be, 
no matter how wicked or stupid.

Denis Did***** (1713-84), French philosopher. 
Refutation of Helvétius (written 1773-76; 
first published 1875; repr. in Selected Writings, 
ed. by Lester G. Crocker, 1966).
 




 8 Posts in Topic:
Help me out on CADMAXPlease
LS <lasithasenadheera@  2006-09-13 14:08:31 
Re: Help me out on CADMAXPlease
"jg" <jg@[EM  2006-09-13 20:44:46 
Re: Help me out on CADMAX Please
LS <lasithasenadheera@  2006-09-14 03:28:54 
Re: Help me out on CADMAX Please
"jg" <jg@[EM  2006-09-14 10:04:30 
Re: Help me out on CADMAX Please
F. George McDuffee <gm  2006-09-14 13:48:55 
Re: Help me out on CADMAX Please
Cliff <Clhuprich@[EMAI  2006-09-14 16:13:48 
Re: Help me out on CADMAX Please
F. George McDuffee <gm  2006-09-14 15:44:53 
Re: Help me out on CADMAXPlease
LS <lasithasenadheera@  2006-09-15 13:10:32 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 11:03:40 CST 2008.