Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5be14f5e89 | ||
|
efff17dfc7 | ||
|
ac4a5500a9 | ||
|
6b90a7aac8 | ||
|
3c3d72f366 | ||
|
dbcab8377f | ||
|
11d96d37e1 | ||
|
40843b421f |
1
lib.scad
@@ -40,7 +40,6 @@ include <vitamins/inserts.scad>
|
||||
include <vitamins/kp_pillow_blocks.scad>
|
||||
include <vitamins/ldrs.scad>
|
||||
include <vitamins/leadnuts.scad>
|
||||
include <vitamins/leds.scad>
|
||||
include <vitamins/light_strips.scad>
|
||||
include <vitamins/mains_sockets.scad>
|
||||
include <vitamins/modules.scad>
|
||||
|
BIN
libtest.png
Before Width: | Height: | Size: 780 KiB After Width: | Height: | Size: 784 KiB |
16
libtest.scad
@@ -165,8 +165,8 @@ o_rings_y = springs_y;
|
||||
sealing_strip_y = springs_y + 20;
|
||||
tubings_y = sealing_strip_y + 20;
|
||||
pillars_y = tubings_y + 20;
|
||||
leadnuts_y = pillars_y + 40;
|
||||
pulleys_y = leadnuts_y +40;
|
||||
ball_bearings_y = pillars_y + 40;
|
||||
pulleys_y = ball_bearings_y +40;
|
||||
hot_ends_y = pulleys_y + 60;
|
||||
linear_bearings_y = hot_ends_y + 50;
|
||||
sheets_y = linear_bearings_y + 100;
|
||||
@@ -209,10 +209,7 @@ translate([x0, tubings_y])
|
||||
translate([x0, pillars_y])
|
||||
pillars();
|
||||
|
||||
translate([x0, leadnuts_y ])
|
||||
leadnuts();
|
||||
|
||||
translate([x0 + 60, leadnuts_y])
|
||||
translate([x0, ball_bearings_y])
|
||||
ball_bearings();
|
||||
|
||||
translate([x0, pulleys_y])
|
||||
@@ -252,7 +249,8 @@ translate([x0, psus_y]) {
|
||||
}
|
||||
|
||||
zipties_y = 0;
|
||||
bulldogs_y = zipties_y + 40;
|
||||
bulldogs_y = zipties_y + 30;
|
||||
leadnuts_y = bulldogs_y + 50;
|
||||
|
||||
translate([x1, zipties_y])
|
||||
zipties();
|
||||
@@ -260,6 +258,10 @@ translate([x1, zipties_y])
|
||||
translate([x1, bulldogs_y])
|
||||
bulldogs();
|
||||
|
||||
translate([x1, leadnuts_y])
|
||||
leadnuts();
|
||||
|
||||
|
||||
leds_y = 0;
|
||||
carriers_y = leds_y + 40;
|
||||
spades_y = carriers_y + 40;
|
||||
|
13
readme.md
@@ -65,14 +65,11 @@ Also single bearing balls are modelled as just a silver sphere and a BOM entry.
|
||||
| ```bb_bore(type)``` | Internal diameter |
|
||||
| ```bb_colour(type)``` | Shield colour, "silver" for metal |
|
||||
| ```bb_diameter(type)``` | External diameter |
|
||||
| ```bb_hub(type)``` | Inner rim thickness guesstimate |
|
||||
| ```bb_name(type)``` | Part code without shield type suffix |
|
||||
| ```bb_rim(type)``` | Outer rim thickness guesstimate |
|
||||
| ```bb_width(type)``` | Width |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```bb_rim(type)``` | Inner and outer rim thickness |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
@@ -88,7 +85,8 @@ Also single bearing balls are modelled as just a silver sphere and a BOM entry.
|
||||
| 1 | ```ball_bearing(BB6200)``` | Ball bearing 6200-2RS 10mm x 30mm x 9mm |
|
||||
| 1 | ```ball_bearing(BB6201)``` | Ball bearing 6201-2RS 12mm x 32mm x 10mm |
|
||||
| 1 | ```ball_bearing(BB624)``` | Ball bearing 624-2RS 4mm x 13mm x 5mm |
|
||||
| 4 | ``` bearing_ball(3)``` | Steel ball 3mm |
|
||||
| 1 | ```ball_bearing(BB6808)``` | Ball bearing 6808-2RS 40mm x 52mm x 7mm |
|
||||
| 5 | ``` bearing_ball(3)``` | Steel ball 3mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -1943,6 +1941,9 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | ```d_plug(DCONN9, pcb = true)``` | D-type 9 way PCB mount plug |
|
||||
| 1 | ```hdmi(hdmi_full)``` | HDMI socket |
|
||||
| 1 | ```idc_transition(2p54header, 5)``` | IDC transition header 5 x 2 |
|
||||
| 1 | ```led(LED10mm, "yellow")``` | LED 10 mm yellow |
|
||||
| 1 | ```led(LED3mm)``` | LED 3 mm red |
|
||||
| 1 | ```led(LED5mm, "orange")``` | LED 5 mm orange |
|
||||
| 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 |
|
||||
|
@@ -147,7 +147,7 @@ def tests(tests):
|
||||
print("Can't find implementation!")
|
||||
continue
|
||||
|
||||
vsplit = "AKR" + chr(ord('Z') + 1)
|
||||
vsplit = "AJR" + chr(ord('Z') + 1)
|
||||
vtype = locations[0][1]
|
||||
types = [vtype + ' ' + vsplit[i] + '-' + chr(ord(vsplit[i + 1]) - 1) for i in range(len(vsplit) - 1)] + [loc[1] for loc in locations[1 :]]
|
||||
if type == vtype:
|
||||
@@ -201,7 +201,7 @@ def tests(tests):
|
||||
dname = deps_name(deps_dir, scad.lower())
|
||||
oldest = png_name if mtime(png_name) < mtime(bom_name) else bom_name
|
||||
changed = check_deps(oldest, dname)
|
||||
changed = times.check_have_time(changed, scad_name.lower())
|
||||
changed = times.check_have_time(changed, scad_name)
|
||||
changed = options.have_changed(changed, oldest)
|
||||
if changed:
|
||||
print(changed)
|
||||
|
@@ -48,6 +48,8 @@ def check_have_time(changed, name):
|
||||
return changed
|
||||
|
||||
def add_time(name, start):
|
||||
if name.lower() in times:
|
||||
del times[name.lower()]
|
||||
times[name] = round(time.time() - start, 3)
|
||||
|
||||
def print_times():
|
||||
|
@@ -19,6 +19,7 @@
|
||||
include <../core.scad>
|
||||
include <../vitamins/microswitches.scad>
|
||||
include <../vitamins/d_connectors.scad>
|
||||
include <../vitamins/leds.scad>
|
||||
|
||||
use <../vitamins/pcb.scad>
|
||||
|
||||
@@ -63,10 +64,13 @@ test_pcb = ["TestPCB", "Test PCB",
|
||||
[ 10, 30, 0, "2p54socket", 6, 1],
|
||||
[ 25, 30, 0, "2p54socket", 4, 1, undef, undef, undef, "red" ],
|
||||
[ 10, 40, 0, "chip", 10, 5, 1, grey20],
|
||||
[ 10, 60, 180, "rj45"],
|
||||
[ 8, 80, 180, "usb_A"],
|
||||
[ 8, 100, 180, "usb_Ax2"],
|
||||
[ 3, 120, 180, "usb_uA"],
|
||||
[ 5, 50, 0, "led", LED3mm, "red"],
|
||||
[ 12, 50, 0, "led", LED5mm, "orange"],
|
||||
[ 25, 50, 0, "led", LED10mm, "yellow"],
|
||||
[ 10, 65, 180, "rj45"],
|
||||
[ 8, 85, 180, "usb_A"],
|
||||
[ 8, 105, 180, "usb_Ax2"],
|
||||
[ 3, 125, 180, "usb_uA"],
|
||||
[ 8, 140, 180, "usb_B"],
|
||||
[ 5, 160, 0, "buzzer", 4.5, 8.5],
|
||||
[ 20, 160, 0, "buzzer"],
|
||||
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 160 KiB |
@@ -26,36 +26,51 @@
|
||||
//! Also single bearing balls are modelled as just a silver sphere and a BOM entry.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
include <../utils/tube.scad>
|
||||
|
||||
function bb_name(type) = type[0]; //! Part code without shield type suffix
|
||||
function bb_bore(type) = type[1]; //! Internal diameter
|
||||
function bb_diameter(type) = type[2]; //! External diameter
|
||||
function bb_width(type) = type[3]; //! Width
|
||||
function bb_colour(type) = type[4]; //! Shield colour, "silver" for metal
|
||||
function bb_rim(type) = bb_diameter(type) / 10; //! Inner and outer rim thickness
|
||||
function bb_rim(type) = type[5]; //! Outer rim thickness guesstimate
|
||||
function bb_hub(type) = type[6]; //! Inner rim thickness guesstimate
|
||||
|
||||
module ball_bearing(type) { //! Draw a ball bearing
|
||||
shield = bb_colour(type);
|
||||
suffix = shield == "silver" ? "ZZ " : "-2RS ";
|
||||
vitamin(str("ball_bearing(BB", bb_name(type), "): Ball bearing ", bb_name(type), suffix, bb_bore(type), "mm x ", bb_diameter(type), "mm x ", bb_width(type), "mm"));
|
||||
rim = bb_rim(type);
|
||||
hub = bb_hub(type);
|
||||
h = bb_width(type);
|
||||
od = bb_diameter(type);
|
||||
id = bb_bore(type);
|
||||
|
||||
module tube(od, id, h)
|
||||
linear_extrude(h, center = true, convexity = 5)
|
||||
difference() {
|
||||
circle(d = od);
|
||||
circle(d = id);
|
||||
}
|
||||
or = bb_diameter(type) / 2;
|
||||
ir = bb_bore(type) / 2;
|
||||
|
||||
color("silver") {
|
||||
tube(od, od - rim, h);
|
||||
tube(id + rim, id, h);
|
||||
$fn = 360;
|
||||
|
||||
rim_chamfer = rim / 6;
|
||||
rotate_extrude()
|
||||
hull() {
|
||||
translate([or - rim / 2, 0])
|
||||
square([rim, h - 2 * rim_chamfer], center = true);
|
||||
|
||||
translate([or - rim / 2 - rim_chamfer, 0])
|
||||
square([rim - rim_chamfer, h], center = true);
|
||||
}
|
||||
|
||||
hub_chamfer = hub / 6;
|
||||
rotate_extrude()
|
||||
hull() {
|
||||
translate([ir + hub / 2, 0])
|
||||
square([hub, h - 2 * hub_chamfer], center = true);
|
||||
|
||||
translate([ir + hub / 2 + hub_chamfer, 0])
|
||||
square([hub - hub_chamfer, h], center = true);
|
||||
}
|
||||
}
|
||||
|
||||
color(shield) tube(od - rim, id + rim, h - 1);
|
||||
color(shield) tube(or - rim - eps, ir + hub + eps, h - 1);
|
||||
|
||||
if($children)
|
||||
translate_z(bb_width(type) / 2)
|
||||
|
@@ -16,11 +16,11 @@
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
BB624 = ["624", 4, 13, 5, "blue"]; // 624 ball bearing for idlers
|
||||
BB608 = ["608", 8, 22, 7, "OrangeRed"]; // 608 bearings for wades
|
||||
BB6200 = ["6200", 10, 30, 9, "black"]; // 6200 bearings for KP pillow blocks
|
||||
BB6201 = ["6201", 12, 32, 10, "black"]; // 6201 bearings for KP pillow blocks
|
||||
|
||||
ball_bearings = [BB624, BB608, BB6200, BB6201];
|
||||
BB624 = ["624", 4, 13, 5, "blue", 1.2, 1.2]; // 624 ball bearing for idlers
|
||||
BB608 = ["608", 8, 22, 7, "OrangeRed", 1.4, 2.0]; // 608 bearings for wades
|
||||
BB6200 = ["6200", 10, 30, 9, "black", 2.3, 3.6]; // 6200 bearings for KP pillow blocks
|
||||
BB6201 = ["6201", 12, 32, 10, "black", 2.4, 3.7]; // 6201 bearings for KP pillow blocks
|
||||
BB6808 = ["6808", 40, 52, 7, "black", 1.5, 1.6];
|
||||
ball_bearings = [BB624, BB608, BB6200, BB6201, BB6808];
|
||||
|
||||
use <ball_bearing.scad>
|
||||
|
@@ -49,7 +49,7 @@ module led(type, colour = "red", lead = 5) { //! Draw specified LED with desired
|
||||
}
|
||||
}
|
||||
color("silver")
|
||||
for(side = [-1, 1], len = lead - side)
|
||||
for(side = [-1, 1], len = lead - (lead < 3 ? 0 : side))
|
||||
translate([side * led_pitch(type) / 2, 0, -len / 2])
|
||||
vflip()
|
||||
cube([led_lead_t(type), led_lead_t(type), len], center = true);
|
||||
|
@@ -33,6 +33,7 @@ use <../utils/dogbones.scad>
|
||||
use <../utils/thread.scad>
|
||||
use <../utils/tube.scad>
|
||||
use <d_connector.scad>
|
||||
use <led.scad>
|
||||
|
||||
function pcb_name(type) = type[1]; //! Description
|
||||
function pcb_length(type) = type[2]; //! Length
|
||||
@@ -821,6 +822,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "standoff")) if(!cutouts) standoff(comp[4], comp[5], comp[6], comp[7]);
|
||||
if(show(comp, "uSD")) uSD(comp[4], cutouts);
|
||||
if(show(comp, "trimpot10")) trimpot10(param(4, false), cutouts);
|
||||
if(show(comp, "led")) led(comp[4], comp[5], 2.6);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -18,6 +18,8 @@
|
||||
//
|
||||
include <microswitches.scad>
|
||||
include <d_connectors.scad>
|
||||
include <leds.scad>
|
||||
|
||||
//
|
||||
// l w t r h l c b h
|
||||
// e i h a o a o o o
|
||||
@@ -324,7 +326,15 @@ PI_IO = ["PI_IO", "PI_IO V2", 35.56, 25.4, 1.6, 0, 0, 0, "green", tru
|
||||
], []];
|
||||
|
||||
ZC_A0591 = ["ZC_A0591", "ZC-A0591 ULN2003 driver PCB", 35, 32, 1.6, 0, 2.5, 0, "green", false, [[2.25, 3.25], [-2.25, 3.25], [2.25, -3.25], [-2.25, -3.25] ],
|
||||
[], [], [], [], M2p5_pan_screw];
|
||||
[ [ 12.25, 8.3, -90, "jst_xh", 5],
|
||||
[ -6.5, 10, 0, "2p54header", 1, 4],
|
||||
[-14, -4.5, 0, "2p54header", 4, 1],
|
||||
[ 5.5, 6, 0, "led", LED3mm, [1,1,1, 0.5]],
|
||||
[ 5.5, 10.5, 0, "led", LED3mm, [1,1,1, 0.5]],
|
||||
[ 5.5, 15, 0, "led", LED3mm, [1,1,1, 0.5]],
|
||||
[ 5.5, 19.5, 0, "led", LED3mm, [1,1,1, 0.5]],
|
||||
|
||||
], [], [], [], M2p5_pan_screw];
|
||||
|
||||
|
||||
MT3608 = ["MT3608", "MT3608 boost converter module", 37, 17, 1.2, 2, 1.5, [5, 3], "#2140BE", false, [[3.0725, 5.095], [3.0725, -5.095], [-3.0725, 5.095], [-3.0725, -5.095]],
|
||||
|
@@ -23,6 +23,7 @@
|
||||
include <../utils/core/core.scad>
|
||||
|
||||
use <washer.scad>
|
||||
use <nut.scad>
|
||||
use <../utils/rounded_cylinder.scad>
|
||||
use <../utils/thread.scad>
|
||||
include <inserts.scad>
|
||||
|