1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-13 19:03:58 +02:00

Merge branch 'nophead:master' into master

This commit is contained in:
Pablo Cremades
2025-04-22 18:29:42 -03:00
committed by GitHub
50 changed files with 184501 additions and 51 deletions

1
.gitignore vendored
View File

@@ -12,3 +12,4 @@ times.txt
*_diff.png
*.echo
cmd_times.txt
*.gco

View File

@@ -3,6 +3,31 @@
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
### [v21.38.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.38.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.37.1...v21.38.0 "diff with v21.37.1")
* 2025-04-15 [`bd94182`](https://github.com/nophead/NopSCADlib/commit/bd94182ff1ca85df7b667fc6985defb779846252 "show commit") [C.P.](# "Chris Palmer") Added simple Gridfinity generator and examples.
* 2025-04-15 [`86df9a3`](https://github.com/nophead/NopSCADlib/commit/86df9a34d641511a84026eaf0b3191437e4692be "show commit") [C.P.](# "Chris Palmer") Added chamfer test file.
* 2025-04-15 [`9758112`](https://github.com/nophead/NopSCADlib/commit/9758112e05d02c9cf156828ecd47b7770b602628 "show commit") [C.P.](# "Chris Palmer") Added `chamfer_hole()` utility module.
#### [v21.37.1](https://github.com/nophead/NopSCADlib/releases/tag/v21.37.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.37.0...v21.37.1 "diff with v21.37.0")
* 2025-04-14 [`7546203`](https://github.com/nophead/NopSCADlib/commit/7546203b0377930a75a45e2943af296dc1758dca "show commit") [R.S.](# "Robert Schiele") positional parameters should not follow named parameters
* Some versions of OpenSCAD (like the latest official release `2021.01` get
confused if positional parameters follow named parameters. So let's use
named parameters after the first named one was used.
### [v21.37.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.37.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.36.0...v21.37.0 "diff with v21.36.0")
* 2025-04-15 [`edc7e17`](https://github.com/nophead/NopSCADlib/commit/edc7e174370ac8dcd6d4a78b31640347ab266f60 "show commit") [C.P.](# "Chris Palmer") Included `pcbs.scad` in `displays.scad`.
Moved `I2C_LCD_Backpack` from `tiny_pcbs` to pcbs to prevent connector clash.
Updated images and readme.
* 2025-04-11 [`a9b501a`](https://github.com/nophead/NopSCADlib/commit/a9b501a2d2ce242c181c2cd5f5d1f86ba7150eec "show commit") [P.](# "pcremades") Added a 1602 LCD with I2C module
* 2025-04-11 [`126343d`](https://github.com/nophead/NopSCADlib/commit/126343d5af75a2aa458db112305a62b953e23694 "show commit") [P.](# "pcremades") Added a I2C TWI SPI Serial Interface for 1602 LCD
* 2025-04-11 [`1692fcc`](https://github.com/nophead/NopSCADlib/commit/1692fcc8116c9a0926231a95d0207a0085c814c5 "show commit") [P.](# "pcremades") Added `1/4"` square trimpot to `pcb.scad`
### [v21.36.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.36.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.35.6...v21.36.0 "diff with v21.35.6")
* 2025-04-09 [`33ac382`](https://github.com/nophead/NopSCADlib/commit/33ac3820b0df87df05d7c2dbb3d553e2aafa6828 "show commit") [C.P.](# "Chris Palmer") Added `pose_stl()` module because `pose()` only works for assembly views.

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

View File

@@ -0,0 +1,49 @@
[
{
"name": "main_assembly",
"big": null,
"ngb": false,
"zoomed": 0,
"count": 1,
"assemblies": {},
"vitamins": {},
"printed": {
"lathe_tool_stand.stl": {
"count": 1,
"colour": "[0, 0.572549, 0]",
"camera": "0,0,0,70,0,315,500"
},
"MT2_stand.stl": {
"count": 1,
"colour": "[0, 0.572549, 0]",
"camera": "0,0,0,70,0,315,500"
},
"chuck_stand.stl": {
"count": 1,
"colour": "[0, 0.572549, 0]",
"camera": "0,0,0,70,0,315,500"
},
"chuck_jaw_bin.stl": {
"count": 1,
"colour": "[0, 0.572549, 0]",
"camera": "0,0,0,70,0,315,500"
},
"1x1_bin.stl": {
"count": 1,
"colour": "[0, 0.572549, 0]",
"camera": "0,0,0,70,0,315,500"
},
"123_block_stand.stl": {
"count": 1,
"colour": "[0, 0.572549, 0]",
"camera": "0,0,0,70,0,315,500"
},
"faceplate_stand.stl": {
"count": 1,
"colour": "[0, 0.572549, 0]",
"camera": "0,0,0,70,0,315,500"
}
},
"routed": {}
}
]

View File

@@ -0,0 +1,15 @@
M
a
i
n
Printed:
1| 1 123_block_stand.stl
1| 1 1x1_bin.stl
1| 1 MT2_stand.stl
1| 1 chuck_jaw_bin.stl
1| 1 chuck_stand.stl
1| 1 faceplate_stand.stl
1| 1 lathe_tool_stand.stl
Assemblies:
1 main_assembly

View File

@@ -0,0 +1,9 @@
main_assembly:
Printed:
1 123_block_stand.stl
1 1x1_bin.stl
1 MT2_stand.stl
1 chuck_jaw_bin.stl
1 chuck_stand.stl
1 faceplate_stand.stl
1 lathe_tool_stand.stl

View File

@@ -0,0 +1,64 @@
<a name="TOP"></a>
# Gridfinity
Gridfinity examples
![Main Assembly](assemblies/main_assembled.png)
<span></span>
---
## Table of Contents
1. [Parts list](#Parts_list)
1. [Main Assembly](#main_assembly)
<span></span>
[Top](#TOP)
---
<a name="Parts_list"></a>
## Parts list
| <span style="writing-mode: vertical-rl; text-orientation: mixed;">Main</span> | <span style="writing-mode: vertical-rl; text-orientation: mixed;">TOTALS</span> | |
|---:|---:|:---|
| | | **3D printed parts** |
| &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;123_block_stand.stl |
| &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;1x1_bin.stl |
| &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;MT2_stand.stl |
| &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;chuck_jaw_bin.stl |
| &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;chuck_stand.stl |
| &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;faceplate_stand.stl |
| &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;lathe_tool_stand.stl |
| &nbsp;&nbsp;7&nbsp; | &nbsp;&nbsp;7&nbsp; | &nbsp;&nbsp;Total 3D printed parts count |
<span></span>
[Top](#TOP)
---
<a name="main_assembly"></a>
## Main Assembly
### 3D Printed parts
| 1 x 123_block_stand.stl | 1 x 1x1_bin.stl | 1 x MT2_stand.stl |
|---|---|---|
| ![123_block_stand.stl](stls/123_block_stand.png) | ![1x1_bin.stl](stls/1x1_bin.png) | ![MT2_stand.stl](stls/MT2_stand.png)
| 1 x chuck_jaw_bin.stl | 1 x chuck_stand.stl | 1 x faceplate_stand.stl |
|---|---|---|
| ![chuck_jaw_bin.stl](stls/chuck_jaw_bin.png) | ![chuck_stand.stl](stls/chuck_stand.png) | ![faceplate_stand.stl](stls/faceplate_stand.png)
| 1 x lathe_tool_stand.stl |
|---|
| ![lathe_tool_stand.stl](stls/lathe_tool_stand.png)
### Assembly instructions
![main_assembly](assemblies/main_assembly.png)
Show all the Gridfinity parts
![main_assembled](assemblies/main_assembled.png)
<span></span>
[Top](#TOP)

View File

@@ -0,0 +1,58 @@
include <NopSCADlib/core.scad>
use <NopSCADlib/printed/gridfinity.scad>
use <NopSCADlib/utils/maths.scad>
use <NopSCADlib/utils/chamfer.scad>
tool_size = 8;
box = gridfinity_bin("123_block_stand", 2, 2, 5);
123_block = inch([3, 1, 2]);
102040_block = [20, 10, 40];
blocks = [123_block, 123_block, 102040_block];
box_mm = gridfinity_bin_size_mm(box);
wall = 1.75;
bwall = 1;
clearance = 0.5;
gap = (box_mm.y - sumv([for(b = blocks) b.y])) / (len(blocks) + 1);
module holes() {
let($b = blocks[0])
translate([0, box_mm.y / 2 - gap - $b.y / 2])
children();
let($b = blocks[1])
translate([0, box_mm.y / 2 - gap - blocks[0].y - gap - $b.y / 2])
children();
for(side = [-1, 1])
let($b = blocks[2])
translate([side * (blocks[2].x + 2 * gap) / 2,
box_mm.y / 2 - gap - blocks[0].y - gap - blocks[1].y - gap - blocks[2].y / 2 ])
children();
}
module 123_block_stand_stl()
gridfinity_bin(box) union() {
holes() {
translate_z(gridfinity_base_z() + bwall + $b.z / 2 + eps)
cube([$b.x + clearance, $b.y + clearance, $b.z + 2 * eps], true);
chamfer = 1;
translate_z(box_mm.z)
chamfer_hole(chamfer)
square([$b.x + clearance, $b.y + clearance], true);
}
translate_z(gridfinity_base_z() + bwall)
difference() {
rounded_rectangle([box_mm.x - 2 * wall, box_mm.y - 2 * wall, box_mm.z - gridfinity_base_z() - bwall - wall], gridfinity_corner_r() - wall);
holes()
rounded_rectangle([$b.x + clearance + 2 * wall, $b.y + clearance + 2 * wall, 100], wall, center = true);
}
}

View File

@@ -0,0 +1,9 @@
include <NopSCADlib/core.scad>
use <NopSCADlib/printed/gridfinity.scad>
box = gridfinity_bin("1x1_bin", 1, 1, 5);
module 1x1_bin_stl()
gridfinity_bin(box)
gridfinity_partition(box, 1, 1);

View File

@@ -0,0 +1,80 @@
//
// Stand for MT2 taper lathe tools
//
include <NopSCADlib/core.scad>
use <NopSCADlib/utils/maths.scad>
use <NopSCADlib/utils/chamfer.scad>
use <NopSCADlib/printed/gridfinity.scad>
box = gridfinity_bin("MT2_stand", 4, 2, 8);
box_mm = gridfinity_bin_size_mm(box);
wall = 1.75;
bwall = 1;
diameters1 = [43, 47, 64];
d2 = 20;
clearance = 1;
clearance2 = 4;
MT2_base = 5; // smaller diameters
MT2_D1 = 15; // diameter at the bottom of the taper at base height
MT2_half_angle = 1.4302777777777778;
hole_depth = box_mm.z - gridfinity_base_z() - bwall;
MT2_r1 = MT2_D1 / 2;
MT2_r2 = MT2_r1 + (hole_depth - MT2_base) * tan(MT2_half_angle);
gap = (box_mm.x - sumv(diameters1) - 2 * clearance) / (len(diameters1) - 1);
gap2 = 18;
module MT2_socket() {
clearance = 0.3;
translate_z(-hole_depth) {
poly_cylinder(MT2_r1 + clearance / 2, MT2_base + eps);
translate_z(MT2_base)
hull() {
poly_cylinder(MT2_r1 + clearance / 2, eps);
translate_z(hole_depth - MT2_base)
poly_cylinder(MT2_r2 + clearance / 2, eps);
}
}
chamfer_hole(1)
poly_circle(MT2_r2 + clearance / 2);
}
function pos(i) = [clearance + sumv(slice(diameters1, 0, i)) + i * gap + diameters1[i] / 2 - box_mm.x / 2, box_mm.y / 2 - clearance - diameters1[i] / 2, box_mm.z];
function pos2(i) = [clearance2 + i * gap2 + (i + 0.5) * d2 - box_mm.x / 2, -box_mm.y / 2 + clearance2 + d2 / 2, box_mm.z];
module holes()
for(i = [0 : len(diameters1) - 1]) {
translate(pos(i))
children();
translate(pos2(i))
children();
}
module MT2_stand_stl()
gridfinity_bin(box) union() {
holes()
MT2_socket();
translate_z(gridfinity_base_z() + bwall)
difference() {
rounded_rectangle([box_mm.x - 2 * wall, box_mm.y - 2 * wall, box_mm.z - gridfinity_base_z() - bwall - wall], gridfinity_corner_r() - wall);
holes()
cylinder(r = MT2_r2 + wall, h = 200, center = true);
for(x = [-box_mm.x / 2 : 20 : box_mm.x /2])
translate([x, 0])
cube([squeezed_wall, 200, 200], center = true);
}
}

View File

@@ -0,0 +1,36 @@
include <NopSCADlib/core.scad>
use <NopSCADlib/utils/chamfer.scad>
use <NopSCADlib/printed/gridfinity.scad>
box = gridfinity_bin("chuck_jaw_bin", 1, 1, 5);
box_mm = gridfinity_bin_size_mm(box);
bwall = 1;
length = 37;
width = 34;
z_bot = gridfinity_base_z() + bwall;
depth = box_mm.z - z_bot;
module chuck_jaw_bin_stl()
gridfinity_bin(box)
translate_z(box_mm.z) {
cube([length, width, depth * 2], true);
chamfer = 1;
chamfer_hole(chamfer)
square([length, width], true);
*hull() {
rounded_rectangle([length + 2 * chamfer, width + 2 * chamfer, eps], chamfer);
translate_z(-chamfer + eps / 2)
cube([length, width, eps], true);
}
}

View File

@@ -0,0 +1,52 @@
include <NopSCADlib/core.scad>
use <NopSCADlib/printed/gridfinity.scad>
use <NopSCADlib/utils/chamfer.scad>
box = gridfinity_bin("chuck_stand", 2, 2, 5);
box_mm = gridfinity_bin_size_mm(box);
bwall = 1;
chuck_d = 80;
ring_od = 50;
ring_id = 40;
ring_h = 4;
hole_pitch = (60 + 72.5) / 2;
hole_d = (72.5 - 60) / 2;
hole_depth = 15;
clearance = 0.5;
chamfer = 1;
z_bot = gridfinity_base_z() + bwall;
module chuck_stand_stl()
gridfinity_bin(box) union() {
translate_z(z_bot) {
for(a = [0 : 30 : 330])
rotate(a)
translate([0, hole_pitch / 2]) {
poly_cylinder(hole_d / 2 + clearance / 2, h = 100);
translate_z(hole_depth)
chamfer_hole(chamfer)
poly_circle(hole_d / 2 + clearance / 2);
}
translate_z(hole_depth) {
poly_cylinder(r = chuck_d / 2 + clearance / 2, h = 100);
poly_tube(or = ring_od / 2 + clearance, ir = ring_id / 2 - clearance, h = 2 * ring_h, center = true);
chamfer_hole(chamfer)
poly_circle(ring_od / 2 + clearance);
}
}
translate_z(box_mm.z)
chamfer_hole(chamfer)
poly_circle(r = chuck_d / 2 + clearance / 2);
}

View File

@@ -0,0 +1,56 @@
include <NopSCADlib/core.scad>
use <NopSCADlib/printed/gridfinity.scad>
use <NopSCADlib/utils/maths.scad>
use <NopSCADlib/utils/chamfer.scad>
tool_size = 8;
box = gridfinity_bin("faceplate_stand", 3, 1, 5);
faceplate = [112, 16, 17];
sanding_disc = [69, 6.7, 14.5];
discs = [faceplate, sanding_disc];
box_mm = gridfinity_bin_size_mm(box);
wall = 1.8;
bwall = 1;
clearance = 0.5;
gap = (box_mm.y - sumv([for(b = discs) b.z])) / (len(discs) + 1);
module holes() {
for(i = [0 : len(discs) - 1]) let($d = discs[i])
translate([0, box_mm.y / 2 - gap - (i ? discs[0].z + gap : 0) - $d.z / 2])
children();
}
module faceplate_stand_stl()
gridfinity_bin(box) union() {
holes() {
$fa = 1;
r = $d.x / 2 + clearance / 2;
z = gridfinity_base_z() + bwall + r;
translate_z(z)
rotate([90, 0, 0])
teardrop_plus(r = r, h = $d.y + clearance, center = true);
chamfer = 1;
h = z - box_mm.z + wall;
translate_z(box_mm.z)
chamfer_hole(chamfer)
square([2 * sqrt(sqr(r) - sqr(h)), $d.y + clearance], true);
}
difference() {
translate_z(gridfinity_base_z() + bwall)
rounded_rectangle([box_mm.x - 2 * wall, box_mm.y - 2 * wall, box_mm.z - gridfinity_base_z() - bwall - wall], gridfinity_corner_r() - wall);
holes() {
r = $d.x / 2 + clearance / 2;
translate_z(gridfinity_base_z() + bwall + r)
rotate([90, 0, 0])
teardrop_plus(r = r + wall, h = $d.y + clearance + 2 * wall);
}
}
}

View File

@@ -0,0 +1,45 @@
include <NopSCADlib/core.scad>
use <NopSCADlib/printed/gridfinity.scad>
use <NopSCADlib/utils/chamfer.scad>
tool_size = 8;
rows = 2;
cols = 5;
spacing = 8;
hole = tool_size + 0.2;
tool_pitch = hole + spacing;
box = gridfinity_bin("lathe_tool_stand", 2, 1, 5);
module holes()
for(x = [0 : cols - 1], y = [0 : rows - 1])
translate([x - (cols -1) / 2, y - (rows - 1) / 2] * tool_pitch)
children();
box_mm = gridfinity_bin_size_mm(box);
wall = 1.75;
bwall = 1;
module lathe_tool_stand_stl()
gridfinity_bin(box) union() {
translate_z(box_mm.z)
holes() {
cube([hole, hole, 2 * (box_mm.z - gridfinity_base_z() - bwall)], true);
chamfer = 1;
chamfer_hole(chamfer)
square([hole, hole], true);
}
translate_z(gridfinity_base_z() + bwall)
difference() {
rounded_rectangle([box_mm.x - 2 * wall, box_mm.y - 2 * wall, box_mm.z - gridfinity_base_z() - bwall - wall], gridfinity_corner_r() - wall);
holes()
rounded_rectangle([hole + 2 * wall, hole + 2 * wall, 100], wall, center = true);
}
}

View File

@@ -0,0 +1,42 @@
//
//! Gridfinity examples
//
include <NopSCADlib/core.scad>
use <lathe_tool_stand.scad>
use <MT2_stand.scad>
use <chuck_stand.scad>
use <chuck_jaw_bin.scad>
use <1x1_bin.scad>
use <123_block_stand.scad>
use <faceplate_stand.scad>
//! Show all the Gridfinity parts
module main_assembly()
assembly("main") {
$manifold = true;
lathe_tool_stand_stl();
translate([42, 63])
MT2_stand_stl();
translate([42 * 2, -42 / 2])
chuck_stand_stl();
translate([-21, -42])
chuck_jaw_bin_stl();
translate([21, -42])
1x1_bin_stl();
translate([42 * 4, -42 / 2])
123_block_stand_stl();
translate([42 * 6.5, 0])
faceplate_stand_stl();
}
main_assembly();

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,7 @@
include <core.scad>
include <vitamins/psus.scad>
include <vitamins/pcbs.scad>
include <vitamins/displays.scad> // Includes pcbs.scad
include <vitamins/antennas.scad>
include <vitamins/batteries.scad>
@@ -34,7 +34,6 @@ include <vitamins/box_sections.scad>
include <vitamins/bulldogs.scad>
include <vitamins/cameras.scad>
include <vitamins/components.scad>
include <vitamins/displays.scad>
include <vitamins/extrusions.scad>
include <vitamins/extrusion_brackets.scad>
include <vitamins/fastons.scad>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@@ -25,7 +25,7 @@
//! STL files for all the printed parts, DXF files for CNC routed parts in a project and a manual containing assembly
//! instructions and exploded views by scraping markdown embedded in OpenSCAD comments, [see scripts](scripts/readme.md).
//!
//! A simple example project can be found [here](examples/MainsBreakOutBox/readme.md).
//! A simple example project can be found [here](examples/MainsBreakOutBox/readme.md) and more complex examples [here](examples).
//!
//! For more examples of what it can make see the [gallery](gallery/readme.md).
//!
@@ -68,6 +68,7 @@ use <tests/fastons.scad>
use <tests/fuseholder.scad>
use <tests/gear_motors.scad>
use <tests/geared_steppers.scad>
use <tests/gridfinity.scad>
use <tests/hot_ends.scad>
use <tests/IECs.scad>
use <tests/inserts.scad>
@@ -204,7 +205,11 @@ pocket_y = handle_y + 70;
translate([x5 + 65, pocket_y])
pocket_handles();
hinge_y = pocket_y + 100;
gridfinity_y = pocket_y + 100;
translate([950, gridfinity_y])
gridfinity_test();
hinge_y = gridfinity_y + 100;
translate([x5, hinge_y]) {
door_hinges()
door_latches();
@@ -221,7 +226,6 @@ box_y = pbox_y + 150;
translate([950, box_y])
box_test();
inserts_y = 0;
nuts_y = inserts_y + 20;
washers_y = nuts_y + 160;

104
printed/gridfinity.scad Normal file
View File

@@ -0,0 +1,104 @@
//
// NopSCADlib Copyright Chris Palmer 2024
// 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/>.
//
//
//! Generate storage bins compatible with Zack Freedman's Gridfinity design, see <https://www.youtube.com/watch?v=ra_9zU-mnl8&t=37s>
//!
//! Based on <https://gridfinity.xyz/specification>
//!
//! More examples [here](examples/Gridfinity).
//
include <../core.scad>
use <../utils/rounded_cylinder.scad>
pitch = 42;
z_step = 7;
width = 41.5;
foot_w = 37.2;
foot_h = 1.8;
lower_chamfer = 0.8;
upper_chamfer = 2.15;
corner_r = 7.5 / 2;
foot_r = 3.2 / 2;
chamfer_r = 1.6 / 2;
function gridfinity_bin(name, grid_x, grid_y, grid_z) = [name, [grid_x, grid_y, grid_z], lower_chamfer]; //! Constructor
function gridfinity_bin_name(type) = type[0]; //! Name for the STL file
function gridfinity_bin_size(type) = type[1]; //! Size in grid units
function gridfinity_base_z() = foot_h + lower_chamfer + upper_chamfer; //! height of base
function gridfinity_corner_r() = corner_r; //! Outside corner radius
function gridfinity_bin_size_mm(type) = //! Overall size of the bin
let(s = gridfinity_bin_size(type))
[(s.x - 1) * pitch + width, (s.y - 1) * pitch + width, s.z * z_step];
module gridfinity_bin(type) { //! Create a gridfinity bin, bits to cut out are passed as a child
size = gridfinity_bin_size(type);
w1 = width - 2 * (lower_chamfer + upper_chamfer);
w2 = width - 2 * upper_chamfer;
stl(gridfinity_bin_name(type)) {
translate([-(size.x - 1) / 2 * pitch, -(size.y - 1) / 2 * pitch])
for(x = [0 : size.x - 1], y = [0 : size.y - 1])
translate([x * pitch, y * pitch]) {
hull() {
rounded_rectangle([w1, w1, eps], chamfer_r);
translate_z(lower_chamfer)
rounded_rectangle([w2, w2, foot_h + eps], foot_r);
}
hull() {
translate_z(lower_chamfer + foot_h)
rounded_rectangle([w2, w2, foot_h + eps], foot_r);
translate_z(lower_chamfer + foot_h + upper_chamfer)
rounded_rectangle([width, width, eps], corner_r);
}
}
difference() {
base_z = gridfinity_base_z();
translate_z(base_z)
rounded_rectangle([(size.x - 1) * pitch + width, (size.y - 1) * pitch + width, size.z * z_step - base_z], corner_r);
if($children)
children(0);
}
}
}
module gridfinity_partition(type, cols = 1, rows = 1, wall = 1.6, iwall = squeezed_wall, bwall = 1, corner_r = 4) { //! Passed as child to hollow out specified partitions
size = gridfinity_bin_size_mm(type);
wx = (size.x - 2 * wall - (cols - 1) * iwall) / cols;
wy = (size.y - 2 * wall - (rows - 1) * iwall) / rows;
h = size.z - gridfinity_base_z() - bwall;
for(x = [0 : cols - 1], y = [0 : rows - 1])
translate([-size.x / 2 + wall + x * (wx + iwall) + wx / 2,
-size.y / 2 + wall + y * (wy + iwall) + wy / 2,
size.z + eps])
vflip()
rounded_top_rectangle([wx, wy, h + eps], corner_r, corner_r);
}

145
readme.md
View File

@@ -6,7 +6,7 @@ There are also Python scripts to generate Bills of Materials (BOMs),
STL files for all the printed parts, DXF files for CNC routed parts in a project and a manual containing assembly
instructions and exploded views by scraping markdown embedded in OpenSCAD comments, [see scripts](scripts/readme.md).
A simple example project can be found [here](examples/MainsBreakOutBox/readme.md).
A simple example project can be found [here](examples/MainsBreakOutBox/readme.md) and more complex examples [here](examples).
For more examples of what it can make see the [gallery](gallery/readme.md).
@@ -24,32 +24,32 @@ A list of changes classified as breaking, additions or fixes is maintained in [C
<tr><td> <a href = "#7_segments">7_segments</a> </td><td> <a href = "#iecs">IECs</a> </td><td> <a href = "#radials">Radials</a> </td><td> <a href = "#box">Box</a> </td><td> <a href = "#annotation">Annotation</a> </td><td> <a href = "#bom">BOM</a> </td></tr>
<tr><td> <a href = "#antennas">Antennas</a> </td><td> <a href = "#inserts">Inserts</a> </td><td> <a href = "#rails">Rails</a> </td><td> <a href = "#butt_box">Butt_box</a> </td><td> <a href = "#bezier">Bezier</a> </td><td> <a href = "#clip">Clip</a> </td></tr>
<tr><td> <a href = "#axials">Axials</a> </td><td> <a href = "#jack">Jack</a> </td><td> <a href = "#ring_terminals">Ring_terminals</a> </td><td> <a href = "#cable_clip">Cable_clip</a> </td><td> <a href = "#catenary">Catenary</a> </td><td> <a href = "#global">Global</a> </td></tr>
<tr><td> <a href = "#bldc_motors">BLDC_motors</a> </td><td> <a href = "#ldrs">LDRs</a> </td><td> <a href = "#rockers">Rockers</a> </td><td> <a href = "#cable_grommets">Cable_grommets</a> </td><td> <a href = "#core_xy">Core_xy</a> </td><td> <a href = "#polyholes">Polyholes</a> </td></tr>
<tr><td> <a href = "#ball_bearings">Ball_bearings</a> </td><td> <a href = "#led_meters">LED_meters</a> </td><td> <a href = "#rod">Rod</a> </td><td> <a href = "#camera_housing">Camera_housing</a> </td><td> <a href = "#dimension">Dimension</a> </td><td> <a href = "#rounded_rectangle">Rounded_rectangle</a> </td></tr>
<tr><td> <a href = "#batteries">Batteries</a> </td><td> <a href = "#leds">LEDs</a> </td><td> <a href = "#rod_ends">Rod_ends</a> </td><td> <a href = "#carriers">Carriers</a> </td><td> <a href = "#dogbones">Dogbones</a> </td><td> <a href = "#sphere">Sphere</a> </td></tr>
<tr><td> <a href = "#bearing_blocks">Bearing_blocks</a> </td><td> <a href = "#leadnuts">Leadnuts</a> </td><td> <a href = "#sbr_rails">SBR_rails</a> </td><td> <a href = "#corner_block">Corner_block</a> </td><td> <a href = "#fillet">Fillet</a> </td><td> <a href = "#teardrops">Teardrops</a> </td></tr>
<tr><td> <a href = "#belts">Belts</a> </td><td> <a href = "#light_strips">Light_strips</a> </td><td> <a href = "#sk_brackets">SK_brackets</a> </td><td> <a href = "#door_hinge">Door_hinge</a> </td><td> <a href = "#gears">Gears</a> </td><td></td></tr>
<tr><td> <a href = "#blowers">Blowers</a> </td><td> <a href = "#linear_bearings">Linear_bearings</a> </td><td> <a href = "#smds">SMDs</a> </td><td> <a href = "#door_latch">Door_latch</a> </td><td> <a href = "#hanging_hole">Hanging_hole</a> </td><td></td></tr>
<tr><td> <a href = "#box_sections">Box_sections</a> </td><td> <a href = "#magnets">Magnets</a> </td><td> <a href = "#ssrs">SSRs</a> </td><td> <a href = "#drag_chain">Drag_chain</a> </td><td> <a href = "#horiholes">Horiholes</a> </td><td></td></tr>
<tr><td> <a href = "#bulldogs">Bulldogs</a> </td><td> <a href = "#mains_sockets">Mains_sockets</a> </td><td> <a href = "#screws">Screws</a> </td><td> <a href = "#fan_guard">Fan_guard</a> </td><td> <a href = "#layout">Layout</a> </td><td></td></tr>
<tr><td> <a href = "#buttons">Buttons</a> </td><td> <a href = "#microswitches">Microswitches</a> </td><td> <a href = "#sealing_strip">Sealing_strip</a> </td><td> <a href = "#fixing_block">Fixing_block</a> </td><td> <a href = "#maths">Maths</a> </td><td></td></tr>
<tr><td> <a href = "#cable_strips">Cable_strips</a> </td><td> <a href = "#microview">Microview</a> </td><td> <a href = "#servo_motors">Servo_motors</a> </td><td> <a href = "#flat_hinge">Flat_hinge</a> </td><td> <a href = "#offset">Offset</a> </td><td></td></tr>
<tr><td> <a href = "#cameras">Cameras</a> </td><td> <a href = "#modules">Modules</a> </td><td> <a href = "#shaft_couplings">Shaft_couplings</a> </td><td> <a href = "#foot">Foot</a> </td><td> <a href = "#pcb_utils">PCB_utils</a> </td><td></td></tr>
<tr><td> <a href = "#circlips">Circlips</a> </td><td> <a href = "#nuts">Nuts</a> </td><td> <a href = "#sheets">Sheets</a> </td><td> <a href = "#handle">Handle</a> </td><td> <a href = "#quadrant">Quadrant</a> </td><td></td></tr>
<tr><td> <a href = "#components">Components</a> </td><td> <a href = "#o_ring">O_ring</a> </td><td> <a href = "#spades">Spades</a> </td><td> <a href = "#knob">Knob</a> </td><td> <a href = "#round">Round</a> </td><td></td></tr>
<tr><td> <a href = "#dip">DIP</a> </td><td> <a href = "#opengrab">Opengrab</a> </td><td> <a href = "#spools">Spools</a> </td><td> <a href = "#led_bezel">LED_bezel</a> </td><td> <a href = "#rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
<tr><td> <a href = "#d_connectors">D_connectors</a> </td><td> <a href = "#pcb">PCB</a> </td><td> <a href = "#springs">Springs</a> </td><td> <a href = "#pcb_mount">PCB_mount</a> </td><td> <a href = "#rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
<tr><td> <a href = "#displays">Displays</a> </td><td> <a href = "#pcbs">PCBs</a> </td><td> <a href = "#stepper_motors">Stepper_motors</a> </td><td> <a href = "#psu_shroud">PSU_shroud</a> </td><td> <a href = "#rounded_triangle">Rounded_triangle</a> </td><td></td></tr>
<tr><td> <a href = "#extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#psus">PSUs</a> </td><td> <a href = "#swiss_clips">Swiss_clips</a> </td><td> <a href = "#pocket_handle">Pocket_handle</a> </td><td> <a href = "#sector">Sector</a> </td><td></td></tr>
<tr><td> <a href = "#extrusions">Extrusions</a> </td><td> <a href = "#panel_meters">Panel_meters</a> </td><td> <a href = "#terminals">Terminals</a> </td><td> <a href = "#press_fit">Press_fit</a> </td><td> <a href = "#splines">Splines</a> </td><td></td></tr>
<tr><td> <a href = "#fans">Fans</a> </td><td> <a href = "#photo_interrupters">Photo_interrupters</a> </td><td> <a href = "#toggles">Toggles</a> </td><td> <a href = "#printed_box">Printed_box</a> </td><td> <a href = "#sweep">Sweep</a> </td><td></td></tr>
<tr><td> <a href = "#fastons">Fastons</a> </td><td> <a href = "#pillars">Pillars</a> </td><td> <a href = "#transformers">Transformers</a> </td><td> <a href = "#printed_pulleys">Printed_pulleys</a> </td><td> <a href = "#thread">Thread</a> </td><td></td></tr>
<tr><td> <a href = "#fuseholder">Fuseholder</a> </td><td> <a href = "#pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#ttracks">Ttracks</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 = "#gear_motors">Gear_motors</a> </td><td> <a href = "#pin_headers">Pin_headers</a> </td><td> <a href = "#tubings">Tubings</a> </td><td> <a href = "#ssr_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#geared_steppers">Geared_steppers</a> </td><td> <a href = "#potentiometers">Potentiometers</a> </td><td> <a href = "#variacs">Variacs</a> </td><td> <a href = "#screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#green_terminals">Green_terminals</a> </td><td> <a href = "#pulleys">Pulleys</a> </td><td> <a href = "#veroboard">Veroboard</a> </td><td> <a href = "#socket_box">Socket_box</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#ht_pipes">HT_pipes</a> </td><td></td><td> <a href = "#washers">Washers</a> </td><td> <a href = "#strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#hot_ends">Hot_ends</a> </td><td></td><td> <a href = "#wire">Wire</a> </td><td></td><td></td><td></td></tr>
<tr><td> <a href = "#bldc_motors">BLDC_motors</a> </td><td> <a href = "#ldrs">LDRs</a> </td><td> <a href = "#rockers">Rockers</a> </td><td> <a href = "#cable_grommets">Cable_grommets</a> </td><td> <a href = "#chamfer">Chamfer</a> </td><td> <a href = "#polyholes">Polyholes</a> </td></tr>
<tr><td> <a href = "#ball_bearings">Ball_bearings</a> </td><td> <a href = "#led_meters">LED_meters</a> </td><td> <a href = "#rod">Rod</a> </td><td> <a href = "#camera_housing">Camera_housing</a> </td><td> <a href = "#core_xy">Core_xy</a> </td><td> <a href = "#rounded_rectangle">Rounded_rectangle</a> </td></tr>
<tr><td> <a href = "#batteries">Batteries</a> </td><td> <a href = "#leds">LEDs</a> </td><td> <a href = "#rod_ends">Rod_ends</a> </td><td> <a href = "#carriers">Carriers</a> </td><td> <a href = "#dimension">Dimension</a> </td><td> <a href = "#sphere">Sphere</a> </td></tr>
<tr><td> <a href = "#bearing_blocks">Bearing_blocks</a> </td><td> <a href = "#leadnuts">Leadnuts</a> </td><td> <a href = "#sbr_rails">SBR_rails</a> </td><td> <a href = "#corner_block">Corner_block</a> </td><td> <a href = "#dogbones">Dogbones</a> </td><td> <a href = "#teardrops">Teardrops</a> </td></tr>
<tr><td> <a href = "#belts">Belts</a> </td><td> <a href = "#light_strips">Light_strips</a> </td><td> <a href = "#sk_brackets">SK_brackets</a> </td><td> <a href = "#door_hinge">Door_hinge</a> </td><td> <a href = "#fillet">Fillet</a> </td><td></td></tr>
<tr><td> <a href = "#blowers">Blowers</a> </td><td> <a href = "#linear_bearings">Linear_bearings</a> </td><td> <a href = "#smds">SMDs</a> </td><td> <a href = "#door_latch">Door_latch</a> </td><td> <a href = "#gears">Gears</a> </td><td></td></tr>
<tr><td> <a href = "#box_sections">Box_sections</a> </td><td> <a href = "#magnets">Magnets</a> </td><td> <a href = "#ssrs">SSRs</a> </td><td> <a href = "#drag_chain">Drag_chain</a> </td><td> <a href = "#hanging_hole">Hanging_hole</a> </td><td></td></tr>
<tr><td> <a href = "#bulldogs">Bulldogs</a> </td><td> <a href = "#mains_sockets">Mains_sockets</a> </td><td> <a href = "#screws">Screws</a> </td><td> <a href = "#fan_guard">Fan_guard</a> </td><td> <a href = "#horiholes">Horiholes</a> </td><td></td></tr>
<tr><td> <a href = "#buttons">Buttons</a> </td><td> <a href = "#microswitches">Microswitches</a> </td><td> <a href = "#sealing_strip">Sealing_strip</a> </td><td> <a href = "#fixing_block">Fixing_block</a> </td><td> <a href = "#layout">Layout</a> </td><td></td></tr>
<tr><td> <a href = "#cable_strips">Cable_strips</a> </td><td> <a href = "#microview">Microview</a> </td><td> <a href = "#servo_motors">Servo_motors</a> </td><td> <a href = "#flat_hinge">Flat_hinge</a> </td><td> <a href = "#maths">Maths</a> </td><td></td></tr>
<tr><td> <a href = "#cameras">Cameras</a> </td><td> <a href = "#modules">Modules</a> </td><td> <a href = "#shaft_couplings">Shaft_couplings</a> </td><td> <a href = "#foot">Foot</a> </td><td> <a href = "#offset">Offset</a> </td><td></td></tr>
<tr><td> <a href = "#circlips">Circlips</a> </td><td> <a href = "#nuts">Nuts</a> </td><td> <a href = "#sheets">Sheets</a> </td><td> <a href = "#gridfinity">Gridfinity</a> </td><td> <a href = "#pcb_utils">PCB_utils</a> </td><td></td></tr>
<tr><td> <a href = "#components">Components</a> </td><td> <a href = "#o_ring">O_ring</a> </td><td> <a href = "#spades">Spades</a> </td><td> <a href = "#handle">Handle</a> </td><td> <a href = "#quadrant">Quadrant</a> </td><td></td></tr>
<tr><td> <a href = "#dip">DIP</a> </td><td> <a href = "#opengrab">Opengrab</a> </td><td> <a href = "#spools">Spools</a> </td><td> <a href = "#knob">Knob</a> </td><td> <a href = "#round">Round</a> </td><td></td></tr>
<tr><td> <a href = "#d_connectors">D_connectors</a> </td><td> <a href = "#pcb">PCB</a> </td><td> <a href = "#springs">Springs</a> </td><td> <a href = "#led_bezel">LED_bezel</a> </td><td> <a href = "#rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
<tr><td> <a href = "#displays">Displays</a> </td><td> <a href = "#pcbs">PCBs</a> </td><td> <a href = "#stepper_motors">Stepper_motors</a> </td><td> <a href = "#pcb_mount">PCB_mount</a> </td><td> <a href = "#rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
<tr><td> <a href = "#extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#psus">PSUs</a> </td><td> <a href = "#swiss_clips">Swiss_clips</a> </td><td> <a href = "#psu_shroud">PSU_shroud</a> </td><td> <a href = "#rounded_triangle">Rounded_triangle</a> </td><td></td></tr>
<tr><td> <a href = "#extrusions">Extrusions</a> </td><td> <a href = "#panel_meters">Panel_meters</a> </td><td> <a href = "#terminals">Terminals</a> </td><td> <a href = "#pocket_handle">Pocket_handle</a> </td><td> <a href = "#sector">Sector</a> </td><td></td></tr>
<tr><td> <a href = "#fans">Fans</a> </td><td> <a href = "#photo_interrupters">Photo_interrupters</a> </td><td> <a href = "#toggles">Toggles</a> </td><td> <a href = "#press_fit">Press_fit</a> </td><td> <a href = "#splines">Splines</a> </td><td></td></tr>
<tr><td> <a href = "#fastons">Fastons</a> </td><td> <a href = "#pillars">Pillars</a> </td><td> <a href = "#transformers">Transformers</a> </td><td> <a href = "#printed_box">Printed_box</a> </td><td> <a href = "#sweep">Sweep</a> </td><td></td></tr>
<tr><td> <a href = "#fuseholder">Fuseholder</a> </td><td> <a href = "#pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#ttracks">Ttracks</a> </td><td> <a href = "#printed_pulleys">Printed_pulleys</a> </td><td> <a href = "#thread">Thread</a> </td><td></td></tr>
<tr><td> <a href = "#gear_motors">Gear_motors</a> </td><td> <a href = "#pin_headers">Pin_headers</a> </td><td> <a href = "#tubings">Tubings</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 = "#geared_steppers">Geared_steppers</a> </td><td> <a href = "#potentiometers">Potentiometers</a> </td><td> <a href = "#variacs">Variacs</a> </td><td> <a href = "#ssr_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#green_terminals">Green_terminals</a> </td><td> <a href = "#pulleys">Pulleys</a> </td><td> <a href = "#veroboard">Veroboard</a> </td><td> <a href = "#screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#ht_pipes">HT_pipes</a> </td><td></td><td> <a href = "#washers">Washers</a> </td><td> <a href = "#socket_box">Socket_box</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#hot_ends">Hot_ends</a> </td><td></td><td> <a href = "#wire">Wire</a> </td><td> <a href = "#strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#hygrometer">Hygrometer</a> </td><td></td><td> <a href = "#zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
</table>
@@ -1106,7 +1106,7 @@ LCD displays.
| 1 | `display(BigTreeTech_TFT35v3_0)` | BigTreeTech TFT35 v3.0 |
| 1 | `display(HDMI5)` | HDMI display 5" |
| 1 | `display(TFT128x160)` | LCD TFT ST7735 display 128x160 |
| 1 | `display(LCD1602A)` | LCD display 1602A |
| 2 | `display(LCD1602A)` | LCD display 1602A |
| 1 | `display(LCD2004A)` | LCD display 2004A |
| 1 | `display(LCDS7282B)` | LCD display S-7282B |
| 1 | `display(SSD1963_4p3)` | LCD display SSD1963 4.3" |
@@ -3000,6 +3000,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pcb(EnviroPlus)` | Enviro+ |
| 1 | `pcb(ExtruderPCB)` | Extruder connection PCB - not shown |
| 1 | `pcb(HW803_1WAY_RELAY)` | HW-803 5V 1 way relay module |
| 1 | `pcb(I2C_LCD_Backpack)` | I2C / SPI character LCD backpack |
| 1 | `pcb(KY_040)` | KY-040 rotart encoder breakout |
| 1 | `pcb(Keyes5p1)` | Keyes5.1 Arduino Uno expansion board - not shown |
| 1 | `pcb(L9110S)` | L9110S 2-Channel motor driver module |
@@ -3038,11 +3039,12 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 4 | `screw(M2_cap_screw, 25)` | Screw M2 cap x 25mm |
| 2 | `screw(M2p5_cap_screw, 20)` | Screw M2.5 cap x 20mm |
| 8 | `screw(M2p5_cap_screw, 30)` | Screw M2.5 cap x 30mm |
| 8 | `screw(M2p5_cap_screw, 35)` | Screw M2.5 cap x 35mm |
| 4 | `screw(M2p5_cap_screw, 40)` | Screw M2.5 cap x 40mm |
| 4 | `screw(M2p5_cap_screw, 35)` | Screw M2.5 cap x 35mm |
| 8 | `screw(M2p5_cap_screw, 40)` | Screw M2.5 cap x 40mm |
| 4 | `screw(M2p5_dome_screw, 25)` | Screw M2.5 dome x 25mm |
| 4 | `screw(M2p5_pan_screw, 20)` | Screw M2.5 pan x 20mm |
| 8 | `screw(M2p5_pan_screw, 30)` | Screw M2.5 pan x 30mm |
| 4 | `screw(M2p5_pan_screw, 30)` | Screw M2.5 pan x 30mm |
| 4 | `screw(M2p5_pan_screw, 35)` | Screw M2.5 pan x 35mm |
| 19 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
| 13 | `screw(M3_cap_screw, 20)` | Screw M3 cap x 20mm |
| 5 | `screw(M3_cap_screw, 25)` | Screw M3 cap x 25mm |
@@ -3067,24 +3069,25 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| Qty | Filename |
| ---:|:--- |
| 4 | pcb_spacer20100.stl |
| 4 | pcb_spacer20150.stl |
| 4 | pcb_spacer20160.stl |
| 4 | pcb_spacer2070.stl |
| 4 | pcb_spacer2080.stl |
| 4 | pcb_spacer2090.stl |
| 2 | pcb_spacer25110.stl |
| 4 | pcb_spacer25140.stl |
| 4 | pcb_spacer25180.stl |
| 4 | pcb_spacer25150.stl |
| 4 | pcb_spacer25190.stl |
| 4 | pcb_spacer25200_2.stl |
| 4 | pcb_spacer25200.stl |
| 4 | pcb_spacer25210_2.stl |
| 4 | pcb_spacer25250.stl |
| 4 | pcb_spacer25220_2.stl |
| 4 | pcb_spacer25260.stl |
| 4 | pcb_spacer25270.stl |
| 4 | pcb_spacer25280.stl |
| 4 | pcb_spacer2580.stl |
| 5 | pcb_spacer30130.stl |
| 4 | pcb_spacer30220.stl |
| 1 | pcb_spacer30130.stl |
| 4 | pcb_spacer30140.stl |
| 4 | pcb_spacer30230.stl |
| 3 | pcb_spacer30240.stl |
| 4 | pcb_spacer30240.stl |
| 3 | pcb_spacer30250.stl |
| 10 | pcb_spacer3050.stl |
| 9 | pcb_spacer3060.stl |
| 9 | pcb_spacer3070.stl |
@@ -6279,6 +6282,49 @@ inserts don't grip well in rubber.
| 1 | insert_foot_assembly |
<a href="#top">Top</a>
---
<a name="gridfinity"></a>
## Gridfinity
Generate storage bins compatible with Zack Freedman's Gridfinity design, see <https://www.youtube.com/watch?v=ra_9zU-mnl8&t=37s>
Based on <https://gridfinity.xyz/specification>
More examples [here](examples/Gridfinity).
[printed/gridfinity.scad](printed/gridfinity.scad) Implementation.
[tests/gridfinity.scad](tests/gridfinity.scad) Code for this example.
### Properties
| Function | Description |
|:--- |:--- |
| `gridfinity_bin_name(type)` | Name for the STL file |
| `gridfinity_bin_size(type)` | Size in grid units |
### Functions
| Function | Description |
|:--- |:--- |
| `gridfinity_base_z()` | height of base |
| `gridfinity_bin(name, grid_x, grid_y, grid_z)` | Constructor |
| `gridfinity_bin_size_mm(type)` | Overall size of the bin |
| `gridfinity_corner_r()` | Outside corner radius |
### Modules
| Module | Description |
|:--- |:--- |
| `gridfinity_bin(type)` | Create a gridfinity bin, bits to cut out are passed as a child |
| `gridfinity_partition(type, cols = 1, rows = 1, wall = 1.6, iwall = squeezed_wall, bwall = 1, corner_r = 4)` | Passed as child to hollow out specified partitions |
![gridfinity](tests/png/gridfinity.png)
### Printed
| Qty | Filename |
| ---:|:--- |
| 1 | chuck_stand.stl |
<a href="#top">Top</a>
---
@@ -7179,6 +7225,27 @@ The coordinates of the lowest point on the curve can be retrieved by calling `ca
![catenary](tests/png/catenary.png)
<a href="#top">Top</a>
---
<a name="chamfer"></a>
## Chamfer
45 degree chamfer the entrance to holes.
If the hole shape is concave then it must be described as a list of 2D convex children.
[utils/chamfer.scad](utils/chamfer.scad) Implementation.
[tests/chamfer.scad](tests/chamfer.scad) Code for this example.
### Modules
| Module | Description |
|:--- |:--- |
| `chamfer_hole(depth = 1)` | Chamfer a hole given a 2D outline as a child |
![chamfer](tests/png/chamfer.png)
<a href="#top">Top</a>
---

View File

@@ -22,7 +22,7 @@ use <../utils/layout.scad>
include <../vitamins/leds.scad>
module leds()
layout(echoit([for(l = LEDs) max(led_diameter(l))]), 5)
layout([for(l = LEDs) max(led_diameter(l))], 5)
led(LEDs[$i], ["green", "blue", "red", "orange"][$i % 4]);
if($preview)

37
tests/chamfer.scad Normal file
View File

@@ -0,0 +1,37 @@
//
// NopSCADlib Copyright Chris Palmer 2025
// 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 <../core.scad>
use <../utils/chamfer.scad>
module chamfer() {
difference() {
h = 1;
rounded_rectangle([20, 20, h], 2);
translate_z(h)
chamfer_hole(h + eps) {
circle(2);
translate([-1, 0])
square([2, 5]);
}
}
}
chamfer();

View File

@@ -161,7 +161,7 @@ module coreXY_motor_in_back_test2() {
lower_drive_pulley_offset = [20, 5];
coreXY(coreXY_GT2_20_16, size, pos, separation, x_gap = 0, plain_idler_offset = [20, 0], upper_drive_pulley_offset, lower_drive_pulley_offset, show_pulleys = true, left_lower = false, motor_back = true);
coreXY(coreXY_GT2_20_16, size, pos, separation, x_gap = 0, plain_idler_offset = [20, 0], upper_drive_pulley_offset = upper_drive_pulley_offset, lower_drive_pulley_offset = lower_drive_pulley_offset, show_pulleys = true, left_lower = false, motor_back = true);
translate (
[ size.x - separation.x/2 - lower_drive_pulley_offset.x

76
tests/gridfinity.scad Normal file
View File

@@ -0,0 +1,76 @@
//
// NopSCADlib Copyright Chris Palmer 2025
// 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 <../core.scad>
include <../printed/gridfinity.scad>
use <NopSCADlib/utils/chamfer.scad>
box = gridfinity_bin("chuck_stand", 2, 2, 5);
box_mm = gridfinity_bin_size_mm(box);
bwall = 1;
chuck_d = 80;
ring_od = 50;
ring_id = 40;
ring_h = 4;
hole_pitch = (60 + 72.5) / 2;
hole_d = (72.5 - 60) / 2;
hole_depth = 15;
clearance = 0.5;
chamfer = 1;
z_bot = gridfinity_base_z() + bwall;
module chuck_stand_stl()
gridfinity_bin(box) union() {
translate_z(z_bot) {
for(a = [0 : 30 : 330])
rotate(a)
translate([0, hole_pitch / 2]) {
poly_cylinder(hole_d / 2 + clearance / 2, h = 100);
translate_z(hole_depth)
chamfer_hole(chamfer)
poly_circle(hole_d / 2 + clearance / 2);
}
translate_z(hole_depth) {
poly_cylinder(r = chuck_d / 2 + clearance / 2, h = 100);
poly_tube(or = ring_od / 2 + clearance, ir = ring_id / 2 - clearance, h = 2 * ring_h, center = true);
chamfer_hole(chamfer)
poly_circle(ring_od / 2 + clearance);
}
}
translate_z(box_mm.z)
chamfer_hole(chamfer)
poly_circle(r = chuck_d / 2 + clearance / 2);
}
module gridfinity_test()
stl_colour(pp1_colour) chuck_stand_stl();
gridfinity_test();

BIN
tests/png/chamfer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 68 KiB

BIN
tests/png/gridfinity.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 KiB

After

Width:  |  Height:  |  Size: 234 KiB

38
utils/chamfer.scad Normal file
View File

@@ -0,0 +1,38 @@
//
// NopSCADlib Copyright Chris Palmer 2024
// 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/>.
//
//
//! 45 degree chamfer the entrance to holes.
//!
//! If the hole shape is concave then it must be described as a list of 2D convex children.
//
include <core/core.scad>
module chamfer_hole(depth = 1) { //! Chamfer a hole given a 2D outline as a child
for(i = [0 : $children - 1])
hull() {
linear_extrude(eps)
offset(depth)
children(i);
translate_z(-depth)
linear_extrude(eps)
children(i);
}
}

View File

@@ -272,13 +272,13 @@ module coreXY(type, size, pos, separation, x_gap = 0, plain_idler_offset = [0, 0
// lower belt
hflip(!left_lower)
explode(25)
coreXY_half(type, size, [size.x - pos.x - separation.x/2 - (left_lower ? x_gap : 0), pos.y], separation.y, x_gap, plain_idler_offset, [-lower_drive_pulley_offset.x, lower_drive_pulley_offset.y], show_pulleys, lower_belt = true, hflip = true, motor_back);
coreXY_half(type, size, [size.x - pos.x - separation.x/2 - (left_lower ? x_gap : 0), pos.y], separation.y, x_gap, plain_idler_offset, [-lower_drive_pulley_offset.x, lower_drive_pulley_offset.y], show_pulleys, lower_belt = true, hflip = true, motor_back = motor_back);
// upper belt
translate([separation.x, 0, separation.z])
hflip(left_lower)
explode(25)
coreXY_half(type, size, [pos.x + separation.x/2 + (left_lower ? x_gap : 0), pos.y], separation.y, x_gap, plain_idler_offset, upper_drive_pulley_offset, show_pulleys, lower_belt = false, hflip = false, motor_back);
coreXY_half(type, size, [pos.x + separation.x/2 + (left_lower ? x_gap : 0), pos.y], separation.y, x_gap, plain_idler_offset, upper_drive_pulley_offset, show_pulleys, lower_belt = false, hflip = false, motor_back = motor_back);
}
}

View File

@@ -17,6 +17,8 @@
// If not, see <https://www.gnu.org/licenses/>.
//
include <pcbs.scad>
HDMI5PCB = pcb("", "", [121.11, 77.93, 1.65], hole_d = 2.2, colour = "mediumblue",
holes = [[4.6, 4.9], [4.6, -3.73], [97.69, -3.73], [97.69, 4.9]],
components = [
@@ -186,6 +188,6 @@ BigTreeTech_TFT35v3_0 = ["BigTreeTech_TFT35v3_0", "BigTreeTech TFT35 v3.0",
];
displays = [HDMI5, SSD1963_4p3, LCD2004A, BigTreeTech_TFT35v3_0, LCD1602A, LCDS7282B, TFT128x160];
displays = [HDMI5, SSD1963_4p3, LCD2004A, BigTreeTech_TFT35v3_0, LCD1602A, LCD1602AI2C, LCDS7282B, TFT128x160];
use <display.scad>

View File

@@ -1313,11 +1313,11 @@ I2C_LCD_Backpack = let(size=[42, 19, 1.2])
grid = [2, size[1]-2, 16, 1, silver, inch(0.1), inch(0.9)]
);
tiny_pcbs = [ESP_201, ESP_01M, XIAO, ESP_12F, MP1584EN, ESP_01,tiny_buck, LIPO_fuel_gauge, 9DOF_stick, I2C_LCD_Backpack];
tiny_pcbs = [ESP_201, ESP_01M, XIAO, ESP_12F, MP1584EN, ESP_01,tiny_buck, LIPO_fuel_gauge, 9DOF_stick];
big_pcbs = [BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
pcbs = [KY_040, TP4056, L9110S, ZC_A0591, RCWL0516, MT3608,RAMPSEndstop, ArduinoNano, HW803_1WAY_RELAY, Feather405, RPI_Pico,
pcbs = [KY_040, TP4056, L9110S, ZC_A0591, RCWL0516, MT3608,RAMPSEndstop, ArduinoNano, I2C_LCD_Backpack, HW803_1WAY_RELAY, Feather405, RPI_Pico,
ESP32_DOIT_V1, BlackPill, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, OPZ2, PanelDue_v3, RPI3A, RPI3, RPI4];
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];