[Plugin] Slots 4 Tabs

[Plugin] Slots 4 Tabs

Postby kyyu » Fri May 28, 2010 2:49 am

This plugin automatically makes mating slots for a part with tabs.

Copyright(C) 2010, kyyu
All Rights Reserved
Permission to use, copy, modify, and distribute this software for any purpose
and without fee is hereby granted, provided this notice appears in any copies.
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Name: Slots 4 Tabs
Version: 1.1
SU Version: 7.0
Date: 06-02-2010

Description: Automatically makes mating slots for a tabbed part
Usage: Select both the parts (each grouped) and right click context menu ( [kyyu]/Slots 4 Tabs )
* Plugin will automatically detect which part is which
* Parts should be place in proper perpendicular, intersecting position
* Parts are assumed to be flat plates, thickness same as tab height
* Tab height needs to match expected thickness exactly (default is 0.25 inch)
* How to change thickness value:
1) Type for example "$kyyu_s4t = 0.25 or 3.mm" into the Ruby Console. Will be good for entire SU session.
2) Or change the default permanently, a few lines down in the code.
* Plugin automatically defaults to the move tool when done. You can comment this out, if not wanted.

History:
1.0 (05-27-2010) - first version
1.1 (06-02-2010) - fixed some metric bugs

=end





New version 1.1 (fixed some metric bugs)

ky_Slots_4_Tabs (v1.1).rb



Slots_4_Tabs (0.25 inch test file).skp


Slots_4_Tabs (0.125 inch test file).skp


Slots_4_Tabs (3mm test file).skp



-Kwok
0
Last edited by kyyu on Thu Jun 03, 2010 1:56 am, edited 1 time in total.

kyyu 
 

Re: [Plugin] Slots 4 Tabs

Postby xrok1 » Fri May 28, 2010 5:30 am

thats pretty cool! if you plan on taking this further i think automatically generating tabs of predefined sizes on clicked edge and tolerances (gaps) between slots and tabs would be excellent additions to this plugin. :D
1
“There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

http://www.Twilightrender.com try it!

xrok1 
 

Re: [Plugin] Slots 4 Tabs

Postby kyyu » Fri May 28, 2010 10:23 pm

Yes, I agree, auto tabs would be cool. So little time, and some many plugins to write. ;) -Kwok
1

kyyu 
 

Re: [Plugin] Slots 4 Tabs

Postby eco_artbarn » Tue Jun 01, 2010 11:32 am

hey kwok,
great idea
though when i do all the steps no slots are created
any suggestions?

cheers
0

eco_artbarn 
 

Re: [Plugin] Slots 4 Tabs

Postby kyyu » Tue Jun 01, 2010 10:25 pm

eco_artbarn wrote:hey kwok,
great idea
though when i do all the steps no slots are created
any suggestions?

cheers

Hi. I was going to ask if they were groups, but I just checked and you would have gotten an error message. If you can post a sample file, I will take a look at it. Or you can give my test file a try:

Make Slot test_v1.skp


-Kwok
0

kyyu 
 

Re: [Plugin] Slots 4 Tabs

Postby eco_artbarn » Wed Jun 02, 2010 10:27 am

hi i have tried yours and it works great

but my file does not, i have tried typing in and changing to decimal in ruby but i get this:

$kyyu_s4t = 3.mm
0.118110236220472
Error: #<ArgumentError: comparison of Length with nil failed>
C:/PROGRA~1/Google/GOOGLE~2/Plugins/ky_Slots_4_Tabs (v1.0).rb:35:in `=='
C:/PROGRA~1/Google/GOOGLE~2/Plugins/ky_Slots_4_Tabs (v1.0).rb:35:in `kyyu_Slots_4_Tabs'
C:/PROGRA~1/Google/GOOGLE~2/Plugins/ky_Slots_4_Tabs (v1.0).rb:250
C:/PROGRA~1/Google/GOOGLE~2/Plugins/ky_Slots_4_Tabs (v1.0).rb:250:in `call'

i tried changing it in the plugin in notepad but it didn't make any difference

attached is my file, maybe i am missing some simple step?
i need to work to 3mm
cheers ashley
0

eco_artbarn 
 

Re: [Plugin] Slots 4 Tabs

Postby kyyu » Thu Jun 03, 2010 2:22 am

Hi eco_artbarn,

Ok, I've fixed it and should now be working for metric. The 1st post has been updated with v1.1. This plugin is based on a whole string of assumptions and metric just doesn't work 100% of the time. But the bad news is your parts have a problem, I think. At least on my computer. It's the 1st time I have seen it massively fail and deform the part, instead of just giving an error message and stopping. Using 3.mm worked on my test 3 mm file, but not on yours. For some strange reason your 3mm is slightly different than what my computer draws. See the picture below. My coversion is exactly what the goggle calculator shows. Yours is not. If I type in exactly $kyyu_s4t = 0.11817322834643, then your part works. Otherwise massive failure. Just hit undo. I've stepped through it, but have no clue. One second it is fine and then next step, the faces are fractured and many bits gone. Possibly, your computer will not have a problem, if it's all consistant there.

Oh, if you want to measure the edge yourself, just select the edge and type this into the ruby console "Sketchup.active_model.selection[0].length"

s4t_metric problem.png


-Kwok
0

kyyu 
 

Re: [Plugin] Slots 4 Tabs

Postby eco_artbarn » Thu Jun 03, 2010 4:11 pm

:fecstatic:

hi kwok
well done
no idea about my measurements being off on my computer, but that did work now by putting

$kyyu_s4t = 3.mm

can i just open up the plugin in note pad and change that line to make it do that permanently?

many thanks for your help.
now i just need to try and unfold it all to try and create some 2d files to laser cut using the finger joints.
we never seem able to match up all 6 sides of an object when using a line cutting programm

big thanks
0

eco_artbarn 
 

Re: [Plugin] Slots 4 Tabs

Postby kyyu » Thu Jun 03, 2010 8:38 pm

eco_artbarn wrote:
...
$kyyu_s4t = 3.mm

can i just open up the plugin in note pad and change that line to make it do that permanently?
...

Cool! Glad it's working. :) Yes, you can just edit it, like a text file. -Kwok
0

kyyu 
 

Re: [Plugin] Slots 4 Tabs

Postby OregonCoastDad » Sat Jul 23, 2016 6:52 am

Hello,

I'm planning to download and play with this. I was wondering will it work on curved edges and parts?

Brock
0

OregonCoastDad 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: sokhet and 9 guests

Visit our sponsors: