Loading

Four in a Line

by guberti, published

Four in a Line by guberti May 7, 2013

Description

Asle known as Connect Four, Four in a line is a game where you try to use your pieces to get a row of four. The rules can be found at en.wikipedia.org/wiki/Connect_Four. My thing also has two tubes on each side of the board for easy storage of pieces. I made this thing in OpenSCAD with the following code:

Board:

difference() {
cylinder(8,55,55);
translate([0,0,1])cylinder(7,53,53);
}
//cylinder(8,40,40); //Comment out this line before pressing F6
difference(){
translate([56,0,0])cylinder(100,6,6);
translate([56,0,0])cylinder(100,5,5);
translate([57,0,10])cylinder(3,6,6);
}
difference(){
translate([-56,0,0])cylinder(100,6,6);
translate([-56,0,0])cylinder(100,5,5);
translate([-57,0,10])cylinder(3,6,6);
}
translate([-57,0,9])cylinder(1,6,6);
translate([57,0,9])cylinder(1,6,6);
difference() {
translate([-52,-2,15])cube([104,4,85]); //Change 20 t0 10?
translate([-52,-1,20])cube([104,2,85]);
translate([45,6,65])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,50])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,35])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,20])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,80])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,95])rotate([90,0,0])cylinder(15,5,5);

translate([30,6,65])rotate([90,0,0])cylinder(15,5,5);
translate([30,6,50])rotate([90,0,0])cylinder(15,5,5);
translate([30,6,35])rotate([90,0,0])cylinder(15,5,5);
translate([30,6,20])rotate([90,0,0])cylinder(15,5,5);
translate([30,6,80])rotate([90,0,0])cylinder(15,5,5);
translate([30,6,95])rotate([90,0,0])cylinder(15,5,5);

translate([15,6,65])rotate([90,0,0])cylinder(15,5,5);
translate([15,6,50])rotate([90,0,0])cylinder(15,5,5);
translate([15,6,35])rotate([90,0,0])cylinder(15,5,5);
translate([15,6,20])rotate([90,0,0])cylinder(15,5,5);
translate([15,6,80])rotate([90,0,0])cylinder(15,5,5);
translate([15,6,95])rotate([90,0,0])cylinder(15,5,5);

translate([0,6,65])rotate([90,0,0])cylinder(15,5,5);
translate([0,6,50])rotate([90,0,0])cylinder(15,5,5);
translate([0,6,35])rotate([90,0,0])cylinder(15,5,5);
translate([0,6,20])rotate([90,0,0])cylinder(15,5,5);
translate([0,6,80])rotate([90,0,0])cylinder(15,5,5);
translate([0,6,95])rotate([90,0,0])cylinder(15,5,5);

translate([-15,6,65])rotate([90,0,0])cylinder(15,5,5);
translate([-15,6,50])rotate([90,0,0])cylinder(15,5,5);
translate([-15,6,35])rotate([90,0,0])cylinder(15,5,5);
translate([-15,6,20])rotate([90,0,0])cylinder(15,5,5);
translate([-15,6,80])rotate([90,0,0])cylinder(15,5,5);
translate([-15,6,95])rotate([90,0,0])cylinder(15,5,5);

translate([-30,6,65])rotate([90,0,0])cylinder(15,5,5);
translate([-30,6,50])rotate([90,0,0])cylinder(15,5,5);
translate([-30,6,35])rotate([90,0,0])cylinder(15,5,5);
translate([-30,6,20])rotate([90,0,0])cylinder(15,5,5);
translate([-30,6,80])rotate([90,0,0])cylinder(15,5,5);
translate([-30,6,95])rotate([90,0,0])cylinder(15,5,5);

translate([-45,6,65])rotate([90,0,0])cylinder(15,5,5);
translate([-45,6,50])rotate([90,0,0])cylinder(15,5,5);
translate([-45,6,35])rotate([90,0,0])cylinder(15,5,5);
translate([-45,6,20])rotate([90,0,0])cylinder(15,5,5);
translate([-45,6,80])rotate([90,0,0])cylinder(15,5,5);
translate([-45,6,95])rotate([90,0,0])cylinder(15,5,5);
}

