[Plugin] Bolt Maker (Final Update 7-Feb-2012)

[Plugin] Bolt Maker (Final Update 7-Feb-2012)

Postby sdmitch » Sun Sep 18, 2011 5:56 pm

In response to http://forums.sketchucation.com/viewtop ... 23&t=39998

Bolt Maker XII the final edition.


Enter the diameter of the bolt, pick a head type(Hex or Cap), pick washer locations(none,head,nut,both)
choose locating method(Offset,PickPt), and indicate if mutiple copies will be placed. The locate by Offset now accepts any two edges of the face to define the offset. The only requirement is that the offsets intersect on the face. The bolts are initial created as a group but is converted to a component before placement. The head type,diameter,length, and washer configuration is used to name the component thus allowing the rapid placement of multiple instances of the same bolt component.

boltmaker2.jpg
boltmaker3.jpg
boltmaker4.jpg
boltmaker5.jpg


After clicking OK to set the bolt parameters, you can keyin a fixed length for the bolt if you are bolting one piece to another where a nut is not required.

The entities to be bolted together no longer have to be groups or components. Almost any shape can be used, I-beam, channel, pipe. The only reqirement is that the drill holes fall intirely inside the faces. Partial holes are not permited.

Go to the Plugin Store for latest version.
8
Last edited by sdmitch on Thu Jan 08, 2015 3:26 pm, edited 12 times in total.
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Bolt Maker

Postby jonorman » Sun Sep 18, 2011 10:06 pm

:berserk: :sketchstatic: :berserk:

Dang that is sweet, just like the one i`m used to at work...

couple of questions. can the bolt be made more "realistic" ?? Is the bolt made by the script or can it pick one from a folder or a "bolt inventory" ??

Bug: the bolt has reversed faces..

Again a million thank you for this script.... :enlight:
2

jonorman 
Premium Member
Premium Member
 

Re: [Plugin] Bolt Maker

Postby Humpmetwice » Mon Sep 19, 2011 12:27 am

I also love this plugin but while using it, it messes up the hole some how. See image to see whats happening.



Thanks Kurt
1
User avatar
Humpmetwice 
 

Re: [Plugin] Bolt Maker

Postby sdmitch » Mon Sep 19, 2011 12:51 am

jonorman wrote::berserk: :sketchstatic: :berserk:

Dang that is sweet, just like the one i`m used to at work...

couple of questions. can the bolt be made more "realistic" ?? Is the bolt made by the script or can it pick one from a folder or a "bolt inventory" ??

Bug: the bolt has reversed faces..

Again a million thank you for this script.... :enlight:


More "realistic"? In what way?
The bolt is totally made by script.
Reversed faces. Is that a significant problem?
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Bolt Maker

Postby sdmitch » Mon Sep 19, 2011 12:53 am

humpmetwice wrote:I also love this plugin but while using it, it messes up the hole some how. See image to see whats happening.



Thanks Kurt



I've never seen that problem before? How often does it occur? At what diameter?
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Bolt Maker

Postby Jim » Mon Sep 19, 2011 1:21 am

Thanks for this, Sam.

sdmitch wrote:I've never seen that problem before? How often does it occur? At what diameter?


It happens to me when I bolt 2 of the exact same instances. When I make one of the instances unique, it does not happen.

Also...

0085.png
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] Bolt Maker

Postby sdmitch » Mon Sep 19, 2011 1:43 am

Jim, Thanks for the info. That is something I never tested because I assumed the components would be unique since "drilling" a hole in one would effect them all.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Bolt Maker (Updated 20Sep11)

Postby Jim » Sat Sep 24, 2011 3:19 pm

Sam, I'm getting this error when trying to bolt through the same instance:


Error: #<NoMethodError: undefined method `distance' for nil:NilClass>
C:/Plugins/bolt maker.rb:205:in `drill_hole'
C:/Plugins/bolt maker.rb:148:in `onLButtonDown'
1
Hi

Jim 
Global Moderator
 

