Jump to content

3D bolt creation routine-test drivers required...


Recommended Posts

Posted

I've finally dipped my toe into the lisp pool and this is my first attemt :)

 

First off, I have had to post the code in two parts as there is a maximum 10000 character limit in posts, sorry about that.

 

The routine below should "drill" a clearace hole in two selected 3D plates up to a thickness of 70mm each. Then it should draw a 3D metric nut, bolt and washers, bolting the two plates together. Bolt sizes available are M4 to M30 (preferred sizes only).

 

To begin with, you will have to put a point on one of the faces to be drilled, in the position that you require the bolt hole.

 

Once loaded, type: mbolt on the command line, then follow the prompts.

 

All input for improvement or fixing errors would be gretly apreciated, however, please be aware that I am a complete novice when it comes to lisp and as such I'm still not familiar with all the commands, conventions or syntax.

 

Ok, here goes! :unsure:

  • Replies 24
  • Created
  • Last Reply

Top Posters In This Topic

  • Cerberus

    8

  • Bill Tillman

    4

  • stevsmith

    2

  • Lee Mac

    2

Top Posters In This Topic

Posted Images

Posted

Part 1:

 

;c:m4bolt drills hole in two pieces of steel and creates M4 bolt of appropriate length, nut and washers         ^c^c(if (not c:m4bolt)(load "dcbolt.fas"));m4bolt
;c:m5bolt drills hole in two pieces of steel and creates M5 bolt of appropriate length, nut and washers         ^c^c(if (not c:m5bolt)(load "dcbolt.fas"));m5bolt
;c:m6bolt drills hole in two pieces of steel and creates M6 bolt of appropriate length, nut and washers         ^c^c(if (not c:m6bolt)(load "dcbolt.fas"));m6bolt
;c:m8bolt drills hole in two pieces of steel and creates M8 bolt of appropriate length, nut and washers         ^c^c(if (not c:m8bolt)(load "dcbolt.fas"));m8bolt
;c:m10bolt drills hole in two pieces of steel and creates M10 bolt of appropriate length, nut and washers       ^c^c(if (not c:m10bolt)(load "dcbolt.fas"));m10bolt
;c:m12bolt drills hole in two pieces of steel and creates M12 bolt of appropriate length, nut and washers       ^c^c(if (not c:m12bolt)(load "dcbolt.fas"));m12bolt
;c:m16bolt drills hole in two pieces of steel and creates M16 bolt of appropriate length, nut and washers       ^c^c(if (not c:m16bolt)(load "dcbolt.fas"));m16bolt
;c:m20bolt drills hole in two pieces of steel and creates M20 bolt of appropriate length, nut and washers       ^c^c(if (not c:m20bolt)(load "dcbolt.fas"));m20bolt
;c:m24bolt drills hole in two pieces of steel and creates M24 bolt of appropriate length, nut and washers       ^c^c(if (not c:m24bolt)(load "dcbolt.fas"));m24bolt
;c:m30bolt drills hole in two pieces of steel and creates M30 bolt of appropriate length, nut and washers       ^c^c(if (not c:m30bolt)(load "dcbolt.fas"));m30bolt

