flat mode

This commit is contained in:
5shekel
2025-11-25 15:00:42 +02:00
parent 98337df623
commit bdc8731cdd
2 changed files with 143 additions and 22 deletions

119
camera_side_mount.scad Normal file
View File

@@ -0,0 +1,119 @@
// Camera side mount with modular inserts - LASER CUT VERSION
// Base plate with tripod hole + two camera mount inserts with notch/tab joints
// 24mm width faces front when assembled
// RENDER MODE - Change this to switch between views
render_mode = "assembly"; // Options: "assembly" or "flat"
render_mode = "flat"; // Options: "assembly" or "flat"
// Parameters - Camera hole spacing: rotated 90° CW
hole_spacing_x = 25; // mm (horizontal distance between hole centers)
hole_spacing_y = 24; // mm (vertical distance between hole centers)
bottom_hole_clearance = 4; // mm (clearance from base plate to bottom hole center when standing)
hole_edge_margin_x = 3; // mm (side margin)
hole_edge_margin_y = bottom_hole_clearance; // mm (bottom margin = bottom clearance)
mount_width = hole_spacing_x + 2 * hole_edge_margin_x; // 31mm total width
mount_height = hole_spacing_y + 2 * hole_edge_margin_y; // 30mm total height
material_thickness = 3; // mm (laser cut material thickness)
spacing = 35; // mm (gap between camera inserts)
hole_diameter = 3.2; // mm (M3 clearance hole for camera)
padding = 3; // mm padding on sides (top/bottom/right)
left_margin = 14; // mm left margin for tripod hole center (ensures >10mm edge clearance)
base_thickness = 2; // mm (base plate thickness)
tripod_hole_diameter = 6.35; // mm (1/4" standard tripod screw, radius=3.175mm)
// Notch parameters for joining - wider for better rigidity and alignment
notch_width = 12; // mm width of the notch/slot (wider for stability)
notch_depth = 8; // mm depth of the slot in base plate
tab_height = notch_depth; // Height of the tab on insert
// Total dimensions
mount_area_width = mount_width * 2 + spacing;
total_width = mount_area_width + left_margin + padding; // Left margin + right padding
total_height = mount_height + 2 * padding;
// Base plate module with tripod hole and slots for inserts
module base_plate() {
difference() {
// Base rectangle
cube([total_width, total_height, base_thickness]);
// 1/4" tripod hole on left side (10mm clearance from edge)
translate([left_margin, total_height / 2, -0.5])
cylinder(h = base_thickness + 1, d = tripod_hole_diameter, $fn = 30);
// Slot for first insert (offset from left by left_margin)
translate([left_margin + mount_width/2 - notch_width/2, padding - notch_depth, -0.5])
cube([notch_width, notch_depth + 0.1, base_thickness + 1]);
// Slot for second insert (right position)
translate([left_margin + mount_width + spacing + mount_width/2 - notch_width/2, padding - notch_depth, -0.5])
cube([notch_width, notch_depth + 0.1, base_thickness + 1]);
}
}
// Camera mount insert module (with 4 M3 holes and bottom tab for slot)
module camera_mount_insert() {
difference() {
union() {
// Main insert body
cube([mount_width, mount_height, material_thickness]);
// Tab at bottom center for inserting into base slot
translate([mount_width/2 - notch_width/2, -tab_height, 0])
cube([notch_width, tab_height, material_thickness]);
}
// 4 holes for camera mounting - 25mm x 24mm spacing (rotated 90° CW)
// Bottom-left (3mm from base when standing)
translate([hole_edge_margin_x, hole_edge_margin_y, -0.5])
cylinder(h = material_thickness + 1, d = hole_diameter, $fn = 30);
// Bottom-right (25mm horizontal spacing)
translate([hole_edge_margin_x + hole_spacing_x, hole_edge_margin_y, -0.5])
cylinder(h = material_thickness + 1, d = hole_diameter, $fn = 30);
// Top-left (24mm vertical spacing from bottom)
translate([hole_edge_margin_x, hole_edge_margin_y + hole_spacing_y, -0.5])
cylinder(h = material_thickness + 1, d = hole_diameter, $fn = 30);
// Top-right
translate([hole_edge_margin_x + hole_spacing_x, hole_edge_margin_y + hole_spacing_y, -0.5])
cylinder(h = material_thickness + 1, d = hole_diameter, $fn = 30);
}
}
// Assembly module - shows complete setup with inserts standing vertically
module complete_assembly() {
// Base plate
base_plate();
// First camera mount insert (left) - standing vertically, 24mm faces front
translate([left_margin + mount_width/2 - material_thickness/2, padding, base_thickness])
rotate([90, 0, 90])
camera_mount_insert();
// Second camera mount insert (right) - standing vertically, 24mm faces front
translate([left_margin + mount_width + spacing + mount_width/2 - material_thickness/2, padding, base_thickness])
rotate([90, 0, 90])
camera_mount_insert();
}
// Render based on mode
if (render_mode == "assembly") {
// Assembly view - shows how parts fit together
complete_assembly();
} else if (render_mode == "flat") {
// Flat layout for laser cutting - all parts laid flat
// Base plate
base_plate();
// First insert - laid flat
translate([total_width + 5, 0, 0])
camera_mount_insert();
// Second insert - laid flat
translate([total_width + 5, mount_height + tab_height + 5, 0])
camera_mount_insert();
}

