Last active
March 24, 2020 15:06
-
-
Save creationix/7dac74086928467b3c3add7115f12184 to your computer and use it in GitHub Desktop.
Block Raised Garden
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
width=6; | |
depth=3; | |
total_bricks=width*2+depth*2; | |
inside_surface_area=(width*16-8)/12 * (depth*16-8)/12; | |
echo("Total bricks",total_bricks); | |
echo("Dirt surface Area (sqft)", inside_surface_area); | |
for (i=[0:1:width-1]){ | |
translate([i * 16,0,0]) { | |
small_block(); | |
translate([8,0,4]) | |
block(); | |
} | |
translate([i * 16,depth*16,0]) { | |
translate([8,0,0]) | |
small_block(); | |
translate([0,0,4]) | |
block(); | |
} | |
} | |
for (i=[0:1:depth-1]){ | |
translate([0,i*16,0]) { | |
translate([8,8,0]) rotate([0,0,90]) | |
small_block(); | |
translate([8,0,4]) rotate([0,0,90]) | |
block(); | |
} | |
translate([width*16,i*16,0]) { | |
translate([8,0,0]) rotate([0,0,90]) | |
small_block(); | |
translate([8,8,4]) rotate([0,0,90]) | |
block(); | |
} | |
} | |
module block() { | |
//#cube([16, 8, 8]); | |
translate([0,0,3/16]) linear_extrude(height=7+5/8) | |
import("block-profile.svg", dpi=25.4); | |
} | |
module small_block() { | |
//#cube([16,8,4]); | |
translate([3/16,3/16,3/16]) | |
cube([15+5/8,7+5/8,3+5/8]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.