Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a74bf094aa | ||
|
5a06f79466 | ||
|
98e17080d8 | ||
|
d3f308a45e | ||
|
fe454884e0 | ||
|
c019448dd3 | ||
|
eadc541e8f | ||
|
02791c40ac | ||
|
85b8ffbbc3 | ||
|
dd5d3869ad |
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 178 KiB |
BIN
libtest.png
Before Width: | Height: | Size: 797 KiB After Width: | Height: | Size: 798 KiB |
@@ -78,7 +78,7 @@ function pbox_screw_inset(type) = //! How far the base screws are inset
|
||||
R = pbox_radius(type)
|
||||
) max(r, R - (R - r) / sqrt(2));
|
||||
|
||||
module pbox_screw_positions(type) {
|
||||
module pbox_screw_positions(type) { //! Place children at base screw positions
|
||||
foot = pbox_foot(type);
|
||||
inset = pbox_screw_inset(type);
|
||||
for(x = [-1, 1], y = [-1, 1])
|
||||
@@ -127,6 +127,9 @@ module pbox_inner_shape(type) {
|
||||
rounded_square([w, d], rad, center = true);
|
||||
}
|
||||
|
||||
module pbox_outer_shape(type) //! 2D outer shape of the box
|
||||
offset(pbox_wall(type) / 2) pbox_mid_shape(type);
|
||||
|
||||
module pbox_base(type) { //! Generate the STL for the base
|
||||
stl(str(pbox_name(type),"_base"));
|
||||
t = pbox_base(type);
|
||||
@@ -161,7 +164,7 @@ module pbox(type) { //! Generate the STL for the main case
|
||||
difference() {
|
||||
union() {
|
||||
linear_extrude(total_height)
|
||||
offset(wall / 2) pbox_mid_shape(type);
|
||||
pbox_outer_shape(type);
|
||||
|
||||
if($children > 2)
|
||||
children(2);
|
||||
|
22
readme.md
@@ -523,6 +523,8 @@ Various electronic components used in hot ends and heated beds.
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```TO220_thickness()``` | Thickness of the tab of a TO220 |
|
||||
| ```fack2spm_bezel_size()``` | FACK2SPM Bezel dimensions |
|
||||
| ```fack2spm_screw()``` | Screw type for FACK2SPM |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
@@ -531,6 +533,9 @@ Various electronic components used in hot ends and heated beds.
|
||||
| ```al_clad_resistor(type, value, leads = true)``` | Draw an aluminium clad resistor |
|
||||
| ```al_clad_resistor_hole_positions(type)``` | Position children at the screw holes of an aluminium clad resistor |
|
||||
| ```al_clad_resistor_holes(type, h = 100)``` | Drill screw holes for an aluminium clad resistor |
|
||||
| ```fack2spm()``` | Draw a FACK2SPM Cat5E RJ45 shielded panel mount coupler |
|
||||
| ```fack2spm_hole_positions()``` | Place children at the FACK2SPM mounting hole positions |
|
||||
| ```fack2spm_holes(h = 0)``` | Cut the holes for a FACK2SPM |
|
||||
| ```panel_USBA()``` | Draw a panel mount USBA connector |
|
||||
| ```panel_USBA_hole_positions()``` | Place children at hole positions |
|
||||
| ```panel_USBA_holes(h = 100)``` | Make holes for USBA connector |
|
||||
@@ -555,6 +560,7 @@ Various electronic components used in hot ends and heated beds.
|
||||
| 4 | ```screw(M2p5_pan_screw, 16)``` | Screw M2.5 pan x 16mm |
|
||||
| 4 | ```screw(M3_pan_screw, 16)``` | Screw M3 pan x 16mm |
|
||||
| 1 | ```panel_USBA()``` | Socket USB A panel mount |
|
||||
| 1 | ```tuk_fack2spm()``` | TUK FACK2SPM Cat5E RJ45 shielded panel mount coupler |
|
||||
| 1 | ```thermal_cutout(TC)``` | Thermal cutout TC |
|
||||
| 1 | ```resistor(Epcos)``` | Thermistor Epcos B57560G104F 100K 1% |
|
||||
| 1 | ```resistor(EpcosBlue)``` | Thermistor Epcos B57861S104F40 100K 1% |
|
||||
@@ -1433,7 +1439,7 @@ The 7 SEGMENT.TTF font from the [docs](docs) directory needs to be installed to
|
||||
| ```meter_lug_size(type)``` | Lug length and width |
|
||||
| ```meter_offset(type)``` | Display position, 0 = center, +1 = top |
|
||||
| ```meter_pcb_size(type)``` | PCB size excluding lugs |
|
||||
| ```meter_shunt(type)``` | Ampmeter shunt wire |
|
||||
| ```meter_shunt(type)``` | Ammeter shunt wire |
|
||||
| ```meter_size(type)``` | Size of display |
|
||||
|
||||
### Functions
|
||||
@@ -1443,6 +1449,7 @@ The 7 SEGMENT.TTF font from the [docs](docs) directory needs to be installed to
|
||||
| ```meter_bezel_rad(type)``` | Printed bezel corner radius |
|
||||
| ```meter_bezel_wall(type)``` | Printed bezel wall thickness |
|
||||
| ```meter_bezel_width(type)``` | Printed bezel width |
|
||||
| ```meter_shunt_y(type)``` | Shunt y coordinate |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
@@ -2094,7 +2101,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```box_header(2p54header, 4, 2, smt = 0)``` | Box header 4 x 2 |
|
||||
| 1 | ```box_header(2p54header, 4, 2)``` | Box header 4 x 2 |
|
||||
| 1 | ```d_plug(DCONN9, pcb = true)``` | D-type 9 way PCB mount plug |
|
||||
| 1 | ```dil_socket(12, 15.24)``` | DIL socket 24 x 0.6" |
|
||||
| 1 | ```hdmi(hdmi_full)``` | HDMI socket |
|
||||
@@ -2107,12 +2114,11 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | ```microswitch(small_microswitch)``` | Microswitch DM1-00P-110-3 |
|
||||
| 1 | ```hdmi(hdmi_mini)``` | Mini HDMI socket |
|
||||
| 1 | ```molex_254(2)``` | Molex KK header 2 way |
|
||||
| 1 | ```pin_header(2p54header, 4, 1, smt = 0)``` | Pin header 4 x 1 |
|
||||
| 1 | ```pin_header(2p54header, 5, 1, smt = undef)``` | Pin header 5 x 1 |
|
||||
| 1 | ```pin_socket(2p54header, 4, 1, right_angle = undef, height = undef, smt = undef)``` | Pin socket 4 x 1 |
|
||||
| 1 | ```pin_header(2p54header, 4, 1)``` | Pin header 4 x 1 |
|
||||
| 1 | ```pin_header(2p54header, 5, 1)``` | Pin header 5 x 1 |
|
||||
| 1 | ```pin_socket(2p54header, 4, 1)``` | Pin socket 4 x 1 |
|
||||
| 1 | ```pin_socket(2p54header, 6, 1)``` | Pin socket 6 x 1 |
|
||||
| 1 | ```pin_socket(2p54header, 8, 1)``` | Pin socket 8 x 1 |
|
||||
| 1 | ```pin_socket(2p54header, 8, 1, right_angle = undef, height = undef, smt = undef)``` | Pin socket 8 x 1 |
|
||||
| 2 | ```pin_socket(2p54header, 8, 1)``` | Pin socket 8 x 1 |
|
||||
| 1 | ```ax_res(res1_2, 10, tol = 10)``` | Resistor 10 Ohms 10% 0.5W |
|
||||
| 1 | ```ax_res(res1_4, 100, tol = 2)``` | Resistor 100 Ohms 2% 0.25W |
|
||||
| 1 | ```ax_res(res1_8, 1000)``` | Resistor 1000 Ohms 5% 0.125W |
|
||||
@@ -4706,6 +4712,8 @@ It can also have printed feet on the base with the screws doubling up to hold th
|
||||
| ```pbox_base(type)``` | Generate the STL for the base |
|
||||
| ```pbox_base_screws(type, thickness = 0)``` | Place the screws and feet |
|
||||
| ```pbox_inserts(type)``` | Place the inserts for the base screws |
|
||||
| ```pbox_outer_shape(type)``` | 2D outer shape of the box |
|
||||
| ```pbox_screw_positions(type)``` | Place children at base screw positions |
|
||||
|
||||

|
||||
|
||||
|
@@ -61,10 +61,10 @@ test_pcb = ["TestPCB", "Test PCB",
|
||||
[ 20, -15, 0, "trimpot10", true],
|
||||
[ 10, 2, 0, "smd_led", LED0805, "red"],
|
||||
[ 10, 10, 0, "2p54header", 4, 1],
|
||||
[ 25, 10, 0, "2p54header", 5, 1, undef, "blue" ],
|
||||
[ 25, 10, 0, "2p54header", 5, 1, false, "blue" ],
|
||||
[ 10, 20, 0, "2p54boxhdr", 4, 2],
|
||||
[ 10, 30, 0, "2p54socket", 6, 1],
|
||||
[ 25, 30, 0, "2p54socket", 4, 1, undef, undef, undef, "red" ],
|
||||
[ 25, 30, 0, "2p54socket", 4, 1, false, 0, false, "red" ],
|
||||
[ 10, 40, 0, "chip", 10, 5, 1, grey20],
|
||||
[ 5, 50, 0, "led", LED3mm, "red"],
|
||||
[ 12, 50, 0, "led", LED5mm, "orange"],
|
||||
@@ -119,7 +119,7 @@ test_pcb = ["TestPCB", "Test PCB",
|
||||
[ 80, 200, 0, "pdip", 24, "27C32", true, inch(0.6) ],
|
||||
[ 80, 170, 0, "pdip", 8, "NE555" ],
|
||||
[ 52, 206, 0, "2p54socket", 8, 1 ],
|
||||
[ 52, 194, 0, "2p54socket", 8, 1, undef, undef, undef, "red" ],
|
||||
[ 52, 194, 0, "2p54socket", 8, 1, false, 0, false, "red" ],
|
||||
[ 50, 220, 0, "standoff", 5, 4.5, 12.5, 2.54],
|
||||
[ 50, 240, 0, "potentiometer"],
|
||||
[ 75, 240, 0, "potentiometer", 7, 8],
|
||||
|
@@ -41,9 +41,12 @@ module components() {
|
||||
translate([0, 50])
|
||||
TO220("Generic TO220 package");
|
||||
|
||||
translate([50, 50])
|
||||
translate([40, 50])
|
||||
panel_USBA();
|
||||
|
||||
translate([80, 50])
|
||||
fack2spm();
|
||||
|
||||
translate([0,80])
|
||||
thermal_cutouts();
|
||||
|
||||
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 251 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 60 KiB |
@@ -28,6 +28,7 @@ include <../core.scad>
|
||||
include <tubings.scad>
|
||||
include <spades.scad>
|
||||
use <../utils/rounded_cylinder.scad>
|
||||
use <../utils/dogbones.scad>
|
||||
|
||||
function resistor_length(type) = type[2]; //! Body length
|
||||
function resistor_diameter(type) = type[3]; //! Body diameter
|
||||
@@ -447,3 +448,75 @@ module thermal_cutout(type) { //! Draw specified thermal cutout
|
||||
thermal_cutout_hole_positions(type)
|
||||
children();
|
||||
}
|
||||
|
||||
function fack2spm_bezel_size() = [19.2, 35.5, 2.6, 2]; //! FACK2SPM Bezel dimensions
|
||||
|
||||
module fack2spm_hole_positions() //! Place children at the FACK2SPM mounting hole positions
|
||||
for(end = [-1, 1])
|
||||
translate([0, end * 28.96 / 2])
|
||||
children();
|
||||
|
||||
function fack2spm_screw() = M3_dome_screw; //! Screw type for FACK2SPM
|
||||
|
||||
module fack2spm_holes(h = 0) { //! Cut the holes for a FACK2SPM
|
||||
fack2spm_hole_positions()
|
||||
drill(screw_clearance_radius(fack2spm_screw()), h);
|
||||
|
||||
dogbone_rectangle([17.15, 22.86, h]);
|
||||
}
|
||||
|
||||
module fack2spm() { //! Draw a FACK2SPM Cat5E RJ45 shielded panel mount coupler
|
||||
vitamin("tuk_fack2spm(): TUK FACK2SPM Cat5E RJ45 shielded panel mount coupler");
|
||||
|
||||
bezel = fack2spm_bezel_size();
|
||||
body = [16.8, 22.8, 9.8];
|
||||
socket = [14.5, 16.1, 29.6];
|
||||
y_offset = -(19.45 - 16.3) / 2;
|
||||
plug = [12, 6.8, 10];
|
||||
plug_y = y_offset - socket.y / 2 + 4 + plug.y / 2;
|
||||
tab1 = [4, 3];
|
||||
tab2 = [6.3, 1.6];
|
||||
|
||||
module socket()
|
||||
translate([0, y_offset])
|
||||
square([socket.x, socket.y], center = true);
|
||||
|
||||
color("silver") {
|
||||
linear_extrude(bezel.z)
|
||||
difference() {
|
||||
rounded_square([bezel.x, bezel.y], bezel[3]);
|
||||
|
||||
fack2spm_hole_positions()
|
||||
circle(d = 3.15);
|
||||
|
||||
socket();
|
||||
}
|
||||
|
||||
translate_z(bezel.z - body.z)
|
||||
linear_extrude(body.z - eps)
|
||||
difference() {
|
||||
square([body.x, body.y], center = true);
|
||||
|
||||
socket();
|
||||
}
|
||||
|
||||
translate_z(bezel.z - socket.z)
|
||||
linear_extrude(socket.z - 0.1)
|
||||
difference() {
|
||||
offset(-0.1) socket();
|
||||
|
||||
translate([0, plug_y]) {
|
||||
square([plug.x, plug.y], center = true);
|
||||
|
||||
translate([0, -plug.y / 2]) {
|
||||
square([tab1.x, 2 * tab1.y], center = true);
|
||||
|
||||
square([tab2.x, 2 * tab2.y], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
translate([0, plug_y, -socket.z / 2])
|
||||
cube([plug.x, plug.y, socket.z - 2 * plug.z], center = true);
|
||||
}
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ function meter_lug_size(type) = type[4]; //! Lug length and width
|
||||
function meter_lug_offset(type) = type[5]; //! Lug position, 0 = center, +1 = top
|
||||
function meter_hole_pitch(type) = type[6]; //! Lug hole pitch
|
||||
function meter_hole_radius(type) = type[7]; //! Lug hole radius
|
||||
function meter_shunt(type) = type[8]; //! Ampmeter shunt wire
|
||||
function meter_shunt(type) = type[8]; //! Ammeter shunt wire
|
||||
|
||||
function meter_pos(type) = (meter_pcb_size(type).y - meter_size(type).y) * meter_offset(type) / 2;
|
||||
function meter_lug_pos(type) = (meter_pcb_size(type).y - meter_lug_size(type).y) * meter_lug_offset(type) / 2;
|
||||
@@ -44,6 +44,8 @@ module meter_hole_positions(type) //! Position children over the holes
|
||||
translate([side * meter_hole_pitch(type) / 2, meter_lug_pos(type)])
|
||||
children();
|
||||
|
||||
function meter_shunt_y(type) = meter_pos(type) - meter_pcb_size(type).y / 2; //! Shunt y coordinate
|
||||
|
||||
module meter(type, colour = "red", value = "888", display_colour = false) //! Draw a meter with optional colour and display value
|
||||
{
|
||||
vitamin(str("meter(", type[0], arg(colour, "red", "colour"), "): LED ", meter_shunt(type) ? "am" : "volt", "meter ", colour));
|
||||
@@ -80,7 +82,7 @@ module meter(type, colour = "red", value = "888", display_colour = false) //! Dr
|
||||
|
||||
shunt = meter_shunt(type);
|
||||
if(shunt)
|
||||
translate([0, -meter_pcb_size(type).y / 2 + meter_pos(type), size.z])
|
||||
translate([0, meter_shunt_y(type), size.z])
|
||||
vflip()
|
||||
color("#b87333")
|
||||
wire_link(shunt.y, shunt.x, shunt.z, tail = 2);
|
||||
|
@@ -883,9 +883,9 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
function param(n, default = 0) = len(comp) > n ? comp[n] : default;
|
||||
rotate(comp.z) {
|
||||
// Components that have a cutout parameter go in this section
|
||||
if(show(comp, "2p54header")) pin_header(2p54header, comp[4], comp[5], param(6), false, cutouts, colour = param(7, undef));
|
||||
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], param(6, false), param(7), param(8, false), cutouts, param(9, undef));
|
||||
if(show(comp, "2p54header")) pin_header(2p54header, comp[4], comp[5], param(6, false), false, cutouts, colour = param(7, undef));
|
||||
if(show(comp, "2p54boxhdr")) box_header(2p54header, comp[4], comp[5], param(6, false), cutouts);
|
||||
if(show(comp, "2p54socket")) pin_socket(2p54header, comp[4], comp[5], param(6, false), param(7, 0), param(8, false), cutouts, param(9, undef));
|
||||
if(show(comp, "chip")) chip(comp[4], comp[5], comp[6], param(7, grey30), cutouts);
|
||||
if(show(comp, "rj45")) rj45(cutouts);
|
||||
if(show(comp, "usb_A")) usb_Ax1(cutouts);
|
||||
|
@@ -259,22 +259,28 @@ module screw_countersink(type) { //! Countersink shape
|
||||
|
||||
module screw_and_washer(type, length, star = false, penny = false) { //! Screw with a washer which can be standard or penny and an optional star washer on top
|
||||
washer = screw_washer(type);
|
||||
head_type = screw_head_type(type);
|
||||
|
||||
translate_z(exploded() * 6)
|
||||
if(penny)
|
||||
penny_washer(washer);
|
||||
else
|
||||
washer(washer);
|
||||
if(head_type != hs_cs && head_type != hs_cs_cap) {
|
||||
translate_z(exploded() * 6)
|
||||
if(penny)
|
||||
penny_washer(washer);
|
||||
else
|
||||
washer(washer);
|
||||
|
||||
translate_z(washer_thickness(washer)) {
|
||||
if(star) {
|
||||
translate_z(exploded() * 8)
|
||||
star_washer(washer);
|
||||
translate_z(washer_thickness(washer)) {
|
||||
if(star) {
|
||||
translate_z(exploded() * 8)
|
||||
star_washer(washer);
|
||||
|
||||
translate_z(washer_thickness(washer))
|
||||
translate_z(washer_thickness(washer))
|
||||
screw(type, length);
|
||||
}
|
||||
else
|
||||
screw(type, length);
|
||||
}
|
||||
else
|
||||
screw(type, length);
|
||||
}
|
||||
else
|
||||
translate_z(eps)
|
||||
screw(type, length);
|
||||
}
|
||||
|