View File

@@ -1,14 +1,16 @@
// Double mounting plate with shared base and tripod mount // Double mounting plate with shared base and tripod mount
// Two 24x25mm sections with 10mm spacing and 4 M3 holes each // Camera hole spacing: 24mm x 25mm pitch
// 1/4" tripod hole in center, 3mm padding on all sides // 1/4" tripod hole in center, 3mm padding on all sides
// Parameters // Parameters - Camera hole spacing
plate_width = 24; // mm (width of each mounting section) hole_spacing_x = 24; // mm (horizontal distance between hole centers)
plate_height = 25; // mm hole_spacing_y = 25; // mm (vertical distance between hole centers)
hole_edge_margin = 3; // mm (margin from edge to first hole)
plate_width = hole_spacing_x + 2 * hole_edge_margin; // 30mm total width per section
plate_height = hole_spacing_y + 2 * hole_edge_margin; // 31mm total height per section
plate_thickness = 2; // mm plate_thickness = 2; // mm
spacing = 15; // mm (gap between mounting sections) spacing = 10; // mm (gap between mounting sections)
hole_diameter = 3.2; // mm (M3 clearance hole) hole_diameter = 3.2; // mm (M3 clearance hole)
hole_margin = 3; // mm from edge of mounting section
padding = 3; // mm padding on all sides padding = 3; // mm padding on all sides
tripod_hole_diameter = 6.35; // mm (1/4" standard tripod screw) tripod_hole_diameter = 6.35; // mm (1/4" standard tripod screw)
@@ -23,40 +25,40 @@ module double_plate_with_holes() {
// Single continuous base rectangle with padding // Single continuous base rectangle with padding
cube([total_width, total_height, plate_thickness]); cube([total_width, total_height, plate_thickness]);
// First set of 4 holes (left section) - offset by padding // First set of 4 holes (left section) - 24mm x 25mm spacing
// Bottom-left // Bottom-left
translate([padding + hole_margin, padding + hole_margin, -0.5]) translate([padding + hole_edge_margin, padding + hole_edge_margin, -0.5])
cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30); cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30);
// Bottom-right // Bottom-right (24mm from left hole)
translate([padding + plate_width - hole_margin, padding + hole_margin, -0.5]) translate([padding + hole_edge_margin + hole_spacing_x, padding + hole_edge_margin, -0.5])
cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30); cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30);
// Top-left // Top-left (25mm from bottom hole)
translate([padding + hole_margin, padding + plate_height - hole_margin, -0.5]) translate([padding + hole_edge_margin, padding + hole_edge_margin + hole_spacing_y, -0.5])
cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30); cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30);
// Top-right // Top-right (24mm x 25mm from bottom-left)
translate([padding + plate_width - hole_margin, padding + plate_height - hole_margin, -0.5]) translate([padding + hole_edge_margin + hole_spacing_x, padding + hole_edge_margin + hole_spacing_y, -0.5])
cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30); cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30);
// Second set of 4 holes (right section) - offset by padding // Second set of 4 holes (right section) - 24mm x 25mm spacing
offset_x = padding + plate_width + spacing; offset_x = padding + plate_width + spacing;
// Bottom-left // Bottom-left
translate([offset_x + hole_margin, padding + hole_margin, -0.5]) translate([offset_x + hole_edge_margin, padding + hole_edge_margin, -0.5])
cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30); cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30);
// Bottom-right // Bottom-right (24mm from left hole)
translate([offset_x + plate_width - hole_margin, padding + hole_margin, -0.5]) translate([offset_x + hole_edge_margin + hole_spacing_x, padding + hole_edge_margin, -0.5])
cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30); cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30);
// Top-left // Top-left (25mm from bottom hole)
translate([offset_x + hole_margin, padding + plate_height - hole_margin, -0.5]) translate([offset_x + hole_edge_margin, padding + hole_edge_margin + hole_spacing_y, -0.5])
cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30); cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30);
// Top-right // Top-right (24mm x 25mm from bottom-left)
translate([offset_x + plate_width - hole_margin, padding + plate_height - hole_margin, -0.5]) translate([offset_x + hole_edge_margin + hole_spacing_x, padding + hole_edge_margin + hole_spacing_y, -0.5])
cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30); cylinder(h = plate_thickness + 1, d = hole_diameter, $fn = 30);
// 1/4" tripod hole in center // 1/4" tripod hole in center