Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d703ae4997 | ||
|
f7ef075434 | ||
|
6f93b6af9a | ||
|
53f416eef1 | ||
|
6354219627 | ||
|
56e2b71bda | ||
|
8f5503586d | ||
|
1cd9edfe87 | ||
|
a85fdaf176 | ||
|
18294b4b81 | ||
|
ad62ce362c | ||
|
9f27f26894 | ||
|
2eaa4bfc21 | ||
|
1944039f22 | ||
|
1c221ad612 | ||
|
85adf7b4f4 | ||
|
64bde2cb3a | ||
|
c34469e852 | ||
|
dbc3c36f44 | ||
|
8c51183ba6 | ||
|
a9c4e60cac | ||
|
d041b18025 | ||
|
e85887fec4 | ||
|
ededb514b8 |
@@ -39,6 +39,7 @@ pp2_colour = is_undef($pp2_colour) ? "red" : $pp2_colour; // pri
|
|||||||
pp3_colour = is_undef($pp3_colour) ? "blue" : $pp3_colour; // printed part colour 3
|
pp3_colour = is_undef($pp3_colour) ? "blue" : $pp3_colour; // printed part colour 3
|
||||||
pp4_colour = is_undef($pp4_colour) ? "darkorange" : $pp4_colour;// printed part colour 4
|
pp4_colour = is_undef($pp4_colour) ? "darkorange" : $pp4_colour;// printed part colour 4
|
||||||
show_rays = is_undef($show_rays) ? false : $show_rays; // show camera sight lines and light direction
|
show_rays = is_undef($show_rays) ? false : $show_rays; // show camera sight lines and light direction
|
||||||
|
show_threads = is_undef($show_threads) ? false : $show_threads; // show screw threads
|
||||||
|
|
||||||
// Minimum wall is about two filaments wide but we extrude it closer to get better bonding
|
// Minimum wall is about two filaments wide but we extrude it closer to get better bonding
|
||||||
squeezed_wall = $preview ? 2 * extrusion_width - layer_height * (1 - PI / 4)
|
squeezed_wall = $preview ? 2 * extrusion_width - layer_height * (1 - PI / 4)
|
||||||
@@ -59,7 +60,8 @@ grey60 = [0.6, 0.6, 0.6];
|
|||||||
grey70 = [0.7, 0.7, 0.7];
|
grey70 = [0.7, 0.7, 0.7];
|
||||||
grey80 = [0.8, 0.8, 0.8];
|
grey80 = [0.8, 0.8, 0.8];
|
||||||
grey90 = [0.9, 0.9, 0.9];
|
grey90 = [0.9, 0.9, 0.9];
|
||||||
brass = "gold";
|
brass = [255/255, 215/255, 0/255];
|
||||||
|
silver = [0.75, 0.75, 0.75];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enums
|
* Enums
|
||||||
|
1
lib.scad
@@ -90,3 +90,4 @@ use <utils/layout.scad>
|
|||||||
use <utils/round.scad>
|
use <utils/round.scad>
|
||||||
use <utils/offset.scad>
|
use <utils/offset.scad>
|
||||||
use <utils/sector.scad>
|
use <utils/sector.scad>
|
||||||
|
use <utils/thread.scad>
|
||||||
|
BIN
libtest.png
Before Width: | Height: | Size: 721 KiB After Width: | Height: | Size: 741 KiB |
@@ -91,6 +91,7 @@ use <tests/strap_handle.scad>
|
|||||||
use <tests/ssr_shroud.scad>
|
use <tests/ssr_shroud.scad>
|
||||||
use <tests/psu_shroud.scad>
|
use <tests/psu_shroud.scad>
|
||||||
use <tests/flat_hinge.scad>
|
use <tests/flat_hinge.scad>
|
||||||
|
use <tests/pcb_mount.scad>
|
||||||
|
|
||||||
x5 = 800;
|
x5 = 800;
|
||||||
|
|
||||||
@@ -304,6 +305,9 @@ translate([x3, veroboard_y])
|
|||||||
translate([x3 + 70, veroboard_y + 30])
|
translate([x3 + 70, veroboard_y + 30])
|
||||||
geared_steppers();
|
geared_steppers();
|
||||||
|
|
||||||
|
translate([x3 + 140, veroboard_y + 20])
|
||||||
|
pcb_mounts();
|
||||||
|
|
||||||
translate([x3, d_connectors_y])
|
translate([x3, d_connectors_y])
|
||||||
d_connectors();
|
d_connectors();
|
||||||
|
|
||||||
|
@@ -50,6 +50,10 @@ function bbox_name(type) = type[8] ? type[8] : "bbox"; //! Optional name i
|
|||||||
function bbox_skip_blocks(type)= type[9] ? type[9] : []; //! List of fixing blocks to skip, used to allow a hinged panel for example
|
function bbox_skip_blocks(type)= type[9] ? type[9] : []; //! List of fixing blocks to skip, used to allow a hinged panel for example
|
||||||
function star_washers(type) = type[10] ? type[10] : is_undef(type[10]); //! Set to false to remove star washers.
|
function star_washers(type) = type[10] ? type[10] : is_undef(type[10]); //! Set to false to remove star washers.
|
||||||
|
|
||||||
|
function bbox_volume(type) = bbox_width(type) * bbox_depth(type) * bbox_height(type) / 1000000; //! Internal volume in litres
|
||||||
|
function bbox_area(type) = let(w = bbox_width(type), d = bbox_depth(type), h = bbox_height(type)) //! Internal surdface area in m^2
|
||||||
|
2 * (w * d + w * h + d * h) / 1000000;
|
||||||
|
|
||||||
module bbox_shelf_blank(type) { //! 2D template for a shelf
|
module bbox_shelf_blank(type) { //! 2D template for a shelf
|
||||||
dxf(str(bbox_name(type), "_shelf"));
|
dxf(str(bbox_name(type), "_shelf"));
|
||||||
|
|
||||||
@@ -165,7 +169,7 @@ module bbox_right_blank(type, sheet = false) { //! 2D template for the right sid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module bbox_front_blank(type, sheet = false) { //! 2D template for the front
|
module bbox_front_blank(type, sheet = false, width = 0) { //! 2D template for the front
|
||||||
dxf(str(bbox_name(type), "_front"));
|
dxf(str(bbox_name(type), "_front"));
|
||||||
|
|
||||||
t = sheet_thickness(bbox_sheets(type));
|
t = sheet_thickness(bbox_sheets(type));
|
||||||
@@ -174,7 +178,7 @@ module bbox_front_blank(type, sheet = false) { //! 2D template for the front
|
|||||||
|
|
||||||
difference() {
|
difference() {
|
||||||
translate([0, (bt - bb) / 2])
|
translate([0, (bt - bb) / 2])
|
||||||
sheet_2D(subst_sheet(type, sheet), bbox_width(type) + 2 * t, bbox_height(type) + bb + bt);
|
sheet_2D(subst_sheet(type, sheet), max(bbox_width(type) + 2 * t, width), bbox_height(type) + bb + bt);
|
||||||
|
|
||||||
drill_holes(type, rotate([-90, 0, 0]) * translate([0, bbox_depth(type) / 2]));
|
drill_holes(type, rotate([-90, 0, 0]) * translate([0, bbox_depth(type) / 2]));
|
||||||
}
|
}
|
||||||
@@ -205,7 +209,7 @@ module _bbox_assembly(type, top = true, base = true, left = true, right = true,
|
|||||||
width = bbox_width(type);
|
width = bbox_width(type);
|
||||||
depth = bbox_depth(type);
|
depth = bbox_depth(type);
|
||||||
height = bbox_height(type);
|
height = bbox_height(type);
|
||||||
echo("Box:", width, depth, height);
|
echo("Box:", width, depth, height, volume = bbox_volume(type), area = bbox_area(type));
|
||||||
|
|
||||||
t = sheet_thickness(bbox_sheets(type));
|
t = sheet_thickness(bbox_sheets(type));
|
||||||
bt = sheet_thickness(bbox_base_sheet(type));
|
bt = sheet_thickness(bbox_base_sheet(type));
|
||||||
|
@@ -195,12 +195,15 @@ module mouse_grommet_assembly(r, thickness)
|
|||||||
module ribbon_grommet_20_3_stl() ribbon_grommet(20, 3);
|
module ribbon_grommet_20_3_stl() ribbon_grommet(20, 3);
|
||||||
module mouse_grommet_15_3_stl() mouse_grommet(1.5, 3);
|
module mouse_grommet_15_3_stl() mouse_grommet(1.5, 3);
|
||||||
module mouse_grommet_20_3_stl() mouse_grommet(2, 3);
|
module mouse_grommet_20_3_stl() mouse_grommet(2, 3);
|
||||||
|
module mouse_grommet_25_3_stl() mouse_grommet(2.5, 3);
|
||||||
module mouse_grommet_30_3_stl() mouse_grommet(3, 3);
|
module mouse_grommet_30_3_stl() mouse_grommet(3, 3);
|
||||||
|
|
||||||
module round_grommet_bottom_30_stl() round_grommet_bottom(3);
|
module round_grommet_bottom_30_stl() round_grommet_bottom(3);
|
||||||
module round_grommet_bottom_40_stl() round_grommet_bottom(4);
|
module round_grommet_bottom_40_stl() round_grommet_bottom(4);
|
||||||
|
module round_grommet_bottom_50_stl() round_grommet_bottom(5);
|
||||||
module round_grommet_bottom_60_stl() round_grommet_bottom(6);
|
module round_grommet_bottom_60_stl() round_grommet_bottom(6);
|
||||||
|
|
||||||
module round_grommet_top_30_3_stl() round_grommet_top(3, 3);
|
module round_grommet_top_30_3_stl() round_grommet_top(3, 3);
|
||||||
module round_grommet_top_40_3_stl() round_grommet_top(4, 3);
|
module round_grommet_top_40_3_stl() round_grommet_top(4, 3);
|
||||||
|
module round_grommet_top_50_3_stl() round_grommet_top(5, 3);
|
||||||
module round_grommet_top_60_3_stl() round_grommet_top(6, 3);
|
module round_grommet_top_60_3_stl() round_grommet_top(6, 3);
|
||||||
|
124
printed/pcb_mount.scad
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
//
|
||||||
|
// NopSCADlib Copyright Chris Palmer 2019
|
||||||
|
// nop.head@gmail.com
|
||||||
|
// hydraraptor.blogspot.com
|
||||||
|
//
|
||||||
|
// This file is part of NopSCADlib.
|
||||||
|
//
|
||||||
|
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||||
|
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||||
|
// the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||||
|
// If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
//! A frame to mount a PCB by its corners when it has no mounting holes.
|
||||||
|
//! The stl must be given a parameterless wrapper in the project that uses it.
|
||||||
|
//
|
||||||
|
include <../core.scad>
|
||||||
|
include <../vitamins/screws.scad>
|
||||||
|
use <../vitamins/pcb.scad>
|
||||||
|
|
||||||
|
clearance = 0.2;
|
||||||
|
min_wall = extrusion_width * 2;
|
||||||
|
wall = 2;
|
||||||
|
|
||||||
|
overlap = 2;
|
||||||
|
|
||||||
|
screw = M3_cap_screw;
|
||||||
|
screw_clearance_r = 3.1 / 2;
|
||||||
|
pillar_r = corrected_radius(screw_clearance_r) + wall;
|
||||||
|
|
||||||
|
function pillar_x_pitch(pcb) = pcb_length(pcb) + 2 * clearance + 2 * (pillar_r - overlap) / sqrt(2); //! x pitch of screw pillars
|
||||||
|
function pillar_y_pitch(pcb) = pcb_width(pcb) + 2 * clearance + 2 * (pillar_r - overlap) / sqrt(2); //! y pitch of screw pillars
|
||||||
|
|
||||||
|
function pcb_mount_length(pcb) = pillar_x_pitch(pcb) + 2 * pillar_r; //! Outside length of the mount
|
||||||
|
function pcb_mount_width(pcb) = pillar_y_pitch(pcb) + 2 * pillar_r; //! Outside width of the mount
|
||||||
|
|
||||||
|
frame_w = 3;
|
||||||
|
frame_t = 2;
|
||||||
|
|
||||||
|
washer_thickness = 1.25;
|
||||||
|
|
||||||
|
module pcb_mount_screw_positions(pcb) //! Positions of the screws and pillars
|
||||||
|
for(x = [-1, 1], y = [-1, 1])
|
||||||
|
translate([x * pillar_x_pitch(pcb) / 2, y * pillar_y_pitch(pcb) / 2])
|
||||||
|
children();
|
||||||
|
|
||||||
|
module pcb_mount_holes(pcb, h = 0) //! Drill holes for PCB mount
|
||||||
|
pcb_mount_screw_positions(pcb)
|
||||||
|
drill(screw_clearance_radius(screw), h);
|
||||||
|
|
||||||
|
module pcb_mount_ring()
|
||||||
|
difference() {
|
||||||
|
circle(pillar_r);
|
||||||
|
|
||||||
|
poly_circle(screw_clearance_r);
|
||||||
|
}
|
||||||
|
|
||||||
|
module pcb_mount_washer_stl() //! A plastic washer to clamp a PCB
|
||||||
|
linear_extrude(height = washer_thickness)
|
||||||
|
pcb_mount_ring();
|
||||||
|
|
||||||
|
module pcb_mount(pcb, height = 5, washers = true) { //! Make the STL of a pcb mount for the specified PCB.
|
||||||
|
stl(str("pcb_mount_", pcb[0], "_", height));
|
||||||
|
|
||||||
|
y_pitch = pcb_width(pcb) > 4 * pillar_r + 4 ? pillar_r + 1
|
||||||
|
: pcb_width(pcb) / 2 + frame_w + 1 + pillar_r;
|
||||||
|
|
||||||
|
if(washers)
|
||||||
|
for(x = [-1, 1], y = [-1, 1])
|
||||||
|
translate([x * (pillar_r + 1), y * y_pitch, 0])
|
||||||
|
pcb_mount_washer_stl();
|
||||||
|
|
||||||
|
for(x = [-1, 1])
|
||||||
|
translate([x * pillar_x_pitch(pcb) / 2, 0, frame_t / 2])
|
||||||
|
cube([frame_w, pillar_y_pitch(pcb) - 2 * wall, frame_t], center = true);
|
||||||
|
|
||||||
|
for(y = [-1, 1])
|
||||||
|
translate([0, y * pillar_y_pitch(pcb) / 2, frame_t / 2])
|
||||||
|
cube([pillar_x_pitch(pcb) - 2 * wall, frame_w, frame_t], center = true);
|
||||||
|
|
||||||
|
pcb_mount_screw_positions(pcb)
|
||||||
|
linear_extrude(height = height)
|
||||||
|
pcb_mount_ring();
|
||||||
|
|
||||||
|
linear_extrude(height = height + pcb_thickness(pcb) - layer_height)
|
||||||
|
difference() {
|
||||||
|
pcb_mount_screw_positions(pcb)
|
||||||
|
pcb_mount_ring();
|
||||||
|
|
||||||
|
square([pcb_length(pcb) + 2 * clearance, pcb_width(pcb) + 2 * clearance], center = true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module pcb_mount_assembly(pcb, thickness, height = 5) { //! A PCB mount assembly with fasteners
|
||||||
|
translate_z(height)
|
||||||
|
pcb(pcb);
|
||||||
|
|
||||||
|
color(pp1_colour) pcb_mount(pcb, washers = false);
|
||||||
|
|
||||||
|
washer = screw_washer(screw);
|
||||||
|
nut = screw_nut(screw);
|
||||||
|
t = pcb_thickness(pcb);
|
||||||
|
screw_length = screw_longer_than(height + t + washer_thickness + thickness + washer_thickness(washer) + nut_thickness(nut, true));
|
||||||
|
|
||||||
|
pcb_mount_screw_positions(pcb) {
|
||||||
|
translate_z(height + t) {
|
||||||
|
color(pp2_colour) pcb_mount_washer_stl();
|
||||||
|
|
||||||
|
translate_z(washer_thickness)
|
||||||
|
screw(screw, screw_length);
|
||||||
|
}
|
||||||
|
|
||||||
|
translate_z(-thickness)
|
||||||
|
vflip()
|
||||||
|
nut_and_washer(nut, true);
|
||||||
|
}
|
||||||
|
}
|
148
readme.md
@@ -30,13 +30,13 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
|
|||||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#Ring_terminals">Ring_terminals</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
|
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#Ring_terminals">Ring_terminals</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
|
||||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Rockers">Rockers</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Rockers">Rockers</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
||||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Rod">Rod</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Rod">Rod</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
||||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Psu_shroud">Psu_shroud</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Pcb_mount">Pcb_mount</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Psu_shroud">Psu_shroud</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||||
<tr><td> <a href = "#Iecs">Iecs</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Ssr_shroud">Ssr_shroud</a> </td><td></td><td></td></tr>
|
<tr><td> <a href = "#Iecs">Iecs</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||||
<tr><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
<tr><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Ssr_shroud">Ssr_shroud</a> </td><td></td><td></td></tr>
|
||||||
<tr><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Ssrs">Ssrs</a> </td><td></td><td></td><td></td></tr>
|
<tr><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Ssrs">Ssrs</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||||
<tr><td> <a href = "#Ldrs">Ldrs</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td></td><td></td><td></td></tr>
|
<tr><td> <a href = "#Ldrs">Ldrs</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td></td><td></td><td></td></tr>
|
||||||
<tr><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td></td><td></td><td></td></tr>
|
<tr><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td></td><td></td><td></td></tr>
|
||||||
<tr><td> <a href = "#Leds">Leds</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td></td><td></td><td></td></tr>
|
<tr><td> <a href = "#Leds">Leds</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td></td><td></td><td></td></tr>
|
||||||
@@ -260,7 +260,7 @@ Models of radial blowers.
|
|||||||
| Qty | Module call | BOM entry |
|
| Qty | Module call | BOM entry |
|
||||||
| ---:|:--- |:---|
|
| ---:|:--- |:---|
|
||||||
| 1 | ```blower(PE4020)``` | Blower Pengda Technology 4020 |
|
| 1 | ```blower(PE4020)``` | Blower Pengda Technology 4020 |
|
||||||
| 1 | ```blower(RM5015)``` | Blower Runda RB5015 |
|
| 1 | ```blower(RB5015)``` | Blower Runda RB5015 |
|
||||||
| 3 | ```screw(M3_cap_screw, 20)``` | Screw M3 cap x 20mm |
|
| 3 | ```screw(M3_cap_screw, 20)``` | Screw M3 cap x 20mm |
|
||||||
| 2 | ```screw(M4_cap_screw, 25)``` | Screw M4 cap x 25mm |
|
| 2 | ```screw(M4_cap_screw, 25)``` | Screw M4 cap x 25mm |
|
||||||
| 3 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
| 3 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||||
@@ -581,6 +581,7 @@ LCD dispays.
|
|||||||
| ---:|:--- |:---|
|
| ---:|:--- |:---|
|
||||||
| 1 | ```display(HDMI5)``` | HDMI display 5" |
|
| 1 | ```display(HDMI5)``` | HDMI display 5" |
|
||||||
| 1 | ```display(LCD1602A)``` | LCD display 1602A |
|
| 1 | ```display(LCD1602A)``` | LCD display 1602A |
|
||||||
|
| 1 | ```display(LCDS7282B)``` | LCD display S-7282B |
|
||||||
| 1 | ```display(SSD1963_4p3)``` | LCD display SSD1963 4.3" |
|
| 1 | ```display(SSD1963_4p3)``` | LCD display SSD1963 4.3" |
|
||||||
|
|
||||||
|
|
||||||
@@ -615,16 +616,11 @@ Can draw three styles: solid, open frame and open frame with screw bosses.
|
|||||||
| ```fan_thickness(type)``` | Thickness of the frame |
|
| ```fan_thickness(type)``` | Thickness of the frame |
|
||||||
| ```fan_width(type)``` | Width of square |
|
| ```fan_width(type)``` | Width of square |
|
||||||
|
|
||||||
### Functions
|
|
||||||
| Function | Description |
|
|
||||||
|:--- |:--- |
|
|
||||||
| ```fan_screw_length(type, thickness)``` | Screw length required |
|
|
||||||
|
|
||||||
### Modules
|
### Modules
|
||||||
| Module | Description |
|
| Module | Description |
|
||||||
|:--- |:--- |
|
|:--- |:--- |
|
||||||
| ```fan(type)``` | Draw specified fan, origin in the centre |
|
| ```fan(type)``` | Draw specified fan, origin in the centre |
|
||||||
| ```fan_assembly(type, thickness, include_fan = true, screw = false)``` | Fan with its fasteners |
|
| ```fan_assembly(type, thickness, include_fan = true, screw = false, full_depth = false)``` | Fan with its fasteners |
|
||||||
| ```fan_hole_positions(type, z = undef)``` | Position children at the screw hole positions |
|
| ```fan_hole_positions(type, z = undef)``` | Position children at the screw hole positions |
|
||||||
| ```fan_holes(type, poly = false, screws = true, h = 100)``` | Make all the holes for the fan, or just the aperture if ```screws``` is false. Set ```poly``` true for poly_holes. |
|
| ```fan_holes(type, poly = false, screws = true, h = 100)``` | Make all the holes for the fan, or just the aperture if ```screws``` is false. Set ```poly``` true for poly_holes. |
|
||||||
|
|
||||||
@@ -634,6 +630,7 @@ Can draw three styles: solid, open frame and open frame with screw bosses.
|
|||||||
| Qty | Module call | BOM entry |
|
| Qty | Module call | BOM entry |
|
||||||
| ---:|:--- |:---|
|
| ---:|:--- |:---|
|
||||||
| 1 | ```fan(fan120x25)``` | Fan 120mm x 25mm |
|
| 1 | ```fan(fan120x25)``` | Fan 120mm x 25mm |
|
||||||
|
| 1 | ```fan(fan17x8)``` | Fan 17mm x 8mm |
|
||||||
| 1 | ```fan(fan25x10)``` | Fan 25mm x 10mm |
|
| 1 | ```fan(fan25x10)``` | Fan 25mm x 10mm |
|
||||||
| 1 | ```fan(fan30x10)``` | Fan 30mm x 10mm |
|
| 1 | ```fan(fan30x10)``` | Fan 30mm x 10mm |
|
||||||
| 1 | ```fan(fan40x11)``` | Fan 40mm x 11mm |
|
| 1 | ```fan(fan40x11)``` | Fan 40mm x 11mm |
|
||||||
@@ -643,17 +640,20 @@ Can draw three styles: solid, open frame and open frame with screw bosses.
|
|||||||
| 1 | ```fan(fan70x15)``` | Fan 70mm x 15mm |
|
| 1 | ```fan(fan70x15)``` | Fan 70mm x 15mm |
|
||||||
| 1 | ```fan(fan80x25)``` | Fan 80mm x 25mm |
|
| 1 | ```fan(fan80x25)``` | Fan 80mm x 25mm |
|
||||||
| 1 | ```fan(fan80x38)``` | Fan 80mm x 38mm |
|
| 1 | ```fan(fan80x38)``` | Fan 80mm x 38mm |
|
||||||
|
| 4 | ```nut(M2_nut, nyloc = true)``` | Nut M2 x 1.6mm nyloc |
|
||||||
| 4 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc |
|
| 4 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc |
|
||||||
| 8 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
|
| 8 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
|
||||||
| 28 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc |
|
| 28 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc |
|
||||||
|
| 4 | ```screw(M2_cap_screw, 16)``` | Screw M2 cap x 16mm |
|
||||||
| 4 | ```screw(M2p5_pan_screw, 20)``` | Screw M2.5 pan x 20mm |
|
| 4 | ```screw(M2p5_pan_screw, 20)``` | Screw M2.5 pan x 20mm |
|
||||||
| 8 | ```screw(M3_dome_screw, 20)``` | Screw M3 dome x 20mm |
|
| 8 | ```screw(M3_dome_screw, 20)``` | Screw M3 dome x 20mm |
|
||||||
| 20 | ```screw(M4_dome_screw, 16)``` | Screw M4 dome x 16mm |
|
| 20 | ```screw(M4_dome_screw, 16)``` | Screw M4 dome x 16mm |
|
||||||
| 4 | ```screw(M4_dome_screw, 25)``` | Screw M4 dome x 25mm |
|
| 4 | ```screw(M4_dome_screw, 25)``` | Screw M4 dome x 25mm |
|
||||||
| 4 | ```screw(M4_dome_screw, 30)``` | Screw M4 dome x 30mm |
|
| 4 | ```screw(M4_dome_screw, 30)``` | Screw M4 dome x 30mm |
|
||||||
| 4 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm |
|
| 8 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm |
|
||||||
| 8 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
| 8 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||||
| 28 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
| 12 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||||
|
| 32 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
||||||
|
|
||||||
|
|
||||||
<a href="#top">Top</a>
|
<a href="#top">Top</a>
|
||||||
@@ -829,7 +829,7 @@ Needs updating as mostly obsolete versions.
|
|||||||
### Modules
|
### Modules
|
||||||
| Module | Description |
|
| Module | Description |
|
||||||
|:--- |:--- |
|
|:--- |:--- |
|
||||||
| ```hot_end(type, filament, naked = false)``` | Draw specified hot end |
|
| ```hot_end(type, filament, naked = false, resistor_wire_rotate = [0,0,0])``` | Draw specified hot end |
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -1682,7 +1682,9 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||||||
### Functions
|
### Functions
|
||||||
| Function | Description |
|
| Function | Description |
|
||||||
|:--- |:--- |
|
|:--- |:--- |
|
||||||
|
| ```pcb_component_position(type, name, index = 0)``` | Return x y position of specified component |
|
||||||
| ```pcb_coord(type, p)``` | Convert offsets from the edge to coordinates relative to the centre |
|
| ```pcb_coord(type, p)``` | Convert offsets from the edge to coordinates relative to the centre |
|
||||||
|
| ```pcb_grid_pos(type, x, y, z = 0)``` | Returns a pcb grid position |
|
||||||
| ```pcb_screw(type, cap = hs_cap)``` | Mounting screw type |
|
| ```pcb_screw(type, cap = hs_cap)``` | Mounting screw type |
|
||||||
|
|
||||||
### Modules
|
### Modules
|
||||||
@@ -1702,7 +1704,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||||||
| ```pcb_component_position(type, name)``` | Position child at the specified component position |
|
| ```pcb_component_position(type, name)``` | Position child at the specified component position |
|
||||||
| ```pcb_components(type, cutouts = false, angle = undef)``` | Draw list of PCB components on the PCB |
|
| ```pcb_components(type, cutouts = false, angle = undef)``` | Draw list of PCB components on the PCB |
|
||||||
| ```pcb_cutouts(type, angle = undef)``` | Make cut outs to clear components on a PCB |
|
| ```pcb_cutouts(type, angle = undef)``` | Make cut outs to clear components on a PCB |
|
||||||
| ```pcb_grid(type, x, y, z = 0)``` | Positions children at specified grid positions |
|
| ```pcb_grid(type, x, y, z = 0)``` | Positions children at specified grid position |
|
||||||
| ```pcb_screw_positions(type)``` | Positions children at the mounting hole positions |
|
| ```pcb_screw_positions(type)``` | Positions children at the mounting hole positions |
|
||||||
| ```pcb_spacer(screw, height, wall = 1.8, taper = 0)``` | Generate STL for PCB spacer |
|
| ```pcb_spacer(screw, height, wall = 1.8, taper = 0)``` | Generate STL for PCB spacer |
|
||||||
| ```rj45(cutout = false)``` | Draw RJ45 Ethernet connector |
|
| ```rj45(cutout = false)``` | Draw RJ45 Ethernet connector |
|
||||||
@@ -1724,6 +1726,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||||||
| 1 | ```pcb(DuetE)``` | Duet 2 Ethernet electronics |
|
| 1 | ```pcb(DuetE)``` | Duet 2 Ethernet electronics |
|
||||||
| 1 | ```pcb(Duex2)``` | Duex2 expansion board |
|
| 1 | ```pcb(Duex2)``` | Duex2 expansion board |
|
||||||
| 1 | ```pcb(Duex5)``` | Duex5 expasnion board |
|
| 1 | ```pcb(Duex5)``` | Duex5 expasnion board |
|
||||||
|
| 1 | ```pcb(EnviroPlus)``` | Enviro+ |
|
||||||
| 1 | ```pcb(ExtruderPCB)``` | Extruder connection PCB |
|
| 1 | ```pcb(ExtruderPCB)``` | Extruder connection PCB |
|
||||||
| 1 | ```pcb(Keyes5p1)``` | Keyes5.1 Arduino Uno expansion board |
|
| 1 | ```pcb(Keyes5p1)``` | Keyes5.1 Arduino Uno expansion board |
|
||||||
| 1 | ```pcb(Melzi)``` | Melzi electronics |
|
| 1 | ```pcb(Melzi)``` | Melzi electronics |
|
||||||
@@ -1731,7 +1734,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||||||
| 1 | ```molex_254(2)``` | Molex KK header 2 way |
|
| 1 | ```molex_254(2)``` | Molex KK header 2 way |
|
||||||
| 1 | ```molex_254(3)``` | Molex KK header 3 way |
|
| 1 | ```molex_254(3)``` | Molex KK header 3 way |
|
||||||
| 16 | ```nut(M2_nut, nyloc = true)``` | Nut M2 x 1.6mm nyloc |
|
| 16 | ```nut(M2_nut, nyloc = true)``` | Nut M2 x 1.6mm nyloc |
|
||||||
| 24 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc |
|
| 28 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc |
|
||||||
| 12 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
|
| 12 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
|
||||||
| 12 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc |
|
| 12 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc |
|
||||||
| 1 | ```pcb(PI_IO)``` | PI_IO V2 |
|
| 1 | ```pcb(PI_IO)``` | PI_IO V2 |
|
||||||
@@ -1744,22 +1747,21 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||||||
| 1 | ```pin_socket(2p54header, 13, 2, right_angle = true)``` | Pin socket 13 x 2 right_angle |
|
| 1 | ```pin_socket(2p54header, 13, 2, right_angle = true)``` | Pin socket 13 x 2 right_angle |
|
||||||
| 1 | ```pcb(RPI3)``` | Raspberry Pi 3 |
|
| 1 | ```pcb(RPI3)``` | Raspberry Pi 3 |
|
||||||
| 1 | ```pcb(RPI0)``` | Raspberry Pi Zero |
|
| 1 | ```pcb(RPI0)``` | Raspberry Pi Zero |
|
||||||
| 4 | ```screw(M2_cap_screw, 20)``` | Screw M2 cap x 20mm |
|
| 16 | ```screw(M2_cap_screw, 25)``` | Screw M2 cap x 25mm |
|
||||||
| 12 | ```screw(M2_cap_screw, 25)``` | Screw M2 cap x 25mm |
|
|
||||||
| 4 | ```screw(M2p5_cap_screw, 16)``` | Screw M2.5 cap x 16mm |
|
| 4 | ```screw(M2p5_cap_screw, 16)``` | Screw M2.5 cap x 16mm |
|
||||||
| 4 | ```screw(M2p5_cap_screw, 20)``` | Screw M2.5 cap x 20mm |
|
| 8 | ```screw(M2p5_cap_screw, 20)``` | Screw M2.5 cap x 20mm |
|
||||||
| 12 | ```screw(M2p5_pan_screw, 20)``` | Screw M2.5 pan x 20mm |
|
| 8 | ```screw(M2p5_pan_screw, 20)``` | Screw M2.5 pan x 20mm |
|
||||||
|
| 4 | ```screw(M2p5_pan_screw, 25)``` | Screw M2.5 pan x 25mm |
|
||||||
| 4 | ```screw(M2p5_pan_screw, 35)``` | Screw M2.5 pan x 35mm |
|
| 4 | ```screw(M2p5_pan_screw, 35)``` | Screw M2.5 pan x 35mm |
|
||||||
| 4 | ```screw(M3_cap_screw, 25)``` | Screw M3 cap x 25mm |
|
| 8 | ```screw(M3_cap_screw, 30)``` | Screw M3 cap x 30mm |
|
||||||
| 4 | ```screw(M3_cap_screw, 30)``` | Screw M3 cap x 30mm |
|
|
||||||
| 4 | ```screw(M3_cap_screw, 35)``` | Screw M3 cap x 35mm |
|
| 4 | ```screw(M3_cap_screw, 35)``` | Screw M3 cap x 35mm |
|
||||||
| 8 | ```screw(M4_cap_screw, 30)``` | Screw M4 cap x 30mm |
|
| 4 | ```screw(M4_cap_screw, 30)``` | Screw M4 cap x 30mm |
|
||||||
| 4 | ```screw(M4_cap_screw, 35)``` | Screw M4 cap x 35mm |
|
| 8 | ```screw(M4_cap_screw, 35)``` | Screw M4 cap x 35mm |
|
||||||
| 3 | ```terminal_35(2)``` | Terminal block 2 way 3.5mm |
|
| 3 | ```terminal_35(2)``` | Terminal block 2 way 3.5mm |
|
||||||
| 2 | ```green_terminal(gt_2p54, 4)``` | Terminal block 4 way 0.1" |
|
| 2 | ```green_terminal(gt_2p54, 4)``` | Terminal block 4 way 0.1" |
|
||||||
| 1 | | USB A to Mini B lead |
|
| 1 | | USB A to Mini B lead |
|
||||||
| 16 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm |
|
| 16 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm |
|
||||||
| 24 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm |
|
| 28 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||||
| 12 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
| 12 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||||
| 12 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
| 12 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
||||||
| 1 | ```pcb(ZC_A0591)``` | ZC-A0591 ULN2003 driver PCB |
|
| 1 | ```pcb(ZC_A0591)``` | ZC-A0591 ULN2003 driver PCB |
|
||||||
@@ -1767,22 +1769,23 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||||||
### Printed
|
### Printed
|
||||||
| Qty | Filename |
|
| Qty | Filename |
|
||||||
| ---:|:--- |
|
| ---:|:--- |
|
||||||
| 4 | pcb_spacer20120.stl |
|
|
||||||
| 4 | pcb_spacer20130.stl |
|
| 4 | pcb_spacer20130.stl |
|
||||||
| 4 | pcb_spacer20140.stl |
|
| 4 | pcb_spacer20140.stl |
|
||||||
| 4 | pcb_spacer20150.stl |
|
| 4 | pcb_spacer20150.stl |
|
||||||
|
| 4 | pcb_spacer20160.stl |
|
||||||
| 4 | pcb_spacer25100_2.stl |
|
| 4 | pcb_spacer25100_2.stl |
|
||||||
| 4 | pcb_spacer25110_2.stl |
|
| 4 | pcb_spacer25110_2.stl |
|
||||||
| 4 | pcb_spacer25220.stl |
|
| 4 | pcb_spacer25120_2.stl |
|
||||||
|
| 4 | pcb_spacer25230.stl |
|
||||||
| 4 | pcb_spacer2570.stl |
|
| 4 | pcb_spacer2570.stl |
|
||||||
| 4 | pcb_spacer2580.stl |
|
| 4 | pcb_spacer2580.stl |
|
||||||
| 4 | pcb_spacer2590_2.stl |
|
| 4 | pcb_spacer2590.stl |
|
||||||
| 4 | pcb_spacer30160.stl |
|
|
||||||
| 4 | pcb_spacer30170.stl |
|
| 4 | pcb_spacer30170.stl |
|
||||||
| 4 | pcb_spacer30210.stl |
|
| 4 | pcb_spacer30180.stl |
|
||||||
| 4 | pcb_spacer40180.stl |
|
| 4 | pcb_spacer30220.stl |
|
||||||
| 4 | pcb_spacer40190.stl |
|
| 4 | pcb_spacer40190.stl |
|
||||||
| 4 | pcb_spacer40200.stl |
|
| 4 | pcb_spacer40200.stl |
|
||||||
|
| 4 | pcb_spacer40210.stl |
|
||||||
|
|
||||||
|
|
||||||
<a href="#top">Top</a>
|
<a href="#top">Top</a>
|
||||||
@@ -1864,17 +1867,18 @@ Pin headers and sockets, etc.
|
|||||||
| ```box_header(type, cols = 1, rows = 1, smt = false, cutout = false)``` | Draw box header |
|
| ```box_header(type, cols = 1, rows = 1, smt = false, cutout = false)``` | Draw box header |
|
||||||
| ```idc_transition(type, cols = 5, skip = [], cutout = false)``` | Draw IDC transition header |
|
| ```idc_transition(type, cols = 5, skip = [], cutout = false)``` | Draw IDC transition header |
|
||||||
| ```pin(type, length = undef)``` | Draw a header pin |
|
| ```pin(type, length = undef)``` | Draw a header pin |
|
||||||
| ```pin_header(type, cols = 1, rows = 1, smt = false, cutout = false)``` | Draw pin header |
|
| ```pin_header(type, cols = 1, rows = 1, smt = false, right_angle = false, cutout = false)``` | Draw pin header |
|
||||||
| ```pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, cutout = false)``` | Draw pin socket |
|
| ```pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, smt = false, cutout = false)``` | Draw pin socket |
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Vitamins
|
### Vitamins
|
||||||
| Qty | Module call | BOM entry |
|
| Qty | Module call | BOM entry |
|
||||||
| ---:|:--- |:---|
|
| ---:|:--- |:---|
|
||||||
| 1 | ```box_header(2p54header102)``` | Box header 10 x 2 |
|
| 1 | ```box_header(2p54header, 10, 2)``` | Box header 10 x 2 |
|
||||||
| 1 | ```idc_transition(2p54header, 10)``` | IDC transition header 10 x 2 |
|
| 1 | ```idc_transition(2p54header, 10)``` | IDC transition header 10 x 2 |
|
||||||
| 1 | ```pin_header(2p54header102)``` | Pin header 10 x 2 |
|
| 1 | ```pin_header(2p54header, 10, 2)``` | Pin header 10 x 2 |
|
||||||
|
| 1 | ```pin_header(2p54header, 10, 2, right_angle = true)``` | Pin header 10 x 2 right_angle |
|
||||||
| 1 | ```pin_socket(2p54header, 10, 2)``` | Pin socket 10 x 2 |
|
| 1 | ```pin_socket(2p54header, 10, 2)``` | Pin socket 10 x 2 |
|
||||||
| 1 | ```pin_socket(2p54header, 10, 2, right_angle = true)``` | Pin socket 10 x 2 right_angle |
|
| 1 | ```pin_socket(2p54header, 10, 2, right_angle = true)``` | Pin socket 10 x 2 right_angle |
|
||||||
|
|
||||||
@@ -2120,6 +2124,7 @@ Ring terminals and earth assemblies for DiBond panels.
|
|||||||
### Properties
|
### Properties
|
||||||
| Function | Description |
|
| Function | Description |
|
||||||
|:--- |:--- |
|
|:--- |:--- |
|
||||||
|
| ```ringterm_crimp_length(type)``` | If non-zero the length of the crimp tube |
|
||||||
| ```ringterm_hole(type)``` | Wire hole diameter |
|
| ```ringterm_hole(type)``` | Wire hole diameter |
|
||||||
| ```ringterm_id(type)``` | Inside diameter |
|
| ```ringterm_id(type)``` | Inside diameter |
|
||||||
| ```ringterm_length(type)``` | Length of the tail including the ring |
|
| ```ringterm_length(type)``` | Length of the tail including the ring |
|
||||||
@@ -2145,12 +2150,13 @@ Ring terminals and earth assemblies for DiBond panels.
|
|||||||
### Vitamins
|
### Vitamins
|
||||||
| Qty | Module call | BOM entry |
|
| Qty | Module call | BOM entry |
|
||||||
| ---:|:--- |:---|
|
| ---:|:--- |:---|
|
||||||
| 2 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
|
| 3 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
|
||||||
| 1 | ```ring_terminal(M3_ringterm)``` | Ring terminal 3mm |
|
| 1 | ```ring_terminal(M3_ringterm)``` | Ring terminal 3mm |
|
||||||
| 1 | ```ring_terminal(M3_ringterm_cs)``` | Ring terminal 3mm |
|
| 1 | ```ring_terminal(M3_ringterm_cs)``` | Ring terminal 3mm |
|
||||||
|
| 1 | ```ring_terminal(M3_ringterm_crimp)``` | Ring terminal crimp 3mm |
|
||||||
| 1 | ```screw(M3_cap_screw, 10)``` | Screw M3 cap x 10mm |
|
| 1 | ```screw(M3_cap_screw, 10)``` | Screw M3 cap x 10mm |
|
||||||
| 1 | ```screw(M3_dome_screw, 10)``` | Screw M3 dome x 10mm |
|
| 2 | ```screw(M3_dome_screw, 10)``` | Screw M3 dome x 10mm |
|
||||||
| 4 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
|
| 6 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
|
||||||
|
|
||||||
|
|
||||||
<a href="#top">Top</a>
|
<a href="#top">Top</a>
|
||||||
@@ -2483,6 +2489,7 @@ Filament spool models
|
|||||||
| Qty | Module call | BOM entry |
|
| Qty | Module call | BOM entry |
|
||||||
| ---:|:--- |:---|
|
| ---:|:--- |:---|
|
||||||
| 1 | ```spool(spool_200x55)``` | Filament spool 200 x 55 |
|
| 1 | ```spool(spool_200x55)``` | Filament spool 200 x 55 |
|
||||||
|
| 1 | ```spool(spool_200x60)``` | Filament spool 200 x 60 |
|
||||||
| 1 | ```spool(spool_300x85)``` | Filament spool 300 x 85 |
|
| 1 | ```spool(spool_300x85)``` | Filament spool 300 x 85 |
|
||||||
| 1 | ```spool(spool_300x88)``` | Filament spool 300 x 88 |
|
| 1 | ```spool(spool_300x88)``` | Filament spool 300 x 88 |
|
||||||
|
|
||||||
@@ -3242,6 +3249,12 @@ Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
|
|||||||
| ```bbox_width(type)``` | Internal width |
|
| ```bbox_width(type)``` | Internal width |
|
||||||
| ```star_washers(type)``` | Set to false to remove star washers. |
|
| ```star_washers(type)``` | Set to false to remove star washers. |
|
||||||
|
|
||||||
|
### Functions
|
||||||
|
| Function | Description |
|
||||||
|
|:--- |:--- |
|
||||||
|
| ```bbox_area(type)``` | Internal surdface area in m^2 |
|
||||||
|
| ```bbox_volume(type)``` | Internal volume in litres |
|
||||||
|
|
||||||
### Modules
|
### Modules
|
||||||
| Module | Description |
|
| Module | Description |
|
||||||
|:--- |:--- |
|
|:--- |:--- |
|
||||||
@@ -3251,7 +3264,7 @@ Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
|
|||||||
| ```bbox_base(type)``` | Default base, can be overridden to customise |
|
| ```bbox_base(type)``` | Default base, can be overridden to customise |
|
||||||
| ```bbox_base_blank(type)``` | 2D template for the base |
|
| ```bbox_base_blank(type)``` | 2D template for the base |
|
||||||
| ```bbox_front(type)``` | Default front, can be overridden to customise |
|
| ```bbox_front(type)``` | Default front, can be overridden to customise |
|
||||||
| ```bbox_front_blank(type, sheet = false)``` | 2D template for the front |
|
| ```bbox_front_blank(type, sheet = false, width = 0)``` | 2D template for the front |
|
||||||
| ```bbox_left(type)``` | Default left side, can be overridden to customise |
|
| ```bbox_left(type)``` | Default left side, can be overridden to customise |
|
||||||
| ```bbox_left_blank(type, sheet = false)``` | 2D template for the left side |
|
| ```bbox_left_blank(type, sheet = false)``` | 2D template for the left side |
|
||||||
| ```bbox_right(type)``` | Default right side, can be overridden to customise |
|
| ```bbox_right(type)``` | Default right side, can be overridden to customise |
|
||||||
@@ -3569,6 +3582,7 @@ The ring spacing as well as the number of spokes can be specified, if zero a gas
|
|||||||
| Qty | Filename |
|
| Qty | Filename |
|
||||||
| ---:|:--- |
|
| ---:|:--- |
|
||||||
| 1 | fan_guard_120.stl |
|
| 1 | fan_guard_120.stl |
|
||||||
|
| 1 | fan_guard_17.stl |
|
||||||
| 1 | fan_guard_25.stl |
|
| 1 | fan_guard_25.stl |
|
||||||
| 1 | fan_guard_30.stl |
|
| 1 | fan_guard_30.stl |
|
||||||
| 1 | fan_guard_40.stl |
|
| 1 | fan_guard_40.stl |
|
||||||
@@ -3843,6 +3857,54 @@ Printed handle that can be printed without needing support material due to its t
|
|||||||
| 1 | handle_assembly |
|
| 1 | handle_assembly |
|
||||||
|
|
||||||
|
|
||||||
|
<a href="#top">Top</a>
|
||||||
|
|
||||||
|
---
|
||||||
|
<a name="Pcb_mount"></a>
|
||||||
|
## Pcb_mount
|
||||||
|
A frame to mount a PCB by its corners when it has no mounting holes.
|
||||||
|
The stl must be given a parameterless wrapper in the project that uses it.
|
||||||
|
|
||||||
|
|
||||||
|
[printed/pcb_mount.scad](printed/pcb_mount.scad) Implementation.
|
||||||
|
|
||||||
|
[tests/pcb_mount.scad](tests/pcb_mount.scad) Code for this example.
|
||||||
|
|
||||||
|
### Functions
|
||||||
|
| Function | Description |
|
||||||
|
|:--- |:--- |
|
||||||
|
| ```pcb_mount_length(pcb)``` | Outside length of the mount |
|
||||||
|
| ```pcb_mount_width(pcb)``` | Outside width of the mount |
|
||||||
|
| ```pillar_x_pitch(pcb)``` | x pitch of screw pillars |
|
||||||
|
| ```pillar_y_pitch(pcb)``` | y pitch of screw pillars |
|
||||||
|
|
||||||
|
### Modules
|
||||||
|
| Module | Description |
|
||||||
|
|:--- |:--- |
|
||||||
|
| ```pcb_mount(pcb, height = 5, washers = true)``` | Make the STL of a pcb mount for the specified PCB. |
|
||||||
|
| ```pcb_mount_assembly(pcb, thickness, height = 5)``` | A PCB mount assembly with fasteners |
|
||||||
|
| ```pcb_mount_holes(pcb, h = 0)``` | Drill holes for PCB mount |
|
||||||
|
| ```pcb_mount_screw_positions(pcb)``` | Positions of the screws and pillars |
|
||||||
|
| ```pcb_mount_washer_stl()``` | A plastic washer to clamp a PCB |
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Vitamins
|
||||||
|
| Qty | Module call | BOM entry |
|
||||||
|
| ---:|:--- |:---|
|
||||||
|
| 4 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
|
||||||
|
| 1 | ```pcb(PI_IO)``` | PI_IO V2 |
|
||||||
|
| 1 | ```pin_socket(2p54header, 13, 2)``` | Pin socket 13 x 2 |
|
||||||
|
| 4 | ```screw(M3_cap_screw, 16)``` | Screw M3 cap x 16mm |
|
||||||
|
| 3 | ```terminal_35(2)``` | Terminal block 2 way 3.5mm |
|
||||||
|
| 4 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||||
|
|
||||||
|
### Printed
|
||||||
|
| Qty | Filename |
|
||||||
|
| ---:|:--- |
|
||||||
|
| 1 | pcb_mount_PI_IO_5.stl |
|
||||||
|
|
||||||
|
|
||||||
<a href="#top">Top</a>
|
<a href="#top">Top</a>
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@@ -154,7 +154,7 @@ def views(target, do_assemblies = None):
|
|||||||
f.write("use <%s/%s>\n" % (dir, filename))
|
f.write("use <%s/%s>\n" % (dir, filename))
|
||||||
f.write("%s();\n" % module);
|
f.write("%s();\n" % module);
|
||||||
#
|
#
|
||||||
# Run openscad on th created file
|
# Run openscad on the created file
|
||||||
#
|
#
|
||||||
dname = deps_name(deps_dir, filename)
|
dname = deps_name(deps_dir, filename)
|
||||||
for explode in [0, 1]:
|
for explode in [0, 1]:
|
||||||
@@ -167,7 +167,7 @@ def views(target, do_assemblies = None):
|
|||||||
if changed:
|
if changed:
|
||||||
print(changed)
|
print(changed)
|
||||||
t = time.time()
|
t = time.time()
|
||||||
openscad.run("-D$pose=1", "-D$explode=%d" % explode, colour_scheme, "--projection=p", "--imgsize=4096,4096", "--autocenter", "--viewall", "-d", dname, "-o", tmp_name, png_maker_name);
|
openscad.run("-D$show_threads=1", "-D$pose=1", "-D$explode=%d" % explode, colour_scheme, "--projection=p", "--imgsize=4096,4096", "--autocenter", "--viewall", "-d", dname, "-o", tmp_name, png_maker_name);
|
||||||
times.add_time(png_name, t)
|
times.add_time(png_name, t)
|
||||||
do_cmd(["magick", tmp_name, "-trim", "-resize", "1004x1004", "-bordercolor", background, "-border", "10", tmp_name])
|
do_cmd(["magick", tmp_name, "-trim", "-resize", "1004x1004", "-bordercolor", background, "-border", "10", tmp_name])
|
||||||
update_image(tmp_name, png_name)
|
update_image(tmp_name, png_name)
|
||||||
|
@@ -35,4 +35,5 @@ module d_connectors()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($preview)
|
if($preview)
|
||||||
d_connectors();
|
let($show_threads = true)
|
||||||
|
d_connectors();
|
||||||
|
35
tests/pcb_mount.scad
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
//
|
||||||
|
// NopSCADlib Copyright Chris Palmer 2019
|
||||||
|
// nop.head@gmail.com
|
||||||
|
// hydraraptor.blogspot.com
|
||||||
|
//
|
||||||
|
// This file is part of NopSCADlib.
|
||||||
|
//
|
||||||
|
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||||
|
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||||
|
// the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||||
|
// If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
include <../lib.scad>
|
||||||
|
use <../printed/pcb_mount.scad>
|
||||||
|
|
||||||
|
PI_IO = ["PI_IO", "PI_IO V2", 35.56, 25.4, 1.6, 0, 0, 0, "green", true, [],
|
||||||
|
[[(3.015 - 2.7) * 25.4 - 3.5 /2, (4.5 - 3.685) * 25.4, 90, "term35", 2],
|
||||||
|
[(3.46 - 2.7) * 25.4 - 3.5 /2, (4.5 - 3.69) * 25.4, 90, "term35", 2],
|
||||||
|
[(3.91 - 2.7) * 25.4 - 3.5 /2, (4.5 - 3.69) * 25.4, 90, "term35", 2],
|
||||||
|
[(3.4 - 2.7) * 25.4, (4.5 - 4.15) * 25.4, 0, "2p54socket", 13, 2],
|
||||||
|
], []];
|
||||||
|
|
||||||
|
module pcb_mounts()
|
||||||
|
if($preview)
|
||||||
|
pcb_mount_assembly(PI_IO, 3);
|
||||||
|
else
|
||||||
|
pcb_mount(PI_IO);
|
||||||
|
|
||||||
|
pcb_mounts();
|
@@ -26,4 +26,5 @@ module pillars()
|
|||||||
pillar(pillars[$i]);
|
pillar(pillars[$i]);
|
||||||
|
|
||||||
if($preview)
|
if($preview)
|
||||||
pillars();
|
let($show_threads = true)
|
||||||
|
pillars();
|
||||||
|
@@ -28,15 +28,18 @@ module pin_headers()
|
|||||||
idc_transition(pin_headers[$i], 10);
|
idc_transition(pin_headers[$i], 10);
|
||||||
|
|
||||||
translate([0, 20])
|
translate([0, 20])
|
||||||
pin_header(pin_headers[$i], 10, 2);
|
pin_header(pin_headers[$i], 10, 2, right_angle = true);
|
||||||
|
|
||||||
translate([0, 40])
|
translate([0, 40])
|
||||||
|
pin_header(pin_headers[$i], 10, 2);
|
||||||
|
|
||||||
|
translate([0, 60])
|
||||||
box_header(pin_headers[$i], 10, 2);
|
box_header(pin_headers[$i], 10, 2);
|
||||||
|
|
||||||
translate([0, 65])
|
translate([0, 80])
|
||||||
pin_socket(pin_headers[$i], 10, 2);
|
pin_socket(pin_headers[$i], 10, 2);
|
||||||
|
|
||||||
translate([0, 95])
|
translate([0, 110])
|
||||||
pin_socket(pin_headers[$i], 10, 2, right_angle = true);
|
pin_socket(pin_headers[$i], 10, 2, right_angle = true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 42 KiB |
BIN
tests/png/pcb_mount.png
Normal file
After Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 150 KiB After Width: | Height: | Size: 147 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 39 KiB |
@@ -24,7 +24,7 @@ include <../vitamins/ring_terminals.scad>
|
|||||||
|
|
||||||
module ring_terminals()
|
module ring_terminals()
|
||||||
layout([for(t = ring_terminals) ringterm_od(t)], 5)
|
layout([for(t = ring_terminals) ringterm_od(t)], 5)
|
||||||
rotate(90)
|
rotate(180)
|
||||||
ring_terminal_assembly(ring_terminals[$i], 3);
|
ring_terminal_assembly(ring_terminals[$i], 3);
|
||||||
|
|
||||||
if($preview)
|
if($preview)
|
||||||
|
@@ -33,4 +33,5 @@ module rods()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($preview)
|
if($preview)
|
||||||
rods();
|
let($show_threads = true)
|
||||||
|
rods();
|
||||||
|
@@ -34,4 +34,5 @@ for(y = [0 : len(screw_lists) -1])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($preview)
|
if($preview)
|
||||||
screws();
|
let($show_threads = true)
|
||||||
|
screws();
|
||||||
|
@@ -43,7 +43,7 @@ module ellipse(xr, yr) scale([1, yr / xr]) circle4n(xr);
|
|||||||
|
|
||||||
module extrude_if(h, center = true) //! Extrudes 2D object to 3D when ```h``` is nonzero, otherwise leaves it 2D
|
module extrude_if(h, center = true) //! Extrudes 2D object to 3D when ```h``` is nonzero, otherwise leaves it 2D
|
||||||
if(h)
|
if(h)
|
||||||
linear_extrude(height = h, center = center) // 3D
|
linear_extrude(height = h, center = center, convexity = 2) // 3D
|
||||||
children();
|
children();
|
||||||
else
|
else
|
||||||
children(); // 2D
|
children(); // 2D
|
||||||
|
114
utils/thread.scad
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
//
|
||||||
|
// NopSCADlib Copyright Chris Palmer 2019
|
||||||
|
// nop.head@gmail.com
|
||||||
|
// hydraraptor.blogspot.com
|
||||||
|
//
|
||||||
|
// This file is part of NopSCADlib.
|
||||||
|
//
|
||||||
|
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||||
|
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||||
|
// the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
// See the GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||||
|
// If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
//! A utilities for making threads with sweep.
|
||||||
|
//
|
||||||
|
include <../core.scad>
|
||||||
|
use <sweep.scad>
|
||||||
|
use <maths.scad>
|
||||||
|
|
||||||
|
function thread_profile(h, crest, angle) = //! Create thread profile path
|
||||||
|
let(base = crest + 2 * h * tan(angle / 2))
|
||||||
|
[[-base / 2, 0, 0], [-crest / 2, h, 0], [crest / 2, h, 0], [base / 2, 0, 0]];
|
||||||
|
|
||||||
|
module male_thread(pitch, minor_d, length, profile, taper_top = true, center = true, solid = true) { //! Create male thread
|
||||||
|
turns = length / pitch + (taper_top ? 0 : 1);
|
||||||
|
r = minor_d / 2;
|
||||||
|
sides = r2sides(r);
|
||||||
|
h = max([for(p = profile) p.y]);
|
||||||
|
final = (turns - 1) * sides;
|
||||||
|
path = [for(i = [0 : sides * turns],
|
||||||
|
R = i < sides ? r - h + h * i / sides
|
||||||
|
: i > final && taper_top ? r - h * (i - final) / sides : r,
|
||||||
|
a = i * 360 / sides)
|
||||||
|
[R * sin(-a), R * cos(-a), pitch * a / 360]];
|
||||||
|
t = atan(pitch / sides / (r * cos(225 / sides)));
|
||||||
|
translate_z(center ? -length / 2 : 0) {
|
||||||
|
render() intersection() {
|
||||||
|
sweep(path, profile, twist = t * sides * turns);
|
||||||
|
cylinder(d = minor_d + 5, h = length);
|
||||||
|
}
|
||||||
|
if(solid)
|
||||||
|
rotate(90)
|
||||||
|
cylinder(d = minor_d + eps, h = length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module female_thread(pitch, outer_d, length, profile, taper_top = true, center = true) { //! Create female thread
|
||||||
|
turns = length / pitch + (taper_top ? 0 : 1);
|
||||||
|
r = outer_d / 2;
|
||||||
|
sides = r2sides(r);
|
||||||
|
h = max([for(p = profile) p.y]);
|
||||||
|
final = (turns - 1) * sides;
|
||||||
|
path = [for(i = [0 : sides * turns],
|
||||||
|
R = i < sides ? r + h - h * i / sides
|
||||||
|
: i > final && taper_top ? r + h * (i - final) / sides : r,
|
||||||
|
a = i * 360 / sides)
|
||||||
|
[R * sin(-a), R * cos(-a), pitch * a / 360]];
|
||||||
|
t = atan(pitch / sides / (r * cos(225 / sides)));
|
||||||
|
translate_z(center ? -length / 2 : 0) {
|
||||||
|
render() intersection() {
|
||||||
|
sweep(path, reverse([for(p = profile) [p.x, -p.y, 0]]), twist = t * sides * turns);
|
||||||
|
cylinder(d = outer_d + 5, h = length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module male_metric_thread(d, pitch, length, taper_top = true, center = true) { //! Create male thread with metric profile
|
||||||
|
h = sqrt(3) / 2 * pitch;
|
||||||
|
minor_d = d - 5 * h / 4;
|
||||||
|
male_thread(pitch, minor_d, length, thread_profile((d - minor_d) / 2, pitch / 8, 60), taper_top, center);
|
||||||
|
}
|
||||||
|
|
||||||
|
module female_metric_thread(d, pitch, length, taper_top = true, center = true) { //! Create male thread with metric profile
|
||||||
|
h = sqrt(3) / 2 * pitch;
|
||||||
|
outer_d = d + 5 * h / 4;
|
||||||
|
male_thread(pitch, outer_d, length, thread_profile((outer_d - d) / 2, pitch / 8, 60), taper_top, center);
|
||||||
|
}
|
||||||
|
|
||||||
|
function metric_coarse_pitch(d) //! Convert metric diameter to pitch
|
||||||
|
= d == 1.6 ? 0.35 // M1.6
|
||||||
|
: [0.4, // M2
|
||||||
|
0.45,// M2.5
|
||||||
|
0.5, // M3
|
||||||
|
0.6, // M3.5
|
||||||
|
0.7, // M4
|
||||||
|
0,
|
||||||
|
0.8, // M5
|
||||||
|
0,
|
||||||
|
1.0, // M6
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1.25, // M8
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1.5, // M10
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
1.75, // M12
|
||||||
|
][d * 2 - 4];
|
||||||
|
|
||||||
|
male_metric_thread(3, 0.5, 25);
|
||||||
|
|
||||||
|
translate([10, 0])
|
||||||
|
male_metric_thread(8, 1.25, 30);
|
@@ -17,7 +17,7 @@
|
|||||||
// If not, see <https://www.gnu.org/licenses/>.
|
// If not, see <https://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
RB5015 = ["RM5015", "Blower Runda RB5015", 51.3, 51, 15, 31.5, M4_cap_screw, 26, [27.3, 25.4], 4.5, [[4.3, 45.4], [47.3,7.4]], 20, 14, 1.5, 1.3, 1.2, 15];
|
RB5015 = ["RB5015", "Blower Runda RB5015", 51.3, 51, 15, 31.5, M4_cap_screw, 26, [27.3, 25.4], 4.5, [[4.3, 45.4], [47.3,7.4]], 20, 14, 1.5, 1.3, 1.2, 15];
|
||||||
PE4020 = ["PE4020", "Blower Pengda Technology 4020", 40, 40, 20, 27.5, M3_cap_screw, 22, [21.5, 20 ], 3.2, [[37,3],[3,37],[37,37]], 29.3, 17, 1.7, 1.2, 1.3, 13];
|
PE4020 = ["PE4020", "Blower Pengda Technology 4020", 40, 40, 20, 27.5, M3_cap_screw, 22, [21.5, 20 ], 3.2, [[37,3],[3,37],[37,37]], 29.3, 17, 1.7, 1.2, 1.3, 13];
|
||||||
|
|
||||||
blowers = [PE4020, RB5015];
|
blowers = [PE4020, RB5015];
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
//! D-connectors. Can be any number of ways, male or female, solder buckets, PCB mount or IDC, with or without pillars.
|
//! D-connectors. Can be any number of ways, male or female, solder buckets, PCB mount or IDC, with or without pillars.
|
||||||
//
|
//
|
||||||
include <../core.scad>
|
include <../core.scad>
|
||||||
|
use <../utils/thread.scad>
|
||||||
|
|
||||||
d_pillar_color = grey90;
|
d_pillar_color = grey90;
|
||||||
d_plug_shell_color = grey80;
|
d_plug_shell_color = grey80;
|
||||||
@@ -51,16 +52,21 @@ module d_pillar() { //! Draw a pillar for a D-connector
|
|||||||
height = 4.5;
|
height = 4.5;
|
||||||
screw = 2.5;
|
screw = 2.5;
|
||||||
screw_length = 8;
|
screw_length = 8;
|
||||||
color(d_pillar_color) {
|
|
||||||
translate_z(-screw_length)
|
|
||||||
cylinder(d = screw, h = screw_length + 1);
|
|
||||||
|
|
||||||
|
translate_z(-screw_length)
|
||||||
|
if(show_threads)
|
||||||
|
color(d_pillar_color * 0.7)
|
||||||
|
male_metric_thread(screw, metric_coarse_pitch(screw), screw_length, false, false);
|
||||||
|
else
|
||||||
|
color(d_pillar_color)
|
||||||
|
cylinder(d = screw, h = screw_length + 1);
|
||||||
|
|
||||||
|
color(d_pillar_color)
|
||||||
linear_extrude(height = height)
|
linear_extrude(height = height)
|
||||||
difference() {
|
difference() {
|
||||||
circle(r = rad, $fn = 6);
|
circle(r = rad, $fn = 6);
|
||||||
circle(d = screw);
|
circle(d = screw);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specified D plug, which can be IDC, PCB or plain solder bucket
|
module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specified D plug, which can be IDC, PCB or plain solder bucket
|
||||||
|
@@ -47,6 +47,19 @@ LCD1602A = ["LCD1602A", "LCD display 1602A", 71.3, 24.3, 7.0, LCD1602APCB,
|
|||||||
[], // clearance need for the ts ribbon
|
[], // clearance need for the ts ribbon
|
||||||
];
|
];
|
||||||
|
|
||||||
|
LCDS7282BPCB = ["", "", 85, 36, 1.65, 0, 2.56, 0, "green", false, [[-2.5, -2.5], [-2.5, 2.5], [2.5, 2.5], [2.5, -2.5]],
|
||||||
|
[ [3.5, 18, 0, "2p54header", 2, 7]
|
||||||
|
],
|
||||||
|
[]];
|
||||||
|
|
||||||
|
LCDS7282B = ["LCDS7282B", "LCD display S-7282B", 73.6, 28.7, 9.6, LCDS7282BPCB,
|
||||||
|
[-2.5, 0, 0], // pcb offst
|
||||||
|
[[-64.5 / 2, -14.5 / 2], [64.5 / 2, 14.5 / 2, 0.6]], // aperture
|
||||||
|
[], // touch screen
|
||||||
|
0, // thread length
|
||||||
|
[], // clearance need for the ts ribbon
|
||||||
|
];
|
||||||
|
|
||||||
SSD1963_4p3PCB = ["", "", 120, 74, 1.65, 3, 3, 0, "mediumblue", false, [[3, 3], [-3, 3], [-3, -3], [3, -3]],
|
SSD1963_4p3PCB = ["", "", 120, 74, 1.65, 3, 3, 0, "mediumblue", false, [[3, 3], [-3, 3], [-3, -3], [3, -3]],
|
||||||
[ [2.75 + 1.27, 37, 90, "2p54header", 20, 2]
|
[ [2.75 + 1.27, 37, 90, "2p54header", 20, 2]
|
||||||
],
|
],
|
||||||
@@ -60,6 +73,6 @@ SSD1963_4p3 = ["SSD1963_4p3", "LCD display SSD1963 4.3\"", 105.5, 67.2, 3.4, SSD
|
|||||||
[[0, -34.5], [12, -31.5]],
|
[[0, -34.5], [12, -31.5]],
|
||||||
];
|
];
|
||||||
|
|
||||||
displays = [HDMI5, SSD1963_4p3, LCD1602A];
|
displays = [HDMI5, SSD1963_4p3, LCD1602A, LCDS7282B];
|
||||||
|
|
||||||
use <display.scad>
|
use <display.scad>
|
||||||
|
@@ -61,30 +61,34 @@ heater_y = heater_width / 2;
|
|||||||
|
|
||||||
fan_x_offset = rad_dia / 2 + 4;
|
fan_x_offset = rad_dia / 2 + 4;
|
||||||
|
|
||||||
module e3d_resistor(type) {
|
module e3d_resistor(type, resistor_wire_rotate = [0,0,0]) {
|
||||||
translate([11 - heater_x, -3 - heater_y, heater_height / 2 + nozzle_h]) {
|
translate([11 - heater_x, -3 - heater_y, heater_height / 2 + nozzle_h]) {
|
||||||
color("grey")
|
color("grey")
|
||||||
rotate([-90, 0, 0])
|
rotate([-90, 0, 0])
|
||||||
cylinder(r = resistor_dia / 2, h = resistor_len);
|
cylinder(r = resistor_dia / 2, h = resistor_len);
|
||||||
|
|
||||||
color("red")
|
color("red")
|
||||||
translate([-3.5/2, resistor_len + 3.5/2 + 1, 0]) {
|
translate([0, resistor_len + 3.5/2 + 1, 0]) {
|
||||||
cylinder(d = 3.5, h = 36);
|
rotate(resistor_wire_rotate) {
|
||||||
|
translate([-3.5/2, 0, 0]) {
|
||||||
|
cylinder(d = 3.5, h = 36);
|
||||||
|
|
||||||
translate([3.5, 0, 0])
|
translate([3.5, 0, 0])
|
||||||
cylinder(r = 3.5 / 2, h = 36);
|
cylinder(r = 3.5 / 2, h = 36);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module heater_block(type) {
|
module heater_block(type, resistor_wire_rotate = [0,0,0]) {
|
||||||
translate_z(-hot_end_length(type)) {
|
translate_z(-hot_end_length(type)) {
|
||||||
translate_z(nozzle_h)
|
translate_z(nozzle_h)
|
||||||
color("lightgrey")
|
color("lightgrey")
|
||||||
translate([-heater_x, -heater_y, 0])
|
translate([-heater_x, -heater_y, 0])
|
||||||
cube([heater_length, heater_width, heater_height]);
|
cube([heater_length, heater_width, heater_height]);
|
||||||
|
|
||||||
e3d_resistor(type);
|
e3d_resistor(type, resistor_wire_rotate);
|
||||||
e3d_nozzle(type);
|
e3d_nozzle(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -118,7 +122,7 @@ module e3d_fan(type) {
|
|||||||
fan(fan30x10);
|
fan(fan30x10);
|
||||||
}
|
}
|
||||||
|
|
||||||
module e3d_hot_end(type, filament, naked = false) {
|
module e3d_hot_end(type, filament, naked = false, resistor_wire_rotate = [0,0,0]) {
|
||||||
insulator_length = hot_end_insulator_length(type);
|
insulator_length = hot_end_insulator_length(type);
|
||||||
inset = hot_end_inset(type);
|
inset = hot_end_inset(type);
|
||||||
h_ailettes = rad_len / (2 * rad_nb_ailettes - 1);
|
h_ailettes = rad_len / (2 * rad_nb_ailettes - 1);
|
||||||
@@ -146,17 +150,17 @@ module e3d_hot_end(type, filament, naked = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rotate(90)
|
rotate(90)
|
||||||
heater_block(type);
|
heater_block(type, resistor_wire_rotate);
|
||||||
|
|
||||||
if(!naked)
|
if(!naked)
|
||||||
translate_z(inset - insulator_length)
|
translate_z(inset - insulator_length)
|
||||||
e3d_fan();
|
e3d_fan();
|
||||||
}
|
}
|
||||||
|
|
||||||
module e3d_hot_end_assembly(type, filament, naked = false) {
|
module e3d_hot_end_assembly(type, filament, naked = false, resistor_wire_rotate = [0,0,0]) {
|
||||||
bundle = 3.2;
|
bundle = 3.2;
|
||||||
|
|
||||||
e3d_hot_end(type, filament, naked);
|
e3d_hot_end(type, filament, naked, resistor_wire_rotate);
|
||||||
|
|
||||||
// Wire and ziptie
|
// Wire and ziptie
|
||||||
if(!naked)
|
if(!naked)
|
||||||
|
@@ -147,11 +147,16 @@ module fan_holes(type, poly = false, screws = true, h = 100) { //! Make all the
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function nut_and_washer_thickness(screw, nyloc) = washer_thickness(screw_washer(screw)) + nut_thickness(screw_nut(screw), nyloc);
|
function fan_screw_depth(type, full_depth = false) = fan_boss_d(type) || full_depth ? fan_depth(type) : fan_thickness(type);
|
||||||
function fan_screw_depth(type) = fan_boss_d(type) ? fan_depth(type) : fan_thickness(type);
|
|
||||||
function fan_screw_length(type, thickness) = screw_longer_than(thickness + fan_screw_depth(type) + nut_and_washer_thickness(fan_screw(type), true)); //! Screw length required
|
|
||||||
|
|
||||||
module fan_assembly(type, thickness, include_fan = true, screw = false) { //! Fan with its fasteners
|
function fan_screw_length(type, thickness, full_depth = false) =
|
||||||
|
let(depth = fan_screw_depth(type, full_depth),
|
||||||
|
washers = depth == fan_depth(type) ? 2 : 1,
|
||||||
|
washer = screw_washer(fan_screw(type)),
|
||||||
|
nut = screw_nut(fan_screw(type)))
|
||||||
|
screw_longer_than(thickness + depth + washer_thickness(washer) * washers + nut_thickness(nut, true)); //! Screw length required
|
||||||
|
|
||||||
|
module fan_assembly(type, thickness, include_fan = true, screw = false, full_depth = false) { //! Fan with its fasteners
|
||||||
translate_z(-fan_depth(type) / 2) {
|
translate_z(-fan_depth(type) / 2) {
|
||||||
if(include_fan)
|
if(include_fan)
|
||||||
fan(type);
|
fan(type);
|
||||||
@@ -160,11 +165,14 @@ module fan_assembly(type, thickness, include_fan = true, screw = false) { //! Fa
|
|||||||
nut = screw_nut(Screw);
|
nut = screw_nut(Screw);
|
||||||
fan_hole_positions(type) {
|
fan_hole_positions(type) {
|
||||||
translate_z(thickness)
|
translate_z(thickness)
|
||||||
screw_and_washer(Screw, fan_screw_length(type, thickness));
|
screw_and_washer(Screw, fan_screw_length(type, thickness, full_depth));
|
||||||
|
|
||||||
translate_z(include_fan ? -fan_screw_depth(type) : 0)
|
translate_z(include_fan ? -fan_screw_depth(type, full_depth) : 0)
|
||||||
vflip()
|
vflip()
|
||||||
nut(nut, true);
|
if(fan_screw_depth(type, full_depth) == fan_depth(type))
|
||||||
|
nut_and_washer(nut, true);
|
||||||
|
else
|
||||||
|
nut(nut, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -40,7 +40,8 @@ fan50x15 = [50, 15, 48, 20, M4_dome_screw, 25, 12.5,100,7, 0, undef];
|
|||||||
fan40x11 = [40, 11, 37, 16, M3_dome_screw, 25, 7.5,100, 9, 0, undef];
|
fan40x11 = [40, 11, 37, 16, M3_dome_screw, 25, 7.5,100, 9, 0, undef];
|
||||||
fan30x10 = [30, 10, 27, 12, M3_dome_screw, 17, 10, 100, 5, 0, undef];
|
fan30x10 = [30, 10, 27, 12, M3_dome_screw, 17, 10, 100, 5, 0, undef];
|
||||||
fan25x10 = [25, 10, 24, 10, M2p5_pan_screw, 16, 10, 100, 5, 0, undef];
|
fan25x10 = [25, 10, 24, 10, M2p5_pan_screw, 16, 10, 100, 5, 0, undef];
|
||||||
|
fan17x8 = [17, 8, 16, 6.75, M2_cap_screw, 12.6, 8, 100, 7, 0, undef];
|
||||||
|
|
||||||
fans = [fan25x10, fan30x10, fan40x11, fan50x15, fan60x15, fan60x25, fan70x15, fan80x25, fan80x38, fan120x25];
|
fans = [fan17x8, fan25x10, fan30x10, fan40x11, fan50x15, fan60x15, fan60x25, fan70x15, fan80x25, fan80x38, fan120x25];
|
||||||
|
|
||||||
use <fan.scad>
|
use <fan.scad>
|
||||||
|
@@ -44,10 +44,10 @@ function hot_end_length(type) = hot_end_total_length(type) - hot_end_inset(type)
|
|||||||
use <jhead.scad>
|
use <jhead.scad>
|
||||||
use <e3d.scad>
|
use <e3d.scad>
|
||||||
|
|
||||||
module hot_end(type, filament, naked = false) { //! Draw specified hot end
|
module hot_end(type, filament, naked = false, resistor_wire_rotate = [0,0,0]) { //! Draw specified hot end
|
||||||
if(hot_end_style(type) == jhead)
|
if(hot_end_style(type) == jhead)
|
||||||
jhead_hot_end_assembly(type, filament, naked);
|
jhead_hot_end_assembly(type, filament, naked);
|
||||||
|
|
||||||
if(hot_end_style(type) == e3d)
|
if(hot_end_style(type) == e3d)
|
||||||
e3d_hot_end_assembly(type, filament, naked);
|
e3d_hot_end_assembly(type, filament, naked, resistor_wire_rotate);
|
||||||
}
|
}
|
||||||
|
@@ -49,9 +49,12 @@ function pcb_grid(type) = type[13]; //! Grid if a perfboard
|
|||||||
function pcb_polygon(type) = type[14]; //! Optional outline polygon for odd shaped boards
|
function pcb_polygon(type) = type[14]; //! Optional outline polygon for odd shaped boards
|
||||||
function pcb_screw(type, cap = hs_cap) = Len(type[15]) ? type[15] : find_screw(cap, screw_smaller_than(pcb_hole_d(type))); //! Mounting screw type
|
function pcb_screw(type, cap = hs_cap) = Len(type[15]) ? type[15] : find_screw(cap, screw_smaller_than(pcb_hole_d(type))); //! Mounting screw type
|
||||||
|
|
||||||
module pcb_grid(type, x, y, z = 0) //! Positions children at specified grid positions
|
function pcb_grid_pos(type, x, y, z = 0) = //! Returns a pcb grid position
|
||||||
translate([-pcb_length(type) / 2 + pcb_grid(type).x + 2.54 * x,
|
[-pcb_length(type) / 2 + pcb_grid(type).x + 2.54 * x,
|
||||||
-pcb_width(type) / 2 + pcb_grid(type).y + 2.54 * y, pcb_thickness(type) + z])
|
-pcb_width(type) / 2 + pcb_grid(type).y + 2.54 * y, pcb_thickness(type) + z];
|
||||||
|
|
||||||
|
module pcb_grid(type, x, y, z = 0) //! Positions children at specified grid position
|
||||||
|
translate(pcb_grid_pos(type, x, y, z))
|
||||||
children();
|
children();
|
||||||
|
|
||||||
// allows negative ordinates to represent offsets from the far edge
|
// allows negative ordinates to represent offsets from the far edge
|
||||||
@@ -697,11 +700,12 @@ module standoff(h, d, h2, d2) {
|
|||||||
|
|
||||||
module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb component from description
|
module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb component from description
|
||||||
function show(comp, part) = (comp[3] == part || comp[3] == str("-",part)) && (!cutouts || angle == undef || angle == comp.z);
|
function show(comp, part) = (comp[3] == part || comp[3] == str("-",part)) && (!cutouts || angle == undef || angle == comp.z);
|
||||||
|
function param(n, default = 0) = len(comp) > n ? comp[n] : default;
|
||||||
rotate(comp.z) {
|
rotate(comp.z) {
|
||||||
if(show(comp, "2p54header")) pin_header(2p54header, comp[4], comp[5], len(comp) > 5 ? comp[6] : false, cutouts);
|
if(show(comp, "2p54header")) pin_header(2p54header, comp[4], comp[5], param(6), cutouts);
|
||||||
if(show(comp, "2p54boxhdr")) box_header(2p54header, comp[4], comp[5], len(comp) > 5 ? comp[6] : false, cutouts);
|
if(show(comp, "2p54boxhdr")) box_header(2p54header, comp[4], comp[5], param(6), cutouts);
|
||||||
if(show(comp, "2p54socket")) pin_socket(2p54header, comp[4], comp[5], comp[6], len(comp) > 7 ? comp[7] : 0, cutouts);
|
if(show(comp, "2p54socket")) pin_socket(2p54header, comp[4], comp[5], param(6, false), param(7), param(8, false), cutouts);
|
||||||
if(show(comp, "chip")) chip(comp[4], comp[5], comp[6], len(comp) > 7 ? comp[7] : grey30, cutouts);
|
if(show(comp, "chip")) chip(comp[4], comp[5], comp[6], param(7, grey30), cutouts);
|
||||||
if(show(comp, "rj45")) rj45(cutouts);
|
if(show(comp, "rj45")) rj45(cutouts);
|
||||||
if(show(comp, "usb_Ax2")) usb_Ax2(cutouts);
|
if(show(comp, "usb_Ax2")) usb_Ax2(cutouts);
|
||||||
if(show(comp, "usb_uA")) usb_uA(cutouts);
|
if(show(comp, "usb_uA")) usb_uA(cutouts);
|
||||||
@@ -729,6 +733,9 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function pcb_component_position(type, name, index = 0) = //! Return x y position of specified component
|
||||||
|
[for(comp = pcb_components(type), p = [pcb_coord(type, [comp.x, comp.y])]) if(comp[3] == name) [p.x, p.y]][index];
|
||||||
|
|
||||||
module pcb_component_position(type, name) { //! Position child at the specified component position
|
module pcb_component_position(type, name) { //! Position child at the specified component position
|
||||||
for(comp = pcb_components(type)) {
|
for(comp = pcb_components(type)) {
|
||||||
p = pcb_coord(type, [comp.x, comp.y]);
|
p = pcb_coord(type, [comp.x, comp.y]);
|
||||||
@@ -803,9 +810,9 @@ module pcb(type) { //! Draw specified PCB
|
|||||||
pcb_screw_positions(type)
|
pcb_screw_positions(type)
|
||||||
tube(or = max(pcb_land_d(type), 1) / 2, ir = pcb_hole_d(type) / 2, h = t + 2 * eps);
|
tube(or = max(pcb_land_d(type), 1) / 2, ir = pcb_hole_d(type) / 2, h = t + 2 * eps);
|
||||||
|
|
||||||
fr4 = pcb_colour(type) == "green";
|
fr4 = pcb_colour(type) != "sienna";
|
||||||
plating = 0.15;
|
plating = 0.15;
|
||||||
color(fr4 ? "silver" : "gold")
|
color(pcb_colour(type) == "green" ? "silver" : "gold")
|
||||||
translate_z(-plating)
|
translate_z(-plating)
|
||||||
linear_extrude(height = fr4 ? t + 2 * plating : plating)
|
linear_extrude(height = fr4 ? t + 2 * plating : plating)
|
||||||
if(Len(grid)) {
|
if(Len(grid)) {
|
||||||
|
@@ -214,16 +214,25 @@ RPI3 = ["RPI3", "Raspberry Pi 3", 85, 56, 1.4, 3, 2.75, 6, "green"
|
|||||||
|
|
||||||
RPI0 = ["RPI0", "Raspberry Pi Zero", 65, 30, 1.4, 3, 2.75, 6, "green", false, [[3.5, 3.5], [-3.5, 3.5], [-3.5, -3.5], [3.5, -3.5]],
|
RPI0 = ["RPI0", "Raspberry Pi Zero", 65, 30, 1.4, 3, 2.75, 6, "green", false, [[3.5, 3.5], [-3.5, 3.5], [-3.5, -3.5], [3.5, -3.5]],
|
||||||
[//[32.5, -3.5, 0, "2p54header", 20, 2],
|
[//[32.5, -3.5, 0, "2p54header", 20, 2],
|
||||||
[25.5, 13, 0, "chip", 12, 12, 1.2],
|
[25.5, 13, 0, "chip", 12, 12, 1.2],
|
||||||
[12.4, 3.4, -90, "mini_hdmi"],
|
[12.4, 3.4, -90, "mini_hdmi"],
|
||||||
[54, 2, -90, "usb_uA"],
|
[54, 2, -90, "usb_uA"],
|
||||||
[41.4, 2, -90, "usb_uA"],
|
[41.4, 2, -90, "usb_uA"],
|
||||||
[7.25, 16.7, 180, "uSD", [12, 11.5, 1.28]],
|
[7.25, 16.7, 180, "uSD", [12, 11.5, 1.4]],
|
||||||
[-1.3, 15, 0, "flat_flex"],
|
[-1.3, 15, 0, "flat_flex"],
|
||||||
],
|
],
|
||||||
[": Micro SD card"],
|
[": Micro SD card"],
|
||||||
[32.5 - 9.5 * 2.54, 26.5 - 1.27, 20, 2]];
|
[32.5 - 9.5 * 2.54, 26.5 - 1.27, 20, 2]];
|
||||||
|
|
||||||
|
EnviroPlus = ["EnviroPlus", "Enviro+", 65, 30.6, 1.6, 3, 2.75, 6, "white", false, [[3.5, 3.8], [-3.5, 3.8], [-3.5, -3.8], [3.5, -3.8]],
|
||||||
|
[[32.5, -3.8, 0, "-2p54socket", 20, 2, false, 5, true],
|
||||||
|
[-15.5, 2.5, 0, "-chip", 15, 5, 3, "white"],
|
||||||
|
[-14.25,16.25, 0, "chip", 27.5, 13.5, 1.5]
|
||||||
|
],
|
||||||
|
[],
|
||||||
|
[8, 1.5, 9, 1]];
|
||||||
|
|
||||||
|
|
||||||
ArduinoUno3 = ["ArduinoUno3", "Arduino Uno R3", 68.58, 53.34, 1.6, 0, 3.3, 0, "#2140BE", false, [[15.24, 50.8],[66.04, 35.56],[66.04, 7.62],[13.97, 2.54]],
|
ArduinoUno3 = ["ArduinoUno3", "Arduino Uno R3", 68.58, 53.34, 1.6, 0, 3.3, 0, "#2140BE", false, [[15.24, 50.8],[66.04, 35.56],[66.04, 7.62],[13.97, 2.54]],
|
||||||
[[30.226, -2.54, 0, "2p54socket", 10, 1],
|
[[30.226, -2.54, 0, "2p54socket", 10, 1],
|
||||||
[54.61, -2.54, 0, "2p54socket", 8, 1],
|
[54.61, -2.54, 0, "2p54socket", 8, 1],
|
||||||
@@ -330,6 +339,6 @@ PERF74x51 = ["PERF74x51", "Perfboard 74 x 51mm", 74, 51, 1.0, 0, 3.0, 0, "sienna
|
|||||||
|
|
||||||
PSU12V1A = ["PSU12V1A", "PSU 12V 1A", 67, 31, 1.7, 0, 3.9, 0, "green", true, [[3.5, 3.5], [-3.5, 3.5], [-3.5, -3.5], [3.5, -3.5]], [], []];
|
PSU12V1A = ["PSU12V1A", "PSU 12V 1A", 67, 31, 1.7, 0, 3.9, 0, "green", true, [[3.5, 3.5], [-3.5, 3.5], [-3.5, -3.5], [3.5, -3.5]], [], []];
|
||||||
|
|
||||||
pcbs = [ExtruderPCB, PI_IO, RPI0, RPI3, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PERF80x20, PERF70x50, PERF70x30, PERF60x40, PERF74x51, PSU12V1A, DuetE, Duex2, Duex5, Melzi, ZC_A0591];
|
pcbs = [ExtruderPCB, PI_IO, RPI0, EnviroPlus, RPI3, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PERF80x20, PERF70x50, PERF70x30, PERF60x40, PERF74x51, PSU12V1A, DuetE, Duex2, Duex5, Melzi, ZC_A0591];
|
||||||
|
|
||||||
use <pcb.scad>
|
use <pcb.scad>
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
//! Threaded pillars. Each end can be male or female.
|
//! Threaded pillars. Each end can be male or female.
|
||||||
//
|
//
|
||||||
include <../core.scad>
|
include <../core.scad>
|
||||||
|
use <../utils/thread.scad>
|
||||||
|
|
||||||
function pillar_name(type) = type[1]; //! Name of part
|
function pillar_name(type) = type[1]; //! Name of part
|
||||||
function pillar_thread(type) = type[2]; //! Thread diameter
|
function pillar_thread(type) = type[2]; //! Thread diameter
|
||||||
@@ -41,30 +42,43 @@ module pillar(type) { //! Draw specified pillar
|
|||||||
sex = str(sex(pillar_bot_thread(type)),"/", sex(pillar_top_thread(type)));
|
sex = str(sex(pillar_bot_thread(type)),"/", sex(pillar_top_thread(type)));
|
||||||
height = pillar_height(type);
|
height = pillar_height(type);
|
||||||
thread_d = pillar_thread(type);
|
thread_d = pillar_thread(type);
|
||||||
|
bot_thread_l = pillar_bot_thread(type);
|
||||||
|
top_thread_l = pillar_top_thread(type);
|
||||||
|
thread_colour = pillar_i_colour(type) * (show_threads ? 0.7 : 1);
|
||||||
|
|
||||||
vitamin(str("pillar(", type[0], "): Pillar ", pillar_name(type), " ", sex, " M", thread_d, "x", height));
|
vitamin(str("pillar(", type[0], "): Pillar ", pillar_name(type), " ", sex, " M", thread_d, "x", height));
|
||||||
|
|
||||||
|
color(thread_colour) {
|
||||||
|
if(bot_thread_l > 0)
|
||||||
|
translate_z(-bot_thread_l + eps)
|
||||||
|
if(show_threads)
|
||||||
|
male_metric_thread(thread_d, metric_coarse_pitch(thread_d), bot_thread_l, false, false);
|
||||||
|
else
|
||||||
|
cylinder(h = bot_thread_l, d = thread_d);
|
||||||
|
|
||||||
|
if(top_thread_l > 0)
|
||||||
|
translate_z(height + top_thread_l - eps)
|
||||||
|
if(show_threads)
|
||||||
|
vflip()
|
||||||
|
male_metric_thread(thread_d, metric_coarse_pitch(thread_d), top_thread_l, false, false);
|
||||||
|
else
|
||||||
|
cylinder(h = top_thread_l, d = thread_d);
|
||||||
|
}
|
||||||
|
|
||||||
color(pillar_i_colour(type)) {
|
color(pillar_i_colour(type)) {
|
||||||
if(pillar_bot_thread(type) > 0)
|
|
||||||
translate_z(-pillar_bot_thread(type))
|
|
||||||
cylinder(h = pillar_bot_thread(type) + eps, d = pillar_thread(type));
|
|
||||||
|
|
||||||
if(pillar_top_thread(type) > 0)
|
|
||||||
translate_z(height - eps)
|
|
||||||
cylinder(h = pillar_top_thread(type) + eps, d = pillar_thread(type));
|
|
||||||
|
|
||||||
linear_extrude(height = height)
|
linear_extrude(height = height)
|
||||||
difference() {
|
difference() {
|
||||||
circle(d = pillar_id(type), $fn = fn(pillar_ifn(type)));
|
circle(d = pillar_id(type), $fn = fn(pillar_ifn(type)));
|
||||||
circle(d = pillar_thread(type));
|
circle(d = thread_d);
|
||||||
}
|
}
|
||||||
|
|
||||||
top = height + min(pillar_top_thread(type), 0);
|
top = height + min(top_thread_l, 0);
|
||||||
bot = -min(pillar_bot_thread(type), 0);
|
bot = -min(bot_thread_l, 0);
|
||||||
|
|
||||||
translate_z(bot)
|
translate_z(bot)
|
||||||
cylinder(h = top - bot, d = pillar_thread(type) + eps);
|
cylinder(h = top - bot, d = thread_d + eps);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pillar_od(type) > pillar_id(type))
|
if(pillar_od(type) > pillar_id(type))
|
||||||
color(pillar_o_colour(type)) linear_extrude(height = height)
|
color(pillar_o_colour(type)) linear_extrude(height = height)
|
||||||
difference() {
|
difference() {
|
||||||
|
@@ -30,8 +30,8 @@
|
|||||||
// d r r d d
|
// d r r d d
|
||||||
//
|
//
|
||||||
M2x16_brass_pillar = ["M2x16_brass_pillar", "nurled", 2, 16, 3.17, 3.17, 0, 0, brass, brass, 3,-3];
|
M2x16_brass_pillar = ["M2x16_brass_pillar", "nurled", 2, 16, 3.17, 3.17, 0, 0, brass, brass, 3,-3];
|
||||||
M3x13_hex_pillar = ["M3x13_hex_pillar", "hex", 3, 13, 5/cos(30), 5/cos(30), 6, 6, "silver", "silver", -6, 6];
|
M3x13_hex_pillar = ["M3x13_hex_pillar", "hex", 3, 13, 5/cos(30), 5/cos(30), 6, 6, "silver", silver, -6, 6];
|
||||||
M3x20_hex_pillar = ["M3x20_hex_pillar", "hex", 3, 20, 5/cos(30), 5/cos(30), 6, 6, "silver", "silver", -6, 6];
|
M3x20_hex_pillar = ["M3x20_hex_pillar", "hex", 3, 20, 5/cos(30), 5/cos(30), 6, 6, "silver", silver, -8, 8];
|
||||||
M3x20_nylon_pillar = ["M3x20_nylon_pillar", "nylon", 3, 20, 8, 5/cos(30), 0, 6, "white", brass, -6, 6];
|
M3x20_nylon_pillar = ["M3x20_nylon_pillar", "nylon", 3, 20, 8, 5/cos(30), 0, 6, "white", brass, -6, 6];
|
||||||
M4x17_nylon_pillar = ["M4x17_nylon_pillar", "nylon", 4, 20, 8, 5/cos(30), 0, 6, "white", brass, -6, 6];
|
M4x17_nylon_pillar = ["M4x17_nylon_pillar", "nylon", 4, 20, 8, 5/cos(30), 0, 6, "white", brass, -6, 6];
|
||||||
M3x20_nylon_hex_pillar = ["M3x20_nylon_hex_pillar", "hex nylon", 3, 20, 8/cos(30), 8/cos(30), 6, 6, grey20, grey20, -6, 6];
|
M3x20_nylon_hex_pillar = ["M3x20_nylon_hex_pillar", "hex nylon", 3, 20, 8/cos(30), 8/cos(30), 6, 6, grey20, grey20, -6, 6];
|
||||||
|
@@ -43,30 +43,52 @@ module pin(type, length = undef) { //! Draw a header pin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module pin_header(type, cols = 1, rows = 1, smt = false, cutout = false) { //! Draw pin header
|
module pin_header(type, cols = 1, rows = 1, smt = false, right_angle = false, cutout = false) { //! Draw pin header
|
||||||
pitch = hdr_pitch(type);
|
pitch = hdr_pitch(type);
|
||||||
h = pitch;
|
h = pitch;
|
||||||
|
ra_offset = 2.4;
|
||||||
|
width = pitch * rows;
|
||||||
|
|
||||||
if(cutout)
|
if(cutout)
|
||||||
dogbone_rectangle([cols * pitch + 2 * panel_clearance, rows * pitch + 2 * panel_clearance, 100], center = false);
|
dogbone_rectangle([cols * pitch + 2 * panel_clearance, rows * pitch + 2 * panel_clearance, 100], center = false);
|
||||||
else
|
else
|
||||||
vitamin(str("pin_header(", type[0], cols, rows, arg(smt, false, "smt"), "): Pin header ", cols, " x ", rows));
|
vitamin(str("pin_header(", type[0], ", ", cols, ", ", rows,
|
||||||
|
arg(smt, false, "smt"), arg(right_angle, false, "right_angle"), "): Pin header ", cols, " x ", rows, right_angle ? " right_angle" : ""));
|
||||||
|
|
||||||
translate_z(smt ? 3.5 - h : 0) {
|
translate_z(smt ? 3.5 - h : 0) {
|
||||||
for(x = [0 : cols - 1], y = [0 : rows - 1])
|
for(x = [0 : cols - 1], y = [0 : rows - 1]) {
|
||||||
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2), 0])
|
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2), 0])
|
||||||
pin(type);
|
if(right_angle)
|
||||||
|
pin(type, hdr_pin_below(type) + width / 2 + (y - 0.5) * pitch);
|
||||||
|
else
|
||||||
|
pin(type);
|
||||||
|
|
||||||
color(hdr_base_colour(type))
|
if(right_angle) {
|
||||||
linear_extrude(height = h)
|
w = hdr_pin_width(type);
|
||||||
for(x = [0 : cols - 1], y = [0 : rows - 1])
|
rotate([-90, 0, 180])
|
||||||
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2), pitch / 2])
|
translate([pitch * (x - (cols - 1) / 2), -pitch * (y - (rows - 1) / 2) -width / 2, hdr_pin_below(type) - (y - 0.5) * pitch])
|
||||||
hull() {
|
pin(type, hdr_pin_length(type) - hdr_pin_below(type) + ra_offset + pitch / 2 + (y - 0.5) * pitch);
|
||||||
chamfer = pitch / 4;
|
|
||||||
square([pitch + eps, pitch - chamfer], center = true);
|
|
||||||
|
|
||||||
square([pitch - chamfer, pitch + eps], center = true);
|
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2) - w / 2, pitch * (y - (rows - 1) / 2) + width / 2 - w / 2])
|
||||||
}
|
rotate([0, -90, 0])
|
||||||
|
color(hdr_pin_colour(type))
|
||||||
|
rotate_extrude(angle = 90, $fn = 32)
|
||||||
|
translate([0, -w / 2])
|
||||||
|
square(w);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
translate([0, right_angle ? -ra_offset - pitch / 2 : 0, right_angle ? width / 2 : 0])
|
||||||
|
rotate([right_angle ? 90 : 0, 0, 0])
|
||||||
|
color(hdr_base_colour(type))
|
||||||
|
linear_extrude(height = h)
|
||||||
|
for(x = [0 : cols - 1], y = [0 : rows - 1])
|
||||||
|
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2), pitch / 2])
|
||||||
|
hull() {
|
||||||
|
chamfer = pitch / 4;
|
||||||
|
square([pitch + eps, pitch - chamfer], center = true);
|
||||||
|
|
||||||
|
square([pitch - chamfer, pitch + eps], center = true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,12 +102,12 @@ module box_header(type, cols = 1, rows = 1, smt = false, cutout = false) { //! D
|
|||||||
if(cutout)
|
if(cutout)
|
||||||
dogbone_rectangle([cols * pitch + 2 * panel_clearance, rows * pitch + 2 * panel_clearance, 100], center = false);
|
dogbone_rectangle([cols * pitch + 2 * panel_clearance, rows * pitch + 2 * panel_clearance, 100], center = false);
|
||||||
else
|
else
|
||||||
vitamin(str("box_header(", type[0], cols, rows, arg(smt, false, "smt"), "): Box header ", cols, " x ", rows));
|
vitamin(str("box_header(", type[0], ", ", cols, ", ", rows, arg(smt, false, "smt"), "): Box header ", cols, " x ", rows));
|
||||||
|
|
||||||
translate_z(smt ? 3.5 - h : 0) {
|
translate_z(smt ? 3.5 - h : 0) {
|
||||||
for(x = [0 : cols - 1], y = [0 : rows - 1])
|
for(x = [0 : cols - 1], y = [0 : rows - 1])
|
||||||
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2), 0])
|
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2), 0])
|
||||||
pin(type);
|
pin(type, hdr_pin_length(type) - pitch + base);
|
||||||
|
|
||||||
color(hdr_base_colour(type)) {
|
color(hdr_base_colour(type)) {
|
||||||
linear_extrude(height = base)
|
linear_extrude(height = base)
|
||||||
@@ -138,16 +160,16 @@ module idc_transition(type, cols = 5, skip = [], cutout = false) { //! Draw IDC
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, cutout = false) { //! Draw pin socket
|
module pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, smt = false, cutout = false) { //! Draw pin socket
|
||||||
pitch = hdr_pitch(type);
|
pitch = hdr_pitch(type);
|
||||||
length = pitch * cols + 0.5;
|
length = pitch * cols + 0.5;
|
||||||
width = pitch * rows - 0.08;
|
width = pitch * rows - 0.08;
|
||||||
depth = max(hdr_socket_depth(type), height);
|
depth = height ? height : hdr_socket_depth(type);
|
||||||
ra_offset = 1.5;
|
ra_offset = 1.5;
|
||||||
if(cutout)
|
if(cutout)
|
||||||
;
|
;
|
||||||
else {
|
else {
|
||||||
vitamin(str("pin_socket(", type[0], ", ", cols, ", ", rows, arg(right_angle, false, "right_angle"), arg(height, 0, "height"),
|
vitamin(str("pin_socket(", type[0], ", ", cols, ", ", rows, arg(right_angle, false, "right_angle"), arg(height, 0, "height"), arg(smt, false, "smt"),
|
||||||
"): Pin socket ", cols, " x ", rows, right_angle ? " right_angle" : ""));
|
"): Pin socket ", cols, " x ", rows, right_angle ? " right_angle" : ""));
|
||||||
color(hdr_base_colour(type))
|
color(hdr_base_colour(type))
|
||||||
translate([0, right_angle ? -ra_offset - pitch / 2 : 0, right_angle ? width / 2 : 0])
|
translate([0, right_angle ? -ra_offset - pitch / 2 : 0, right_angle ? width / 2 : 0])
|
||||||
@@ -164,8 +186,9 @@ module pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, cut
|
|||||||
|
|
||||||
color(hdr_pin_colour(type))
|
color(hdr_pin_colour(type))
|
||||||
for(x = [0 : cols - 1], y = [0 : rows -1]) {
|
for(x = [0 : cols - 1], y = [0 : rows -1]) {
|
||||||
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2), 0])
|
if(!smt)
|
||||||
pin(type, hdr_pin_below(type) + width / 2 + (y - 0.5) * pitch);
|
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2), 0])
|
||||||
|
pin(type, hdr_pin_below(type) + width / 2 + (y - 0.5) * pitch);
|
||||||
|
|
||||||
if(right_angle) {
|
if(right_angle) {
|
||||||
rotate([-90, 0, 0])
|
rotate([-90, 0, 0])
|
||||||
|
@@ -17,14 +17,14 @@
|
|||||||
// If not, see <https://www.gnu.org/licenses/>.
|
// If not, see <https://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
// p p b p p b
|
// p p b p p b Socket depth
|
||||||
// i i e i i a
|
// i i e i i a
|
||||||
// t n l n n s
|
// t n l n n s
|
||||||
// c o e
|
// c o e
|
||||||
// h l w w c
|
// h l w w c
|
||||||
// c
|
// c
|
||||||
//
|
//
|
||||||
2p54header = ["2p54header", 2.54, 12, 3.2, 0.66, "gold", grey20, 8.5];
|
2p54header = ["2p54header", 2.54, 11.6, 3.2, 0.66, "gold", grey20, 8.5];
|
||||||
|
|
||||||
pin_headers = [ 2p54header ];
|
pin_headers = [ 2p54header ];
|
||||||
|
|
||||||
|
@@ -26,48 +26,96 @@ use <nut.scad>
|
|||||||
use <washer.scad>
|
use <washer.scad>
|
||||||
use <../utils/tube.scad>
|
use <../utils/tube.scad>
|
||||||
|
|
||||||
function ringterm_od(type) = type[1]; //! Outside diameter
|
function ringterm_od(type) = type[1]; //! Outside diameter
|
||||||
function ringterm_id(type) = type[2]; //! Inside diameter
|
function ringterm_id(type) = type[2]; //! Inside diameter
|
||||||
function ringterm_length(type) = type[3]; //! Length of the tail including the ring
|
function ringterm_length(type) = type[3]; //! Length of the tail including the ring
|
||||||
function ringterm_width(type) = type[4]; //! Width of the tail
|
function ringterm_width(type) = type[4]; //! Width of the tail
|
||||||
function ringterm_hole(type) = type[5]; //! Wire hole diameter
|
function ringterm_hole(type) = type[5]; //! Wire hole diameter
|
||||||
function ringterm_thickness(type) = type[6]; //! Metal thickness
|
function ringterm_thickness(type) = type[6]; //! Metal thickness
|
||||||
function ringterm_screw(type) = type[7]; //! Screw type
|
function ringterm_screw(type) = type[7]; //! Screw type
|
||||||
|
function ringterm_crimp_length(type) = type[8]; //! If non-zero the length of the crimp tube
|
||||||
function ringterm_extent(type) = ringterm_length(type) / sqrt(2); //! Space to leave
|
function ringterm_extent(type) = ringterm_length(type) / sqrt(2); //! Space to leave
|
||||||
|
|
||||||
module ring_terminal(type) { //! Draw specifeid ring terminal
|
module ring_terminal(type) { //! Draw specifeid ring terminal
|
||||||
screw = ringterm_screw(type);
|
screw = ringterm_screw(type);
|
||||||
d = 2 * screw_radius(screw);
|
d = 2 * screw_radius(screw);
|
||||||
vitamin(str("ring_terminal(", type[0], "): Ring terminal ",d,"mm"));
|
crimp = ringterm_crimp_length(type);
|
||||||
|
vitamin(str("ring_terminal(", type[0], "): Ring terminal ", crimp ? "crimp " : "", d, "mm"));
|
||||||
|
|
||||||
t = ringterm_thickness(type);
|
t = ringterm_thickness(type);
|
||||||
w = ringterm_width(type);
|
w = ringterm_width(type);
|
||||||
od = ringterm_od(type);
|
od = ringterm_od(type);
|
||||||
id = ringterm_id(type);
|
id = ringterm_id(type);
|
||||||
l = ringterm_length(type);
|
l = ringterm_length(type);
|
||||||
angle = 45;
|
angle = crimp ? 0 : 45;
|
||||||
bend = washer_radius(screw_washer(screw)) + t * tan(angle / 2);
|
transition = 1;
|
||||||
|
bend = crimp ? l - od / 2 - crimp - transition : washer_radius(screw_washer(screw)) + t * tan(angle / 2);
|
||||||
|
hole_d = ringterm_hole(type);
|
||||||
|
|
||||||
|
module hull_if_crimp()
|
||||||
|
if(crimp)
|
||||||
|
hull()
|
||||||
|
children();
|
||||||
|
else
|
||||||
|
children();
|
||||||
|
|
||||||
color("silver") union() {
|
color("silver") union() {
|
||||||
tube(or = od / 2, ir = id / 2, h = t, center = false);
|
linear_extrude(height = t)
|
||||||
|
difference() {
|
||||||
|
hull_if_crimp() {
|
||||||
|
circle(d = od);
|
||||||
|
|
||||||
translate([-w / 2, -bend, 0])
|
translate([-w / 2, -bend, 0])
|
||||||
cube([w, bend - id / 2, t]);
|
square([w, bend - id / 2]);
|
||||||
|
}
|
||||||
|
circle(d = id);
|
||||||
|
}
|
||||||
|
|
||||||
translate([0, -bend])
|
if(crimp) {
|
||||||
rotate([-angle, 0, 0])
|
translate([0, -bend, w / 2])
|
||||||
linear_extrude(height = t)
|
rotate([90, 0, 0]) {
|
||||||
difference() {
|
render() difference() {
|
||||||
length = l - od / 2 - bend;
|
union() {
|
||||||
hull() {
|
translate_z(transition)
|
||||||
translate([-w / 2, -eps])
|
cylinder(d = w, h = crimp);
|
||||||
square([w, eps]);
|
|
||||||
|
|
||||||
translate([0, -length + w / 2])
|
hull() {
|
||||||
circle(d = w);
|
translate_z(transition)
|
||||||
|
cylinder(d = w, h = eps);
|
||||||
|
|
||||||
|
translate([-w / 2, -w / 2])
|
||||||
|
cube([w, t, eps]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
translate([0, -length + w / 2])
|
hull() {
|
||||||
circle(d = ringterm_hole(type));
|
translate_z(-eps)
|
||||||
|
cylinder(d = w - 2 * t, h = crimp + transition + 2 * eps);
|
||||||
|
|
||||||
|
translate([-w / 2 + t, -w / 2 + t])
|
||||||
|
cube([w - 2 * t, w / 2 - t, eps]);
|
||||||
|
}
|
||||||
|
translate([0, w / 2])
|
||||||
|
cube([0.1, w, 100], center = true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
translate([0, -bend])
|
||||||
|
rotate([-angle, 0, 0])
|
||||||
|
linear_extrude(height = t)
|
||||||
|
difference() {
|
||||||
|
length = l - od / 2 - bend;
|
||||||
|
hull() {
|
||||||
|
translate([-w / 2, -eps])
|
||||||
|
square([w, eps]);
|
||||||
|
|
||||||
|
translate([0, -length + w / 2])
|
||||||
|
circle(d = w);
|
||||||
|
}
|
||||||
|
if(hole_d)
|
||||||
|
translate([0, -length + w / 2])
|
||||||
|
circle(d = hole_d);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
translate_z(ringterm_thickness(type))
|
translate_z(ringterm_thickness(type))
|
||||||
children();
|
children();
|
||||||
|
@@ -20,16 +20,17 @@
|
|||||||
//
|
//
|
||||||
// Ring terminals
|
// Ring terminals
|
||||||
//
|
//
|
||||||
// o i l w h t s
|
// o i l w h t s c
|
||||||
// d d e i o h c
|
// d d e i o h c r
|
||||||
// n d l i r
|
// n d l i r i
|
||||||
// g t e c e
|
// g t e c e m
|
||||||
// t h k w
|
// t h k w p
|
||||||
// h
|
// h
|
||||||
//
|
//
|
||||||
M3_ringterm = ["M3_ringterm", 6, 3, 12, 3, 1.5, 0.2, M3_dome_screw];
|
M3_ringterm = ["M3_ringterm", 6, 3, 12, 3, 1.5, 0.2, M3_dome_screw, 0];
|
||||||
M3_ringterm_cs = ["M3_ringterm_cs", 6, 3, 12, 3, 1.5, 0.2, M3_cap_screw];
|
M3_ringterm_cs = ["M3_ringterm_cs", 6, 3, 12, 3, 1.5, 0.2, M3_cap_screw, 0];
|
||||||
|
M3_ringterm_crimp = ["M3_ringterm_crimp", 5.5, 3, 13, 4.1, 0, 0.7, M3_dome_screw, 4.5];
|
||||||
|
|
||||||
ring_terminals = [M3_ringterm, M3_ringterm_cs];
|
ring_terminals = [M3_ringterm, M3_ringterm_cs, M3_ringterm_crimp];
|
||||||
|
|
||||||
use <ring_terminal.scad>
|
use <ring_terminal.scad>
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
//! Steel rods and studding with chamfered ends.
|
//! Steel rods and studding with chamfered ends.
|
||||||
//
|
//
|
||||||
include <../core.scad>
|
include <../core.scad>
|
||||||
|
use <../utils/thread.scad>
|
||||||
|
|
||||||
rod_colour = grey80;
|
rod_colour = grey80;
|
||||||
studding_colour = grey70;
|
studding_colour = grey70;
|
||||||
@@ -41,10 +42,14 @@ module studding(d , l) { //! Draw a threaded rod with specified length and diame
|
|||||||
vitamin(str("studding(", d, ", ", l,"): Threaded rod M", d, " x ", l, "mm"));
|
vitamin(str("studding(", d, ", ", l,"): Threaded rod M", d, " x ", l, "mm"));
|
||||||
|
|
||||||
chamfer = d / 20;
|
chamfer = d / 20;
|
||||||
|
pitch = metric_coarse_pitch(d);
|
||||||
color(studding_colour)
|
color(studding_colour)
|
||||||
hull() {
|
if(show_threads && pitch)
|
||||||
cylinder(d = d, h = l - 2 * chamfer, center = true);
|
male_metric_thread(d, pitch, l);
|
||||||
|
else
|
||||||
|
hull() {
|
||||||
|
cylinder(d = d, h = l - 2 * chamfer, center = true);
|
||||||
|
|
||||||
cylinder(d = d - 2 * chamfer, h = l, center = true);
|
cylinder(d = d - 2 * chamfer, h = l, center = true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -24,6 +24,7 @@ include <../core.scad>
|
|||||||
|
|
||||||
use <washer.scad>
|
use <washer.scad>
|
||||||
use <../utils/rounded_cylinder.scad>
|
use <../utils/rounded_cylinder.scad>
|
||||||
|
use <../utils/thread.scad>
|
||||||
|
|
||||||
function screw_head_type(type) = type[2]; //! Head style hs_cap, hs_pan, hs_cs, hs_hex, hs_grub, hs_cs_cap, hs_dome
|
function screw_head_type(type) = type[2]; //! Head style hs_cap, hs_pan, hs_cs, hs_hex, hs_grub, hs_cs_cap, hs_dome
|
||||||
function screw_radius(type) = type[3] / 2; //! Nominal radius
|
function screw_radius(type) = type[3] / 2; //! Nominal radius
|
||||||
@@ -69,24 +70,33 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
|
|||||||
socket_depth= screw_socket_depth(type);
|
socket_depth= screw_socket_depth(type);
|
||||||
socket_rad = socket_af / cos(30) / 2;
|
socket_rad = socket_af / cos(30) / 2;
|
||||||
max_thread = screw_max_thread(type);
|
max_thread = screw_max_thread(type);
|
||||||
thread = max_thread ? min(length, max_thread) : length;
|
thread = max_thread ? length >= max_thread + 5 ? max_thread
|
||||||
|
: length
|
||||||
|
: length;
|
||||||
shank = length - thread;
|
shank = length - thread;
|
||||||
colour = nylon || head_type == hs_grub ? grey40 : grey80;
|
colour = nylon || head_type == hs_grub ? grey40 : grey80;
|
||||||
|
|
||||||
|
|
||||||
module shaft(headless = 0) {
|
module shaft(headless = 0) {
|
||||||
point = screw_nut(type) ? 0 : 3 * rad;
|
point = screw_nut(type) ? 0 : 3 * rad;
|
||||||
color(colour * 0.9 )
|
d = 2 * screw_radius(type);
|
||||||
rotate_extrude() {
|
pitch = metric_coarse_pitch(d);
|
||||||
translate([0, -length + point])
|
l = length - shank;
|
||||||
square([rad, length - headless - point]);
|
if(show_threads && !point && pitch)
|
||||||
|
translate_z(-l - shank)
|
||||||
|
color(colour * 0.7)
|
||||||
|
male_metric_thread(d, pitch, l, !!headless, false);
|
||||||
|
else
|
||||||
|
color(colour * 0.9)
|
||||||
|
rotate_extrude() {
|
||||||
|
translate([0, -length + point])
|
||||||
|
square([rad, length - headless - point]);
|
||||||
|
|
||||||
if(point)
|
if(point)
|
||||||
polygon([
|
polygon([
|
||||||
[0, -length], [0, point - length], [rad - 0.1, point - length]
|
[0, -length], [0, point - length], [rad - 0.1, point - length]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
if(shank >= 5)
|
if(shank - headless > 0)
|
||||||
color(colour)
|
color(colour)
|
||||||
translate_z(-shank)
|
translate_z(-shank)
|
||||||
cylinder(r = rad + eps, h = shank - headless);
|
cylinder(r = rad + eps, h = shank - headless);
|
||||||
@@ -102,6 +112,7 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
|
|||||||
linear_extrude(height = socket_depth)
|
linear_extrude(height = socket_depth)
|
||||||
difference() {
|
difference() {
|
||||||
circle(head_rad);
|
circle(head_rad);
|
||||||
|
|
||||||
circle(socket_rad, $fn = 6);
|
circle(socket_rad, $fn = 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,14 +121,23 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
|
|||||||
}
|
}
|
||||||
if(head_type == hs_grub) {
|
if(head_type == hs_grub) {
|
||||||
color(colour) {
|
color(colour) {
|
||||||
translate_z(-socket_depth)
|
if(!show_threads) {
|
||||||
linear_extrude(height = socket_depth)
|
translate_z(-socket_depth)
|
||||||
difference() {
|
linear_extrude(height = socket_depth)
|
||||||
circle(r = rad);
|
difference() {
|
||||||
circle(socket_rad, $fn = 6);
|
circle(r = rad);
|
||||||
}
|
|
||||||
|
|
||||||
shaft(socket_depth);
|
circle(socket_rad, $fn = 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
shaft(socket_depth);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
render() difference() {
|
||||||
|
shaft(socket_depth);
|
||||||
|
|
||||||
|
cylinder(r = socket_rad, $fn = 6, h = 2 * socket_depth, center = true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(head_type == hs_hex) {
|
if(head_type == hs_hex) {
|
||||||
|
@@ -110,7 +110,7 @@ screw_lists = [
|
|||||||
[ M2_cap_screw, M2p5_cap_screw, M3_cap_screw, M4_cap_screw, M5_cap_screw, M6_cap_screw, M8_cap_screw],
|
[ M2_cap_screw, M2p5_cap_screw, M3_cap_screw, M4_cap_screw, M5_cap_screw, M6_cap_screw, M8_cap_screw],
|
||||||
[ 0, 0, M3_low_cap_screw],
|
[ 0, 0, M3_low_cap_screw],
|
||||||
[ 0, 0, M3_hex_screw, M4_hex_screw, M5_hex_screw, M6_hex_screw, M8_hex_screw],
|
[ 0, 0, M3_hex_screw, M4_hex_screw, M5_hex_screw, M6_hex_screw, M8_hex_screw],
|
||||||
[ 0, M2p5_pan_screw, M3_pan_screw, M4_pan_screw, No632_pan_screw, M5_pan_screw, M6_pan_screw],
|
[ 0, M2p5_pan_screw, M3_pan_screw, M4_pan_screw, M5_pan_screw, M6_pan_screw, No632_pan_screw],
|
||||||
[ 0, No2_screw, No4_screw, No6_screw, No6_cs_screw],
|
[ 0, No2_screw, No4_screw, No6_screw, No6_cs_screw],
|
||||||
[ 0, M2_cs_cap_screw,M3_cs_cap_screw, M4_cs_cap_screw],
|
[ 0, M2_cs_cap_screw,M3_cs_cap_screw, M4_cs_cap_screw],
|
||||||
[ 0, 0, M3_dome_screw, M4_dome_screw],
|
[ 0, 0, M3_dome_screw, M4_dome_screw],
|
||||||
|
@@ -27,7 +27,8 @@
|
|||||||
spool_300x88 = ["spool_300x88", 300, 88, 43, 6, 8, 52, 214, 300];
|
spool_300x88 = ["spool_300x88", 300, 88, 43, 6, 8, 52, 214, 300];
|
||||||
spool_300x85 = ["spool_300x85", 300, 85, 60, 4, 8, 52, 250, 280];
|
spool_300x85 = ["spool_300x85", 300, 85, 60, 4, 8, 52, 250, 280];
|
||||||
spool_200x55 = ["spool_200x55", 200, 55, 40, 5, 5, 52, 200, 200];
|
spool_200x55 = ["spool_200x55", 200, 55, 40, 5, 5, 52, 200, 200];
|
||||||
|
spool_200x60 = ["spool_200x60", 200, 60, 60, 5, 2, 52, 78, 191]; // 3D Filaprint
|
||||||
|
|
||||||
spools = [spool_200x55, spool_300x85, spool_300x88];
|
spools = [spool_200x55, spool_200x60, spool_300x85, spool_300x88];
|
||||||
|
|
||||||
use <spool.scad>
|
use <spool.scad>
|
||||||
|