Browse Source

Add first draft of dovetail clamp plate

master
Steve Cross 8 months ago
parent
commit
9daa5d7407
Signed by: hairlesshobo GPG Key ID: A89EDFF0F5E08A30
  1. 250
      Vixen Dovetail/vixen_dovetail_plate.scad

250
Vixen Dovetail/vixen_dovetail_plate.scad

@ -17,22 +17,234 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
channel_height = 15;
channel_width = 44;
channel_angle = 14;
channel_length = 150;
base_height = 20;
base_diameter = 70;
$fn = 360;
make_bar();
//cylinder(h=base_height, d=base_diameter);
module make_bar() {
cube([channel_width, channel_length, channel_height]);
}
include <_vixen_dovetail_bar.scad>;
// [unit: mm]
// this is how thick the base plate should be
base_thickness = 10;
// [unit: mm]
base_width = 100;
// [unit: mm]
base_length = 90;
// [unit: mm]
// how tall should the clamps be with regards to the height
// of the vixen dovetail itself
clamp_height = 10;
// [unit: mm]
// how much thickness should be added to the clamp
clamp_thickness = 8;
// [unit: mm]
// TODO: MAKE_SHARED
base_bolt_shaft_d = 6.9;
// [unit: mm]
// Diameter of the nut
// TODO: MAKE_SHARED
base_nut_diameter = 12.9;
// [unit: mm]
// TODO: MAKE_SHARED
base_nut_height = 4;
// [unit: mm]
// How far from the bottom of the base stand should the nut sit
base_nut_offset = 4;
// [unit: mm]
slide_bolt_head_height = 4;
// [unit: mm]
slide_bolt_head_diameter = 12.9;
// [unit: mm]
slide_bolt_shaft_diameter = 6.9;
// [unit: mm]
slide_slot_depth = 6.25;
clamp_guide_top_brace_thickness = 2;
clamp_travel_width = 15;
clamp_travel_overlap = 3;
kerf_margin = 0.3;
$fn = 360;
/*************************************************************************/
/*************************************************************************/
show_dovetail = false;
rotate_final = true;
clamp_angular_width = calculate_vixen_angular_offset(clamp_height, channel_angle);
clamp_guide_apothem = base_thickness + clamp_guide_top_brace_thickness;
slide_slot_length = base_width - clamp_thickness - clamp_angular_width;
slide_slot_offset_x = base_width - slide_slot_length;
slide_slot_offset_y1 = base_length / 4;
slide_slot_offset_y2 = slide_slot_offset_y1 * 3;
slide_brace_offset_x = clamp_thickness + channel_width + clamp_travel_width;
slide_plate_width = base_width - clamp_thickness - channel_width + clamp_angular_width;
slide_plate_offset_x = base_width - slide_plate_width;
if (rotate_final == false) {
color("LightSkyBlue") build_base_plate();
color("red") build_slide_plate();
color("green") show_dovetail_bar();
} else {
rotate([90, 0, 0])
color("LightSkyBlue") build_base_plate();
translate([0, -30, base_width])
rotate([90, 90, 0])
color("red") build_slide_plate();
}
module show_dovetail_bar() {
if (show_dovetail == true) {
translate([clamp_thickness, -50, base_thickness])
make_vixen_dovetail_bar(200);
}
}
module build_slide_plate() {
slide_plate_height = clamp_height-(kerf_margin*2);
difference() {
union() {
difference() {
translate([slide_plate_offset_x, 0, base_thickness+kerf_margin])
cube([slide_plate_width, base_length, slide_plate_height]);
translate([clamp_thickness, -1, base_thickness])
make_base_vixen_dovetail_bar(base_length+2);
slide_brace_assembly(x=slide_plate_offset_x, width=clamp_thickness + clamp_travel_width + clamp_angular_width + clamp_travel_overlap, punch=false, margin=kerf_margin);
};
slide_plate_guide_offset_x = slide_brace_offset_x + clamp_thickness + clamp_travel_overlap;
slide_plate_guide_length = base_width - slide_plate_guide_offset_x;
slide_plate_guide_radius = get_radius_from_apothem(slide_slot_depth-kerf_margin);
// bottom slide slot
slide_slot(slide_slot_offset_y1, x=slide_plate_guide_offset_x, length=slide_plate_guide_length, d=slide_plate_guide_radius*2);
// top slide slot
slide_slot(slide_slot_offset_y2, x=slide_plate_guide_offset_x, length=slide_plate_guide_length, d=slide_plate_guide_radius*2);
}
// bottom slide bolt hole
translate([slide_plate_offset_x-1, slide_slot_offset_y1, base_thickness])
rotate([90, 0, 90])
cylinder(slide_plate_width+2, d=slide_bolt_shaft_diameter);
// bottom slide bolt hole
translate([slide_plate_offset_x-1, slide_slot_offset_y2, base_thickness])
rotate([90, 0, 90])
cylinder(slide_plate_width+2, d=slide_bolt_shaft_diameter);
}
}
module build_base_plate() {
difference() {
union() {
// base plate
cube([base_width, base_length, base_thickness]);
// left side fixed clamp
difference() {
translate([0, 0, base_thickness])
cube([clamp_angular_width + clamp_thickness, base_length, clamp_height]);
translate([clamp_thickness, -1, base_thickness])
make_base_vixen_dovetail_bar(base_length+2);
}
}
base_nut_offset_x = clamp_thickness + clamp_angular_width + channel_width/2;
base_nut_offset_y = base_length / 2;
// base bolt hole
translate([base_nut_offset_x, base_nut_offset_y, 0]) {
translate([0, 0, base_nut_offset])
cylinder(base_thickness, d=base_nut_diameter, center=false, $fn=6);
translate([0, 0, -1])
cylinder(base_thickness+2, d=base_bolt_shaft_d);
};
// bottom slide slot
slide_slot(slide_slot_offset_y1);
// top slide slot
slide_slot(slide_slot_offset_y2);
}
slide_brace_assembly();
}
module slide_brace_assembly(x=slide_brace_offset_x, width=clamp_thickness, punch=true, margin=0) {
// bottom slide brace
slide_brace(slide_slot_offset_y1, x=x, width=width, punch=punch, margin=margin);
// top slide brace
slide_brace(slide_slot_offset_y2, x=x, width=width, punch=punch, margin=margin);
// slide brace cross bar
translate([x, base_length/4, clamp_guide_apothem+base_thickness-clamp_guide_top_brace_thickness])
cube([width, base_length/2, clamp_guide_top_brace_thickness]);
}
module slide_brace(y, x=slide_brace_offset_x, width=clamp_thickness, punch=true, margin=0) {
radius = get_radius_from_apothem(clamp_guide_apothem + margin);
translate([x, y, 0])
difference() {
translate([0, 0, base_thickness])
rotate([90, 0, 90])
cylinder(h=width, r=radius, $fn = 6);
// trim off the bottom protrustion that we do not need
translate([-1, -radius-1, -clamp_guide_top_brace_thickness-1])
cube([width+2, radius*2+2, clamp_guide_top_brace_thickness+1]);
if (punch == true) {
// punch out the hole for the bolt head
translate([-1, 0, base_thickness])
rotate([90, 0, 90])
cylinder(h=slide_bolt_head_height+1, d=slide_bolt_head_diameter, $fn=6);
// punch out the hole for the bolt
translate([-1, 0, base_thickness])
rotate([90, 0, 90])
cylinder(h=width+2, d=slide_bolt_shaft_diameter);
}
}
}
slide_slot_diameter = get_diameter_from_apothem(slide_slot_depth);
module slide_slot(y, x=slide_slot_offset_x, d=slide_slot_diameter, length=slide_slot_length+1) {
translate([x, y, base_thickness])
rotate([90, 0, 90])
cylinder(h=length, d=d, $fn = 6);
}
function get_diameter_from_apothem(apothem) =
get_radius_from_apothem(apothem) * 2;
function get_radius_from_apothem(apothem) =
(apothem / sqrt(3)) * 2;
Loading…
Cancel
Save