SOB Google Sketchup plugin

Standard PCB templates and project cases

SOB Google Sketchup plugin

Postby tayken » Thu Sep 20, 2012 10:24 am

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!
Attachments
SOB.zip
(3.07 KiB) Downloaded 209 times
User avatar
tayken
Developer
Developer
 
Posts: 1392
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: SOB Google Sketchup plugin

Postby arakis » Fri Sep 21, 2012 8:44 am

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
best regards FIlip.
arakis
Crew
Crew
 
Posts: 1044
Joined: Wed May 25, 2011 11:15 am
Location: Belgrade, Serbia

Re: SOB Google Sketchup plugin

Postby ian » Fri Sep 21, 2012 9:58 am

This is so cool, thanks Tayken! Filip is going to do the works on it :) (blog, wiki, svn, etc).
User avatar
ian
Crew
Crew
 
Posts: 10578
Joined: Mon Jul 06, 2009 6:14 am

Re: SOB Google Sketchup plugin

Postby tayken » Fri Sep 21, 2012 10:39 am

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.
User avatar
tayken
Developer
Developer
 
Posts: 1392
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: SOB Google Sketchup plugin

Postby systemstech » Fri Sep 21, 2012 12:32 pm

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
User avatar
systemstech
Sr. Member
Sr. Member
 
Posts: 288
Joined: Tue Aug 07, 2012 10:11 pm
Location: Homestead, FL. U.S.A.

Re: SOB Google Sketchup plugin

Postby tayken » Fri Sep 21, 2012 7:49 pm

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
User avatar
tayken
Developer
Developer
 
Posts: 1392
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: SOB Google Sketchup plugin

Postby tayken » Sat Sep 22, 2012 11:34 am

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
User avatar
tayken
Developer
Developer
 
Posts: 1392
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: SOB Google Sketchup plugin

Postby ian » Mon Sep 24, 2012 4:00 am

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.
Attachments
SOB.zip
(3.21 KiB) Downloaded 176 times
User avatar
ian
Crew
Crew
 
Posts: 10578
Joined: Mon Jul 06, 2009 6:14 am

Re: SOB Google Sketchup plugin

Postby systemstech » Mon Sep 24, 2012 6:56 am

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. :)
User avatar
systemstech
Sr. Member
Sr. Member
 
Posts: 288
Joined: Tue Aug 07, 2012 10:11 pm
Location: Homestead, FL. U.S.A.

Re: SOB Google Sketchup plugin

Postby tayken » Mon Sep 24, 2012 8:16 am

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.
User avatar
tayken
Developer
Developer
 
Posts: 1392
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: SOB Google Sketchup plugin

Postby tayken » Mon Sep 24, 2012 8:17 am

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
User avatar
tayken
Developer
Developer
 
Posts: 1392
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: SOB Google Sketchup plugin

Postby Tochi » Wed Dec 05, 2012 12:38 pm

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
Tochi
Newbie
Newbie
 
Posts: 3
Joined: Wed Dec 05, 2012 12:34 pm

Re: SOB Google Sketchup plugin

Postby tayken » Wed Dec 05, 2012 10:18 pm

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.
User avatar
tayken
Developer
Developer
 
Posts: 1392
Joined: Sat Dec 12, 2009 10:58 am
Location: Tokyo, Japan

Re: SOB Google Sketchup plugin

Postby arakis » Thu Dec 06, 2012 4:20 am

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...
best regards FIlip.
arakis
Crew
Crew
 
Posts: 1044
Joined: Wed May 25, 2011 11:15 am
Location: Belgrade, Serbia

Re: SOB Google Sketchup plugin

Postby Tochi » Thu Dec 06, 2012 8:52 pm

Ok Thank arakis and tayken.
Tochi
Newbie
Newbie
 
Posts: 3
Joined: Wed Dec 05, 2012 12:34 pm

Next

Return to Sick of Beige