Page 1 of 2

SOB Google Sketchup plugin

PostPosted: Thu Sep 20, 2012 10:24 am
by tayken
Finally done with the plugin, added all the bells and whistles.

To install, you just put the "SOB.rb" file in the zip file under Plugins folder. This gives you a nice menu addon as seen in the following picture:
menu.jpg

When you click on that menu option, you get a basic dialog box:
dialog.jpg

You enter some parameters and voila! You have a nice dox design. There are 3 choices for side panes: None, interclocking and stacked. You can see why I named them as such when you create the different designs: Interlocking has interlocking side panes, they are sturdy but sometimes hard to assemble. In stacking you first put the short sides' panels, then long sides' panels stack on top of that because of the tab adjustment.

Just tell me what you guys think. Can change dialog box stuff easily. Also I can upload it to SVN if you want it.

Enjoy!

Re: SOB Google Sketchup plugin

PostPosted: Fri Sep 21, 2012 8:44 am
by arakis
Pure awesomeness, one request :) could you add a design, or simply augment the 'none' one. It be cool if we had the SoB actual cases that are on sale at seeed.... They are only 2mm wider then the PCBs, and the holes are in the same locations....
Great job on the script, gotta teach us how to do it..

P.S. I added it to the SVN, hope it;s ok with you...
http://dangerous-prototypes-open-hardwa ... tes/SOB.rb

Also I tested it and it works perfectly

Re: SOB Google Sketchup plugin

PostPosted: Fri Sep 21, 2012 9:58 am
by ian
This is so cool, thanks Tayken! Filip is going to do the works on it :) (blog, wiki, svn, etc).

Re: SOB Google Sketchup plugin

PostPosted: Fri Sep 21, 2012 10:39 am
by tayken
arakis wrote:Pure awesomeness, one request :) could you add a design, or simply augment the 'none' one. It be cool if we had the SoB actual cases that are on sale at seeed.... They are only 2mm wider then the PCBs, and the holes are in the same locations....

OK, that is just a matter of editing some if statements, can do that by tomorrow night. They are only 2 mm wider, right? No other changes?

arakis wrote:Great job on the script, gotta teach us how to do it..

Why not! Had to read lots of f*cking manuals and examples for it. I guess it is karma, after telling so many forum members to go and RTFM. :D

arakis wrote:P.S. I added it to the SVN, hope it;s ok with you...
http://dangerous-prototypes-open-hardwa ... tes/SOB.rb

Totally OK, just have to add a license script maybe? It is CC-0 as a DP standard.

arakis wrote:Also I tested it and it works perfectly

Perfect! No quirks, no strange behavior, right? I only tested it with Sketchup 8, but I got a warning that there is a new version. I'll have to update it and see if it still works or not.

ian wrote:This is so cool, thanks Tayken! Filip is going to do the works on it :) (blog, wiki, svn, etc).

Can help with that if it is needed. Filip, email, PM or smoke signal me for any part that I should do.

Re: SOB Google Sketchup plugin

PostPosted: Fri Sep 21, 2012 12:32 pm
by systemstech
This great! I love it. Is there any way that you can add a drop down list for all the SoB sizes? I am not a programmer and I have a feeling that your going to tell me to RTFM. LoL

Re: SOB Google Sketchup plugin

PostPosted: Fri Sep 21, 2012 7:49 pm
by tayken
systemstech wrote:This great! I love it. Is there any way that you can add a drop down list for all the SoB sizes? I am not a programmer and I have a feeling that your going to tell me to RTFM. LoL

Heheh, nice! I'm happy that you liked it. That is possible, I'll add it with some other possible changes later on. There is no manual for it, so I cannot tell you to go and RTFM. :D

Re: SOB Google Sketchup plugin

PostPosted: Sat Sep 22, 2012 11:34 am
by tayken
New version is in SVN. Now no side option makes the acrylic 2 mm wider than the PCB. Also added CC BY-SA license. I guess if you buy me enough beer, I'll waive all my rights. :P

Re: SOB Google Sketchup plugin

PostPosted: Mon Sep 24, 2012 4:00 am
by ian
Hi Ian,

I do freelance work writing plugins for SketchUp and came across SOB.rb in my news feed.

In SketchUp, all plugins share the same Ruby environment. As such, it's best not to use global variables and methods to avoid conflicts with other plugins.

I made a few small changes - mainly replacing all the global variables with module "instance" variables contained in the SOB module.

Also, the $exStrings.GetString(...) isn't likely doing anything for you unless you have added language translation files. It was never meant to be used by user-made plugins. In some instances, using GetString will fail on some people's SketchUp installation.

I have attached my modifications. If you need a diff, i can provide that also.



Got this via email. Will refer them to the forum thread.

Re: SOB Google Sketchup plugin

PostPosted: Mon Sep 24, 2012 6:56 am
by systemstech
tayken wrote: I guess if you buy me enough beer, I'll waive all my rights. :P


What brand and how much per case? Oh I want that in writing. :)

Re: SOB Google Sketchup plugin

PostPosted: Mon Sep 24, 2012 8:16 am
by tayken
ian wrote:Got this via email. Will refer them to the forum thread.

Thanks for forwarding. Yep, I was aware that they all share the same Ruby env, that was the reason for having a SOB module. Thought it can take care of global variables but I was wrong, nice to learn that!

$exStrings.GetString(...) is (was) for debugging, I had lots and lots of problems with different parts of it, some of them just stayed there. I'll hunt them down and delete them.

The only change I can see is changing global variables to "instance" variables (putting them inside module definition and changing $ to @), right? I compared it with the one I have, those are the only differences being shown.

I'll do the changes and commit them. I also saw some misspelled variable names, better to correct them too.

Re: SOB Google Sketchup plugin

PostPosted: Mon Sep 24, 2012 8:17 am
by tayken
systemstech wrote:
tayken wrote: I guess if you buy me enough beer, I'll waive all my rights. :P


What brand and how much per case? Oh I want that in writing. :)

I have to think more about it, drinking lots of good beer lately as a celebration so my standards got higher these couple of days. :D

Re: SOB Google Sketchup plugin

PostPosted: Wed Dec 05, 2012 12:38 pm
by Tochi
Hi, I think the plug in is very interesting and useful, but I have a problem with it.
If I creater a SOB case of 60x37x3 mm the case I get is 62000x39000x3000 mm!
Do I have somethink wrng in my configuration?
I'm using SU 8.0.15158

Re: SOB Google Sketchup plugin

PostPosted: Wed Dec 05, 2012 10:18 pm
by tayken
Hi Tochi!
When we export PCBs from Eagle to Sketchup, the dimensions change, mm becomes m, so I did the same thing so that we can see the design inside the box.

Also, the dimensions are for the PCB, so it adds some material for other stuff. For example, if you add side panels, your dimensions will increase as it needs some space for interlocks.

Re: SOB Google Sketchup plugin

PostPosted: Thu Dec 06, 2012 4:20 am
by arakis
Tochi wrote:Hi, I think the plug in is very interesting and useful, but I have a problem with it.
If I creater a SOB case of 60x37x3 mm the case I get is 62000x39000x3000 mm!
Do I have somethink wrng in my configuration?
I'm using SU 8.0.15158


This is due to the fact that SU is really bad at woking with small dimmensons, so everything is scaled up 1000times, although when you are finished with your design, and wat to laser cut it, you'll need to scale it back down before exporting to SVG...

Re: SOB Google Sketchup plugin

PostPosted: Thu Dec 06, 2012 8:52 pm
by Tochi
Ok Thank arakis and tayken.