3d/Camera_2020_Mount.scad

48 lines
1.3 KiB
OpenSCAD
Raw Normal View History

2018-01-03 16:10:09 +00:00
PIN_DIAMETER=1.75;
PIN_HEIGHT=4;
PIN_SPACING_X=12;
PIN_SPACING_Y=21;
2018-01-04 12:03:50 +00:00
CAMERA_ROTATION=45; // keep it in [0, 90] to avoid eye damage
2018-01-03 16:10:09 +00:00
THICKNESS=5;
resulting_x=abs(sin(CAMERA_ROTATION)*(PIN_SPACING_X + THICKNESS*2));
resulting_y=abs(cos(CAMERA_ROTATION)*(PIN_SPACING_X + THICKNESS*2));
$fn=36;
2018-01-20 00:32:25 +00:00
include <lib/2020.scad>
2018-01-03 16:10:09 +00:00
module camera_mount() {
translate([0, 0, HEIGHT]) {
// camera pins
translate([-PIN_SPACING_X/2, PIN_SPACING_Y/2])
cylinder(d=PIN_DIAMETER, h=PIN_HEIGHT);
translate([PIN_SPACING_X/2, PIN_SPACING_Y/2])
cylinder(d=PIN_DIAMETER, h=PIN_HEIGHT);
translate([PIN_SPACING_X/2, -PIN_SPACING_Y/2])
cylinder(d=PIN_DIAMETER, h=PIN_HEIGHT);
translate([-PIN_SPACING_X/2, -PIN_SPACING_Y/2])
cylinder(d=PIN_DIAMETER, h=PIN_HEIGHT);
}
}
translate([resulting_y/2, 0, resulting_x/2]) {
rotate([0, CAMERA_ROTATION, 0])
camera_mount();
// the triangle to connect the (rotated) camera mount plate
rotate([-90, 0, 180])
translate([0, 0, -(PIN_SPACING_Y+THICKNESS*2)/2])
linear_extrude(height=PIN_SPACING_Y+THICKNESS*2)
polygon([
[-resulting_y/2, resulting_x/2],
[ resulting_y/2, resulting_x/2],
[ resulting_y/2, -resulting_x/2]
]);
}
translate([-21-THICKNESS*2, -21/2 - THICKNESS, 0])
2018-01-20 00:32:25 +00:00
__2020(resulting_x, THICKNESS);