Skip to content

Instantly share code, notes, and snippets.

@blakesmith
Created October 20, 2019 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blakesmith/9dec713a4bb334bb41d57cefc1a678ee to your computer and use it in GitHub Desktop.
Save blakesmith/9dec713a4bb334bb41d57cefc1a678ee to your computer and use it in GitHub Desktop.
$fn = 100;
motor_diameter = 107;
crank_shaft_length = 29;
total_length = 125;
motor_diameter_tolerance = 1;
motor_diameter_with_tolerance = motor_diameter + motor_diameter_tolerance;
plate_diameter = motor_diameter_with_tolerance * 1.35;
plate_height = plate_diameter + 15;
plate_width = plate_diameter + 15;
// M8 screw, sizings taken from 'clearance hole' at: https://trfastenings.com/products/knowledgebase/tables-standards-terminology/Tapping-Sizes-and-Clearance-Holes
m8_hole_diameter = 9 + 2;
// M6 screw
m6_hole_diameter = 6.6 + 1;
inner_screw_distance = 95;
drive_shaft_diameter = 45;
union() {
// linear_extrude(height = 2)
through_plate();
// mount_plate();
%picture_outline();
}
module picture_outline() {
rotate(270)
translate([-87.25, -79])
linear_extrude(height=5)
import(file = "mount_point_outline.dxf");
}
module through_plate() {
union() {
difference() {
plate();
motor();
engine_holes();
}
}
}
module mount_plate() {
union() {
difference() {
plate();
%motor();
engine_holes();
motor_mount_holes();
drive_shaft_cutout();
}
}
}
module motor() {
translate([-motor_diameter_with_tolerance / 6, -motor_diameter_with_tolerance / 6])
circle(d = motor_diameter_with_tolerance);
}
module plate() {
module base_plate() {
hull() {
square([plate_width, plate_height], center = true);
translate([-plate_diameter / 5, -plate_diameter / 5])
circle(d = plate_diameter);
}
}
module cutouts() {
x_slop = 15;
y_slop = 20;
translate([plate_width - x_slop, 0 + y_slop])
rotate(10)
square([plate_width, plate_height + 100], center=true);
translate([plate_width + (x_slop / 2), 0])
rotate(-15)
square([plate_width, plate_height + 300], center=true);
translate([plate_width + (x_slop / 2), -(y_slop * 3.5)])
rotate(-50)
square([plate_width, plate_height + 300], center=true);
translate([plate_width + (x_slop / 2), 75])
rotate(45)
square([plate_width, plate_height + 300], center=true);
translate([-plate_width + (x_slop / 2), 120])
rotate(-30)
square([plate_width + (x_slop * 2), plate_height + 300], center=true);
}
difference() {
base_plate();
cutouts();
}
}
module engine_holes() {
translate([-plate_diameter / 2.3, plate_diameter / 2.3]) {
circle(d = m8_hole_diameter);
translate([108, 0])
circle(d = m8_hole_diameter);
translate([127.5, -103])
circle(d = m8_hole_diameter);
}
}
module motor_mount_holes() {
translate([-motor_diameter_with_tolerance / 6, -motor_diameter_with_tolerance / 6]) {
translate([0, inner_screw_distance / 2])
circle(d = m6_hole_diameter);
translate([0, -inner_screw_distance / 2])
circle(d = m6_hole_diameter);
translate([-inner_screw_distance / 2, 0])
circle(d = m6_hole_diameter);
translate([inner_screw_distance / 2, 0])
circle(d = m6_hole_diameter);
}
}
module drive_shaft_cutout() {
translate([-motor_diameter_with_tolerance / 6, -motor_diameter_with_tolerance / 6])
circle(d = drive_shaft_diameter);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment