AcornElectron

Changeset

29:0906a130dae4
2014-04-23 Paul Boddie raw files shortlog changelog graph Improved the expression of the inner edge cutouts.
cartridge.scad (file)
     1.1 --- a/cartridge.scad	Wed Apr 23 20:33:02 2014 +0200
     1.2 +++ b/cartridge.scad	Wed Apr 23 20:42:16 2014 +0200
     1.3 @@ -80,10 +80,12 @@
     1.4  	front = 2;
     1.5  	back = 3.5;
     1.6  	top = 3;
     1.7 -	front_left = 1.5;
     1.8 -	front_right = front_left;
     1.9 -	back_left = 1.5;
    1.10 -	back_right = back_left;
    1.11 +	front_side = 1.5;
    1.12 +	front_left = front_side;
    1.13 +	front_right = front_side;
    1.14 +	back_side = 1.5;
    1.15 +	back_left = back_side;
    1.16 +	back_right = back_side;
    1.17  	bottom = 2;
    1.18  
    1.19  	/* Label details. */
    1.20 @@ -108,16 +110,20 @@
    1.21  	top_groove_width = 1.0;
    1.22  	top_groove_depth = 2.0;
    1.23  
    1.24 -	/* Space for the back inside the front. */
    1.25 +	/*
    1.26 +	Space for the inner edge of the back inside the front.
    1.27 +	Offsets are measured from the outside surfaces.
    1.28 +	*/
    1.29  
    1.30  	inner_top_front_cutout_width = width - back_left - back_right;
    1.31  	inner_top_front_cutout_depth = 1.0;
    1.32 -	inner_top_front_cutout_offset = 2.0; /* from top outer surface */
    1.33 +	inner_top_front_cutout_height = 1.0;
    1.34 +	inner_top_front_cutout_offset = top - inner_top_front_cutout_height;
    1.35  
    1.36  	inner_side_front_cutout_height = height - inner_top_front_cutout_offset;
    1.37  	inner_side_front_cutout_width = 0.5;
    1.38  	inner_side_front_cutout_depth = 1.0;
    1.39 -	inner_side_front_cutout_offset = 1.0; /* from side outer surface */
    1.40 +	inner_side_front_cutout_offset = front_side - inner_side_front_cutout_width;
    1.41  
    1.42  	back_cavity_width = 68.0;
    1.43  	back_cavity_inner_width = 65.0;
    1.44 @@ -367,10 +373,10 @@
    1.45  
    1.46  		translate([0, -inner_top_front_cutout_depth / 2, height / 2 -
    1.47  			inner_top_front_cutout_offset -
    1.48 -			inner_top_front_cutout_depth / 2])
    1.49 +			inner_top_front_cutout_height / 2])
    1.50  			cube([inner_top_front_cutout_width,
    1.51  				inner_top_front_cutout_depth,
    1.52 -				inner_top_front_cutout_depth], center = true);
    1.53 +				inner_top_front_cutout_height], center = true);
    1.54  
    1.55  		translate([width / 2 - inner_side_front_cutout_offset -
    1.56  			inner_side_front_cutout_width / 2,