//translate([-55,-4,15])cube([110,8,85]); //Comment out this line before pressing F6
translate([-55,-1,14])cube([110,2,1]);
translate([5.75,-2,15])cube([3.5,4,88]);
translate([-8.75,-2,15])cube([3.5,4,88]);
translate([20.75,-2,15])cube([3.5,4,88]);
translate([-23.75,-2,15])cube([3.5,4,88]);
translate([35.75,-2,15])cube([3.5,4,88]);
translate([-38.75,-2,14])cube([3.5,4,88]);

Token:

difference(){
cylinder(1.8,4.8,4.8);
cylinder(0.5,4,4);
translate([0,0,1.3])cylinder(0.5,4,4);
}

Recent Comments

view all

I printed this and there are two problems. One minor and one major. First minor problem in the part that connects to the side tubes to the base needs to be stronger. This broke immediately upon removal and I had to make an abs/acetone slurry to glue it and reinforce it back together. However, the major problem is... it doesn't work. The tokens should be held in the visible slots by the bottom edge resting on the top edge if the one below. On this there is too much space between the slots for this to happen. For this to work you need to shorten the vertical distance between the holes so the entire height of the playing field is exactly 6x the diameter of the tokens. Also, I would make the holding tubes 1.5 the diameter of the tokens and make that joint with the base more robust or make it a two piece object where the top slides into slots on the base for setup.

You're right. Also, do you know if OpenSCAD has a foreach loop? I would like to use one for my next print.

awesome. You should really use for loops in your code though, it'd make it much more manageable:

translate([45,6,65])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,50])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,35])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,20])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,80])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,95])rotate([90,0,0])cylinder(15,5,5);

becomes:

for (i=[20:15:95])
{
translate([45,6,i])rotate([90,0,0])cylinder(15,5,5);
}

More from Games

view more

Liked By

view all

License

Four in a Line by guberti is licensed under the Creative Commons - Attribution license.

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

Instructions

I included 3 files:
"Four in a line.stl" is the board
"Four ina line token.stl" is one token
"Four in a line tokens (17).stl" is 17 tokens (the number of tokens each player need"
The chips should be printed in two different colors.

Comments

You must be logged in to post a comment.

qnumbra on Sep 22, 2013 said:

I printed this and there are two problems. One minor and one major. First minor problem in the part that connects to the side tubes to the base needs to be stronger. This broke immediately upon removal and I had to make an abs/acetone slurry to glue it and reinforce it back together. However, the major problem is... it doesn't work. The tokens should be held in the visible slots by the bottom edge resting on the top edge if the one below. On this there is too much space between the slots for this to happen. For this to work you need to shorten the vertical distance between the holes so the entire height of the playing field is exactly 6x the diameter of the tokens. Also, I would make the holding tubes 1.5 the diameter of the tokens and make that joint with the base more robust or make it a two piece object where the top slides into slots on the base for setup.

jamesglanville on May 7, 2013 said:

awesome. You should really use for loops in your code though, it'd make it much more manageable:

translate([45,6,65])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,50])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,35])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,20])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,80])rotate([90,0,0])cylinder(15,5,5);
translate([45,6,95])rotate([90,0,0])cylinder(15,5,5);

becomes:

for (i=[20:15:95])
{
translate([45,6,i])rotate([90,0,0])cylinder(15,5,5);
}

guberti on May 8, 2013 said:

You're right. Also, do you know if OpenSCAD has a foreach loop? I would like to use one for my next print.

kwalus on May 7, 2013 said:

have you printed this? if so, can you post a photo?

guberti on May 7, 2013 said:

No, sorry. I havn't printed it. Did I make a mistake? If so, please tell me so I can fix it.

Top