From 3a2c6bece8eae8deedda2344c473050c90122c96 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Mon, 15 Jun 2020 02:59:07 +0200 Subject: [PATCH] Fix library now you can change sixinch width and all files should render correctly --- RackCabinets/sixinch_library.scad | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/RackCabinets/sixinch_library.scad b/RackCabinets/sixinch_library.scad index d497949..ad88b7e 100755 --- a/RackCabinets/sixinch_library.scad +++ b/RackCabinets/sixinch_library.scad @@ -3,7 +3,7 @@ $fn = 50*1; //Constants, do not change ! sixinch = 155*1; // cm = 6" -width = 155-20-20; // 11.5cm between rails +width = sixinch-20-20; // 11.5cm between rails unit = (44.5/19)*6; // 1U gauge = 3*1; gauge_box = 2*1; @@ -185,8 +185,9 @@ module box(dp,u,screw_bottom_front,round_peg,screw_side_front, remove_middle){ difference(){ translate([20,0,gauge]){ difference(){ - cube([115,u*unit,dp]); - translate([gauge_box,gauge_box,-1]){ cube([115-gauge_box*2,u*unit,dp+2]);} + cube_width = sixinch - 40; + cube([cube_width,u*unit,dp]); + translate([gauge_box,gauge_box,-1]){ cube([cube_width-gauge_box*2,u*unit,dp+2]);} } } //CHIMNEY @@ -298,8 +299,9 @@ module lid(dp,u,screw_front,screw_back, remove_middle=false){ } //lid + cube_width = sixinch - 40; translate([20+gauge_box+slip,u*unit-gauge_box,gauge]){ - cube([115-gauge_box*2-slip*2,gauge_box,dp]); + cube([cube_width-gauge_box*2-slip*2,gauge_box,dp]); } //back rest translate([sixinch/2-40,u*unit-gauge_box-2,gauge+dp-2-gauge_box]){