mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2025-02-25 03:54:10 -05:00
Added insert_lug() to make flying insert lugs.
This commit is contained in:
parent
3d4653fc0f
commit
c68f879d13
@ -33,10 +33,8 @@ wall = 1.8;
|
||||
top = 1.5;
|
||||
screw = M3_cap_screw;
|
||||
insert = screw_insert(screw);
|
||||
boss_r = wall + corrected_radius(insert_hole_radius(insert));
|
||||
boss_h = insert_hole_length(insert);
|
||||
boss_r = insert_boss_radius(insert, wall);
|
||||
counter_bore = 2;
|
||||
boss_h2 = boss_h + counter_bore;
|
||||
rad = 2;
|
||||
clearance = layer_height;
|
||||
overlap = 6;
|
||||
@ -137,49 +135,13 @@ module psu_shroud(type, cable_d, name, cables = 1) { //! Generate the STL file f
|
||||
translate([0, height / 2])
|
||||
vertical_tearslot(h = 0, r = cable_d / 2, l = cable_d);
|
||||
}
|
||||
|
||||
mirror([0, 1, 0]) {
|
||||
// insert boss
|
||||
translate_z(height - boss_h)
|
||||
linear_extrude(height = boss_h)
|
||||
// insert lugs
|
||||
mirror([0, 1, 0])
|
||||
psu_shroud_hole_positions(type)
|
||||
difference() {
|
||||
hull() {
|
||||
circle(boss_r);
|
||||
|
||||
translate([0, $side * (boss_r - 1)])
|
||||
square([2 * boss_r, eps], center = true);
|
||||
translate_z(height)
|
||||
rotate(90)
|
||||
insert_lug(insert, wall, $side, counter_bore);
|
||||
}
|
||||
poly_circle(insert_hole_radius(insert));
|
||||
}
|
||||
|
||||
// insert boss counter_bore
|
||||
translate_z(height - boss_h2)
|
||||
linear_extrude(height = counter_bore + eps)
|
||||
psu_shroud_hole_positions(type)
|
||||
difference() {
|
||||
hull() {
|
||||
circle(boss_r);
|
||||
|
||||
translate([0, $side * (boss_r - 1)])
|
||||
square([2 * boss_r, eps], center = true);
|
||||
}
|
||||
poly_circle(insert_screw_diameter(insert) / 2 + 0.1);
|
||||
}
|
||||
// support cones
|
||||
translate_z(height - boss_h2)
|
||||
psu_shroud_hole_positions(type)
|
||||
hull() {
|
||||
cylinder(h = eps, r = boss_r - eps);
|
||||
|
||||
translate([0, $side * (boss_r - 1)])
|
||||
cube([2 * boss_r, eps, eps], center = true);
|
||||
|
||||
translate([0, $side * (boss_r - wall), - (2 * boss_r - wall)])
|
||||
cube(eps);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module psu_shroud_assembly(type, cable_d, name, cables = 1) //! The printed parts with inserts fitted
|
||||
assembly(str("psu_shroud_", name)) {
|
||||
|
@ -33,10 +33,8 @@ wall = 1.8;
|
||||
top = 1.5;
|
||||
screw = M3_cap_screw;
|
||||
insert = screw_insert(screw);
|
||||
boss_r = wall + corrected_radius(insert_hole_radius(insert));
|
||||
boss_h = insert_hole_length(insert);
|
||||
boss_r = insert_boss_radius(insert, wall);
|
||||
counter_bore = 2;
|
||||
boss_h2 = boss_h + counter_bore;
|
||||
rad = 3;
|
||||
clearance = layer_height;
|
||||
|
||||
@ -61,7 +59,6 @@ module ssr_shroud_holes(type, cable_d) { //! Drill the screw and ziptie holes
|
||||
translate([ssr_shroud_cable_x(type, cable_d), side * (ssr_width(type) / 2 - 2 * boss_r)])
|
||||
rotate(-90)
|
||||
cable_tie_holes(cable_d / 2, h = 0);
|
||||
|
||||
}
|
||||
|
||||
module ssr_shroud(type, cable_d, name) { //! Generate the STL file for a specified ssr and cable
|
||||
@ -103,45 +100,11 @@ module ssr_shroud(type, cable_d, name) { //! Generate the STL file for a spec
|
||||
vertical_tearslot(h = 0, r = cable_d / 2, l = cable_d);
|
||||
}
|
||||
// insert boss
|
||||
translate_z(height - boss_h)
|
||||
linear_extrude(height = boss_h)
|
||||
ssr_shroud_hole_positions(type)
|
||||
difference() {
|
||||
hull() {
|
||||
circle(boss_r);
|
||||
|
||||
translate([0, -$side * (boss_r - 1)])
|
||||
square([2 * boss_r, eps], center = true);
|
||||
}
|
||||
poly_circle(insert_hole_radius(insert));
|
||||
}
|
||||
|
||||
// insert boss counter_bore
|
||||
translate_z(height - boss_h2)
|
||||
linear_extrude(height = counter_bore + eps)
|
||||
ssr_shroud_hole_positions(type)
|
||||
difference() {
|
||||
hull() {
|
||||
circle(boss_r);
|
||||
|
||||
translate([0, -$side * (boss_r - 1)])
|
||||
square([2 * boss_r, eps], center = true);
|
||||
}
|
||||
poly_circle(insert_screw_diameter(insert) / 2 + 0.1);
|
||||
}
|
||||
// support cones
|
||||
ssr_shroud_hole_positions(type)
|
||||
hull() {
|
||||
translate_z(-height + boss_h2) {
|
||||
cylinder(h = eps, r = boss_r - eps);
|
||||
|
||||
translate([0, -$side * (boss_r - 1)])
|
||||
cube([2 * boss_r, eps, eps], center = true);
|
||||
}
|
||||
translate([0, -$side * (boss_r - wall), -height + boss_h2 + (2 * boss_r - wall)])
|
||||
cube(eps);
|
||||
}
|
||||
|
||||
vflip()
|
||||
translate_z(height)
|
||||
rotate(90)
|
||||
insert_lug(insert, wall, $side, counter_bore);
|
||||
}
|
||||
|
||||
module ssr_shroud_assembly(type, cable_d, name) //! The printed parts with inserts fitted
|
||||
@ -153,7 +116,6 @@ assembly(str("ssr_shroud_", name)) {
|
||||
|
||||
ssr_shroud_hole_positions(type)
|
||||
insert(insert);
|
||||
|
||||
}
|
||||
|
||||
module ssr_shroud_fastened_assembly(type, cable_d, thickness, name) //! Assembly with screws in place
|
||||
@ -177,6 +139,4 @@ module ssr_shroud_fastened_assembly(type, cable_d, thickness, name) //! Assembly
|
||||
color(grey20)
|
||||
cylinder(d = cable_d, h = 20, center = true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -900,6 +900,7 @@ Heatfit threaded inserts. Can be pushed into thermoplastics using a soldering ir
|
||||
| ```insert(type)``` | Draw specified insert |
|
||||
| ```insert_boss(type, z, wall = 2 * extrusion_width)``` | Make a boss to take an insert |
|
||||
| ```insert_hole(type, counterbore = 0, horizontal = false)``` | Make a hole to take an insert, ```counterbore``` is the extra length for the screw |
|
||||
| ```insert_lug(insert, wall, side, counter_bore = 0)``` | Make a flying insert lug, see [ssr_shroud](#Ssr_shroud) |
|
||||
|
||||

|
||||
|
||||
|
@ -107,3 +107,45 @@ module insert_boss(type, z, wall = 2 * extrusion_width) { //! Make a boss to tak
|
||||
insert_hole(type, max(0, z - insert_hole_length(type) - 2 * layer_height));
|
||||
}
|
||||
}
|
||||
|
||||
module insert_lug(insert, wall, side, counter_bore = 0) {
|
||||
boss_r = insert_boss_radius(insert, wall);
|
||||
boss_h = insert_hole_length(insert);
|
||||
boss_h2 = boss_h + counter_bore;
|
||||
translate_z(-boss_h)
|
||||
linear_extrude(height = boss_h)
|
||||
difference() {
|
||||
hull() {
|
||||
circle(boss_r);
|
||||
|
||||
translate([side * (boss_r - 1), 0])
|
||||
square([eps, 2 * boss_r], center = true);
|
||||
}
|
||||
poly_circle(insert_hole_radius(insert));
|
||||
}
|
||||
|
||||
// insert boss counter_bore
|
||||
translate_z(-boss_h2) {
|
||||
linear_extrude(height = counter_bore + eps)
|
||||
difference() {
|
||||
hull() {
|
||||
circle(boss_r);
|
||||
|
||||
translate([side * (boss_r - 1), 0])
|
||||
square([eps, 2 * boss_r], center = true);
|
||||
}
|
||||
poly_circle(insert_screw_diameter(insert) / 2 + 0.1);
|
||||
}
|
||||
|
||||
// support cones
|
||||
hull() {
|
||||
cylinder(h = eps, r = boss_r - eps);
|
||||
|
||||
translate([side * (boss_r - 1), 0])
|
||||
cube([eps, 2 * boss_r, eps], center = true);
|
||||
|
||||
translate([side * (boss_r - wall + eps), 0, - (2 * boss_r - wall)])
|
||||
cube(eps, center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user