(defun c:m4bolt ( / msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 (setq msize 4.00)	;metric bolt size
 (setq holedia 5.00)	;clearance hole dia
 (setq len1 -70.00)	;max depth of drilled hole
 (setq washerd 9.00)	;washer o/d
 (setq washert 0.80)	;washer thickness
 (setq boltaf 3.50)	;half dim across flats
 (setq boltthk 2.90)	;depth of bolt head
 (setq nutthk 3.00)	;depth of nut
 (setq ext1 5.00)	;min extension past nut face
 (setq boltend 0.25)	;sets chamfer on end of bolt
 (dcbolt msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 )

(defun c:m5bolt ( / msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 (setq msize 5.00)	;metric bolt size
 (setq holedia 6.00)	;clearance hole dia
 (setq len1 -70.00)	;max depth of drilled hole
 (setq washerd 10.00)	;washer o/d
 (setq washert 1.00)	;washer thickness
 (setq boltaf 4.00)	;half dim across flats
 (setq boltthk 3.60)	;depth of bolt head
 (setq nutthk 4.00)	;depth of nut
 (setq ext1 5.00)	;min extension past nut face
 (setq boltend 0.25)	;sets chamfer on end of bolt
 (dcbolt msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 )

(defun c:m6bolt ( / msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 (setq msize 6.00)	;metric bolt size
 (setq holedia 7.00)	;clearance hole dia
 (setq len1 -70.00)	;max depth of drilled hole
 (setq washerd 12.50)	;washer o/d
 (setq washert 1.6)	;washer thickness
 (setq boltaf 5.00)	;half dim across flats
 (setq boltthk 4.00)	;depth of bolt head
 (setq nutthk 5.00)	;depth of nut
 (setq ext1 5.00)	;min extension past nut face
 (setq boltend 0.50)	;sets chamfer on end of bolt
 (dcbolt msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 )

(defun c:m8bolt ( / msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 (setq msize 8.00)	;metric bolt size
 (setq holedia 10.00)	;clearance hole dia
 (setq len1 -70.00)	;max depth of drilled hole
 (setq washerd 17.00)	;washer o/d
 (setq washert 1.6)	;washer thickness
 (setq boltaf 6.50)	;half dim across flats
 (setq boltthk 5.50)	;depth of bolt head
 (setq nutthk 6.50)	;depth of nut
 (setq ext1 5.00)	;min extension past nut face
 (setq boltend 0.50)	;sets chamfer on end of bolt
 (dcbolt msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 )

(defun c:m10bolt ( / msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 (setq msize 10.00)	;metric bolt size
 (setq holedia 12.00)	;clearance hole dia
 (setq len1 -70.00)	;max depth of drilled hole
 (setq washerd 21.00)	;washer o/d
 (setq washert 2.00)	;washer thickness
 (setq boltaf 8.50)	;half dim across flats
 (setq boltthk 7.00)	;depth of bolt head
 (setq nutthk 8.00)	;depth of nut
 (setq ext1 5.00)	;min extension past nut face
 (setq boltend 0.75)	;sets chamfer on end of bolt
 (dcbolt msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 )

(defun c:m12bolt ( / msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 (setq msize 12.00)	;metric bolt size
 (setq holedia 14.00)	;clearance hole dia
 (setq len1 -70.00)	;max depth of drilled hole
 (setq washerd 24.00)	;washer o/d
 (setq washert 2.50)	;washer thickness
 (setq boltaf 9.50)	;half dim across flats
 (setq boltthk 8.00)	;depth of bolt head
 (setq nutthk 10.00)	;depth of nut
 (setq ext1 5.00)	;min extension past nut face
 (setq boltend 1.0)	;sets chamfer on end of bolt
 (dcbolt msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 )

(defun c:m16bolt ( / msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 (setq msize 16.00)	;metric bolt size
 (setq holedia 18.00)	;clearance hole dia
 (setq len1 -70.00)	;max depth of drilled hole
 (setq washerd 30.00)	;washer o/d
 (setq washert 3.00)	;washer thickness
 (setq boltaf 12.00)	;half dim across flats
 (setq boltthk 10.00)	;depth of bolt head
 (setq nutthk 13.00)	;depth of nut
 (setq ext1 5.00)	;min extension past nut face
 (setq boltend 1.25)	;sets chamfer on end of bolt
 (dcbolt msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 )

(defun c:m20bolt ( / msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 (setq msize 20.00)	;metric bolt size
 (setq holedia 22.00)	;clearance hole dia
 (setq len1 -70.00)	;max depth of drilled hole
 (setq washerd 37.00)	;washer o/d
 (setq washert 3.00)	;washer thickness
 (setq boltaf 15.00)	;half dim across flats
 (setq boltthk 13.00)	;depth of bolt head
 (setq nutthk 16.00)	;depth of nut
 (setq ext1 5.00)	;min extension past nut face
 (setq boltend 1.5)	;sets chamfer on end of bolt
 (dcbolt msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 )

(defun c:m24bolt ( / msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 (setq msize 24.00)	;metric bolt size
 (setq holedia 28.00)	;clearance hole dia
 (setq len1 -70.00)	;max depth of drilled hole
 (setq washerd 44.00)	;washer o/d
 (setq washert 4.00)	;washer thickness
 (setq boltaf 18.00)	;half dim across flats
 (setq boltthk 15.00)	;depth of bolt head
 (setq nutthk 19.00)	;depth of nut
 (setq ext1 5.00)	;min extension past nut face
 (setq boltend 1.75)	;sets chamfer on end of bolt
 (dcbolt msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 )

(defun c:m30bolt ( / msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 (setq msize 30.00)	;metric bolt size
 (setq holedia 34.00)	;clearance hole dia
 (setq len1 -70.00)	;max depth of drilled hole
 (setq washerd 56.00)	;washer o/d
 (setq washert 4.00)	;washer thickness
 (setq boltaf 23.00)	;half dim across flats
 (setq boltthk 19.00)	;depth of bolt head
 (setq nutthk 24.00)	;depth of nut
 (setq ext1 5.00)	;min extension past nut face
 (setq boltend 2.00)	;sets chamfer on end of bolt
 (dcbolt msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend)
 )

;------------------------------------------------------------------------------------------------------------------

(defun dcbolt (msize holedia len1 washerd washert boltaf boltthk nutthk ext1 boltend / cm olderr attrerr *error* exsnaps
       curlayer layername colour linetype curlayer2 p1 objtypa ent1 enta entdataa objtypb ent2 entb entdatab
       cyl3 cyl4 washer1 list1 b1 b2 p2 p3 p4d p4 p5d p5 b3 b4 bolthead p6 p7 p8 len2 len3 len4 len5 len6 len7 len8
       len9 b5 msizer p9d p9 len10 p10 p11 b6 b7 shank bolt list2 cyl5 cyl6 washer2 list3 b9 b10 p12 p13 p14
       b11 b12 p15 p16 len11 p17 b13 b14 b15 b16 b17 nut)
 
 ;------------------------------------------------------------------------------------------------------------------

Posted

Part 2:

 

  ;set error handler and save current settings
 (setq cm (getvar "cmdecho"))
 (setvar "cmdecho" 0)
 ;(textscr)
 (setq olderr *error*)
 (setq *error* attrerr)
 (command "_.undo" "_group")
 (setq exsnaps (getvar "osmode"))
 (command "_ucs" "na" "d" "existing")
 (command "_ucs" "na" "s" "existing")
 
 ;save current layer status and create layer "bolting"
 (setq curlayer (getvar "clayer"))
 (setq layername (strcat curlayer " BOLTING"))
 (setq colour "8")
 (setq linetype "continuous")
 (layerset layername colour linetype)
 (setq curlayer2 (getvar "clayer"))
 
 ;bolt routine start-----------------------------------------------------------------------------------------------
 
 (setvar "osmode" 127)
 
 ;set face ucs to face
 (command "ucs" "na" "d" "existing")
 (princ "Pick face to be drilled")
 (command "ucs" "NA" "S" "existing")
 (command "ucs" "f" pause "")
 
 ;set hole center
 (initget 1)
 (setq p1 (getpoint "\nPick hole center point:"))
 
 ;move ucs to hole center
 (command "_ucs" "_o" p1)
 
 ;pick second solid to be drilled
 (while (/= objtypa "3DSOLID")
   (setq ent1 (entsel "\nPick solids to be drilled:"))
   (if ent1
     (progn
(setq enta (car ent1))
(setq entdataa (entget enta))
(setq objtypa (cdr (assoc 0 entdataa)))
)
     )
   )
 
 ;pick second solid to be drilled
 (while (/= objtypb "3DSOLID")
   (setq ent2 (entsel "\nPick solids to be drilled:"))
   (if ent2
     (progn
(setq entb (car ent2))
(setq entdatab (entget entb))
(setq objtypb (cdr (assoc 0 entdatab)))
)
     )
   )
 
 ;create cylinders and subtract from selected solids to "drill" hole
 (command "_cylinder" "0,0,0" "d" holedia len1)
 (setq cyl1 (entlast))
 (command "_subtract" ent1 "" cyl1 "")
 (command "_cylinder" "0,0,0" "d" holedia len1)
 (setq cyl2 (entlast))
 (command "_subtract" ent2 "" cyl2 "")
 
 ;create washer 1
 (command "_cylinder" "0,0,0" "d" washerd washert)
 (setq cyl3 (entlast))
 (command "_cylinder" "0,0,0" "d" holedia washert)
 (setq cyl4 (entlast))
 (command "_subtract" cyl3 "" cyl4 "")
 (setq washer1 (entlast))
 
 ;create bolt head
 (command "_osmode" 0)
 (setq list1 (list 0 0 washert))
 (command "_ucs" "_o" list1)
 (command "_polygon" "6" "0,0,0" "c" boltaf)
 (setq b1 (entlast))
 (command "_extrude" b1 "" boltthk)
 (setq b2 (entlast))
 (setq p2 (list 0 0 boltthk))
 (setq p3 (list boltaf 0 boltthk))
 (setq p4d (+ 20 boltaf))
 (setq p4 (list p4d 0 boltthk))
 (setq p5d (- boltthk 11.55))
 (setq p5 (list p4d 0 p5d))
 (command "_osmode" 0)
 (command "_3dpoly" p3 p4 p5 "c")
 (setq b3 (entlast))
 (command "_revolve" b3 "" "0,0,10" "0,0,0" "360")
 (setq b4 (entlast))
 (command "_subtract" b2 "" b4 "")
 (setq bolthead (entlast))
 
 ;select back face
 (setvar "osmode" 4)
 (initget 1)
 (setq p6 (getpoint "\nSet length of bolt by picking back face hole center:"))
 (command "osmode" 0)
 
 ;calculate bolt grip length
 (setq p7 (list 0 0 0))
 (setq len2 (distance p6 p7))
 (setq len3 (+ len2 washert))
 (setq len4 (+ len3 nutthk))
 (setq len5 (/ len4 5))
 (setq len6 (fix len5))
 (setq len7 (+ 1 len6))
 (setq len8 (* 5 len7))
 (setq len9 (+ len8 ext1))
 
 ;create bolt shank
 (command "_osmode" 0)
 (command "_ucs" "_y" "180")
 (command "_cylinder" "0,0,0" "d" msize len9)
 (setq b5 (entlast))
 (setq msizer (/ msize 2))
 (setq p9d (- msizer boltend))
 (setq p9 (list p9d 0 len9))
 (setq len10 (- len9 boltend))
 (setq p10 (list msizer 0 len10))
 (setq p11 (list msizer 0 len9))
 (command "_osmode" 0)
 (command "_3dpoly" p9 p10 p11 "c")
 (setq b6 (entlast))
 (command "_revolve" b6 "" "0,0,10" "0,0,0" "360")
 (setq b7 (entlast))
 (command "_subtract" b5 "" b7 "")
 (setq shank (entlast))
 
 ;join bolt head to shank
 (command "_union" bolthead shank "")
 (setq bolt (entlast))
 
 ;create washer 2
 (setq list2 (list 0 0 len2))
 (command "_ucs" "_o" list2)
 (command "_osmode" 0)
 (command "_cylinder" "0,0,0" "d" washerd washert)
 (setq cyl5 (entlast))
 (command "_cylinder" "0,0,0" "d" holedia washert)
 (setq cyl6 (entlast))
 (command "_subtract" cyl5 "" cyl6 "")
 (setq washer2 (entlast))
 
 ;create nut
 (setq list3 (list 0 0 washert))
 (command "_ucs" "_o" list3)
 (command "_polygon" "6" "0,0,0" "c" boltaf)
 (setq b9 (entlast))
 (command "_extrude" b9 "" nutthk)
 (setq b10 (entlast))
 (setq p12 (list boltaf 0 0))
 (setq p13 (list p4d 0 0))
 (setq p14 (list p4d 0 11.55))
 (command "_3dpoly" p12 p13 p14 "c")
 (setq b11 (entlast))
 (command "_revolve" b11 "" "0,0,10" "0,0,0" "360")
 (setq b12 (entlast))
 (command "_subtract" b10 "" b12 "")
 (setq b13 (entlast))
 (setq p15 (list boltaf 0 nutthk))
 (setq p16 (list p4d 0 nutthk))
 (setq len11 (- nutthk 11.55))
 (setq p17 (list p4d 0 len11))
 (command "_3dpoly" p15 p16 p17 "c")
 (setq b14 (entlast))
 (command "_revolve" b14 "" "0,0,10" "0,0,0" "360")
 (setq b15 (entlast))
 (command "_subtract" b13 "" b15 "")
 (setq b16 (entlast))
 (command "_cylinder" "0,0,0" "d" msize nutthk)
 (setq b17 (entlast))
 (command "_subtract" b13 "" b17 "")
 (setq nut (entlast))
 
 ;bolt routine finishes--------------------------------------------------------------------------------------------
 
 ;restore all original settings
 (command "_osmode" exsnaps)
 (command "_ucs" "na" "r" "existing")
 (command "_ucs" "na" "d" "existing")
 (command "_layer" "s" curlayer "")
 (command "_undo" "_end")
 (setq *error* olderr)
 (princ)
 )

;internal error handler
(defun attrerr (str /)
 (if (/= str "Function Cancelled")
   (princ (strcat "\nError: "str))
   )
 
 ;end of prog statement
 (command "_undo" "_end")
 (command "_undo" "1")
 
 ;restore old error handler
 (setq *error* olderr)
 (setvar "cmdecho" cm)
 (princ)
 )

;sub routines------------------------------------------------------------------------------------------------------

;subroutine for creating layer
(defun layerset (layername colour linetype / )
 (if (/= colour nil)
   (command "_layer" "m" layername "c" colour layername "lt" linetype layername "")
   )
 )

Posted

Note that the routine should create a new layer for the fasteners based on the current layer. I.e. if you are on a layer called "STEELWORK", a new layer called "STEELWORK BOLTING" should be created.

 

Things I'd like to improve but don't know how:

 

1) At the moment, the initial hole can only be a set depth of 70mm. I think it would be better if the hole depth could be taken from the depth of the 3D solids that you are trying to "drill". This would allow much thicker items to be fastened together. Is this possible?

 

2) This routine only allows you to bolt two items together, is there a way of getting it to allow the selection of more that two items?

 

3) If for some reason the routine crashes out half way through, it doesn't return everything to its original state (UCS, layer, etc) which really annoying. During trials I ended up with the following layers being created:

steelwork bolting

steelwork bolting bolting

steelwork bolting bolting bolting

steelwork bolting bolting bolting bolting, etc. is there a way to return everything and stop this?

 

Any other ideas for improvement?

 

Many thanks in advance. :D

Posted

Oh yes, I nearly forgot. The first part of the code states what needs to typed on the command line and what to put into a button if you want to create a toolbar or menu.

Posted

That's very cool ! I had to try it, just to see how it worked. Very Cool, now if someone can create the threads on the nut and bolt.... LOL... Good Work Cerberus!! oh BTW, it only created 1 layer, 0 BOLTING. I started with a new drawing set to MM units, seemed to run coorectly. here's a screenshot

boltlisp.jpg

Posted

Looks very good for your first attempt.

 

I attached a revised version. Just another approach and I fiddled with your WHILE statements.

 

I did not test, so forgive me if there are any errors.

I was just offering some variation. I'm out of time.:cry:

 

See attached.

Bolt.LSP

Posted

Could someone clarify how to start the LISP process, it doesn't seem to work for me, loaded ok thou......

  • 9 months later...
Posted

I'm not LISP programmer but I installed and successfully ran this. I can use the portion which draws the bolt head so I studied the code and got enough of it to just get confused. Perhaps someone can help me because I'd really love to be able to draw up some bolts and nuts for my 3D work.

 

As I see in the section for drawing the bolt head, this guy:

 

a). draws a six sided polygon

b). extrudes it to the desired thickness

c). then he draws a 3dpolyline which I did not seem to be able to understand. He picks several points but I could not seem to follow the logic.

d). then he subtracts this 3dpoly line from from the hexagonal shape, or maybe it's the other way around.

 

In any case, if someone could offer some advice here, perhaps I could use this method to construct my 3D nuts and bolts.

 

BTW - I follow all the steps to turn off snap, etc...it's just that 3dpolyline that I'm having trouble with. If I could get that part down, this looks like a very simple method for getting some nice 3D bolt heads drawn.

Posted

Bill,

 

The routine revolves that polyline about the center of the bolt then subtracts it from the hexagonal shape. This is what creates the chamfer around the top of a bolt and the top and bottom of the nut.

 

When you have picked the center point for the bolt head, it sets the UCS origin to this point. The polyine is drawn using cartesian co-ordinates about this new origin. The UCS should return to its original position and orientation once the routine has finished.

 

Hope this helps.

 

BTW, I have slightly refined the routine since posting this so that it no longer crashes out awkwardly if you hit the escape key halfway through the command.

 

I am also working on a version that creates socket head cap screws and pan heads. I will post it as soon as it finished.

 

I still haven't worked out how to select more than two plates to bolt together, though. :(

Posted

Thanks Cerbeus for your reply. Like I said I'm no programmer so I'm still not sure how to use this. I was able to use your program but I want to draw nice 3D bolt heads of my own.

 

Let me see if I can show you where I get stumped:

 

;create bolt head

(command "_osmode" 0) OK

(setq list1 (list 0 0 washert)) OK

(command "_ucs" "_o" list1) OK

(command "_polygon" "6" "0,0,0" "c" boltaf) OK

(setq b1 (entlast)) OK

(command "_extrude" b1 "" boltthk) OK

(setq b2 (entlast)) OK

(setq p2 (list 0 0 boltthk)) OK

(setq p3 (list boltaf 0 boltthk)) OK

(setq p4d (+ 20 boltaf)) Does this add 20mm to boltaf?

(setq p4 (list p4d 0 boltthk)) This creates a string with three coordinates (20+boltaf),0,bolthk

(setq p5d (- boltthk 11.55)) This is where I get lost, does this subtract bolthk from 11.55

Of course here is also where I will be making adjustments to 20 and 11.55 to accomodate the various SAE bolt sizes I will be using.

 

(setq p5 (list p4d 0 p5d)) This concantenates the string like above

(command "_osmode" 0) OK

(command "_3dpoly" p3 p4 p5 "c") If I can get the above understood, this is where it comes together to draw the 3dpoly which is where I get lost.

(setq b3 (entlast))

(command "_revolve" b3 "" "0,0,10" "0,0,0" "360") I'm assuming that 10 is used in the first set of coordinates because it's 1/2 of 20 which is used above.

(setq b4 (entlast)) OK

(command "_subtract" b2 "" b4 "") OK

(setq bolthead (entlast)) OK

If I can just get past the arithmetic part above, I think I can understand how you do the 3Dpoly command.

Posted

(setq p5d (- boltthk 11.55)) This is where I get lost, does this subtract bolthk from 11.55

 

The code:

 

(- a b)

Means:

 

the result of subtracting b from a.

 

i.e.

 

(- 10 5)

Returns: 5

 

Hope this clarifies things.

Posted

Thanks. That nailed it down and my first run was clumbsy but it produced a nice 3D bolt head.

 

Think I'll try my hand at a LISP program to draw SAE bolts and nuts now.

 

And BTW - the number ten was because it's 1/2 of 20 used above. I had to divide everything by 25.4 to convert it to Imperical, but it worked nicely. I added the shank and the quasi threads on it. This is close enough for the kind of work I'm doing.

3DBolt(1).jpg

Posted

Thats pretty much what we use here (hex head lag screws though, no bolts) for any of our big Glulam brackets. We've currently got a fastener folder in our block library and include them with the blocks of the brackets. Lately though I've been toying with the idea of replacing them with a dynamic block, do you see any inherent advantage of a LISP routine over the DB in this case? You can treat a simple 3D object as a 2D provided the orientation is correct. Also there are rumblings that Autodesk will allow 3D dynamic blocks with the 2010 release (only a few short months away).

Posted

I can't say that I see any advantage over either method. The whole point is to get a realistically looking 3D fastener into your drawing without a mind twisting process.

 

My goal is to write a LISP routine that will popup a menu and allow you to choose a bolt diameter and length. I know this will not be simple so for now my new understanding of how to get the bolt head looking good in 3D will suffice. The bolt shank and sudo-threads were the easy part and just by mirroring and then union I can make the bolt head look like a nut. For most applications this will be fine.

  • 2 weeks later...
Posted

This lisp is amazing, I done a thread the other day looking for 3d dynamic bolts. This is exactly what im looking for.

 

(dont mean to push my luck, but do you have one for csk fasteners?):D

Posted
Not yet but its on my "To do" list!

 

I'll be forever in your debt when you do mate.

  • 11 months later...
Posted

Wow, you know this looks good, but I get an error when i try to use it.

-----------------------------------------------------------

Command: appload Bolt.LSP successfully loaded.

 

Command:

Command:

Command: m12bolt

*Cancel*

 

Command:

Command:

Command: no function definition: MBOLT

--------------------------------------------------------------

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