Shelf: Convert post_height to variable, echo post_height.
This commit is contained in:
parent
39a7014c89
commit
5b0d1ef276
|
@ -30,6 +30,11 @@ lath_depth = 4.8; /* y */
|
||||||
|
|
||||||
board_height = 1.6; /* z */
|
board_height = 1.6; /* z */
|
||||||
|
|
||||||
|
post_height = drawers_begin + (drawer_size * drawers_number)
|
||||||
|
+ (board_height * drawers_number + board_height);
|
||||||
|
|
||||||
|
echo("Post height is", post_height);
|
||||||
|
|
||||||
module drawer()
|
module drawer()
|
||||||
{
|
{
|
||||||
/* Sides */
|
/* Sides */
|
||||||
|
@ -92,8 +97,6 @@ module lath(length)
|
||||||
|
|
||||||
module shelf()
|
module shelf()
|
||||||
{
|
{
|
||||||
function post_height() = drawers_begin + (drawer_size * drawers_number)
|
|
||||||
+ (board_height * drawers_number + board_height);
|
|
||||||
/* Posts */
|
/* Posts */
|
||||||
color("olive")
|
color("olive")
|
||||||
{
|
{
|
||||||
|
@ -103,7 +106,7 @@ module shelf()
|
||||||
{
|
{
|
||||||
translate([x, y, 0])
|
translate([x, y, 0])
|
||||||
{
|
{
|
||||||
lath(post_height());
|
lath(post_height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,7 +131,7 @@ module shelf()
|
||||||
|
|
||||||
/* Top */
|
/* Top */
|
||||||
translate(
|
translate(
|
||||||
[x, drawer_size - lath_depth, post_height() - lath_depth - 10])
|
[x, drawer_size - lath_depth, post_height - lath_depth - 10])
|
||||||
{
|
{
|
||||||
rotate([90, 0, 0])
|
rotate([90, 0, 0])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue