Shelf: Convert post_height to variable, echo post_height.

This commit is contained in:
tastytea 2020-08-04 16:17:14 +02:00
parent 39a7014c89
commit 5b0d1ef276
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 7 additions and 4 deletions

View File

@ -30,6 +30,11 @@ lath_depth = 4.8; /* y */
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()
{
/* Sides */
@ -92,8 +97,6 @@ module lath(length)
module shelf()
{
function post_height() = drawers_begin + (drawer_size * drawers_number)
+ (board_height * drawers_number + board_height);
/* Posts */
color("olive")
{
@ -103,7 +106,7 @@ module shelf()
{
translate([x, y, 0])
{
lath(post_height());
lath(post_height);
}
}
}
@ -128,7 +131,7 @@ module shelf()
/* Top */
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])
{