1
0
mirror of https://github.com/nophead/Mendel90.git synced 2025-01-16 20:38:15 +01:00

Replaced minkowski with scale, child with children, and removed assign.

Added thinner fan for Huxley.
Added missing nut for M2 screw.
Ball bearings can now position children.
This commit is contained in:
Chris Palmer 2016-01-05 12:18:38 +00:00
parent ce0018a662
commit e853cfbe30
16 changed files with 59 additions and 59 deletions

View File

@ -138,19 +138,19 @@ module atx_screw_positions(psu, base = false) {
psu_width(psu) / 2 - sb_corner_offset - sb_base_width / 2,
psu_height(psu) + sb_wall - sb_height / 2 + layer_height + sb_clearance])
rotate([90, 0, 90])
child();
children();
else {
for(end = [-1, 1])
translate([end * (length / 2 - tab_length - width / 2) - offset, -psu_width(psu) / 2 - width / 2, thickness])
child();
children();
if(sb_frame_screw)
translate([-psu_length(psu) / 2 + sb_corner_offset + sb_frame_width / 2,
psu_width(psu) / 2 + sb_frame_offset - sb_frame_thickness + (frame_nut_traps ? nut_trap_depth(frame_nut) : 0),
psu_height(psu) + sb_wall - sb_height / 2 + sb_clearance])
rotate([90, 0, 0])
child();
children();
}
}
@ -192,11 +192,12 @@ module atx_bracket_assembly(show_psu = false) {
psu(psu);
for(j = [0 : len(sleeving) - 1])
for(i = [0 : sleeving[j][1] - 1])
assign(od = tubing_od(sleeving[j][0]))
for(i = [0 : sleeving[j][1] - 1]) {
od = tubing_od(sleeving[j][0]);
translate([psu_length(psu) / 2 + 8, psu_width(psu) / 2 - 15 - sleeve_pos(j), 12 + i * (od + 1) + od / 2])
rotate([0, 90, 0])
tubing(sleeving[j][0]);
}
translate([psu_length(psu) / 2 + 10, -psu_width(psu) / 2 + 20, 20])
rotate([90, 0, 0])

View File

@ -76,7 +76,7 @@ module mains_inlet_holes()
for(z = side > 0 ? [depth - holes, holes] : [depth - terminal_depth - holes])
translate([side * (mains_inlet_width() / 2 - tab / 2), -mains_inlet_height() / 2 + foot, z])
rotate([-90, 0, 0])
child();
children();

View File

@ -26,6 +26,9 @@ module ball_bearing(type) {
cylinder(r = (type[0] + rim) / 2, h = 3, center = true);
}
}
if($children)
translate([0, 0, ball_bearing_width(type) / 2])
children();
}
module bearing_ball(dia) {

View File

@ -26,26 +26,14 @@ module bulldog_shape(depth, height, radius, open) {
}
module shell(length, width, height, wall) {
difference() {
linear_extrude(height = height, center = true, convexity = 5)
child();
linear_extrude(height = height + 1, center = true, convexity = 5)
difference() {
square([length - 2 * wall, width - 2 * wall], center = true);
minkowski() {
difference() {
square([length + 1, width + 1], center = true);
translate([10,0])
square([length + 1, 2 * wall + eta], center = true);
child();
}
circle(r = wall, center = true);
}
}
}
linear_extrude(height = height, center = true, convexity = 5)
difference() {
children();
offset(-wall)
children();
}
}
module bulldog(type, open = 4) {
tube = bulldog_tube(type);
thickness = bulldog_thickness(type);
@ -61,6 +49,7 @@ module bulldog(type, open = 4) {
rotate([90, 0, 0])
shell(depth, bulldog_height(type), bulldog_length(type), thickness)
bulldog_shape(depth, bulldog_height(type), bulldog_radius(type), gap);
translate([depth - tube - eta, 0, 0])
cube([depth, bulldog_length(type) + 1, 100], center = true);
}

View File

@ -105,7 +105,7 @@ function al_clad_wire_length(type) = type[10];
module al_clad_resistor_hole_positions(type)
for(end = [-1,1])
translate([end * al_clad_hpitch(type) / 2, end * al_clad_vpitch(type) / 2, al_clad_thickness(type)])
child();
children();
module al_clad_resistor_holes(type) {
al_clad_resistor_hole_positions(type)

View File

@ -27,11 +27,12 @@ function controller_accessories(type) = type[4];
module controller_screw_positions(type) {
inset = controller_hole_inset(type);
for($i = [0:3])
assign(x = [inset, controller_width(type) - inset][$i % 2])
assign(y = [inset, controller_length(type) - inset][$i / 2])
translate([x, y, 0])
child();
for($i = [0:3]) {
x = [inset, controller_width(type) - inset][$i % 2];
y = [inset, controller_length(type) - inset][$i / 2];
translate([x, y, 0])
children();
}
}
module controller(type) {
@ -133,5 +134,5 @@ module psu(type) {
module psu_screw_positions(type) {
for(point = psu_hole_list(type))
translate(point)
child();
children();
}

View File

@ -7,6 +7,7 @@
// based on http://www.thingiverse.com/thing:8063 by MiseryBot, CC license
fan80x38 = [80, 38, 75, 35.75, M4_cap_screw, 40, 4.3, 84];
fan80x25 = [80, 25, 75, 35.75, M4_cap_screw, 40, 4.3, 84];
fan70x15 = [70, 15, 66, 30.75, M4_cap_screw, 29, 3.8, 70];
fan60x25 = [60, 25, 57, 25, M4_cap_screw, 31.5, 3.6, 64];
fan60x15 = [60, 15, 57, 25, M4_cap_screw, 29, 2.4, 60];
@ -72,7 +73,7 @@ module fan_hole_positions(type) {
for(x = [-hole_pitch, hole_pitch])
for(y = [-hole_pitch, hole_pitch])
translate([x, y, fan_depth(type) / 2])
child();
children();
}
module fan_holes(type, poly = false) {

View File

@ -49,6 +49,9 @@ module nut(type, nyloc = false, brass = false) {
translate([0, 0, -1])
cylinder(r = hole_rad, h = nyloc_thickness + 2);
}
if($children)
translate([0, 0, thickness])
children();
}
module nut_and_washer(type, nyloc) {

View File

@ -13,7 +13,7 @@ hs_cs = 2; // counter sunk
hs_hex = 3;
hs_grub= 4; // pulley set screw
M2_cap_screw = ["CS020", "M2 cap screw", hs_cap, 2, 3.8, 1.5, M2_washer, false, M2_tap_radius, M2_clearance_radius];
M2_cap_screw = ["CS020", "M2 cap screw", hs_cap, 2, 3.8, 1.5, M2_washer, M2_nut, M2_tap_radius, M2_clearance_radius];
M2p5_pan_screw = ["PS025", "M2.5 pan screw", hs_pan, 2.5, 4.7, 1.7, M2p5_washer, false, M2p5_tap_radius, M2p5_clearance_radius];
M2p5_cap_screw = ["CS025", "M2.5 cap screw", hs_cap, 2.5, 4.7, 2.0, M2p5_washer, false, M2p5_tap_radius, M2p5_clearance_radius];
@ -73,9 +73,9 @@ module screw(type, length, hob_point = 0) {
cylinder(r = 0.2, h = 10 * exploded);
translate([0, 0, exploded ? (length + 10) * exploded : 0]) {
if(head_type == hs_cap) {
assign(head_height = rad * 2,
socket_rad = type[5] / cos(30) / 2,
socket_depth = 2 * rad / 3)
head_height = rad * 2;
socket_rad = type[5] / cos(30) / 2;
socket_depth = 2 * rad / 3;
color(screw_cap_color) render() difference() {
union() {
cylinder(r = head_rad, h = head_height);
@ -87,8 +87,8 @@ module screw(type, length, hob_point = 0) {
}
}
if(head_type == hs_grub) {
assign(socket_rad = type[4] / 2,
socket_depth = type[5])
socket_rad = type[4] / 2;
socket_depth = type[5];
color(screw_grub_color) render() difference() {
translate([0, 0, -length])
cylinder(r = rad, h = length);
@ -97,7 +97,7 @@ module screw(type, length, hob_point = 0) {
}
}
if(head_type == hs_hex) {
assign(head_height =type[5])
head_height =type[5];
color(screw_hex_color) render() union() {
cylinder(r = head_rad, h = head_height, $fn = 6);
translate([0,0, - length + eta])
@ -105,9 +105,9 @@ module screw(type, length, hob_point = 0) {
}
}
if(head_type == hs_pan) {
assign(head_height = type[5],
socket_rad = 0.6 * head_rad,
socket_depth = 0.5 * type[5])
head_height = type[5];
socket_rad = 0.6 * head_rad;
socket_depth = 0.5 * type[5];
color(screw_pan_color) render() difference() {
union() {
rounded_cylinder(r = head_rad, h = head_height, r2 = head_height / 2);
@ -121,10 +121,10 @@ module screw(type, length, hob_point = 0) {
}
}
if(head_type == hs_cs) {
assign(head_height = head_rad,
socket_rad = 0.6 * head_rad,
socket_depth = 0.3 * head_rad,
socket_width = 1)
head_height = head_rad;
socket_rad = 0.6 * head_rad;
socket_depth = 0.3 * head_rad;
socket_width = 1;
color(screw_cs_color) render() difference() {
union() {
translate([0,0, -head_height])

View File

@ -80,12 +80,14 @@ module taped_area(type, tape_width, w, d, overlap) {
pitch = total_width / strips;
intersection() {
group() {
for(i = [0 : strips - 1])
assign(k = ((i % 2) ? 0.9 : 1), c = sheet_colour(type))
translate([-w / 2 - overlap + tape_width / 2 + i * pitch, 0, sheet_thickness(type) / 2 + i * eta])
explode([0, 0, d / 2 + i * 10])
color([c[0] * k, c[1] * k, c[2] * k, c[3]])
sheet(type, tape_width, d + 2 * overlap);
for(i = [0 : strips - 1]) {
k = (i % 2) ? 0.9 : 1;
c = sheet_colour(type);
translate([-w / 2 - overlap + tape_width / 2 + i * pitch, 0, sheet_thickness(type) / 2 + i * eta])
explode([0, 0, d / 2 + i * 10])
color([c[0] * k, c[1] * k, c[2] * k, c[3]])
sheet(type, tape_width, d + 2 * overlap);
}
}
if(!exploded)
cube([w + 2 * eta, d + 2 * eta, 100], center = true);

View File

@ -65,7 +65,7 @@ module comp_spring(type, l = 0) {
if($children)
translate([0, 0, l])
child();
children();
}
//comp_spring(extruder_spring);

View File

@ -41,7 +41,7 @@ module washer(type) {
}
if($children)
translate([0, 0, thickness])
child();
children();
}
module star_washer(type) {
@ -63,5 +63,5 @@ module star_washer(type) {
}
if($children)
translate([0, 0, thickness])
child();
children();
}

View File

@ -82,7 +82,7 @@ module bearing_mount_holes()
for(end = [-1, 1])
translate([end * (bearing_holder_width(Y_bearings) / 2 + tab_length / 2 + nut_offset),
-end * (bearing_holder_length(Y_bearings) - bearing_clamp_tab ) / 2, 0])
child();
children();
module y_bearing_assembly(height)
{

View File

@ -83,7 +83,7 @@ nut_offset = base_nut_traps ? -tab_length / 2 + nut_radius(base_nut) + 0.5 : 0;
module y_idler_screw_hole_position()
translate([0, dia / 2 + wall + tab_length / 2 + nut_offset,0])
child();
children();
module y_idler_screw_hole()
y_idler_screw_hole_position()

View File

@ -29,7 +29,7 @@ module y_motor_bracket_holes()
for(z = [thickness - depth + holes, thickness - holes])
translate([side * (y_motor_bracket_width() / 2 - tab / 2 + nut_offset), -y_motor_bracket_height() / 2 + part_base_thickness, z])
rotate([-90, 0, 0])
child();
children();
module y_motor_bracket() {
height = y_motor_bracket_height();

View File

@ -48,7 +48,7 @@ module z_limit_screw_positions() {
for(z = [0, screw_spacing])
translate([slot_x, -thickness, bottom_z + hinge_post + leg_width / 2 + adjustment - down_adjustment + z])
rotate([90, 0, 0])
child();
children();
}