Re: [Plugin] Bolt Maker (Updated 20Sep11)

Postby Jim » Sat Sep 24, 2011 3:20 pm

I wonder if it would be better to allow the user to select 2 points (using inference) to set the length and direction of the bolt, rather than having the plugin attempt to calculate? I do like pulling off the edges to mark the center; so after this just 2 more clicks to set the length and direction.

Also, what if the bolt were made as a Component rather than a Group? Then it could be re-used and accounting for the hardware in the model would become easier.
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] Bolt Maker (Updated 20Sep11)

Postby Humpmetwice » Sat Sep 24, 2011 3:47 pm

Works Great now but I do like Jim's idea about making it a component instead of a group but beggers can't be choosey.
0
User avatar
Humpmetwice 
 

Re: [Plugin] Bolt Maker (Updated 20Sep11)

Postby sdmitch » Sat Sep 24, 2011 7:49 pm

As I see it, the problem with making the nut and bolt set a component is that you would have to create one for every conceivable diameter and length which wouldn't be any different than creating them as groups. I also see no advantage in requiring 2 additional points to define length and direction. Drilling the hole through the components would be impossible if direction is not perpendicular to the faces. The head of the bolt is always on the first component so the order of selection determines direction.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Bolt Maker (Updated 20Sep11)

Postby ken » Sat Sep 24, 2011 8:16 pm

I am curious, why does the objects to be bolted need to be a component? I use component, but I also use groups and was just wondering why it only would work on a component and not a group.

Thanks for the plugin.

Ken
0
Fight like your the third monkey on Noah's Ark gangway.
User avatar
ken 
Premium Member
Premium Member
 

Re: [Plugin] Bolt Maker (Updated 20Sep11)

Postby sdmitch » Sat Sep 24, 2011 8:34 pm

Jim wrote:Sam, I'm getting this error when trying to bolt through the same instance:


Error: #<NoMethodError: undefined method `distance' for nil:NilClass>
C:/Plugins/bolt maker.rb:205:in `drill_hole'
C:/Plugins/bolt maker.rb:148:in `onLButtonDown'


Because of the nature of components, how could you possibly drill a single hole through the two copies. There is only one situation where that is possible and that is if two instances are stacked and orientated exactly the same. Otherwise, at best you get a bolt on one end and an empty hole on the other.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Bolt Maker (Updated 20Sep11)

Postby sdmitch » Sat Sep 24, 2011 8:39 pm

Ken wrote:I am curious, why does the objects to be bolted need to be a component? I use component, but I also use groups and was just wondering why it only would work on a component and not a group.

Thanks for the plugin.

Ken


Primarily because that's what the original request was. Groups and components are very simuliar but does require some additional code to handle either.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Bolt Maker (Updated 20Sep11)

Postby Jim » Sat Sep 24, 2011 8:55 pm

What I am trying to suggest is there are too many edge cases - too many ways that people need to fasten things together for a plugin to attempt to guess what the user wants. For example, it appears you are assuming there are ever only 2 plates that need bolted together. What if I need 3 plates bolted together? Or if I need a spacer between the plates? By using a 2-point selection procedure for setting the direction and length, you do not need to make any assumptions or guesses - it seems like it would greatly simplify the procedure for placing bolts in all possible cases since the bolt is drawn in the selected direction and length set by the user.

True, this will likely complicate hole-cutting, but I'd rather have a quick way to place bolts before worrying about getting the holes cut.
0
Hi

Jim 
Global Moderator
 

Re: [Plugin] Bolt Maker (Updated 20Sep11)

Postby ken » Sat Sep 24, 2011 9:47 pm

Jim wrote:What I am trying to suggest is there are too many edge cases - too many ways that people need to fasten things together for a plugin to attempt to guess what the user wants. For example, it appears you are assuming there are ever only 2 plates that need bolted together. What if I need 3 plates bolted together? Or if I need a spacer between the plates? By using a 2-point selection procedure for setting the direction and length, you do not need to make any assumptions or guesses - it seems like it would greatly simplify the procedure for placing bolts in all possible cases since the bolt is drawn in the selected direction and length set by the user.

