1
0
mirror of https://github.com/nophead/Mendel90.git synced 2025-09-03 10:02:51 +02:00

Changes for huxley.

Fixing block now uses hull() instead of Minkowski() for speed.
Cleaner STL for ribbon clamps.
This commit is contained in:
Chris Palmer
2016-01-05 16:13:54 +00:00
parent 40179f7307
commit ca52761279
20 changed files with 82104 additions and 97013 deletions

View File

@@ -35,9 +35,11 @@ module bar_clamp_holes(d, yaxis) {
for(y = [bar_rail_offset(d) - bar_clamp_length(d) + 0.5 * bar_clamp_tab - nut_offset,
bar_rail_offset(d) - 0.5 * bar_clamp_tab + nut_offset])
translate([0, y, 0])
child();
children();
}
zswitch_tweak = squeeze ? bar_clamp_band - min_wall - No2_pilot_radius - layer_height / 4 : 0;
module bar_clamp(d, h, w, switch = false, yaxis = false) {
stl(str(yaxis ? "y_bar_clamp" : "z_bar_clamp", (switch && yaxis) ? "_switch" : ""));
nutty = yaxis ? base_nut_traps : frame_nut_traps;
@@ -111,7 +113,7 @@ module bar_clamp(d, h, w, switch = false, yaxis = false) {
if(!yaxis)
translate([-w / 2 - axis_end_clearance,
outer_rad + microswitch_thickness() / 2 - rail_offset,
h - outer_rad + microswitch_first_hole_x_offset()])
h - outer_rad + microswitch_first_hole_x_offset() + zswitch_tweak])
rotate([0, 90, 90])
microswitch_holes();
@@ -190,7 +192,7 @@ module bar_clamp_assembly(d, h, w, switch = false, yaxis = true) {
if(top_limit_switch)
translate([-w / 2 - limit_switch_offset,
outer_rad + microswitch_thickness() / 2,
h - outer_rad + microswitch_first_hole_x_offset()])
h - outer_rad + microswitch_first_hole_x_offset() + zswitch_tweak])
rotate([0, 90, 90]) {
microswitch();
microswitch_hole_positions()
@@ -216,16 +218,19 @@ module z_bar_clamp_stl() translate([0,0,bar_clamp_depth/2]) rotate([0,90,
module z_bar_clamp_switch_stl() translate([0,0,bar_clamp_depth/2]) rotate([0,90,0]) bar_clamp(Z_bar_dia, gantry_setback, bar_clamp_depth, true, false);
module bar_clamps_stl() {
y2 = bar_clamp_length(Z_bar_dia) - bar_clamp_tab + 2;
y3 = y2 + bar_clamp_length(Y_bar_dia) - bar_clamp_tab + 2;
rotate([0, 0, 180]) z_bar_clamp_switch_stl();
translate([2, -2 * bar_rail_offset(Z_bar_dia) + bar_clamp_length(Z_bar_dia), 0]) z_bar_clamp_stl();
gap = 3;
y2 = bar_clamp_length(Z_bar_dia) - bar_clamp_tab + gap;
y3 = y2 + bar_clamp_length(Y_bar_dia) - bar_clamp_tab + gap;
translate([-10, y2, 0]) rotate([0, 0, 180]) y_bar_clamp_switch_stl();
translate([12, y2 -2 * bar_rail_offset(Y_bar_dia) + bar_clamp_length(Y_bar_dia), 0]) y_bar_clamp_stl();
rotate([0, 0, 90]) { rotate([0, 0, 180]) z_bar_clamp_switch_stl();
translate([gap, -2 * bar_rail_offset(Z_bar_dia) + bar_clamp_length(Z_bar_dia), 0]) z_bar_clamp_stl();
translate([0, y3, 0]) rotate([0, 0, 180]) y_bar_clamp_stl();
translate([2, y3 -2 * bar_rail_offset(Y_bar_dia) + bar_clamp_length(Y_bar_dia), 0]) y_bar_clamp_stl();
translate([-9 - gap, y2, 0]) rotate([0, 0, 180]) y_bar_clamp_switch_stl();
translate([9 + gap * 2, y2 -2 * bar_rail_offset(Y_bar_dia) + bar_clamp_length(Y_bar_dia), 0]) y_bar_clamp_stl();
translate([0, y3, 0]) rotate([0, 0, 180]) y_bar_clamp_stl();
translate([gap, y3 -2 * bar_rail_offset(Y_bar_dia) + bar_clamp_length(Y_bar_dia), 0]) y_bar_clamp_stl();
}
}
if(0)

View File

@@ -10,14 +10,17 @@
include <conf/config.scad>
use <ribbon_clamp.scad>
wall = 2;
connector = DCONN15;
motor = extruder_motor(extruder);
screw_length = extruder_d_screw_length(extruder);
pcb = true;
idc = true;
thickness = 2.4;
lid_thickness = 2.4;
wall = 2;
front_thickness = wall + No2_pilot_radius + washer_diameter(M2p5_washer) / 2 + 1;
slot_width = d_slot_length(connector);
slot_height = 11;
@@ -29,8 +32,7 @@ flange_thickness = d_flange_thickness(connector) + flange_clearance;
overlap = 5; // how much it overlaps the side of the motor
//length = overlap + thickness + (pcb ? 14 : 20);
length = overlap + thickness + 20;
length = overlap + thickness + (pcb && squeeze ? 14 : 20);
height = slot_height / 2 + face_height / 2 + thickness;
d_width = flange_width + 2 * wall;
nut_slot = nut_thickness(M3_nut) + 0.3;
@@ -56,12 +58,14 @@ pcb_offset = 3 * 1.27;
nut_x = length + flange_thickness + wall -lug_depth + wall;
function d_motor_bracket_offset(motor) = NEMA_holes(motor)[0] + screw_head_radius(M3_cap_screw) + d_width / 2 + lug_width;
function d_motor_bracket_offset() = NEMA_holes(motor)[0] + screw_head_radius(M3_cap_screw) + d_width / 2 + lug_width;
m_width = NEMA_width(motor) + 2 * thickness;
//
// Lid to retain connector and nuts
//
module d_motor_bracket_lid_stl(motor = NEMA17, nuts = true) {
module d_motor_bracket_lid_stl(nuts = true) {
if(nuts)
stl("d_motor_bracket_lid");
else
@@ -97,18 +101,18 @@ module d_motor_bracket_lid_stl(motor = NEMA17, nuts = true) {
}
}
module d_shell_lid_stl() d_motor_bracket_lid_stl(motor = NEMA17, nuts = false);
module d_shell_lid_stl() d_motor_bracket_lid_stl(nuts = false);
//
// Attaches to the motor
//
module d_motor_bracket_stl(motor = NEMA17) {
module d_motor_bracket_stl(motor_mount = true) {
stl("d_motor_bracket");
m_width = NEMA_width(motor) + 2 * thickness;
offset = d_motor_bracket_offset(motor) + (m_width - d_width) / 2;
offset = motor_mount ? (m_width - d_width) / 2 + d_motor_bracket_offset() : 0;
overlap = motor_mount ? overlap : 0;
mouth = pitch + 2 * M3_clearance_radius + layer_height / 2;
difference() {
translate([0, -offset - d_width / 2, 0]) difference() {
union() {
linear_extrude(height = thickness, convexity = 5) // base
polygon(points = [ [0, 0],
@@ -174,20 +178,21 @@ module d_motor_bracket_stl(motor = NEMA17) {
}
for(y = NEMA_holes(motor)) // motor screws
for(z = NEMA_holes(motor))
translate([overlap - 1, m_width / 2 + y, NEMA_width(motor) / 2 + thickness + z])
rotate([90,0,90])
teardrop_plus(r = M3_clearance_radius, h = thickness + 2, center = false);
if(motor_mount)
for(y = NEMA_holes(motor)) // motor screws
for(z = NEMA_holes(motor))
translate([overlap - 1, m_width / 2 + y, NEMA_width(motor) / 2 + thickness + z])
rotate([90,0,90])
teardrop_plus(r = M3_clearance_radius, h = thickness + 2, center = false);
}
}
//
// Attaches connector to ribbon cable and plastic strip
//
function d_motor_connector_offset(motor) = [
function d_motor_connector_offset() = [
NEMA_width(motor) / 2 + thickness - cable_guide_thickness + ribbon_clamp_slot_depth(),
-NEMA_length(motor) + overlap - length - d_mate_distance(connector) - shell_length + ribbon_clamp_width(cable_screw),
d_motor_bracket_offset(motor)
d_motor_bracket_offset()
];
module d_shell_stl() {
@@ -198,7 +203,7 @@ module d_shell_stl() {
clamp_pitch = ribbon_clamp_pitch(extruder_ways, cable_screw);
front = shell_front + flange_thickness + wall;
union() {
translate([0, - d_width / 2, 0]) union() {
difference() {
union() {
// screw lugs
@@ -255,22 +260,22 @@ module d_shell_stl() {
}
}
module d_shell_assembly(motor) {
module d_shell_assembly() {
translate([slot_height / 2, 0, shell_length])
rotate([0, 0, 90])
explode([0, -15, 0])
d_socket(connector, idc = idc);
translate([-thickness, d_width / 2, 0])
translate([-thickness, 0, 0])
rotate([0, -90, 180]) {
color(d_shell_color) render() d_shell_stl();
translate([0, d_width / 2, height + lid_thickness])
translate([0, 0, height + lid_thickness])
explode([0, 0, 20])
translate([shell_length - length, 0, 0])
color(d_shell_lid_color) render() rotate([180, 0, 0]) d_shell_lid_stl(motor);
color(d_shell_lid_color) render() rotate([180, 0, 0]) d_shell_lid_stl();
for(side = [-1, 1]) {
translate([shell_length - shell_front, d_width / 2 - side * pitch / 2, thickness + slot_height / 2]) //connector screws
translate([shell_length - shell_front, side * pitch / 2, thickness + slot_height / 2]) //connector screws
rotate([90, 0, -90]) {
screw_and_washer(M3_cap_screw, 20);
translate([0, 0, -(shell_front + flange_thickness + wall) - 0.8])
@@ -278,29 +283,36 @@ module d_shell_assembly(motor) {
O_ring(2.5, 1.6, 3);
}
translate([shell_screw_x, d_width / 2 - side * screw_y, height + lid_thickness])
translate([shell_screw_x, side * screw_y, height + lid_thickness])
explode([0, 0, 20])
screw_and_washer(No2_screw, 13);
}
translate([ribbon_clamp_width(M3_cap_screw) / 2, d_width / 2, cable_guide_thickness])
translate([ribbon_clamp_width(M3_cap_screw) / 2, 0, cable_guide_thickness])
rotate([0, 0, 90])
ribbon_clamp_assembly(extruder_ways, cable_screw, 16, cable_guide_thickness, vertical = false, washer = true, nutty = true, slotted = false);
}
}
module d_motor_bracket_assembly(motor) {
rotate([0, 90, 0])
translate([NEMA_length(NEMA17) - overlap, -NEMA_width(NEMA17) / 2 - thickness, -NEMA_width(NEMA17) / 2 - thickness]) {
color(d_motor_bracket_color) render() d_motor_bracket_stl(NEMA17);
translate([0, NEMA_width(NEMA17) / 2 + d_motor_bracket_offset(NEMA17) + thickness, height + lid_thickness])
module d_motor_bracket_assembly(motor_mounted = true) {
offset = motor_mounted ? d_motor_bracket_offset() : 0;
translate(motor_mounted ? [-NEMA_width(motor) / 2 - thickness,
-NEMA_width(motor) / 2 - thickness + offset + m_width / 2,
-NEMA_length(motor) + overlap]
: [0, 0, 0]) {
rotate([0, 90, 0]) {
if(motor_mounted)
color(d_motor_bracket_color) render()
d_motor_bracket_stl(motor_mounted);
translate([0, 0, height + lid_thickness])
translate([length, 0, 0])
explode([0, 0, 40])
translate([-length, 0, 0])
color(d_motor_bracket_lid_color) render() rotate([180, 0, 0]) d_motor_bracket_lid_stl(motor);
color(d_motor_bracket_lid_color) render() rotate([180, 0, 0])
d_motor_bracket_lid_stl();
}
translate([-NEMA_width(motor) / 2 + slot_height / 2, d_motor_bracket_offset(motor), -NEMA_length(motor) + overlap]) {
translate([0, 0, -length])
translate([slot_height / 2 + thickness, 0, -length])
rotate([180, 0, -90])
explode([0, -15, 0]) group() {
if(pcb)
@@ -330,51 +342,60 @@ module d_motor_bracket_assembly(motor) {
}
for(side = [-1, 1]) {
translate([0, pitch / 2 * side, -nut_x])
translate([slot_height / 2 + thickness, pitch / 2 * side, -nut_x])
rotate([180, 0, 0])
explode([10,0,0])
nut(M3_nut);
translate([height - slot_height / 2 - thickness + lid_thickness, side * screw_y, - screw_x])
translate([height + lid_thickness, side * screw_y, - screw_x])
rotate([0, 90, 0])
explode([0, 0, 40])
screw_and_washer(No2_screw, 13);
}
}
for(y = NEMA_holes(motor)) // motor screws
for(x = NEMA_holes(motor))
if(x < 0)
translate([x, y, -NEMA_length(motor) - thickness])
rotate([180, 0, 0])
screw_and_washer(M3_cap_screw, 45);
if(motor_mounted)
for(y = NEMA_holes(motor)) // motor screws
for(x = NEMA_holes(motor))
if(x < 0)
translate([x, y, -NEMA_length(motor) - thickness])
rotate([180, 0, 0])
screw_and_washer(M3_cap_screw, screw_length);
}
module d_motor_brackets_stl() {
d_motor_bracket_stl(NEMA17);
translate([12, 40, 0])
d_motor_bracket_lid_stl(NEMA17);
translate([0, d_motor_bracket_offset() + m_width / 2, 0])
d_motor_bracket_stl();
translate([23, 40, 0])
d_shell_lid_stl(NEMA17);
translate([12, d_motor_bracket_offset() + m_width / 2, 0])
d_motor_bracket_lid_stl();
translate([-33, 8, 0])
d_shell_stl(NEMA17);
translate([23, d_motor_bracket_offset() + m_width / 2, 0])
d_shell_lid_stl();
translate([26, 5, 0]) {
translate([-shell_length - flange_thickness - wall - 1, d_width / 2 + lug_width, 0])
d_shell_stl();
translate([26, 4, 0])
ribbon_clamp_stl(extruder_ways, cable_screw, nutty = true, slotted = false);
*color("grey")
ribbon_clamp_support(extruder_ways, cable_screw);
}
}
if(01) {
NEMA(NEMA17);
d_motor_bracket_assembly(NEMA17);
translate([-NEMA_width(NEMA17) / 2,
d_motor_bracket_offset(NEMA17),
-NEMA_length(NEMA17) -length - d_mate_distance(connector) - shell_length + overlap + (exploded ? - 20 : 0)])
d_shell_assembly(NEMA17);
module d_motor_extruder_brackets_stl() {
translate([0, d_motor_bracket_offset() + m_width / 2, 0])
d_motor_bracket_stl();
translate([12, d_motor_bracket_offset() + m_width / 2, 0])
d_motor_bracket_lid_stl();
}
if(1) {
NEMA(motor);
d_motor_bracket_assembly();
translate([-NEMA_width(motor) / 2,
d_motor_bracket_offset(),
-NEMA_length(motor) -length - d_mate_distance(connector) - shell_length + overlap + (exploded ? - 20 : 0)])
d_shell_assembly();
}
else

View File

@@ -17,7 +17,7 @@ thin_wall = filament_width * 2 + eta;
wall = 3;
counter_bore_rad = washer_diameter(base_washer) / 2 + 0.2;
width = 2 * wall + 2 * thin_wall + 6 * counter_bore_rad;
width = 2 * wall + 2 * thin_wall + 2 * counter_bore_rad + 4 * (squeeze && base_nuts && frame_nuts ? nut_trap_radius(base_nut) : counter_bore_rad);
shear = min(counter_bore_rad - screw_clearance_radius(frame_screw), 2.5);
@@ -35,13 +35,13 @@ function fixing_block_height() = height;
module fixing_block_v_hole(h)
translate([0, hole_offset, h])
child();
children();
module fixing_block_h_holes(h)
for(end = [-1, 1])
translate([end * hole_pitch / 2, h, hole_offset])
rotate([90, 0, 180])
child();
children();
module fixing_block(upper, rear) {
@@ -50,17 +50,23 @@ module fixing_block(upper, rear) {
v_screw = upper ? frame_screw : base_screw;
difference() {
translate([-(width - 2 * corner_rad) / 2, 0, 0])
minkowski() {
cube([width - 2 * corner_rad, depth- corner_rad, height -corner_rad]);
intersection() {
sphere(r = corner_rad);
translate([0, 5, 5])
cube([10, 10, 10], center = true);
}
}
hull()
for(side = [-1,1])
translate([side * (width / 2 - corner_rad), 0, 0]) {
translate([0, corner_rad, corner_rad])
cube(corner_rad * 2, center = true);
translate([-width / 2 - 1, thickness, height + eta]) // diagonal slice of the front
translate([0, 0, height - corner_rad])
rotate([-90, 0, 0])
cylinder(r = corner_rad, h = depth -corner_rad);
translate([0, depth - corner_rad, 0])
cylinder(r = corner_rad, h = height - corner_rad);
}
translate([-width / 2 - 1, thickness, height + eta]) // diagonal slice off the front
rotate([-45, 0, 0])
cube([width + 2, depth * 2, height]);
@@ -134,4 +140,4 @@ module fixing_blocks_stl()
if(0)
fixing_blocks_stl();
else
fixing_block_assembly();
fixing_block_assembly(false, true);

View File

@@ -18,7 +18,6 @@ rib = 3;
function ribbon_clamp_slot(ways) = ways * 0.05 * 25.4 + 2;
function ribbon_clamp_pitch(ways, screw_type) = ribbon_clamp_slot(ways) + 2 * (screw_clearance_radius(screw_type) + min_gap);
//function ribbon_clamp_width(screw_type) = washer_diameter(screw_washer(screw_type)) + 2;
function ribbon_clamp_width(screw_type) = screw_boss_diameter(screw_type);
function ribbon_clamp_length(ways, screw_type) = ribbon_clamp_pitch(ways, screw_type) + ribbon_clamp_width(screw_type);
function ribbon_clamp_thickness(nut = false) = nut ? nut_trap_meat : thickness;
@@ -28,12 +27,12 @@ module ribbon_clamp_holes(ways, screw_type) {
pitch = ribbon_clamp_pitch(ways, screw_type);
for(end = [-1, 1])
translate([end * pitch / 2, 0, 0])
child();
children();
}
module ribbon_clamp(ways, screw_type, nutty = false, slotted = true) {
module ribbon_clamp(ways, screw_type, nutty = false, slotted = true, hex = false) {
hole_rad = screw_clearance_radius(screw_type);
stl(str("ribbon_clamp_",ways,"_", 20 * hole_rad, nutty ? "N" : "", slotted ? "": "B"));
stl(str("ribbon_clamp_",ways,"_", 20 * hole_rad, nutty ? "N" : "", slotted ? "": "B", hex ? "H" : ""));
rad = ribbon_clamp_width(screw_type) / 2;
slot = ribbon_clamp_slot(ways);
pitch = ribbon_clamp_pitch(ways, screw_type);
@@ -46,9 +45,9 @@ module ribbon_clamp(ways, screw_type, nutty = false, slotted = true) {
//
union() {
if(nutty) {
translate([0, 0, thickness - nut_trap_height - eta]) {
translate([0, 0, thickness - nut_trap_height]) {
ribbon_clamp_holes(ways, screw_type)
cylinder(r = rad - eta, h = nut_trap_height);
cylinder(r = rad + 0.001, h = nut_trap_height);
translate([0, 0, nut_trap_height / 2])
cube([pitch, rib, nut_trap_height - eta], center = true);
@@ -70,7 +69,10 @@ module ribbon_clamp(ways, screw_type, nutty = false, slotted = true) {
translate([0, 0, thickness - nut_trap_height])
nut_trap(hole_rad, nut_radius(nut), nut_depth, false, supported = false);
else
poly_cylinder(r = hole_rad, h = 2 * thickness + 1, center = true);
if(hex)
nut_trap(hole_rad, nut_radius(nut), screw_head_height(screw_type), false, supported = true);
else
poly_cylinder(r = hole_rad, h = 2 * thickness + 1, center = true);
//
// Slot
//
@@ -81,13 +83,13 @@ module ribbon_clamp(ways, screw_type, nutty = false, slotted = true) {
}
}
module ribbon_clamp_stl(ways, screw_type, nutty = false, slotted = true) {
module ribbon_clamp_stl(ways, screw_type, nutty = false, slotted = true, hex = false) {
if(nutty)
translate([0, 0, thickness])
rotate([180, 0, 0])
ribbon_clamp(ways, screw_type, nutty, slotted);
else
ribbon_clamp(ways, screw_type, nutty, slotted);
ribbon_clamp(ways, screw_type, nutty, slotted, hex);
}
module ribbon_clamp_support(ways, screw_type) {
@@ -105,11 +107,11 @@ module ribbon_clamp_support(ways, screw_type) {
}
module ribbon_clamp_assembly(ways, screw_type, screw_length, panel_thickness = 0, vertical = false, washer = false, nutty = false, slotted = true) {
module ribbon_clamp_assembly(ways, screw_type, screw_length, panel_thickness = 0, vertical = false, washer = false, nutty = false, slotted = true, hex = false) {
color(ribbon_clamp_color) render()
translate([0, 0, thickness])
rotate([180, 0, 0])
ribbon_clamp(ways, screw_type, nutty = nutty, slotted = slotted);
ribbon_clamp(ways, screw_type, nutty = nutty, slotted = slotted, hex = hex);
if(nutty) {
if(panel_thickness > 0)
@@ -125,7 +127,11 @@ module ribbon_clamp_assembly(ways, screw_type, screw_length, panel_thickness = 0
translate([0,0, thickness])
ribbon_clamp_holes(ways, screw_type)
screw_and_washer(screw_type, screw_length, panel_thickness == 0); // spring washer if no nut
if(hex)
translate([0, 0, -screw_head_height(screw_type)])
screw(screw_type, screw_length);
else
screw_and_washer(screw_type, screw_length, panel_thickness == 0); // spring washer if no nut
if(panel_thickness != 0)
translate([0,0, - panel_thickness])
@@ -142,6 +148,7 @@ module ribbon_clamp_14_33_stl() ribbon_clamp_stl(14, M3_cap_screw);
module ribbon_clamp_14_33NB_stl() ribbon_clamp_stl(14, M3_cap_screw, nutty = true, slotted = false);
module ribbon_clamp_20_33_stl() ribbon_clamp_stl(20, M3_cap_screw);
module ribbon_clamp_20_33H_stl() ribbon_clamp_stl(20, M3_hex_screw, hex = true);
module ribbon_clamp_20_33N_stl() ribbon_clamp_stl(20, M3_cap_screw, nutty = true);
module ribbon_clamp_20_40_stl() ribbon_clamp_stl(20, No6_screw);
module ribbon_clamp_20_44_stl() ribbon_clamp_stl(20, M4_cap_screw);
@@ -165,14 +172,16 @@ module ribbon_clamps_stl() {
translate([0,y1,0]) ribbon_clamp_stl(bed_ways, base_screw, nutty = (cnc_sheets && base_nuts));
translate([0,y2,0]) ribbon_clamp_stl(x_end_ways, frame_screw, nutty = (cnc_sheets && frame_nuts));
translate([0,y3,0]) ribbon_clamp_stl(bed_ways, cap_screw);
translate([0,y4,0]) ribbon_clamp_stl(x_end_ways, M3_cap_screw);
translate([0,y4,0]) ribbon_clamp_stl(x_end_ways, squeeze ? M3_hex_screw : M3_cap_screw, hex = squeeze);
translate([0,y5,0]) ribbon_clamp_stl(extruder_ways, M3_cap_screw);
}
}
if(0) {
if(1) {
ribbon_clamp_assembly(20, M4_cap_screw, 16, 4, nutty = true);
translate([0, -15, 0]) ribbon_clamp_assembly(20, frame_screw, frame_screw_length, sheet_thickness(frame), nutty = false);
translate([0, -15, 0]) ribbon_clamp_assembly(20, frame_screw, frame_screw_length, sheet_thickness(frame));
translate([0, 15, 0]) ribbon_clamp_assembly(20, M3_hex_screw, 16, 2, hex = true);
}
else
ribbon_clamps_stl();

View File

@@ -9,18 +9,20 @@
//
function microswitch_thickness() = 6.4;
function microswitch_width() = 10.2;
function microswitch_length() = 19.8;
function microswitch_first_hole_x_offset() = -2;
function microswitch_button_x_offset() = -(5.1 - microswitch_first_hole_x_offset()) + microswitch_length() / 2;
function microswitch_button_y_offset() = -10.9 + microswitch_width() / 2;
function microswitch_hole_y_offset() = -8.4;
module microswitch_hole_positions()
{
for(x = [microswitch_first_hole_x_offset(), 7.5])
translate([x, microswitch_hole_y_offset(), microswitch_thickness() / 2])
child();
children();
}
module microswitch_holes(r = No2_pilot_radius, h = 7.5)
@@ -38,18 +40,18 @@ module microswitch_contact_space() {
module microswitch() {
vitamin("SMMICRO: Microswitch");
translate([-(5.1 + 9.5 - 7.5), -(8.4 + 2.5), -3.2 + (exploded ? 5 : 0)]) { // put operating point of button at the origin
color(microswitch_color) render() difference() { // main body
cube([19.8, 10.2, 6.4]);
translate([-7.1, -10.9, -microswitch_thickness() / 2 + (exploded ? 5 : 0)]) { // put operating point of button at the origin
color(microswitch_color) render() difference() { // main body
cube([microswitch_length(), microswitch_width(), microswitch_thickness()]);
translate([10, 9.5, -1])
cube([19.8, 10.2, 8]); // lower half of top
cube([microswitch_length(), 10.2, 8]); // lower half of top
translate([5.1, 2.5, -1])
cylinder(r = 2.35 / 2, h = 8); // mounting holes
translate([5.1 + 9.5, 2.5, -1])
cylinder(r = 2.35 / 2, h = 8);
}
color(microswitch_button_color) render() // orange button
translate([5.1 + 9.5 - 7.5,8.4 + 2.5 - 0.5,1.6])
translate([5.1 + 9.5 - 7.5,8.4 + 2.5 - 0.5, 1.6])
linear_extrude(height = 3.2)
hull() {
circle(r = 1);

View File

@@ -33,7 +33,7 @@ function y_belt_anchor_depth() = depth;
module y_belt_anchor_holes() {
for(side = [-1, 1])
translate([0, side * (depth / 2 + M3_nut_radius * cos(30) + eta) + depth / 2, 0])
child();
children();
}

View File

@@ -17,7 +17,7 @@ thickness = 4;
back_thickness = part_base_thickness + (frame_nut_traps ? nut_trap_depth(frame_nut) : 0);
back_height = 24;
big_hole = NEMA_big_hole(Z_motor);
clamp_height = washer_diameter(washer) + 3;
clamp_height = washer_diameter(washer) + default_wall;
clamp_thickness = bar_clamp_band;
clamp_screw_clearance = 2;
clamp_length = Z_bar_dia / 2 + bar_clamp_tab - 2;
@@ -125,7 +125,7 @@ module z_motor_bracket_hole_positions(gantry_setback)
for(side = [-1, 1])
translate([side * z_motor_bracket_hole_offset(), gantry_setback - part_base_thickness, back_height / 2 + thickness / 2])
rotate([90, 0, 0])
child();
children();
module z_motor_bracket_holes(gantry_setback)
z_motor_bracket_hole_positions(gantry_setback)