Compare commits
2 Commits
7a12b81bf8
...
c97ba9787f
Author | SHA1 | Date | |
---|---|---|---|
c97ba9787f | |||
7461ee12dc |
@ -16,7 +16,7 @@ block_length = 6;
|
|||||||
block_height_ratio = 1; // [.33333333333:1/3, .5:1/2, 1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8, 9:9, 10:10]
|
block_height_ratio = 1; // [.33333333333:1/3, .5:1/2, 1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8, 9:9, 10:10]
|
||||||
|
|
||||||
// What type of block should this be? For type-specific options, see the "Wings," "Slopes," "Curves", and "Baseplates" tabs.
|
// What type of block should this be? For type-specific options, see the "Wings," "Slopes," "Curves", and "Baseplates" tabs.
|
||||||
block_type = "brick"; // [brick:Brick, tile:Tile, wing:Wing, slope:Slope, curve:Curve, baseplate:Baseplate]
|
block_type = "center"; // [brick:Brick, tile:Tile, wing:Wing, slope:Slope, curve:Curve, baseplate:Baseplate, center:Center Stud]
|
||||||
|
|
||||||
// What brand of block should this be? LEGO for regular LEGO bricks, Duplo for the toddler-focused larger bricks.
|
// What brand of block should this be? LEGO for regular LEGO bricks, Duplo for the toddler-focused larger bricks.
|
||||||
block_brand = "lego"; // [lego:LEGO, duplo:DUPLO]
|
block_brand = "lego"; // [lego:LEGO, duplo:DUPLO]
|
||||||
@ -164,8 +164,8 @@ module block(
|
|||||||
dual_bottom=false
|
dual_bottom=false
|
||||||
) {
|
) {
|
||||||
post_wall_thickness = (brand == "lego" ? 0.85 : 1);
|
post_wall_thickness = (brand == "lego" ? 0.85 : 1);
|
||||||
wall_thickness=(brand == "lego" ? 1.45 - wall_tolerance : 1.5 - wall_tolerance);
|
wall_thickness=(brand == "lego" ? 1.5 - wall_tolerance : 1.5 - wall_tolerance);
|
||||||
stud_diameter=(brand == "lego" ? 4.85 - stud_tolerance: 9.35 - stud_tolerance);
|
stud_diameter=(brand == "lego" ? 5 - stud_tolerance: 9.35 - stud_tolerance);
|
||||||
hollow_stud_inner_diameter = (brand == "lego" ? 3.1 : 6.7);
|
hollow_stud_inner_diameter = (brand == "lego" ? 3.1 : 6.7);
|
||||||
stud_height=(brand == "lego" ? 1.8 : 4.4);
|
stud_height=(brand == "lego" ? 1.8 : 4.4);
|
||||||
stud_spacing=(brand == "lego" ? 8 : 8 * 2);
|
stud_spacing=(brand == "lego" ? 8 : 8 * 2);
|
||||||
@ -175,7 +175,7 @@ module block(
|
|||||||
cylinder_precision=(brand == "lego" ? 0.1 : 0.05);
|
cylinder_precision=(brand == "lego" ? 0.1 : 0.05);
|
||||||
reinforcing_width = (brand == "lego" ? 0.7 : 1);
|
reinforcing_width = (brand == "lego" ? 0.7 : 1);
|
||||||
|
|
||||||
spline_length = (brand == "lego" ? 0.25 : 1.7);
|
spline_length = (brand == "lego" ? 0 : 1.7);
|
||||||
spline_thickness = (brand == "lego" ? 0.7 : 1.3);
|
spline_thickness = (brand == "lego" ? 0.7 : 1.3);
|
||||||
|
|
||||||
horizontal_hole_diameter = (brand == "lego" ? 4.8 : 4.8 * 2);
|
horizontal_hole_diameter = (brand == "lego" ? 4.8 : 4.8 * 2);
|
||||||
@ -276,7 +276,7 @@ module block(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The studs on top of the block (if it's not a tile).
|
// The studs on top of the block (if it's not a tile).
|
||||||
if ( type != "tile" && !real_dual_bottom ) {
|
if ( type != "tile" && type != "center" && !real_dual_bottom ) {
|
||||||
translate([stud_diameter * stud_rescale / 2, stud_diameter * stud_rescale / 2, 0])
|
translate([stud_diameter * stud_rescale / 2, stud_diameter * stud_rescale / 2, 0])
|
||||||
translate([(overall_length - total_studs_length)/2, (overall_width - total_studs_width)/2, 0]) {
|
translate([(overall_length - total_studs_length)/2, (overall_width - total_studs_width)/2, 0]) {
|
||||||
for (ycount=[0:real_width-1]) {
|
for (ycount=[0:real_width-1]) {
|
||||||
@ -288,6 +288,16 @@ module block(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Center Stud
|
||||||
|
if (type == "center"){
|
||||||
|
translate([axle_diameter / 2, axle_diameter / 2, 0]) {
|
||||||
|
translate([(overall_length - total_axles_length)/2, (overall_width - total_axles_width)/2, 0]) {
|
||||||
|
ycount = (real_width )/2;
|
||||||
|
xcount = (real_length)/2;
|
||||||
|
translate([(xcount-1)*stud_spacing,(ycount-1)*stud_spacing,block_height*real_height]) stud("hollow");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Interior splines to catch the studs.
|
// Interior splines to catch the studs.
|
||||||
translate([stud_spacing / 2 - wall_play - (spline_thickness/2), 0, 0]) for (xcount = [0:real_length-1]) {
|
translate([stud_spacing / 2 - wall_play - (spline_thickness/2), 0, 0]) for (xcount = [0:real_length-1]) {
|
||||||
@ -692,7 +702,7 @@ module block(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module stud() {
|
module stud(stud_type = stud_type) {
|
||||||
difference() {
|
difference() {
|
||||||
cylinder(r=(stud_diameter*stud_rescale)/2,h=stud_height,$fs=cylinder_precision);
|
cylinder(r=(stud_diameter*stud_rescale)/2,h=stud_height,$fs=cylinder_precision);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user