48 lines
1.3 KiB
OpenSCAD
48 lines
1.3 KiB
OpenSCAD
PIN_DIAMETER=1.75;
|
|
PIN_HEIGHT=4;
|
|
PIN_SPACING_X=12;
|
|
PIN_SPACING_Y=21;
|
|
CAMERA_ROTATION=45; // keep it in [0, 90] to avoid eye damage
|
|
|
|
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;
|
|
|
|
include <lib/2020.scad>
|
|
|
|
|
|
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])
|
|
__2020(resulting_x, THICKNESS);
|