// ------------------------------------------------------------------------ // Customizable girders for fischertechnik. // The modules in this file can be used to generate: // - Angle girders with a customizable length, height and width. // If the height or width are greater than the 15mm basic block size, // the corresponding side of the girder has a row of eyelets every // 15mm. The length sides both have flat grooves (the original angle // girder has a flat groove on one side and a pin on the other side). // If the width is greater than 15mm then there are grooves every 15mm. // - U-Girders with a customizable length and width. // //----------------------- parameters --------------------------- /* [Girder type] */ // Girder_type = 0; // [0 : no output, 1:Anglegirder, 2: U-Girder] /* [Angel girder options] */ // The length of the angel girder Length = 60; // [15,30,45,60,75,90,105,120,150,180] // The height of the angel girder Height = 15; // [15,30,45,60,75,90,105,120,150,180] // The width of the angel girder Width = 15; // [15,30,45,60,75,90,105,120,150,180] /* [U-Girder options] */ // The length of the U-Girder U_Length = 90; // [15,30,45,60,75,90,105,120,135, 150,165,180,195] // The width of the U-Girder U_Width = 30; // [15,30,45,60,75,90,105,120,135, 150,165,180,195] // Build plate size correction for the eyelets Correction = 0.2; // [0.0, 0.1, 0.2, 0.3] /* [Hidden] */ // ********************** // ** Static Settings: ** // ********************** include // ********************* // ** Helper Modules: ** // ********************* // -------------------------------------------------------------------- // The girder body without eyelets and grooves // -------------------------------------------------------------------- module girder_body(len = BASIC_BLOCK_SIZE * 4, w = BASIC_BLOCK_SIZE * 2, h = BASIC_BLOCK_SIZE, angle = true) { // make room for the flat grooves additionalheadthickness = 1.5; // the u-girder has an additional wall innerwidth = (angle == true) ? w - WALL_THICKNESS + MANIFOLD_CORRECTION : w - WALL_THICKNESS * 2; innerheight = h - WALL_THICKNESS + MANIFOLD_CORRECTION;// + 0.1; difference() { cube([w, len, h]); translate([WALL_THICKNESS, WALL_THICKNESS + additionalheadthickness, WALL_THICKNESS]) cube([innerwidth, len - ( 2 * WALL_THICKNESS + 2 * additionalheadthickness), innerheight]); } } // ********************* // ** Girder Modules: ** // ********************* // -------------------------------------------------------------------- // Customizable anglegirder // This version of the angle girder has no pin, but grooves on both sides. // The pins are difficult to print, so i decided to use a second groove // and an original Fischertechnik spring cam (Federnocken) // The length of the girder can be set in the customizer, but it should // always be set to multiples of the basic block size (15 mm) to have // complete eylets on the girder. // The same applies to the height and width of the girder. // -------------------------------------------------------------------- module angle_girder(len = BASIC_BLOCK_SIZE * 4, w = BASIC_BLOCK_SIZE, h = BASIC_BLOCK_SIZE) { w_cnt = w / BASIC_BLOCK_SIZE; h_cnt = h / BASIC_BLOCK_SIZE; difference() { difference() { girder_body(len, w, h); for (i = [0 : BASIC_BLOCK_SIZE : (w_cnt - 1) * BASIC_BLOCK_SIZE]) { translate([i, 0 ,0]) eyelet_row(len = len, height = WALL_THICKNESS * 2 + MANIFOLD_CORRECTION); } for (i = [0 : BASIC_BLOCK_SIZE : (h_cnt - 1) * BASIC_BLOCK_SIZE]) { translate([0, 0, i]) rotate([0,270,0]) eyelet_row(len = len, height = WALL_THICKNESS * 2 + MANIFOLD_CORRECTION); } } for (i = [0 : BASIC_BLOCK_SIZE : (w_cnt - 1) * BASIC_BLOCK_SIZE]) { translate([BASIC_BLOCK_HALF + i, 0, h / 2]) flat_groove(h); rotate([180,0,0]) translate([BASIC_BLOCK_HALF + i, -Length, -(h / 2)]) flat_groove(h); } } } // -------------------------------------------------------------------- // customizable u-girder // -------------------------------------------------------------------- module u_girder(len = BASIC_BLOCK_SIZE * 6, w = BASIC_BLOCK_SIZE * 3, h = BASIC_BLOCK_SIZE) { separator_thickness = 1; separator_height = 10; hole_diameter = PLATE_HOLE_DIAMETER; difference() { union() { difference() { // first, the girder body without any holes or eyelets girder_body(len = len, w = w, h = h, angle = false); // now cut out the grooves on both ends of the girder translate([w /2 , 0, BASIC_BLOCK_HALF]) rotate([0,90,0]) flat_groove(w); translate([w /2 , len, BASIC_BLOCK_HALF]) rotate([180,90,0]) flat_groove(w); // next, cut out the eyelets for (i = [0 : BASIC_BLOCK_SIZE : (h / BASIC_BLOCK_SIZE - 1) * BASIC_BLOCK_SIZE]) { translate([0, 0, i]) rotate([0, 270, 0]) eyelet_row(len = len, height = WALL_THICKNESS * 2 + MANIFOLD_CORRECTION); translate([w - WALL_THICKNESS, 0, i]) rotate([0, 270, 0]) eyelet_row(len = len, height = WALL_THICKNESS * 2 + MANIFOLD_CORRECTION); } // finally cut out the holes for the pins of the basic blocks for (i = [0 : BASIC_BLOCK_SIZE : len - BASIC_BLOCK_SIZE]) for (j = [BASIC_BLOCK_HALF : BASIC_BLOCK_SIZE : w ]) translate([j, PLATE_HOLE_DIAMETER - 0.1 + i, 0]) cube_with_cylinder(dir = "up"); } // now add the inner separator walls and the cylinders for the round holes for(k = [BASIC_BLOCK_SIZE : BASIC_BLOCK_SIZE : len - BASIC_BLOCK_SIZE]) { translate([0, k - separator_thickness,0]) cube([w,separator_thickness, separator_height]); for(l = [BASIC_BLOCK_SIZE : BASIC_BLOCK_SIZE : w - BASIC_BLOCK_SIZE]) translate([l, k - separator_thickness / 2, 0]) cylinder(r = 3.4, h = separator_height); } } // drill the holes through the girder for(m = [BASIC_BLOCK_SIZE : BASIC_BLOCK_SIZE : len - BASIC_BLOCK_SIZE]) for(n = [BASIC_BLOCK_SIZE : BASIC_BLOCK_SIZE : w - BASIC_BLOCK_SIZE]) translate([n, m - separator_thickness / 2, -(MANIFOLD_CORRECTION / 2)]) cylinder(d = PLATE_HOLE_DIAMETER, h = separator_height + MANIFOLD_CORRECTION); } } // ******************** // ** Build section: ** // ******************** module main() { if (Girder_type == 1) { angle_girder(len=Length, w=Width, h=Height); } else if (Girder_type == 2) { u_girder(len=U_Length, w=U_Width); } } main();