True, this will likely complicate hole-cutting, but I'd rather have a quick way to place bolts before worrying about getting the holes cut.


I show bolt in all my designs, some time is the hundreds. Yes I would like to have a method of making a bolt with just a line. With the line giving direction and length. I use the bolt dynamic component, and I have to work around showing bolts that not fully engage, in other words, just above the selection but not tightened. I use the plugin drill to make the holes, and just being able to connect multiple pieces together, than add the bolt above the pieces or partly though or completely though would be great.

Well, it is a needed plugin.

Again thank you.
0
Fight like your the third monkey on Noah's Ark gangway.
User avatar
ken 
Premium Member
Premium Member
 

Re: [Plugin] Bolt Maker (Updated 20Sep11)

Postby Niffler » Sun Sep 25, 2011 2:11 am

Greetings, :enlight:

I downloaded "Bolt Maker.rb" and dropped it into the proper plug-in folder and then experienced my first error message after I restarted SketchUp 8.

Error Loading File Bolt Maker.rb
undefined method `file_loaded?' for main:Object


How can I resolve this without using percussion maintenance? ;-)

Peace
0

Niffler 
 

Re: [Plugin] Bolt Maker (Updated 20Sep11)

Postby Jim » Sun Sep 25, 2011 2:21 am

Open the file "Bolt Maker.rb" in a text editor - say notepad.exe, then move the following line up roughly 7-8 lines so it appears just after the comment lines (which begin with #) but before any other lines in the file.

require "sketchup"

Save the file, and restart SketchUp.
1
Hi

Jim 
Global Moderator
 

Re: [Plugin] Bolt Maker (Updated 26Sep11)

Postby CalypsoArt » Wed Oct 05, 2011 10:03 pm

Great plugin. Love the ability to pull from the sides to set position. I got a bug splat but can't remember exactly where in the process. Worked fine after that. I Agree with others it would be nice to be able to pic a top face and a bottom face in a set of stacked components/groups and have the plugin drill/cut through them all. But I can work with it as is.
Thanks.
0

CalypsoArt 
Premium Member
Premium Member
 

Re: [Plugin] Bolt Maker (Updated 06-Oct-11)

Postby sdmitch » Thu Oct 06, 2011 6:36 pm

CalypsoArt,

Stack away. Just posted update allows that and it drills holes through them all.

The bug splats and failures are caused by the usually benign start_operation statements.
I got a lot of those also until I removed them.
1
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Bolt Maker (Updated 06-Oct-11)

Postby sdmitch » Fri Oct 07, 2011 4:25 pm

OOPS!!!! Sorry Bolt Maker fans. Dispite what I thought was adaquate testing, I found a problem while playing around with the plugin this morning. It has been corrected and a new copy posted.
1
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Bolt Maker (Updated 06-Oct-11)

Postby Niffler » Thu Oct 20, 2011 5:08 am

Help!! I can't get bolt maker to run anymore.

1. I have used both copies of bolt maker: bolt maker and bolt maker 7.

2. I run the programs in SketchUp 8.

3. I have run successfully, both versions (obviously, one at a time) in either SketchUp/Plugins or SketchUp/Tools folder. Both copies had worked in either folder. FYI

4. It took me several dozen retrys to figure out those terrible instructions; and in one glorious moment, it worked. I went to repeat my success AND...nothing! I clicked the Bolt-maker icon in the toolbar and then...nothing. I clicked the Bolt-maker icon a number of times. It stopped working.

5. I downloaded and tried out new copies in place of the others in the SketchUp root folder and still nothing. I even reversed the file's location from Plugins folder to the Tools folder, still nothing happened.

6. I even created two, new group components, thinking that it was probably the models. Nope!

7. I went to another older system where I had backup copies of both files of bolt maker and of SketchUp 8. I fired up SketchUp and lo-and-behold, bolt maker worked. I mucked about with the instructions for many times (don't ask me how many), then the same thing happened on that computer: the Bolt-Maker button died.

The only thing I can figure happened with this challenge is that this program is crippleware, that is a program that deactivates itself after a number of reactivations. This program probably detects: "This person is an idiot! It is much too dangerous to be in the hands of such a simpleton." DELETE DELETE DELETE LOL

Can someone help with this?
0

Niffler 
 

Re: [Plugin] Bolt Maker (Updated 06-Oct-11)

Postby sdmitch » Thu Oct 20, 2011 7:09 pm

You must have me and my Bolt Maker confused with someone else. Mine doesn't have a Toolbar Icon or Button!

No, my Bolt Maker is not "crippleware", there are no limits on its use.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Bolt Maker (Updated 06-Oct-11)

Postby Niffler » Thu Oct 20, 2011 9:44 pm

Hello, sdmitch,

Thanks for the reply. I'm sorry, I used the wrong phrase and confused the menu bar with the toolbar (considering that, well the majority of my tools are found under Tools on the menu bar).

I'm pretty sure that the plugin I'm using is yours (it's found under the menu bar, Plugins > Bolt Maker). I'm just pretty frustrated. I managed to get the plugin to work once on SketchUp 8 but, since then, any time I click on the Bolt Maker button under the Plugins menu, the dialogue box for using it wouldn't even appear; its as if I never clicked on it at all.

I apologize if my original post was a bit combative; it's frustrating having a vastly time-saving plugin on my system that doesn't work for whatever reason.

So, can you help me? Have you encountered this problem before with your program, or know of anything that would cause the plugin to only work only once? I appreciate any help you can render.
0

Niffler 
 

Re: [Plugin] Bolt Maker (Updated 06-Oct-11)

Postby ken » Thu Oct 20, 2011 11:29 pm

Note, I also have the same problem. I just didn't mention the problem as I use the bolt maker dynamic component. However, I do wish your plugin would work.

What is does on my machine, it will work one to two times than that is the last it will work. One time removed the txt file and it work one more time. But as of now it does not function each and every time.

I hope you get this sorted out as I use a lot of bolts.

Thank you for your work and the plugin.

Ken
0
Fight like your the third monkey on Noah's Ark gangway.
User avatar
ken 
Premium Member
Premium Member
 

Re: [Plugin] Bolt Maker (Updated 06-Oct-11)

Postby Niffler » Thu Oct 20, 2011 11:47 pm

Thank you, Ken! It's good to know I am not alone in my plight!

I have since deleted and reinstalled using the version of Bolt Maker found on sdmitch.blogspot.com. When I went to use that one, the dialogue box appeared normally. I then went to use the plugin, but it would not recognize my created groups as actually being groups. I then clicked out of the Bolt Maker dialogue box to make another component, in the hopes that would work, and then went to reopen Bolt Maker. Nothing happened; same problem as before.

I closed down SketchUp and replaced the Bolt Maker.rb file with a backup I had made earlier. I am unsure if it was designed for 7 or 8, but I replaced it. Now, no matter how many times I delete the .rb file, restart my system, and reinstall using a new file downloaded directly from blogspot, the program will not work.

This may be a silly question, but where is this .txt file in SketchUp associated with Bolt Maker? I may try deleting that as well when I reinstall, but there is no .txt file that I can see under C:\Program Files\Google\Google SketchUp 8\Plugins

Also, I'm running Vista, and, unlike all other times, the last couple times I went to delete the .rb file, User Account Control did *not* pop up to ask me for permission to delete the file. Weird...
0

Niffler 
 

Re: [Plugin] Bolt Maker (Updated 06-Oct-11)

Postby ken » Fri Oct 21, 2011 12:09 am

Here is the txt file, "Bolt Maker7.txt".

Ken
0
Fight like your the third monkey on Noah's Ark gangway.
User avatar
ken 
Premium Member
Premium Member
 

Re: [Plugin] Bolt Maker (Updated 06-Oct-11)

Postby sdmitch » Fri Oct 21, 2011 12:37 am

Niffler, The .txt file is automatically created when it doesn't exist and just keeps the last input parameters for future runs.

The only problems I have had with the plugin relate to the .start_operation/commit_operation block but those are not active in the plugin I posted.

If you would please open the Ruby Console before running the plugin and post any errors that appear there.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Bolt Maker (Updated 06-Oct-11)

Postby Niffler » Fri Oct 21, 2011 3:32 am

sdmitch wrote:Niffler, The .txt file is automatically created when it doesn't exist and just keeps the last input parameters for future runs.

The only problems I have had with the plugin relate to the .start_operation/commit_operation block but those are not active in the plugin I posted.

If you would please open the Ruby Console before running the plugin and post any errors that appear there.


Greetings Sdmitch,
As you requested...

Error: #<ArgumentError: Cannot convert "0.167'
" to Length>
C:/Program Files/Google/Google SketchUp 8/Plugins/Bolt Maker.rb:48:in `to_l'
C:/Program Files/Google/Google SketchUp 8/Plugins/Bolt Maker.rb:48:in `dialog'
C:/Program Files/Google/Google SketchUp 8/Plugins/Bolt Maker.rb:41:in `initialize'
C:/Program Files/Google/Google SketchUp 8/Plugins/Bolt Maker.rb:25:in `new'
C:/Program Files/Google/Google SketchUp 8/Plugins/Bolt Maker.rb:25

Niffler
0

Niffler 
 

Re: [Plugin] Bolt Maker (Updated 06-Oct-11)

Postby Niffler » Fri Oct 21, 2011 2:44 pm

Niffler wrote:
sdmitch wrote:Niffler, The .txt file is automatically created when it doesn't exist and just keeps the last input parameters for future runs.

The only problems I have had with the plugin relate to the .start_operation/commit_operation block but those are not active in the plugin I posted.

If you would please open the Ruby Console before running the plugin and post any errors that appear there.


Greetings Sdmitch,
As you requested...

Error: #<ArgumentError: Cannot convert "0.167'
" to Length>
C:/Program Files/Google/Google SketchUp 8/Plugins/Bolt Maker.rb:48:in `to_l'
C:/Program Files/Google/Google SketchUp 8/Plugins/Bolt Maker.rb:48:in `dialog'
C:/Program Files/Google/Google SketchUp 8/Plugins/Bolt Maker.rb:41:in `initialize'
C:/Program Files/Google/Google SketchUp 8/Plugins/Bolt Maker.rb:25:in `new'
C:/Program Files/Google/Google SketchUp 8/Plugins/Bolt Maker.rb:25

Niffler


[UPDATE] I have found it! I found the bug!

Last night, I went into my old system and deleted all remenants of Bolt-maker.rb from SketchUp8/Plugins. I then copied the latest version of Bolt-maker.rb I had downloaded from sdmitch.blogspot.com.

I fired-up SketchUp 8, and clicked on Bolt-maker 7 in the menu bar. It worked! Now, I was very cautious about the parameters I set. So I stayed with the 1/4 inch bolt-size.

After a number of dry runs, I was finally able to confidently create a half-dozen bolts "joining" those plates. Great!

Now, I decided to push the limits. I clicked the Boltmaker7 (button) in the menu bar. After the dialog box appeared, I set the bolt's size to 2 inches. The plugin worked. However, when I went to repeat my thought experiment, the dialog box failed to appear, which is good, too.

I clicked open the Ruby Console. After I clicked the Bolt-maker7 (button), the same error appeared as it had in the lines above.

Sdmitch, made a good program, but needs to adjust the parameters of the bolt sizes from: Tiny to Colossal (for all you D&D fans). I think that might set it right.

Peace
0

Niffler 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: nightmare_343 and 5 guests

Visit our sponsors: