How to add connection tabs or slots.

111 views
Skip to first unread message

Linkreincarnate

unread,
Jan 20, 2011, 1:21:22 AM1/20/11
to MakerBot Operators
Basically I have an object made up of row and columns of another
object in OpenSCAD. I want to add connector tabs such that extending
a tab in one direction creates a matching slot on the opposite side so
the object could be easily tiled.

Here is what I have so far.


module Unit(xpos, ypos, zpos){
translate([xpos,ypos,zpos]){

difference() {
cube([10,10,10],true);
cylinder(h=6, r=1.5);

}
}
}



module Row(xpos, ypos, zpos){
translate([xpos,ypos,zpos]){
union(){
for(R=[0:9]){//enter number of units per row as the loop end number
Unit(0,10*R,0);

}
}
}
}

union(){
for(C=[0:9]){//enter number of rows per collumn as the loop end
number
Row(10*C,0,0);
}
}

What I would like to do is have a bit of code to add the tabs on the
basis of user input. (basically ask the user if they want connector
tabs and if yes on what sides) If the user wants tabs I'd like to be
able to make them in a manner such that any tile with an even number
of rows and collumns could be connected together whether or not they
matched size.. I would also like to be able to add a hinge to tiles
on user input.

Anyone willing to help me out? I am new to open Scad but I know how to
program in a few languages.

Robert Hunt

unread,
Jan 22, 2011, 3:06:09 PM1/22/11
to MakerBot Operators
I don't know OpenSCAD that well but here's a start. This modification
offsets specific rows based on the 'tabEvery' parameter.

tabEvery = 2;

module Unit(xpos, ypos, zpos) {
translate([xpos, ypos, zpos]) {
difference() {
cube([10, 10, 10], true);
cylinder(h = 6, r = 1.5);
}
}
}

module Row(xpos, ypos, zpos) {
translate([xpos, ypos, zpos]) {
union() {
for(R = [0:9]) {
//enter number of units per row as the loop end number
Unit(0, 10 * R, 0);
}
}
}
}

union() {
for(C = [0:9]) {
//enter number of rows per collumn as the loop end number
if ((C % tabEvery) == 0) {
Row(10 * C, 10, 0);
}
if ((C % tabEvery) != 0) {
Row(10 * C, 0, 0);

Linkreincarnate

unread,
Jan 22, 2011, 7:19:17 PM1/22/11
to MakerBot Operators
Nice. I may be able to make that work.

Linkreincarnate

unread,
Jan 24, 2011, 2:35:51 AM1/24/11
to MakerBot Operators
Thanks a lot btw. I just realized I didn't thank you.

Jordan Miller

unread,
Jan 24, 2011, 9:31:38 AM1/24/11
to make...@googlegroups.com
also look at the parametric MakerBot box-o-tron on thingiverse. it will make a lasercuttable box of arbitrary size and t-slots and matching holes every parametrically defined distance.

source and examples:
http://www.thingiverse.com/thing:404
http://www.thingiverse.com/thing:4578
http://www.thingiverse.com/thing:1190

jordan

> --
> You received this message because you are subscribed to the Google Groups "MakerBot Operators" group.
> To post to this group, send email to make...@googlegroups.com.
> To unsubscribe from this group, send email to makerbot+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/makerbot?hl=en.
>

Reply all
Reply to author
Forward
0 new messages