Loading openscad/libs/lib_optics.scad +2 −3 Original line number Diff line number Diff line Loading @@ -447,9 +447,8 @@ function camera_board_thickness(optics_config) = key_lookup("board_thickness", o :param params: The microscope parameter dictionary :param optics_config: Optics configuration dictionary :param base_r: Radius of the base central point of the mount body :param message: Message to be printed on the base (used to denote upright versions) */ module camera_platform(params, optics_config, base_r, message=""){ module camera_platform(params, optics_config, base_r){ assert(key_lookup("optics_type", optics_config)=="spacer", "Use spacer optics configuration to create a camera_platform."); // platform height is 5mm below the lens spacer (board is 1mm thick mounting posts are 4mm tall) Loading @@ -457,7 +456,7 @@ module camera_platform(params, optics_config, base_r, message=""){ assert(platform_h > upper_z_flex_z(params), "Platform height too low for z-axis mounting"); camera_rotation = key_lookup("rotation", optics_config); message = key_lookup("message", optics_config); // Make a camera platform with a fitting wedge on the side and a platform on the top difference(){ union(){ Loading openscad/libs/optics_configurations.scad +7 −3 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ function rms_infinity_f50d13_config(camera_type = "picamera_2", beamsplitter=fal */ function pilens_config(camera_type = "picamera_2", upright=false) = let( rotation = upright ? 45+180 : 45, message = upright ? "upright" : "", config_dict = [["optics_type", "spacer"], ["camera_type", camera_type], ["lens_r", 3], Loading @@ -87,7 +88,8 @@ function pilens_config(camera_type = "picamera_2", upright=false) = let( ["lens_spacing", 17], // Minimum 17 for spacer to build correctly ["mounting_post_height",4], ["board_thickness",1], ["rotation", rotation]] // camera rotation about z ["rotation", rotation], // camera rotation about z ["message", message]] ) config_dict; Loading @@ -106,7 +108,8 @@ function c270lens_config(camera_type = "logitech_c270") = let( ["lens_spacing", 17], // Minimum 13 for spacer to build correctly ["mounting_post_height",4], ["board_thickness",1], ["rotation", 180]] // camera rotation about z ["rotation", 180], // camera rotation about z ["message", "C270"]] ) config_dict; Loading @@ -125,5 +128,6 @@ function b0196lens_config(camera_type = "arducam_b0196") = let( ["lens_spacing", 17], // Minimum 17 for spacer to build correctly ["mounting_post_height",4], ["board_thickness",1], ["rotation", -45]] // camera rotation about z ["rotation", -45], // camera rotation about z ["message", "B0196"]] ) config_dict; openscad/upright_camera_platform.scad +1 −1 Original line number Diff line number Diff line Loading @@ -14,5 +14,5 @@ camera_platform_stl(); module camera_platform_stl(){ params = default_params(); optics_config = pilens_config(upright=true); camera_platform(params, optics_config, base_r=5, message="upright"); camera_platform(params, optics_config, base_r=5); } rendering/low_cost_optics_assembly.scad +1 −2 Original line number Diff line number Diff line Loading @@ -206,9 +206,8 @@ module assemble_lens_spacer(frame, camera_type="pi_camera"){ module rendered_camera_platform(camera_type="pi_camera", upright=false){ params = render_params(); optics_config = (camera_type == "c270") ? c270lens_config() : pilens_config(upright=upright); message = (upright)? "upright" : ""; coloured_render(optics_module_colour()){ camera_platform(params, optics_config, 5, message=message); camera_platform(params, optics_config, 5); } } Loading Loading
openscad/libs/lib_optics.scad +2 −3 Original line number Diff line number Diff line Loading @@ -447,9 +447,8 @@ function camera_board_thickness(optics_config) = key_lookup("board_thickness", o :param params: The microscope parameter dictionary :param optics_config: Optics configuration dictionary :param base_r: Radius of the base central point of the mount body :param message: Message to be printed on the base (used to denote upright versions) */ module camera_platform(params, optics_config, base_r, message=""){ module camera_platform(params, optics_config, base_r){ assert(key_lookup("optics_type", optics_config)=="spacer", "Use spacer optics configuration to create a camera_platform."); // platform height is 5mm below the lens spacer (board is 1mm thick mounting posts are 4mm tall) Loading @@ -457,7 +456,7 @@ module camera_platform(params, optics_config, base_r, message=""){ assert(platform_h > upper_z_flex_z(params), "Platform height too low for z-axis mounting"); camera_rotation = key_lookup("rotation", optics_config); message = key_lookup("message", optics_config); // Make a camera platform with a fitting wedge on the side and a platform on the top difference(){ union(){ Loading
openscad/libs/optics_configurations.scad +7 −3 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ function rms_infinity_f50d13_config(camera_type = "picamera_2", beamsplitter=fal */ function pilens_config(camera_type = "picamera_2", upright=false) = let( rotation = upright ? 45+180 : 45, message = upright ? "upright" : "", config_dict = [["optics_type", "spacer"], ["camera_type", camera_type], ["lens_r", 3], Loading @@ -87,7 +88,8 @@ function pilens_config(camera_type = "picamera_2", upright=false) = let( ["lens_spacing", 17], // Minimum 17 for spacer to build correctly ["mounting_post_height",4], ["board_thickness",1], ["rotation", rotation]] // camera rotation about z ["rotation", rotation], // camera rotation about z ["message", message]] ) config_dict; Loading @@ -106,7 +108,8 @@ function c270lens_config(camera_type = "logitech_c270") = let( ["lens_spacing", 17], // Minimum 13 for spacer to build correctly ["mounting_post_height",4], ["board_thickness",1], ["rotation", 180]] // camera rotation about z ["rotation", 180], // camera rotation about z ["message", "C270"]] ) config_dict; Loading @@ -125,5 +128,6 @@ function b0196lens_config(camera_type = "arducam_b0196") = let( ["lens_spacing", 17], // Minimum 17 for spacer to build correctly ["mounting_post_height",4], ["board_thickness",1], ["rotation", -45]] // camera rotation about z ["rotation", -45], // camera rotation about z ["message", "B0196"]] ) config_dict;
openscad/upright_camera_platform.scad +1 −1 Original line number Diff line number Diff line Loading @@ -14,5 +14,5 @@ camera_platform_stl(); module camera_platform_stl(){ params = default_params(); optics_config = pilens_config(upright=true); camera_platform(params, optics_config, base_r=5, message="upright"); camera_platform(params, optics_config, base_r=5); }
rendering/low_cost_optics_assembly.scad +1 −2 Original line number Diff line number Diff line Loading @@ -206,9 +206,8 @@ module assemble_lens_spacer(frame, camera_type="pi_camera"){ module rendered_camera_platform(camera_type="pi_camera", upright=false){ params = render_params(); optics_config = (camera_type == "c270") ? c270lens_config() : pilens_config(upright=upright); message = (upright)? "upright" : ""; coloured_render(optics_module_colour()){ camera_platform(params, optics_config, 5, message=message); camera_platform(params, optics_config, 5); } } Loading