70 lines
3.1 KiB
OpenSCAD
70 lines
3.1 KiB
OpenSCAD
// ============================================
|
|
// Tapo Ceiling Mount - Printed Tapo Base (and lug gap test)
|
|
// ============================================
|
|
// A copy of the original Tapo base: a 56 mm disc with a boss and 2 lugs. The
|
|
// camera turns onto it clockwise, seen from below. Two countersunk holes
|
|
// (39 mm apart) screw it to the wall, or to the original-base adapter.
|
|
//
|
|
// test_set prints three bases with the lug gaps in tapo_fit_gaps
|
|
// (1, 2 and 3 edge notches). Put the camera on each one. Keep the gap that
|
|
// clicks and holds with no play, and set tapo_lug_gap to it. That value also
|
|
// drives the direct Tapo adapter. single prints one base at tapo_lug_gap.
|
|
//
|
|
// Print orientation: flat face on the bed, boss up. Add support under the two
|
|
// lugs; the windows in the plate let the support reach the bed.
|
|
|
|
parameters_only = false;
|
|
include <tapo_ceiling_mount_parameters.scad>;
|
|
|
|
/* [Printed Tapo Base] */
|
|
// Print the three-gap test set or a single base.
|
|
tapo_base_mode = "test_set"; // [test_set, single]
|
|
// Distance between the bases of the test set (mm).
|
|
tapo_base_pitch = 62; // [58:1:80]
|
|
|
|
// One base. The wall face is at z = 0; the camera rests on z = plate_t.
|
|
module tapo_base(gap = tapo_lug_gap, marks = 0) {
|
|
t = tapo_base_plate_t;
|
|
la = cable_exit_angle + tapo_wing_angle; // lug direction
|
|
difference() {
|
|
union() {
|
|
cylinder(d = tapo_base_plate_d, h = t);
|
|
translate([0, 0, t]) tapo_male(gap, 0);
|
|
}
|
|
translate([0, 0, t]) tapo_recess_cut();
|
|
// Windows under the lugs, so support can reach the bed.
|
|
for (a = [la, la + 180])
|
|
rotate([0, 0, a])
|
|
translate([tapo_boss_d_root / 2 + 0.1, -tapo_base_window_w / 2, -0.01])
|
|
cube([tapo_lug_tip_r + 1.5 - tapo_boss_d_root / 2, tapo_base_window_w, t + 0.02]);
|
|
// Screw holes on the axis at 90 degrees to the lugs, countersunk from
|
|
// the camera side into the recess floor.
|
|
rotate([0, 0, la + 90])
|
|
for (s = [-1, 1])
|
|
translate([s * tapo_base_screw_pitch / 2, 0, 0]) {
|
|
translate([0, 0, -0.01]) cylinder(d = tapo_base_screw_d, h = t + 0.02);
|
|
csk = (tapo_base_csk_d - tapo_base_screw_d) / 2;
|
|
translate([0, 0, t - tapo_recess_h - csk])
|
|
cylinder(d1 = tapo_base_screw_d, d2 = tapo_base_csk_d, h = csk + 0.01);
|
|
}
|
|
// Identification notches in the rim.
|
|
for (k = [0 : marks - 1])
|
|
rotate([0, 0, la + 90 + (k - (marks - 1) / 2) * 6])
|
|
translate([tapo_base_plate_d / 2 - 1.5, -0.6, -0.01])
|
|
cube([2, 1.2, t + 0.02]);
|
|
}
|
|
}
|
|
|
|
module tapo_ceiling_tapo_base() {
|
|
if (tapo_base_mode == "single")
|
|
tapo_base(tapo_lug_gap);
|
|
else
|
|
for (i = [0 : len(tapo_fit_gaps) - 1])
|
|
translate([i * tapo_base_pitch, 0, 0])
|
|
tapo_base(tapo_fit_gaps[i], i + 1);
|
|
}
|
|
|
|
for (i = [0 : len(tapo_fit_gaps) - 1])
|
|
echo(str("Tapo test base ", i + 1, " (", i + 1, " notch): lug gap ", tapo_fit_gaps[i], " mm"));
|
|
|
|
tapo_ceiling_tapo_base();
|