OpenFlexure Microscope OpenSCAD docs

test_pieces/feet_open_slot.scad

Build a version of the feet with open holes to view the actuator motion.

Use with main_body_open_actuators.scad to view the band and actuator motion all the way to the upper and lower stops

module feet_open_slot_stl()
[Source]
module feet_open_slot_stl(){
    lie_flat = !false;
    params = default_params();
    x_tr = actuator_housing_xy_size().x + 1.5;
    foot_height = key_lookup("foot_height", params);
    l = actuator_housing_xy_size().y;

    tilt_o = 15 - 0; //the angle of the ground relative to the axis of the outer foot
    h_o = foot_height - 0; //defined in parameters.scad, set hover=2 to not touch ground, useful for the middle foot.
    translate([x_tr, 0]){
        //the foot base may be tilted, lie_flat makes this z=0
        rotate_x(lie_flat ? tilt_o : 0){
            z_top = h_o - (l/2)*tan(tilt_o);
            //makes the bottom z=0  
            translate_z(lie_flat ? z_top : 0){
                difference(){
                    outer_foot(params, lie_flat=false, letter="X");
                    foot_viewing_slot(params, middle=false);
                }
            }
        }
    }

    theta = z_actuator_tilt(params);
    tilt_m = 0 - theta; //the angle of the ground relative to the axis of the foot
    h_m = foot_height + 2; //defined in parameters.scad, set hover=2 to not touch ground, useful for the middle foot.
    //the foot base may be tilted, lie_flat makes this z=0
    rotate_x(lie_flat ? tilt_m : 0){
        //makes the bottom z=0. - 1.38 is a fudge fator to sit the foot on the xy plane correctly
        //this only works for foot_height=15 (in params)
        z_top = h_m - (l/2)*tan(tilt_m) - 1.38;
        translate_z(lie_flat ? z_top : 0){
            difference(){
                middle_foot(params, lie_flat=false, letter="Z");
                foot_viewing_slot(params, middle=true);
            }
        }
    }

    translate([-x_tr, 0]){
        rotate_x(lie_flat ? tilt_o : 0){
            //makes the bottom z=0  
            translate_z(lie_flat ? h_o - (l/2)*tan(tilt_o) : 0){
                difference(){
                    outer_foot(params, lie_flat=false, letter="Y");
                    foot_viewing_slot(params, middle=false);
                }
            }
        }
    }
}

A version of the feet with open holes to view the actuator motion.

Use with main_body_open_actuators.stl to view the band and actuator motion all the way to the upper and lower stops

module foot_viewing_slot(params, middle=false)
[Source]
module foot_viewing_slot(params, middle=false){
    w = 10;
    xy_travel = xy_actuator_travel(params) + actuator_travel_clearance_foot() + xy_travel_adjustment(params);
    if (middle){
        theta = z_actuator_tilt(params);
        y = actuator_housing_xy_size().y * cos(theta) / 2 - actuator_wall_t() - tiny();
        z = -z_actuator_travel(params)*cos(theta) - actuator_travel_clearance_foot() - tiny();
                translate([-w/2, y, z]){
                    cube([w,99,30]);
                }
    }
    else {
        y = actuator_housing_xy_size().y / 2 - actuator_wall_t() - tiny();
        z = -xy_travel - tiny();
            translate([-w/2, y, z]){
                cube([w,99,30]);
            }
    }
}

slots to cut in the feet to view the actuator motion

params:microscope parameters dictionary

middle:boolean indicating the middle (z-axis) foot, false for the outer x,y axis feet