Commit e7a80e49 authored by William Wadsworth's avatar William Wadsworth
Browse files

trim c270 mount bulge

parent e1fd8c04
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -82,7 +82,10 @@ module c270_cutout(beam_r=4.3, cover=true){
                }
                translate([0, cut_mid_tall, block_h-in_h_tall]){
                    rotate_y(180){
                        intersection(){
                            round_top_cube([inner_w, cut_length_tall, block_h], 1.5, center=true);
                            slope_top_cube([inner_w, 2*cut_length_tall, block_h], slope_angle=30, slope_depth=3, center=true);
                        }
                    }
                }
                // component clearance, sensor end
@@ -194,7 +197,10 @@ module c270_camera_mount(screwhole=true){
            // outer size over tall components is inner plus roof thickness
            bulge = c270_tallest_clearance() + 1; 
            translate([0, centre, -mount_height]){
                    intersection(){
                        round_top_cube([w, length, bulge], 2, center=true, $fn=16);
                        slope_top_cube([w, 2*length, bulge], slope_angle=30, slope_depth=3, center=true);
                    }
            }
        }
        translate_z(-mount_height){
+32 −8
Original line number Diff line number Diff line
@@ -1188,7 +1188,7 @@ module cylinder_to_square_column(d=undef, r=undef, h=undef, transition=undef){

/* Create a cube that is rounded on top and flat on the bottom

:param dimensions: `[x, y, z]` dimensions of cube
:param dimensions: `[x, y, z]` dimensions of the cube
:param rounding_radius: The corner radius.
:param center: If `true` places at center in xy, but still the base is at z=0
*/
@@ -1229,7 +1229,7 @@ module round_top_cube(dimensions, rounding_radius, center=false){

/* Create a cube with rounded edges and corners

:param dimensions: `[x, y, z]` dimensions of cube
:param dimensions: `[x, y, z]` dimensions of the cube
:param rounding_radius: The corner radius.
:param center: If `true` places at center in xyz
*/
@@ -1277,8 +1277,8 @@ module flatten(shift=true){

Intended for cutting round-chamfered sections from a block using difference().
The cylinder lies in the y-direction, centred on the origin.
This version has the rising chamfer in the positive x-direction, see tangent_to_cylinder_minus()
for a rising chamfer in the negative x-direction.
This version has the rising chamfer in the positive x-direction, 
see tangent_to_cylinder_minus() for a rising chamfer in the negative x-direction.

### Example
```example
@@ -1311,7 +1311,7 @@ difference(){

:param r: radius of the cylinder to tangent
:param h: height of the cylinder to tangent (in y-direction)
:param angle: angle, rising to positive x
:param angle: angle, above horizontal rising to positive x
:param box: side length of the box that is tangent to the cylinder
*/
module tangent_to_cylinder_plus(r=undef, h=99, angle=undef, box=10){
@@ -1332,8 +1332,8 @@ module tangent_to_cylinder_plus(r=undef, h=99, angle=undef, box=10){

Intended for cutting round-chamfered sections from a block using difference().
The cylinder lies in the y-direction, centred on the origin.
This version has the rising chamfer in the negative x-direction, see tangent_to_cylinder_plus()
for a rising chamfer in the positive x-direction.
This version has the rising chamfer in the negative x-direction, 
see tangent_to_cylinder_plus() for a rising chamfer in the positive x-direction.

### Example
```example
@@ -1365,7 +1365,7 @@ difference(){

:param r: radius of the cylinder to tangent
:param h: height of the cylinder to tangent (in y-direction)
:param angle: angle, rising to positive x
:param angle: angle above horizontal, rising to negative x
:param box: side length of the box that is tangent to the cylinder
*/
module tangent_to_cylinder_minus(r=undef, h=99, angle=undef, box=10){
@@ -1408,3 +1408,27 @@ module two_line_text(message1="", message2="", shift_up=0, size=14, halign="cent
        }
    }
}


/* Create a cube with sloping edges at the top

:param dimensions: `[x, y, z]` dimensions of the cube
:param slope_angle: The angle above the horizontal for the slope
:param slope_depth: The distance below the top that the slope starts
:param center: If `true` places at center in xy, but still the base is at z=0
*/
module slope_top_cube(dimensions, slope_angle=30, slope_depth=2, center=false){
    slope_width = slope_depth / tan(slope_angle);
    top_x = dimensions.x - 2* slope_width;
    top_y = dimensions.y - 2* slope_width;
    height = dimensions.z - slope_depth;
    trans = (center)? [-dimensions.x/2, -dimensions.y/2, 0] : [0,0,0] ;
    translate(trans){
        hull(){
            cube([dimensions.x, dimensions.y, height], center=false);
            translate([slope_width, slope_width, dimensions.z - tiny()]){
                cube([top_x, top_y, tiny()]);
            }
        }
    }
}