Various bolt drawings
Various bolt drawings
(OP)
Hi
Does anyone know of any good sites that have various bolt drawings or is there a lisp routine out there somewhere.
Thanks for your help in advance.
Taffcad
Does anyone know of any good sites that have various bolt drawings or is there a lisp routine out there somewhere.
Thanks for your help in advance.
Taffcad





RE: Various bolt drawings
Chris
SolidWorks 06 5.1/PDMWorks 06
AutoCAD 06
ctopher's home (updated 01-18-07)
RE: Various bolt drawings
bolts or threads, i.e. not spiral threads. That worked for us but cannot share it as it is incorporated in a very large program. We did have to enter the length of the thread or screw length. Metric threads were a pain however as you could not simply use ratios for head diameters and head heights.
RE: Various bolt drawings
http://
RE: Various bolt drawings
RE: Various bolt drawings
;
(defun GETSIZE ()
(initget 1 "B N")
(setq HEX (getkword "\n<B>olt or <N>ut: "))
(if (= HEX "B")
(progn
(prompt "\n1/4 5/16 3/8 7/16 1/2 5/8 3/4 7/8")
(prompt "\n1.0 1.125 1.25 1.5 1.75 2.0 2.25")
(setq SIZE (getstring "\nNominal Size of Hex Bolt: "))
(BEGIN "D:/Acad/Lisp/HBOLT.DAT")
)
(progn
(prompt "\n1/4 5/16 3/8 7/16 1/2 9/16 3/4 7/8")
(prompt "\n1.0 1.125 1.25 1.375 1.5")
(setq SIZE (getstring "\nNominal Size of Hex Nut: "))
(BEGIN "D:/Acad/Lisp/HNUT.DAT")
)))
;
; start up routine
;
(defun BEGIN (DATA)
(setq MPT (getpoint "\Insertion Point: "))
(setq CK nil EN (entlast)
FILE (open DATA "r")
SL (strlen SIZE)
LINE (read-line FILE))
(while (and LINE (/= SIZE (substr LINE 1 SL)))
(setq LINE (read-line FILE)))
(close FILE)
(if (not (member LINE '(nil "")))
(if (= SIZE (substr LINE 1 SL))
(progn (GETDAT) (setq CK T)))
(prompt "\nRequested size not found!")
) (princ))
;
; get data from file
;
(defun GETDAT ()
(setq BN (substr LINE 11 10))
(STRBN)
(setq S1 (atof (substr LINE 21 10))
S2 (atof (substr LINE 31 10))
S3 (atof (substr LINE 41 10))
S4 (atof (substr LINE 51 10))
S5 (atof (substr LINE 61 10))))
;
; get block name
;
(defun STRBN ()
(setq LGTH 1 TSTR (strlen BN)
CH (substr BN LGTH 1))
(while (and (/= CH " ") (/= CH ""))
(setq LGTH (1+ LGTH) CH (substr BN LGTH 1)))
(setq BN (substr BN 1 (1- LGTH)))
(if (= VIEW "EL") (setq BN (strcat VIEW BN))))
;
; draw nut or bolt in plan view
;
(defun C:HBOLTP (/ CK SS1)
(V3)
(GETSIZE)
(if (= CK T) (progn
(if (= (tblsearch "block" BN) nil)
(progn
(command "insert" "HBOLTP" MPT S1 S1 0
"block" BN MPT (entlast) ""
"insert" BN MPT 1 1 0)
)
(command "insert" BN MPT 1 1 0)
)))
(setq ANS (getstring "\nAdd washer <Y>? "))
(if (or (= ANS "") (= ANS "Y") (= ANS "y")) (WASHP))
(setq MPT nil)
(V4))
;
; draw bolt in elevation view
;
(defun C:HBOLTE (/ CK SS1 HEX SIZE)
(V3)
(setq VIEW "EL")
(GETSIZE)
(if (= CK T) (progn
(setq ANG (getangle "\nRotation angle: ")
ANG (angtos ANG))
(if (= (tblsearch "block" BN) nil)
(progn
(setq G1 (/ S2 2.0)
G2 (/ S2 4.0)
G3 (/ S2 8.0)
PT1 (polar MPT pi G1)
PT2 (polar PT1 0 S2)
PT3 (polar (polar PT1 0 G3) (D90) S3)
PT4 (polar (polar PT2 pi G3) (D90) S3)
PT1A (polar PT1 (D90) 1.0)
PT3A (polar PT3 3.66519 1.0)
PT5 (inters PT1 PT1A PT3 PT3A nil)
PT6 (polar PT1 0 G2)
DIST (distance PT1 PT5)
DIFF (- S3 DIST)
PT7 (polar PT6 (D90) DIST)
PT8 (polar PT2 pi G2)
PT9 (polar PT8 (D90) DIST)
PT10 (polar PT2 (D90) DIST)
PT11 (polar PT1 (D90) DIFF)
PT11A (polar PT1 0 G3)
PT12 (polar PT6 (D90) DIFF)
PT13 (polar PT8 (D90) DIFF)
PT13A (polar PT8 0 G3)
PT14 (polar PT2 (D90) DIFF)
MPT1 (polar MPT (D90) S3)
)
(setq en (entlast))
(command "pline" PT10 "a" "s" PT4 PT9 "s" MPT1 PT7
"s" PT3 PT5 ""
"line" PT3 PT4 "")
(if (= HEX "B") (progn
(command "line" PT5 PT1 PT2 PT10 ""
"line" PT6 PT7 ""
"line" PT8 PT9 "" ))
(progn
(command "pline" PT11 "a" "s" PT11A PT12
"s" MPT PT13 "s" PT13A PT14 ""
"line" PT11A PT13A ""
"line" PT11 PT5 ""
"line" PT12 PT7 ""
"line" PT13 PT9 ""
"line" PT14 PT10 "")
))
(MKSET)
(command "block" BN MPT SS1 "")
(command "insert" BN MPT 1 1 ANG)
)
(command "insert" BN MPT 1 1 ANG)
)))
(setq ANS (getstring "\nAdd washer <Y>? "))
(if (or (= ANS "") (= ANS "Y") (= ANS "y")) (WASHE))
(setq MPT nil
VIEW nil)
(V4))
;
; draw washer in elevation view
;
(defun WASHE (/ CK SS1)
(V3)
(setq VIEW "EL")
(BEGIN "D:/Acad/Lisp/AWASHER.DAT")
(if (= CK T) (progn
(if (= (tblsearch "block" BN) nil)
(progn
(command "insert" "WASHEL" MPT S1 S2 0
"block" BN MPT (entlast) ""
"insert" BN MPT 1 1 ANG)
) (command "insert" BN MPT 1 1 ANG))))
(setq MPT nil VIEW nil)
(V4))
;
; draw washer in plan view
;
(defun WASHP (/ CK SS1)
(V3)
(BEGIN "D:/Acad/Lisp/AWASHER.DAT")
(if (= CK T) (progn
(if (= (tblsearch "block" BN) nil)
(progn
(command "circle" MPT "d" S1
"block" BN MPT (entlast) ""
"insert" BN MPT 1 1 0)
) (command "insert" BN MPT 1 1 0)
)))
(V4))
;
; select all entities
;
(defun MKSET ()
(setq SS1 (ssadd) EN1 (entnext EN))
(while EN
(setq SS1 (ssadd EN1 SS1)
EN1 (entnext EN)
EN EN1
)
)
)
(defun D90 () (* pi 0.5))
;
; defint V3
;
(defun V3 ()
(setq BM (getvar "blipmode"))
(setvar "blipmode" 0)
(setvar "cmdecho" 0)
(command "undo" "group")
)
(defun V4 (/ BA)
(setvar "blipmode" BM)
(command "undo" "end")
(prompt "\n")
(setq BA "Program completed . . . . .")
)
data files:
HNUT.DAT
Hex nuts
SIZE BN F G H
-----------------------------------------
1/4 1-4HN 0.438 0.505 0.226
5/16 5-16HN 0.500 0.577 0.273
3/8 3-8HN 0.562 0.650 0.337
7/16 7-16HN 0.688 0.794 0.385
1/2 1-2HN 0.750 0.866 0.448
9/16 9-16HN 0.875 1.010 0.496
5/8 5-8HN 0.938 1.083 0.559
3/4 3-4HN 1.125 1.299 0.665
7/8 7-8HN 1.312 1.516 0.776
1.0 1HN 1.500 1.732 0.887
1.125 1_1-8HN 1.688 1.949 0.999
1.25 1_1-4HN 1.875 2.165 1.094
1.375 1_3-8HN 2.062 2.382 1.206
1.5 1_1-2HN 2.250 2.598 1.317
HBOLT.DAT
Hex Bolts
Size BN F G H
-----------------------------------------
1/4 1-4HB 0.438 0.505 0.188
5/16 5-16HB 0.500 0.577 0.235
3/8 3-8HB 0.562 0.650 0.268
7/16 7-16HB 0.625 0.722 0.316
1/2 1-2HB 0.750 0.866 0.364
5/8 5-8HB 0.938 1.083 0.444
3/4 3-4HB 1.125 1.299 0.524
7/8 7-8HB 1.312 1.516 0.604
1.0 1HB 1.500 1.732 0.700
1.125 1_1-8HB 1.688 1.949 0.780
1.25 1_1-4HB 1.875 2.165 0.876
1.375 1_3-8HB 2.062 2.382 0.940
1.5 1_1-2HB 2.250 2.598 1.036
1.75 1_3-4HB 2.625 3.031 1.196
2.0 2HB 3.000 3.464 1.388
2.25 2_1-4HB 3.375 3.897 1.548
AWASHER.DAT
Type A plain washers
SIZE BN B C
-------------------------------
6 6AW 0.375 0.049
8 8AW 0.438 0.049
10 10AW 0.500 0.049
3/16 3-16AW 0.562 0.049
12 12AW 0.562 0.065
1/4 1-4AW 0.625 0.065
5/16 5-16AW 0.688 0.065
3/8 3-8AW 0.812 0.065
7/16 7-16AW 0.922 0.065
1/2 1-2AW 1.062 0.095
5/8 5-8AW 1.312 0.095
3/4 3-4AW 1.469 0.134
7/8 7-8AW 1.750 0.134
1.0 1AW 2.000 0.134
1.125 1_1-8AW 2.250 0.134
1.25 1_1-4AW 2.500 0.134
1.375 1_3-4AW 2.750 0.165
1.5 1_1-2AW 3.000 0.165
1.75 1_3-4AW 4.000 0.180
2.0 2AW 4.500 0.180
2.25 2_1-4AW 4.750 0.220