Compare commits
125 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
95c4359421 | ||
|
bcff26a27b | ||
|
07b00fabe0 | ||
|
8ed0f3c1af | ||
|
0e8e387d35 | ||
|
0c17620adb | ||
|
6470f1b004 | ||
|
29ba402530 | ||
|
aed4a699f2 | ||
|
10b846c0d5 | ||
|
2de479d691 | ||
|
054dab5025 | ||
|
b559319b03 | ||
|
a487ca0f20 | ||
|
a2ce3f1278 | ||
|
01eb6931d9 | ||
|
c09a74b4c9 | ||
|
aab7f3d683 | ||
|
ad719dad5a | ||
|
00690b61d2 | ||
|
1a24e0d87e | ||
|
171c9a6a34 | ||
|
8bb4b3881e | ||
|
79f8bc66e1 | ||
|
33c9d158ef | ||
|
d2874a0531 | ||
|
b6fd795a25 | ||
|
ad0882db40 | ||
|
8afb08aaa4 | ||
|
e87dffd92c | ||
|
c364bf06b2 | ||
|
1668f9c54c | ||
|
e0dd174010 | ||
|
f104bd42e5 | ||
|
8342ba87e9 | ||
|
0e58e92fbc | ||
|
1af2e18594 | ||
|
598527edbe | ||
|
9c666f8f47 | ||
|
bc1f135e40 | ||
|
ce36729e50 | ||
|
1dca024e64 | ||
|
c1833f0820 | ||
|
6a7f7dcbbf | ||
|
5d3f1115bb | ||
|
9f9adeb6ca | ||
|
f9b06c855c | ||
|
05bfe9b159 | ||
|
f961874ce3 | ||
|
7a6210f442 | ||
|
5bae0aaa51 | ||
|
8649d59e8a | ||
|
e9bc300b8d | ||
|
dcb1e74894 | ||
|
42b9479094 | ||
|
f46f35e909 | ||
|
0513b151b2 | ||
|
dcf258f11a | ||
|
4ff6c7d0a8 | ||
|
2edb6d4df2 | ||
|
26e8497018 | ||
|
bfde879ce2 | ||
|
4641e3a642 | ||
|
42cfed8846 | ||
|
8c339a18c4 | ||
|
065ec0a430 | ||
|
e7eea0520c | ||
|
5cb994b58b | ||
|
573425055a | ||
|
66a7a9bfe0 | ||
|
0335545334 | ||
|
fa91acbaad | ||
|
8bad05e721 | ||
|
9d6727d371 | ||
|
8902d83f0a | ||
|
e40b10f5a0 | ||
|
66a8d1d583 | ||
|
d066648a76 | ||
|
b8546414c0 | ||
|
581c2f8a96 | ||
|
e9ee88dfe9 | ||
|
b07a8ad245 | ||
|
ab17de3b0b | ||
|
0b8141844c | ||
|
7d0548b033 | ||
|
ad3e8d85af | ||
|
8435a350d0 | ||
|
3e5d4b1c8e | ||
|
20f830a008 | ||
|
10bd8ff354 | ||
|
4459cca3ea | ||
|
95bbebd42d | ||
|
cc84a5a536 | ||
|
28c795e9f4 | ||
|
9a0477d16b | ||
|
0583da2eb7 | ||
|
9a08fe9b5c | ||
|
8ab7993148 | ||
|
16dd8d6d17 | ||
|
08c268145e | ||
|
ba7e64233a | ||
|
7090c714ce | ||
|
c5038db6d9 | ||
|
654f094304 | ||
|
1e5e5860e1 | ||
|
a08216d0b8 | ||
|
3d8a9ec8aa | ||
|
7ec059142f | ||
|
7f0d96b824 | ||
|
9e826c1a09 | ||
|
2c1dbe04a9 | ||
|
d644d6b698 | ||
|
8db4cc2cb5 | ||
|
509a87939c | ||
|
40607e6cfc | ||
|
599fbba6c2 | ||
|
b7b5c837bd | ||
|
a793cb6d43 | ||
|
dc4e24b63a | ||
|
8f85ac73dc | ||
|
d1324a670e | ||
|
f5fdec613c | ||
|
c55b8b6d1c | ||
|
56ec8e03ad | ||
|
728b7adf38 |
@@ -26,7 +26,7 @@ OpenSCAD has to be setup to find libraries by setting the ```OPENSCADPATH``` env
|
||||
in the directory it points to. This can be done with ```git clone https://github.com/nophead/NopSCADlib.git``` while in that directory or, if you don't want to use GIT,
|
||||
by downloading https://github.com/nophead/NopSCADlib/archive/master.zip and unzipping it to a directory called NopSCADlib.
|
||||
|
||||
The ```NopSCADlib/scripts``` directory needs to be added to the executable search path.
|
||||
The ```NopSCADlib/scripts``` directory needs to be added to the executable search path, ```PATH``` on Windows and ```path``` on Linux and Mac.
|
||||
|
||||
The installation can be tested by opening ```NopSCADlib/libtest.scad``` in the OpenSCAD GUI. It should render all the objects in the library in about 1 minute.
|
||||
|
||||
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 137 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 179 KiB After Width: | Height: | Size: 187 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
@@ -30,7 +30,7 @@ Earth leakage can be measured Canadian CSA style by disconnected the neutral lin
|
||||
<a name="Parts_list"></a>
|
||||
## Parts list
|
||||
| <span style="writing-mode: vertical-rl; text-orientation: mixed;">Base</span> | <span style="writing-mode: vertical-rl; text-orientation: mixed;">Feet</span> | <span style="writing-mode: vertical-rl; text-orientation: mixed;">Mains In</span> | <span style="writing-mode: vertical-rl; text-orientation: mixed;">Main</span> | <span style="writing-mode: vertical-rl; text-orientation: mixed;">TOTALS</span> | |
|
||||
|--:|--:|--:|--:|--:|:--|
|
||||
|---:|---:|---:|---:|---:|:---|
|
||||
| | | | | | **Vitamins** |
|
||||
| . | . | . | 2 | 2 | 4mm shielded jack socket blue |
|
||||
| . | . | . | 1 | 1 | 4mm shielded jack socket brown |
|
||||
@@ -61,14 +61,14 @@ Earth leakage can be measured Canadian CSA style by disconnected the neutral lin
|
||||
## Base Assembly
|
||||
### Vitamins
|
||||
|Qty|Description|
|
||||
|--:|:----------|
|
||||
|---:|:----------|
|
||||
|2| Heatfit insert M3|
|
||||
|
||||
|
||||
### 3D Printed parts
|
||||
|
||||
| 1 x socket_box.stl |
|
||||
|--|
|
||||
|---|
|
||||
| 
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ Earth leakage can be measured Canadian CSA style by disconnected the neutral lin
|
||||
## Feet Assembly
|
||||
### Vitamins
|
||||
|Qty|Description|
|
||||
|--:|:----------|
|
||||
|---:|:----------|
|
||||
|4| Nut M3 x 2.4mm nyloc|
|
||||
|4| Screw M3 dome x 10mm|
|
||||
|8| Washer M3 x 7mm x 0.5mm|
|
||||
@@ -97,7 +97,7 @@ Earth leakage can be measured Canadian CSA style by disconnected the neutral lin
|
||||
### 3D Printed parts
|
||||
|
||||
| 4 x foot.stl |
|
||||
|--|
|
||||
|---|
|
||||
| 
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ Earth leakage can be measured Canadian CSA style by disconnected the neutral lin
|
||||
### Sub-assemblies
|
||||
|
||||
| 1 x base_assembly |
|
||||
|--|
|
||||
|---|
|
||||
| 
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ Earth leakage can be measured Canadian CSA style by disconnected the neutral lin
|
||||
## Mains In Assembly
|
||||
### Vitamins
|
||||
|Qty|Description|
|
||||
|--:|:----------|
|
||||
|---:|:----------|
|
||||
|3| Heatshrink sleeving ID 3.2mm x 15mm - not shown|
|
||||
|1| IEC inlet for ATX|
|
||||
|2| Nut M3 x 2.4mm nyloc|
|
||||
@@ -138,7 +138,7 @@ Earth leakage can be measured Canadian CSA style by disconnected the neutral lin
|
||||
### Sub-assemblies
|
||||
|
||||
| 1 x feet_assembly |
|
||||
|--|
|
||||
|---|
|
||||
| 
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ Earth leakage can be measured Canadian CSA style by disconnected the neutral lin
|
||||
## Main Assembly
|
||||
### Vitamins
|
||||
|Qty|Description|
|
||||
|--:|:----------|
|
||||
|---:|:----------|
|
||||
|2| 4mm shielded jack socket blue|
|
||||
|1| 4mm shielded jack socket brown|
|
||||
|2| 4mm shielded jack socket green|
|
||||
@@ -178,7 +178,7 @@ Earth leakage can be measured Canadian CSA style by disconnected the neutral lin
|
||||
### Sub-assemblies
|
||||
|
||||
| 1 x mains_in_assembly |
|
||||
|--|
|
||||
|---|
|
||||
| 
|
||||
|
||||
|
||||
|
@@ -60,7 +60,8 @@ grey60 = [0.6, 0.6, 0.6];
|
||||
grey70 = [0.7, 0.7, 0.7];
|
||||
grey80 = [0.8, 0.8, 0.8];
|
||||
grey90 = [0.9, 0.9, 0.9];
|
||||
brass = [255/255, 215/255, 0/255];
|
||||
gold = [255/255, 215/255, 0/255];
|
||||
brass = [255/255, 220/255, 100/255];
|
||||
silver = [0.75, 0.75, 0.75];
|
||||
|
||||
/*
|
||||
|
9
lib.scad
@@ -22,7 +22,7 @@
|
||||
//
|
||||
include <core.scad>
|
||||
|
||||
include <vitamins/fans.scad>
|
||||
include <vitamins/psus.scad>
|
||||
include <vitamins/inserts.scad>
|
||||
include <vitamins/ring_terminals.scad>
|
||||
include <vitamins/rails.scad>
|
||||
@@ -34,14 +34,11 @@ include <vitamins/components.scad>
|
||||
include <vitamins/hot_ends.scad>
|
||||
include <vitamins/tubings.scad>
|
||||
include <vitamins/zipties.scad>
|
||||
include <vitamins/linear_bearings.scad>
|
||||
include <vitamins/scs_bearing_blocks.scad>
|
||||
include <vitamins/rod.scad>
|
||||
include <vitamins/leadnuts.scad>
|
||||
include <vitamins/bulldogs.scad>
|
||||
include <vitamins/pillars.scad>
|
||||
include <vitamins/psus.scad>
|
||||
include <vitamins/iecs.scad>
|
||||
include <vitamins/rockers.scad>
|
||||
include <vitamins/ssrs.scad>
|
||||
include <vitamins/d_connectors.scad>
|
||||
include <vitamins/buttons.scad>
|
||||
@@ -55,7 +52,6 @@ include <vitamins/transformers.scad>
|
||||
include <vitamins/variacs.scad>
|
||||
include <vitamins/springs.scad>
|
||||
include <vitamins/batteries.scad>
|
||||
include <vitamins/microswitches.scad>
|
||||
include <vitamins/ball_bearings.scad>
|
||||
include <vitamins/light_strips.scad>
|
||||
include <vitamins/spools.scad>
|
||||
@@ -63,6 +59,7 @@ include <vitamins/mains_sockets.scad>
|
||||
include <vitamins/ldrs.scad>
|
||||
include <vitamins/geared_steppers.scad>
|
||||
include <vitamins/extrusions.scad>
|
||||
include <vitamins/sk_brackets.scad>
|
||||
|
||||
use <vitamins/jack.scad>
|
||||
use <vitamins/meter.scad>
|
||||
|
BIN
libtest.png
Before Width: | Height: | Size: 759 KiB After Width: | Height: | Size: 782 KiB |
57
libtest.scad
@@ -33,6 +33,7 @@ use <tests/components.scad>
|
||||
use <tests/d_connectors.scad>
|
||||
use <tests/displays.scad>
|
||||
use <tests/extrusions.scad>
|
||||
use <tests/extrusion_brackets.scad>
|
||||
use <tests/fans.scad>
|
||||
use <tests/fuseholder.scad>
|
||||
use <tests/geared_steppers.scad>
|
||||
@@ -40,6 +41,7 @@ use <tests/hot_ends.scad>
|
||||
use <tests/iecs.scad>
|
||||
use <tests/inserts.scad>
|
||||
use <tests/jack.scad>
|
||||
use <tests/kp_pillow_blocks.scad>
|
||||
use <tests/leadnuts.scad>
|
||||
use <tests/leds.scad>
|
||||
use <tests/ldrs.scad>
|
||||
@@ -60,8 +62,10 @@ use <tests/ring_terminals.scad>
|
||||
use <tests/rockers.scad>
|
||||
use <tests/rod.scad>
|
||||
use <tests/screws.scad>
|
||||
use <tests/scs_bearing_blocks.scad>
|
||||
use <tests/sealing_strip.scad>
|
||||
use <tests/sheets.scad>
|
||||
use <tests/sk_brackets.scad>
|
||||
use <tests/spades.scad>
|
||||
use <tests/springs.scad>
|
||||
use <tests/ssrs.scad>
|
||||
@@ -94,7 +98,13 @@ use <tests/psu_shroud.scad>
|
||||
use <tests/flat_hinge.scad>
|
||||
use <tests/pcb_mount.scad>
|
||||
|
||||
x5 = 800;
|
||||
x0 = 0;
|
||||
x1 = x0 + 100;
|
||||
x2 = x1 + 90;
|
||||
x3 = x2 + 130;
|
||||
x4 = x3 + 200;
|
||||
x5 = 850;
|
||||
x6 = x5 + 150;
|
||||
|
||||
cable_grommets_y = 0;
|
||||
|
||||
@@ -133,13 +143,12 @@ translate([x5 + 60, cable_grommets_y + 200])
|
||||
translate([x5, cable_grommets_y + 250])
|
||||
handle();
|
||||
|
||||
translate([900, 600])
|
||||
translate([950, 600])
|
||||
box_test();
|
||||
|
||||
translate([850, 1260])
|
||||
bbox_test();
|
||||
|
||||
x0 = 0;
|
||||
inserts_y = 0;
|
||||
nuts_y = inserts_y + 20;
|
||||
washers_y = nuts_y + 100;
|
||||
@@ -204,10 +213,6 @@ translate([x0, linear_bearings_y]) {
|
||||
rods();
|
||||
}
|
||||
|
||||
translate([x0+150, linear_bearings_y+30]) {
|
||||
extrusions();
|
||||
}
|
||||
|
||||
translate([x0 + 10, hot_ends_y])
|
||||
hot_ends();
|
||||
|
||||
@@ -236,7 +241,6 @@ translate([x0, psus_y]) {
|
||||
psu_shrouds();
|
||||
}
|
||||
|
||||
x1 = x0 + 100;
|
||||
zipties_y = 0;
|
||||
bulldogs_y = zipties_y + 40;
|
||||
|
||||
@@ -246,7 +250,6 @@ translate([x1, zipties_y])
|
||||
translate([x1, bulldogs_y])
|
||||
bulldogs();
|
||||
|
||||
x2 = x1 + 90;
|
||||
leds_y = 0;
|
||||
carriers_y = leds_y + 40;
|
||||
spades_y = carriers_y + 40;
|
||||
@@ -254,7 +257,7 @@ buttons_y = spades_y + 40;
|
||||
jacks_y = buttons_y + 40;
|
||||
microswitches_y = jacks_y + 40;
|
||||
rockers_y = microswitches_y + 40;
|
||||
toggles_y = rockers_y + 40;
|
||||
toggles_y = rockers_y + 60;
|
||||
components_y = toggles_y + 40;
|
||||
|
||||
translate([x2, leds_y])
|
||||
@@ -293,8 +296,6 @@ translate([x2, toggles_y])
|
||||
translate([x2, components_y])
|
||||
components();
|
||||
|
||||
|
||||
x3 = x2 + 150;
|
||||
veroboard_y = 0;
|
||||
d_connectors_y = veroboard_y + 110;
|
||||
iecs_y = d_connectors_y + 80;
|
||||
@@ -303,6 +304,7 @@ ssrs_y = modules_y + 80;
|
||||
blowers_y = ssrs_y + 60;
|
||||
batteries_y = blowers_y + 100;
|
||||
steppers_y = batteries_y + 70;
|
||||
extrusions_y = steppers_y + 100;
|
||||
|
||||
translate([x3, veroboard_y])
|
||||
veroboard_test();
|
||||
@@ -343,16 +345,22 @@ translate([x3, batteries_y])
|
||||
translate([x2, steppers_y]) // interloper
|
||||
stepper_motors();
|
||||
|
||||
translate([x2, extrusions_y]) {
|
||||
extrusions();
|
||||
}
|
||||
|
||||
translate([x3, transformers_y])
|
||||
transformers();
|
||||
|
||||
|
||||
x4 = x3 + 220;
|
||||
belts_y = 0;
|
||||
rails_y = belts_y + 200;
|
||||
cable_strips_y = rails_y + 300;
|
||||
extrusion_brackets_y = rails_y + 250;
|
||||
sk_brackets_y = extrusion_brackets_y + 80;
|
||||
kp_pillow_blocks_y = sk_brackets_y + 50;
|
||||
scs_bearing_blocks_y = kp_pillow_blocks_y + 60;
|
||||
|
||||
translate([x4 + 112, belts_y + 58]) {
|
||||
translate([x4 + 130, belts_y + 58]) {
|
||||
belt_test();
|
||||
|
||||
translate([0, 60])
|
||||
@@ -362,9 +370,22 @@ translate([x4 + 112, belts_y + 58]) {
|
||||
translate([x4, rails_y + 130])
|
||||
rails();
|
||||
|
||||
translate([x4, cable_strips_y])
|
||||
cable_strips();
|
||||
translate([780, 0])
|
||||
rotate(90)
|
||||
cable_strips();
|
||||
|
||||
translate([x4, kp_pillow_blocks_y])
|
||||
kp_pillow_blocks();
|
||||
|
||||
translate([x4, sk_brackets_y])
|
||||
sk_brackets();
|
||||
|
||||
translate([x4, extrusion_brackets_y])
|
||||
extrusion_brackets();
|
||||
|
||||
translate([x4, scs_bearing_blocks_y])
|
||||
scs_bearing_blocks();
|
||||
|
||||
|
||||
x6 = x5 + 150;
|
||||
translate([x6, 125])
|
||||
light_strips();
|
||||
|
@@ -35,8 +35,7 @@ include <../core.scad>
|
||||
use <../vitamins/sheet.scad>
|
||||
use <../vitamins/screw.scad>
|
||||
use <../vitamins/washer.scad>
|
||||
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <../utils/quadrant.scad>
|
||||
|
||||
bezel_clearance = 0.2;
|
||||
|
@@ -32,7 +32,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <../utils/rounded_cylinder.scad>
|
||||
use <../utils/maths.scad>
|
||||
|
||||
|
@@ -32,7 +32,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <../utils/maths.scad>
|
||||
|
||||
def_screw = M3_cap_screw;
|
||||
|
@@ -23,7 +23,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
foot = [25, 12, 3, 2, M4_cap_screw, 10];
|
||||
insert_foot = [20, 10, 0, 2, M3_cap_screw, 10];
|
||||
|
@@ -22,7 +22,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
dia = 18;
|
||||
length = 90; // inside length
|
||||
|
@@ -23,7 +23,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
use <../vitamins/wire.scad>
|
||||
use <../vitamins/psu.scad>
|
||||
|
@@ -22,7 +22,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <../vitamins/cable_strip.scad>
|
||||
|
||||
wall = 2;
|
||||
|
@@ -23,7 +23,7 @@
|
||||
include <../core.scad>
|
||||
include <../vitamins/mains_sockets.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
include <../vitamins/ring_terminals.scad>
|
||||
|
||||
box_height = 19;
|
||||
|
@@ -23,7 +23,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
use <../vitamins/wire.scad>
|
||||
use <../vitamins/ssr.scad>
|
||||
|
@@ -23,7 +23,7 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
strap = [18, 2, M3_pan_screw, 3, 25];
|
||||
function strap() = strap;
|
||||
|
484
readme.md
@@ -21,32 +21,34 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
|
||||
<tr><td> <a href = "#Ball_bearings">Ball_bearings</a> </td><td> <a href = "#Nuts">Nuts</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 = "#Batteries">Batteries</a> </td><td> <a href = "#O_ring">O_ring</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 = "#Belts">Belts</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Cable_grommets">Cable_grommets</a> </td><td> <a href = "#Dogbones">Dogbones</a> </td><td> <a href = "#Global">Global</a> </td></tr>
|
||||
<tr><td> <a href = "#Blowers">Blowers</a> </td><td> <a href = "#Pcbs">Pcbs</a> </td><td> <a href = "#Carriers">Carriers</a> </td><td> <a href = "#Fillet">Fillet</a> </td><td> <a href = "#Polyholes">Polyholes</a> </td></tr>
|
||||
<tr><td> <a href = "#Bulldogs">Bulldogs</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Corner_block">Corner_block</a> </td><td> <a href = "#Hanging_hole">Hanging_hole</a> </td><td> <a href = "#Rounded_rectangle">Rounded_rectangle</a> </td></tr>
|
||||
<tr><td> <a href = "#Buttons">Buttons</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Door_hinge">Door_hinge</a> </td><td> <a href = "#Layout">Layout</a> </td><td> <a href = "#Sphere">Sphere</a> </td></tr>
|
||||
<tr><td> <a href = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Psus">Psus</a> </td><td> <a href = "#Door_latch">Door_latch</a> </td><td> <a href = "#Maths">Maths</a> </td><td> <a href = "#Teardrops">Teardrops</a> </td></tr>
|
||||
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Fan_guard">Fan_guard</a> </td><td> <a href = "#Offset">Offset</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Rails">Rails</a> </td><td> <a href = "#Fixing_block">Fixing_block</a> </td><td> <a href = "#Quadrant">Quadrant</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 = "#Extrusions">Extrusions</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 = "#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 = "#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 = "#Geared_steppers">Geared_steppers</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 = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Spades">Spades</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 = "#Hygrometer">Hygrometer</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 = "#Iecs">Iecs</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 = "#Inserts">Inserts</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 = "#Jack">Jack</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 = "#Toggles">Toggles</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Leadnuts">Leadnuts</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 = "#Tubings">Tubings</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Linear_bearings">Linear_bearings</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Mains_sockets">Mains_sockets</a> </td><td> <a href = "#Washers">Washers</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Meter">Meter</a> </td><td> <a href = "#Wire">Wire</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Microview">Microview</a> </td><td></td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Blowers">Blowers</a> </td><td> <a href = "#Pcb">Pcb</a> </td><td> <a href = "#Carriers">Carriers</a> </td><td> <a href = "#Fillet">Fillet</a> </td><td> <a href = "#Polyholes">Polyholes</a> </td></tr>
|
||||
<tr><td> <a href = "#Bulldogs">Bulldogs</a> </td><td> <a href = "#Pcbs">Pcbs</a> </td><td> <a href = "#Corner_block">Corner_block</a> </td><td> <a href = "#Hanging_hole">Hanging_hole</a> </td><td> <a href = "#Rounded_rectangle">Rounded_rectangle</a> </td></tr>
|
||||
<tr><td> <a href = "#Buttons">Buttons</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Door_hinge">Door_hinge</a> </td><td> <a href = "#Layout">Layout</a> </td><td> <a href = "#Sphere">Sphere</a> </td></tr>
|
||||
<tr><td> <a href = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Door_latch">Door_latch</a> </td><td> <a href = "#Maths">Maths</a> </td><td> <a href = "#Teardrops">Teardrops</a> </td></tr>
|
||||
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Psus">Psus</a> </td><td> <a href = "#Fan_guard">Fan_guard</a> </td><td> <a href = "#Offset">Offset</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Fixing_block">Fixing_block</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#Rails">Rails</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 = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#Ring_terminals">Ring_terminals</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 = "#Extrusions">Extrusions</a> </td><td> <a href = "#Rockers">Rockers</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 = "#Fans">Fans</a> </td><td> <a href = "#Rod">Rod</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 = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Screws">Screws</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 = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Scs_bearing_blocks">Scs_bearing_blocks</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Thread">Thread</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 = "#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 = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Sk_brackets">Sk_brackets</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 = "#Spades">Spades</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 = "#Spools">Spools</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Springs">Springs</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Kp_pillow_blocks">Kp_pillow_blocks</a> </td><td> <a href = "#Ssrs">Ssrs</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 = "#Leds">Leds</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Linear_bearings">Linear_bearings</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Mains_sockets">Mains_sockets</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Meter">Meter</a> </td><td> <a href = "#Washers">Washers</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Wire">Wire</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Modules">Modules</a> </td><td></td><td></td><td></td><td></td></tr>
|
||||
</table>
|
||||
|
||||
@@ -93,8 +95,10 @@ Also single bearing balls are modelled as just a silver sphere and a BOM entry.
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```ball_bearing(BB608)``` | Ball bearing 608-2RS 8mm x 22mm x 7mm |
|
||||
| 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 |
|
||||
| 2 | ``` bearing_ball(3)``` | Steel ball 3mm |
|
||||
| 4 | ``` bearing_ball(3)``` | Steel ball 3mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -196,7 +200,7 @@ Individual teeth are not drawn, instead they are represented by a lighter colour
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```belt(type, points, gap = 0, gap_pt = undef)``` | Draw a belt path given a set of points and pitch radii where the pulleys are. Closed loop unless a gap is specified |
|
||||
| ```belt(type, points, gap = 0, gap_pt = undef, belt_colour = grey20, tooth_colour = grey50)``` | Draw a belt path given a set of points and pitch radii where the pulleys are. Closed loop unless a gap is specified |
|
||||
|
||||

|
||||
|
||||
@@ -213,7 +217,7 @@ Individual teeth are not drawn, instead they are represented by a lighter colour
|
||||
| 2 | ```pulley(GT2x16_plain_idler)``` | Pulley GT2 idler smooth 9.63mm |
|
||||
| 2 | ```pulley(GT2x20ob_pulley)``` | Pulley GT2OB 20 teeth |
|
||||
| 1 | ```screw(M3_cs_cap_screw, 20)``` | Screw M3 cs cap x 20mm |
|
||||
| 4 | ```screw(M3_grub_screw, 6)``` | Screw M3 grub x 6mm |
|
||||
| 4 | ```screw(M3_grub_screw, 6)``` | Screw M3 grub x 6mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -586,6 +590,54 @@ LCD dispays.
|
||||
| 1 | ```display(SSD1963_4p3)``` | LCD display SSD1963 4.3" |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Extrusion_brackets"></a>
|
||||
## Extrusion_brackets
|
||||
Brackets for joining extrusions at a corner.
|
||||
|
||||
|
||||
[vitamins/extrusion_brackets.scad](vitamins/extrusion_brackets.scad) Object definitions.
|
||||
|
||||
[vitamins/extrusion_bracket.scad](vitamins/extrusion_bracket.scad) Implementation.
|
||||
|
||||
[tests/extrusion_brackets.scad](tests/extrusion_brackets.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```extrusion_corner_bracket_base_thickness(type)``` | Thickness of base of bracket |
|
||||
| ```extrusion_corner_bracket_hole_offset(type)``` | Hole offset from corner |
|
||||
| ```extrusion_corner_bracket_side_thickness(type)``` | Thickness of side of bracket |
|
||||
| ```extrusion_corner_bracket_size(type)``` | Size of bracket |
|
||||
| ```extrusion_inner_corner_bracket_size(type)``` | Size of inner bracket |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```extrusion_corner_bracket(type)``` | Corner bracket for extrusion |
|
||||
| ```extrusion_corner_bracket_assembly(type, part_thickness = 2, screw_type = M4_cap_screw, nut_type = M4_sliding_t_nut, max_screw_depth = 6)``` | Assembly with fasteners in place |
|
||||
| ```extrusion_corner_bracket_hole_positions(type)``` | Place children at hole positions |
|
||||
| ```extrusion_inner_corner_bracket(type, grub_screws = true)``` | Inner corner bracket for extrusion |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```extrusion(E2020, 20)``` | Extrusion E2020 x 20mm |
|
||||
| 1 | ```extrusion(E2020, 30)``` | Extrusion E2020 x 30mm |
|
||||
| 1 | ```extrusion(E2020, 40)``` | Extrusion E2020 x 40mm |
|
||||
| 1 | ```extrusion(E2020, 50)``` | Extrusion E2020 x 50mm |
|
||||
| 2 | ```extrusion_corner_bracket(E20_corner_bracket)``` | Extrusion corner bracket 20 |
|
||||
| 2 | ```extrusion_inner_corner_bracket(E20_inner_corner_bracket, true)``` | Extrusion inner corner bracket 4.5 |
|
||||
| 1 | ```extrusion_inner_corner_bracket(E20_inner_corner_bracket, false)``` | Extrusion inner corner bracket 4.5 |
|
||||
| 4 | ```sliding_t_nut(M4_sliding_t_nut)``` | Nut M4 sliding T |
|
||||
| 4 | ```screw(M4_cap_screw, 8)``` | Screw M4 cap x 8mm |
|
||||
| 4 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -617,7 +669,7 @@ Aluminium extrusion.
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```extrusion(type, length, cornerHole = false)``` | Draw the specified extrusion |
|
||||
| ```extrusion(type, length, center = true, cornerHole = false)``` | Draw the specified extrusion |
|
||||
|
||||

|
||||
|
||||
@@ -823,7 +875,7 @@ Parametric green terminal blocks
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```green_terminal(type, ways, skip = [])``` | Draw green terminal blocks, skip can be used to remove pins. |
|
||||
| ```green_terminal(type, ways, skip = [], colour = "lime")``` | Draw green terminal blocks, skip can be used to remove pins. |
|
||||
| ```terminal_254(ways, skip = [])``` | Draw 0.1" terminal block |
|
||||
|
||||

|
||||
@@ -1087,6 +1139,59 @@ E.g. a "brown" socket for mains live needs to be displayed as "sienna" to look r
|
||||
| 1 | ```jack_4mm_shielded("brown", 3, "sienna")``` | 4mm shielded jack socket brown |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Kp_pillow_blocks"></a>
|
||||
## Kp_pillow_blocks
|
||||
KP pillow block bearings
|
||||
|
||||
|
||||
[vitamins/kp_pillow_blocks.scad](vitamins/kp_pillow_blocks.scad) Object definitions.
|
||||
|
||||
[vitamins/kp_pillow_block.scad](vitamins/kp_pillow_block.scad) Implementation.
|
||||
|
||||
[tests/kp_pillow_blocks.scad](tests/kp_pillow_blocks.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```kp_base_height(type)``` | Height of base containing the bolts |
|
||||
| ```kp_diameter(type)``` | Rod hole diameter |
|
||||
| ```kp_hole_offset(type)``` | Rod hole offset |
|
||||
| ```kp_screw_separation(type)``` | Separation of bolts in the base |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```kp_size(type)``` | Size of bracket |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```kp_pillow_block(type)``` | Draw the KP pillow block |
|
||||
| ```kp_pillow_block_assembly(type, part_thickness = 2, screw_type = M5_cap_screw, nut_type = undef)``` | Assembly with fasteners in place |
|
||||
| ```kp_pillow_block_hole_positions(type)``` | Place children at hole positions |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```kp_pillow_block(KP000)``` | KP000 pillow block |
|
||||
| 1 | ```kp_pillow_block(KP001)``` | KP001 pillow block |
|
||||
| 1 | ```kp_pillow_block(KP08_15)``` | KP08_15 pillow block |
|
||||
| 1 | ```kp_pillow_block(KP08_18)``` | KP08_18 pillow block |
|
||||
| 2 | ```sliding_t_nut(M4_hammer_nut)``` | Nut M4 hammer |
|
||||
| 2 | ```sliding_t_nut(M4_sliding_t_nut)``` | Nut M4 sliding T |
|
||||
| 2 | ```sliding_t_nut(M5_sliding_t_nut)``` | Nut M5 sliding T |
|
||||
| 2 | ```nut(M5_nut, nyloc = undef)``` | Nut M5 x 4mm |
|
||||
| 4 | ```screw(M4_cap_screw, 10)``` | Screw M4 cap x 10mm |
|
||||
| 4 | ```screw(M5_cap_screw, 12)``` | Screw M5 cap x 12mm |
|
||||
| 4 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
||||
| 6 | ```washer(M5_washer)``` | Washer M5 x 10mm x 1mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -1623,12 +1728,12 @@ If a nut is given a child then it gets placed on its top surface.
|
||||
| 1 | ```nut(M2p5_nut)``` | Nut M2.5 x 2.2mm |
|
||||
| 1 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc |
|
||||
| 1 | ```nut(M2p5_nut, nylon = true)``` | Nut M2.5 x 2.2mm nylon |
|
||||
| 1 | ```hammer_nut(M3_hammer_nut)``` | Nut M3 hammer |
|
||||
| 1 | ```sliding_t_nut(M3_hammer_nut)``` | Nut M3 hammer |
|
||||
| 1 | ```sliding_t_nut(M3_sliding_t_nut)``` | Nut M3 sliding T |
|
||||
| 1 | ```nut(M3_nut)``` | Nut M3 x 2.4mm |
|
||||
| 1 | ```nut(M3_nut, brass = true)``` | Nut M3 x 2.4mm brass |
|
||||
| 1 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
|
||||
| 1 | ```hammer_nut(M4_hammer_nut)``` | Nut M4 hammer |
|
||||
| 1 | ```sliding_t_nut(M4_hammer_nut)``` | Nut M4 hammer |
|
||||
| 1 | ```sliding_t_nut(M4_sliding_t_nut)``` | Nut M4 sliding T |
|
||||
| 1 | ```nut(M4_nut)``` | Nut M4 x 3.2mm |
|
||||
| 1 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc |
|
||||
@@ -1709,6 +1814,88 @@ A permanent magnet that can be magnatized and de-magnatized electronically.
|
||||
| 1 | ```opengrab()``` | OpenGrab V3 electro permanent magnet |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Pcb"></a>
|
||||
## Pcb
|
||||
PCBs and perfboard with optional components. The shape can be a rectangle with optionally rounded corners or a polygon for odd shapes like Arduino.
|
||||
|
||||
|
||||
[vitamins/pcb.scad](vitamins/pcb.scad) Implementation.
|
||||
|
||||
[tests/pcb.scad](tests/pcb.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```hdmi_depth(type)``` | Front to back depth |
|
||||
| ```hdmi_height(type)``` | Outside height above the PCB |
|
||||
| ```hdmi_height1(type)``` | Inside height at the sides |
|
||||
| ```hdmi_height2(type)``` | Inside height in the middle |
|
||||
| ```hdmi_thickness(type)``` | Wall thickness of the metal |
|
||||
| ```hdmi_width1(type)``` | Inside width at the top |
|
||||
| ```hdmi_width2(type)``` | Inside width at the bottom |
|
||||
| ```pcb_accessories(type)``` | List of accessories to go on the BOM, SD cards, USB cables, etc. |
|
||||
| ```pcb_colour(type)``` | Colour of the subtrate |
|
||||
| ```pcb_components(type)``` | List of components |
|
||||
| ```pcb_grid(type)``` | Grid if a perfboard |
|
||||
| ```pcb_hole_d(type)``` | Mounting hole diameter |
|
||||
| ```pcb_holes(type)``` | List of hole positions |
|
||||
| ```pcb_land_d(type)``` | Pad around mounting hole |
|
||||
| ```pcb_length(type)``` | Length |
|
||||
| ```pcb_name(type)``` | Description |
|
||||
| ```pcb_parts_on_bom(type)``` | True if the parts should be separate BOM items |
|
||||
| ```pcb_polygon(type)``` | Optional outline polygon for odd shaped boards |
|
||||
| ```pcb_radius(type)``` | Corner radius |
|
||||
| ```pcb_thickness(type)``` | Thickness |
|
||||
| ```pcb_width(type)``` | Width |
|
||||
|
||||
### Functions
|
||||
| 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_grid_pos(type, x, y, z = 0)``` | Returns a pcb grid position |
|
||||
| ```pcb_screw(type, cap = hs_cap)``` | Mounting screw type |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```barrel_jack(cutout = false)``` | Draw barrel power jack |
|
||||
| ```buzzer(height, diameter, colour)``` | Draw PCB buzzer with specified height, diameter and color |
|
||||
| ```chip(length, width, thickness, colour, cutout = false)``` | Draw a coloured cube to represent a chip, or other rectangular component |
|
||||
| ```flat_flex(cutout = false)``` | Draw flat flexistrip connector as used on RPI0 |
|
||||
| ```flex(cutout = false)``` | Draw flexistrip connector |
|
||||
| ```hdmi(type, cutout = false)``` | Draw HDMI socket |
|
||||
| ```jack(cutout = false)``` | Draw 3.5mm jack |
|
||||
| ```molex_254(ways)``` | Draw molex header |
|
||||
| ```pcb(type)``` | Draw specified PCB |
|
||||
| ```pcb_assembly(type, height, thickness)``` | Draw PCB assembly with spaces and fasteners in place |
|
||||
| ```pcb_base(type, height, thickness, wall = 2)``` | Generate STL for a base with PCB spacers |
|
||||
| ```pcb_component(comp, cutouts = false, angle = undef)``` | Draw pcb component from description |
|
||||
| ```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_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 position |
|
||||
| ```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 |
|
||||
| ```rj45(cutout = false)``` | Draw RJ45 Ethernet connector |
|
||||
| ```terminal_35(ways, colour = "blue")``` | Draw 3.5mm terminal block |
|
||||
| ```uSD(size, cutout = false)``` | Draw uSD socket |
|
||||
| ```usb_Ax1(cutout = false)``` | Draw USB type A single socket |
|
||||
| ```usb_Ax2(cutout = false)``` | Draw USB type A dual socket |
|
||||
| ```usb_B(cutout = false)``` | Draw USB B connector |
|
||||
| ```usb_uA(cutout = false)``` | Draw USB micro A connector |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```pcb(TestPCB)``` | Test PCB |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -1760,6 +1947,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```barrel_jack(cutout = false)``` | Draw barrel power jack |
|
||||
| ```buzzer(height, diameter, colour)``` | Draw PCB buzzer with specified height, diameter and color |
|
||||
| ```chip(length, width, thickness, colour, cutout = false)``` | Draw a coloured cube to represent a chip, or other rectangular component |
|
||||
| ```flat_flex(cutout = false)``` | Draw flat flexistrip connector as used on RPI0 |
|
||||
| ```flex(cutout = false)``` | Draw flexistrip connector |
|
||||
@@ -1777,8 +1965,9 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| ```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 |
|
||||
| ```rj45(cutout = false)``` | Draw RJ45 Ethernet connector |
|
||||
| ```terminal_35(ways)``` | Draw 3.5mm terminal block |
|
||||
| ```terminal_35(ways, colour = "blue")``` | Draw 3.5mm terminal block |
|
||||
| ```uSD(size, cutout = false)``` | Draw uSD socket |
|
||||
| ```usb_Ax1(cutout = false)``` | Draw USB type A single socket |
|
||||
| ```usb_Ax2(cutout = false)``` | Draw USB type A dual socket |
|
||||
| ```usb_B(cutout = false)``` | Draw USB B connector |
|
||||
| ```usb_uA(cutout = false)``` | Draw USB micro A connector |
|
||||
@@ -1803,7 +1992,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(3)``` | Molex KK header 3 way |
|
||||
| 16 | ```nut(M2_nut, nyloc = true)``` | Nut M2 x 1.6mm nyloc |
|
||||
| 28 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc |
|
||||
| 32 | ```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(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc |
|
||||
| 1 | ```pcb(PI_IO)``` | PI_IO V2 |
|
||||
@@ -1814,23 +2003,23 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | ```pcb(PERF74x51)``` | Perfboard 74 x 51mm |
|
||||
| 1 | ```pcb(PERF80x20)``` | Perfboard 80 x 20mm |
|
||||
| 1 | ```pin_socket(2p54header, 13, 2, right_angle = true)``` | Pin socket 13 x 2 right_angle |
|
||||
| 1 | ```pcb(RAMPSEndstop)``` | RAMPS Endstop Switch |
|
||||
| 1 | ```pcb(RPI3)``` | Raspberry Pi 3 |
|
||||
| 1 | ```pcb(RPI0)``` | Raspberry Pi Zero |
|
||||
| 16 | ```screw(M2_cap_screw, 25)``` | Screw M2 cap x 25mm |
|
||||
| 4 | ```screw(M2p5_cap_screw, 16)``` | Screw M2.5 cap x 16mm |
|
||||
| 8 | ```screw(M2p5_cap_screw, 20)``` | Screw M2.5 cap 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 |
|
||||
| 12 | ```screw(M2p5_cap_screw, 20)``` | Screw M2.5 cap x 20mm |
|
||||
| 4 | ```screw(M2p5_pan_screw, 20)``` | Screw M2.5 pan x 20mm |
|
||||
| 8 | ```screw(M2p5_pan_screw, 25)``` | Screw M2.5 pan x 25mm |
|
||||
| 4 | ```screw(M2p5_pan_screw, 35)``` | Screw M2.5 pan x 35mm |
|
||||
| 8 | ```screw(M3_cap_screw, 30)``` | Screw M3 cap x 30mm |
|
||||
| 4 | ```screw(M3_cap_screw, 35)``` | Screw M3 cap x 35mm |
|
||||
| 4 | ```screw(M4_cap_screw, 30)``` | Screw M4 cap x 30mm |
|
||||
| 8 | ```screw(M4_cap_screw, 35)``` | Screw M4 cap x 35mm |
|
||||
| 12 | ```screw(M4_cap_screw, 35)``` | Screw M4 cap x 35mm |
|
||||
| 3 | ```terminal_35(2)``` | Terminal block 2 way 3.5mm |
|
||||
| 2 | ```green_terminal(gt_2p54, 4)``` | Terminal block 4 way 0.1" |
|
||||
| 1 | | USB A to Mini B lead |
|
||||
| 16 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm |
|
||||
| 28 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 32 | ```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(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
||||
| 1 | ```pcb(ZC_A0591)``` | ZC-A0591 ULN2003 driver PCB |
|
||||
@@ -1838,23 +2027,24 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 4 | pcb_spacer20130.stl |
|
||||
| 4 | pcb_spacer20140.stl |
|
||||
| 4 | pcb_spacer20150.stl |
|
||||
| 4 | pcb_spacer20160.stl |
|
||||
| 4 | pcb_spacer25100_2.stl |
|
||||
| 4 | pcb_spacer20170.stl |
|
||||
| 4 | pcb_spacer25100.stl |
|
||||
| 4 | pcb_spacer25110_2.stl |
|
||||
| 4 | pcb_spacer25120_2.stl |
|
||||
| 4 | pcb_spacer25230.stl |
|
||||
| 4 | pcb_spacer2570.stl |
|
||||
| 4 | pcb_spacer25130_2.stl |
|
||||
| 4 | pcb_spacer25240.stl |
|
||||
| 4 | pcb_spacer2550.stl |
|
||||
| 4 | pcb_spacer2580.stl |
|
||||
| 4 | pcb_spacer2590.stl |
|
||||
| 4 | pcb_spacer30170.stl |
|
||||
| 4 | pcb_spacer30180.stl |
|
||||
| 4 | pcb_spacer30220.stl |
|
||||
| 4 | pcb_spacer40190.stl |
|
||||
| 4 | pcb_spacer30190.stl |
|
||||
| 4 | pcb_spacer30230.stl |
|
||||
| 4 | pcb_spacer40200.stl |
|
||||
| 4 | pcb_spacer40210.stl |
|
||||
| 4 | pcb_spacer40220.stl |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -1935,9 +2125,10 @@ Pin headers and sockets, etc.
|
||||
|:--- |:--- |
|
||||
| ```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 |
|
||||
| ```jst_xh_header(type, pin_count, right_angle=false, colour, pin_colour)``` | Draw JST XH connector |
|
||||
| ```pin(type, length = undef)``` | Draw a header pin |
|
||||
| ```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, smt = false, cutout = false)``` | Draw pin socket |
|
||||
| ```pin_header(type, cols = 1, rows = 1, smt = false, right_angle = false, cutout = false, colour)``` | Draw pin header |
|
||||
| ```pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, smt = false, cutout = false, colour)``` | Draw pin socket |
|
||||
|
||||

|
||||
|
||||
@@ -2022,10 +2213,10 @@ Face order is bottom, top, left, right, front, back.
|
||||
| 1 | ```psu(PD_150_12)``` | PSU PD-150-12 |
|
||||
| 1 | ```psu(S_250_48)``` | PSU S-250-48 |
|
||||
| 1 | ```psu(S_300_12)``` | PSU S-300-12 |
|
||||
| 4 | ```screw(No632_pan_screw, 8)``` | Screw 6-32 pan x 8mm |
|
||||
| 4 | ```screw(M3_cap_screw, 8)``` | Screw M3 cap x 8mm |
|
||||
| 8 | ```screw(M3_pan_screw, 8)``` | Screw M3 pan x 8mm |
|
||||
| 4 | ```screw(M4_cap_screw, 8)``` | Screw M4 cap x 8mm |
|
||||
| 4 | ```screw(No632_pan_screw, 8)``` | Screw 6-32 pan x 8mm |
|
||||
| 4 | ```screw(M3_cap_screw, 8)``` | Screw M3 cap x 8mm |
|
||||
| 8 | ```screw(M3_pan_screw, 8)``` | Screw M3 pan x 8mm |
|
||||
| 4 | ```screw(M4_cap_screw, 8)``` | Screw M4 cap x 8mm |
|
||||
| 12 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||
| 8 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
||||
|
||||
@@ -2091,10 +2282,10 @@ Timing belt pulleys, both toothed and plain with internal bearings for idlers.
|
||||
| 1 | ```pulley(GT2x20um_pulley)``` | Pulley GT2UM 20 teeth |
|
||||
| 1 | ```pulley(T2p5x16_pulley)``` | Pulley T2.5 16 teeth |
|
||||
| 1 | ```pulley(T5x10_pulley)``` | Pulley T5 10 teeth |
|
||||
| 1 | ```screw(M3_grub_screw, 3)``` | Screw M3 grub x 3mm |
|
||||
| 2 | ```screw(M3_grub_screw, 4)``` | Screw M3 grub x 4mm |
|
||||
| 4 | ```screw(M3_grub_screw, 6)``` | Screw M3 grub x 6mm |
|
||||
| 1 | ```screw(M4_grub_screw, 6)``` | Screw M4 grub x 6mm |
|
||||
| 1 | ```screw(M3_grub_screw, 3)``` | Screw M3 grub x 3mm |
|
||||
| 2 | ```screw(M3_grub_screw, 4)``` | Screw M3 grub x 4mm |
|
||||
| 4 | ```screw(M3_grub_screw, 6)``` | Screw M3 grub x 6mm |
|
||||
| 1 | ```screw(M4_grub_screw, 6)``` | Screw M4 grub x 6mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -2254,7 +2445,7 @@ Rocker switch. Also used for neon indicator in the same form factor.
|
||||
| ```rocker_height(type)``` | Body height |
|
||||
| ```rocker_part(type)``` | Part description |
|
||||
| ```rocker_pivot(type)``` | Pivot distance from the back of the flange |
|
||||
| ```rocker_slot_h(type)``` | Panel slow height |
|
||||
| ```rocker_slot_h(type)``` | Panel slot height |
|
||||
| ```rocker_slot_w(type)``` | Panel slot width |
|
||||
| ```rocker_spades(type)``` | Spade types and positions |
|
||||
| ```rocker_width(type)``` | Body width |
|
||||
@@ -2262,7 +2453,7 @@ Rocker switch. Also used for neon indicator in the same form factor.
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```rocker(type)``` | Draw the specified rocker switch |
|
||||
| ```rocker(type, colour)``` | Draw the specified rocker switch |
|
||||
| ```rocker_hole(type, h = 0)``` | Make a hole to accept a rocker switch, by default 2D, set h for 3D |
|
||||
|
||||

|
||||
@@ -2270,8 +2461,8 @@ Rocker switch. Also used for neon indicator in the same form factor.
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```rocker(neon_indicator)``` | Neon Indicator H8630FBNAL |
|
||||
| 1 | ```rocker(small_rocker)``` | Rocker Switch PRASA1-16F-BB0BW |
|
||||
| 2 | ```rocker(neon_indicator)``` | Neon Indicator H8630FBNAL |
|
||||
| 2 | ```rocker(small_rocker)``` | Rocker Switch PRASA1-16F-BB0BW |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -2281,6 +2472,8 @@ Rocker switch. Also used for neon indicator in the same form factor.
|
||||
## Rod
|
||||
Steel rods and studding with chamfered ends.
|
||||
|
||||
These items are sysmtrical, so by default the origin is in the centre but it can be changed to the bottom.
|
||||
|
||||
|
||||
[vitamins/rod.scad](vitamins/rod.scad) Implementation.
|
||||
|
||||
@@ -2379,14 +2572,14 @@ Machine screws and wood screws with various head styles.
|
||||
| 1 | ```screw(M3_cap_screw, 10)``` | Screw M3 cap x 10mm |
|
||||
| 1 | ```screw(M3_cs_cap_screw, 10)``` | Screw M3 cs cap x 10mm |
|
||||
| 1 | ```screw(M3_dome_screw, 10)``` | Screw M3 dome x 10mm |
|
||||
| 1 | ```screw(M3_grub_screw, 6)``` | Screw M3 grub x 6mm |
|
||||
| 1 | ```screw(M3_grub_screw, 6)``` | Screw M3 grub x 6mm |
|
||||
| 1 | ```screw(M3_hex_screw, 10)``` | Screw M3 hex x 10mm |
|
||||
| 1 | ```screw(M3_low_cap_screw, 10)``` | Screw M3 low cap x 10mm |
|
||||
| 1 | ```screw(M3_pan_screw, 10)``` | Screw M3 pan x 10mm |
|
||||
| 1 | ```screw(M4_cap_screw, 25)``` | Screw M4 cap x 25mm |
|
||||
| 1 | ```screw(M4_cs_cap_screw, 25)``` | Screw M4 cs cap x 25mm |
|
||||
| 1 | ```screw(M4_dome_screw, 25)``` | Screw M4 dome x 25mm |
|
||||
| 1 | ```screw(M4_grub_screw, 6)``` | Screw M4 grub x 6mm |
|
||||
| 1 | ```screw(M4_grub_screw, 6)``` | Screw M4 grub x 6mm |
|
||||
| 1 | ```screw(M4_hex_screw, 30)``` | Screw M4 hex x 30mm |
|
||||
| 1 | ```screw(M4_pan_screw, 30)``` | Screw M4 pan x 30mm |
|
||||
| 1 | ```screw(M5_cap_screw, 30)``` | Screw M5 cap x 30mm |
|
||||
@@ -2403,6 +2596,67 @@ Machine screws and wood screws with various head styles.
|
||||
| 1 | ```screw(No6_screw, 30)``` | Screw No6 pan wood x 30mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Scs_bearing_blocks"></a>
|
||||
## Scs_bearing_blocks
|
||||
SCSnUU and SCSnLUU bearing blocks
|
||||
|
||||
|
||||
[vitamins/scs_bearing_blocks.scad](vitamins/scs_bearing_blocks.scad) Object definitions.
|
||||
|
||||
[vitamins/scs_bearing_block.scad](vitamins/scs_bearing_block.scad) Implementation.
|
||||
|
||||
[tests/scs_bearing_blocks.scad](tests/scs_bearing_blocks.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```scs_bearing(type)``` | Linear bearing used |
|
||||
| ```scs_block_center_height(type)``` | Height of the center of the block |
|
||||
| ```scs_block_side_height(type)``` | Height of the side of the block, this determines the minimum screw length |
|
||||
| ```scs_hole_offset(type)``` | Offset of bearing hole from base of block |
|
||||
| ```scs_screw(type)``` | Screw type |
|
||||
| ```scs_screw_separation_x(type)``` | Screw separation in X direction |
|
||||
| ```scs_screw_separation_z(type)``` | Screw separation in Z direction |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```scs_size(type)``` | Size of scs bracket bounding block |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```scs_bearing_block(type)``` | Draw the specified SCS bearing block |
|
||||
| ```scs_bearing_block_assembly(type, part_thickness, screw_type, nut_type)``` | Assembly with screws and nuts in place |
|
||||
| ```scs_bearing_block_hole_positions(type)``` | Place children at hole positions |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 12 | ```nut(M4_nut)``` | Nut M4 x 3.2mm |
|
||||
| 24 | ```nut(M5_nut)``` | Nut M5 x 4mm |
|
||||
| 1 | ```scs_bearing_block(SCS10LUU)``` | SCS10LUU bearing block |
|
||||
| 1 | ```scs_bearing_block(SCS10UU)``` | SCS10UU bearing block |
|
||||
| 1 | ```scs_bearing_block(SCS12LUU)``` | SCS12LUU bearing block |
|
||||
| 1 | ```scs_bearing_block(SCS12UU)``` | SCS12UU bearing block |
|
||||
| 1 | ```scs_bearing_block(SCS16LUU)``` | SCS16LUU bearing block |
|
||||
| 1 | ```scs_bearing_block(SCS16UU)``` | SCS16UU bearing block |
|
||||
| 1 | ```scs_bearing_block(SCS6UU)``` | SCS6UU bearing block |
|
||||
| 1 | ```scs_bearing_block(SCS8LUU)``` | SCS8LUU bearing block |
|
||||
| 1 | ```scs_bearing_block(SCS8UU)``` | SCS8UU bearing block |
|
||||
| 4 | ```screw(M4_cap_screw, 25)``` | Screw M4 cap x 25mm |
|
||||
| 8 | ```screw(M4_cap_screw, 30)``` | Screw M4 cap x 30mm |
|
||||
| 16 | ```screw(M5_cap_screw, 35)``` | Screw M5 cap x 35mm |
|
||||
| 8 | ```screw(M5_cap_screw, 45)``` | Screw M5 cap x 45mm |
|
||||
| 12 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
||||
| 24 | ```washer(M5_washer)``` | Washer M5 x 10mm x 1mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -2492,6 +2746,62 @@ Note that modules that drill holes will return a 2D object if ```h``` is set to
|
||||
| 1 | ```sheet(Steel06, 30, 30, 2)``` | Sheet mild steel 30mm x 30mm x 0.6mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Sk_brackets"></a>
|
||||
## Sk_brackets
|
||||
SK shaft support brackets
|
||||
|
||||
|
||||
[vitamins/sk_brackets.scad](vitamins/sk_brackets.scad) Object definitions.
|
||||
|
||||
[vitamins/sk_bracket.scad](vitamins/sk_bracket.scad) Implementation.
|
||||
|
||||
[tests/sk_brackets.scad](tests/sk_brackets.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```sk_base_height(type)``` | Height of base containing the screws |
|
||||
| ```sk_diameter(type)``` | Rod hole diameter |
|
||||
| ```sk_hole_offset(type)``` | Rod hole offset |
|
||||
| ```sk_screw_separation(type)``` | Separation of screws in the base |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```sk_size(type)``` | Size of bracket |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```sk_bracket(type)``` | SK shaft support bracket |
|
||||
| ```sk_bracket_assembly(type, part_thickness = 2, screw_type = M5_cap_screw, nut_type = undef, max_screw_depth = 6)``` | Assembly with fasteners in place |
|
||||
| ```sk_bracket_hole_positions(type)``` | Place children at hole positions |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 2 | ```extrusion(E2020, 20)``` | Extrusion E2020 x 20mm |
|
||||
| 2 | ```extrusion(E3030, 20)``` | Extrusion E3030 x 20mm |
|
||||
| 2 | ```sliding_t_nut(M4_hammer_nut)``` | Nut M4 hammer |
|
||||
| 2 | ```sliding_t_nut(M4_sliding_t_nut)``` | Nut M4 sliding T |
|
||||
| 2 | ```sliding_t_nut(M5_sliding_t_nut)``` | Nut M5 sliding T |
|
||||
| 2 | ```nut(M5_nut, nyloc = undef)``` | Nut M5 x 4mm |
|
||||
| 1 | ```sk_bracket(SK10)``` | SK10 shaft support bracket |
|
||||
| 1 | ```sk_bracket(SK12)``` | SK12 shaft support bracket |
|
||||
| 1 | ```sk_bracket(SK16)``` | SK16 shaft support bracket |
|
||||
| 1 | ```sk_bracket(SK8)``` | SK8 shaft support bracket |
|
||||
| 2 | ```screw(M4_cap_screw, 12)``` | Screw M4 cap x 12mm |
|
||||
| 2 | ```screw(M4_dome_screw, 12)``` | Screw M4 dome x 12mm |
|
||||
| 4 | ```screw(M5_cap_screw, 16)``` | Screw M5 cap x 16mm |
|
||||
| 4 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
||||
| 6 | ```washer(M5_washer)``` | Washer M5 x 10mm x 1mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -2558,7 +2868,7 @@ Filament spool models
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```spool(type)``` | Draw specified spool |
|
||||
| ```spool(type, filament_depth = 0, filament_colour = "white", filament_d = 3)``` | Draw specified spool with optional filament |
|
||||
|
||||

|
||||
|
||||
@@ -2578,6 +2888,8 @@ Filament spool models
|
||||
## Springs
|
||||
Compression springs. Can be tapered, have open, closed or ground ends. Ground ends will render a lot slower.
|
||||
|
||||
By default springs have their origin at the bottom but can be centered.
|
||||
|
||||
|
||||
[vitamins/springs.scad](vitamins/springs.scad) Object definitions.
|
||||
|
||||
@@ -2606,7 +2918,7 @@ Compression springs. Can be tapered, have open, closed or ground ends. Ground en
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```comp_spring(type, l = 0)``` | Draw specified spring, l can be set to specify the compressed length. |
|
||||
| ```comp_spring(type, l = 0, center = false)``` | Draw specified spring, l can be set to specify the compressed length. |
|
||||
|
||||

|
||||
|
||||
@@ -2708,15 +3020,16 @@ NEMA stepper motor model.
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 24 | ```screw(M3_pan_screw, 8)``` | Screw M3 pan x 8mm |
|
||||
| 4 | ```ring_terminal(M3_ringterm)``` | Ring terminal 3mm |
|
||||
| 15 | ```screw(M3_pan_screw, 8)``` | Screw M3 pan x 8mm |
|
||||
| 1 | ```NEMA(NEMA14)``` | Stepper motor NEMA14 x 36mm |
|
||||
| 1 | ```NEMA(NEMA16)``` | Stepper motor NEMA16 x 19.2mm |
|
||||
| 1 | ```NEMA(NEMA17S)``` | Stepper motor NEMA17 x 34mm |
|
||||
| 1 | ```NEMA(NEMA17M)``` | Stepper motor NEMA17 x 40mm |
|
||||
| 1 | ```NEMA(NEMA17)``` | Stepper motor NEMA17 x 47mm |
|
||||
| 1 | ```NEMA(NEMA23)``` | Stepper motor NEMA22 x 51.2mm |
|
||||
| 24 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||
| 24 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
|
||||
| 11 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||
| 15 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -3502,7 +3815,7 @@ Star washers can be omitted by setting ```star_washers``` to false.
|
||||
| 3 | ```insert(F1BM2p5)``` | Heatfit insert M2.5 |
|
||||
| 3 | ```insert(F1BM3)``` | Heatfit insert M3 |
|
||||
| 3 | ```insert(F1BM4)``` | Heatfit insert M4 |
|
||||
| 3 | ```screw(M2_cap_screw, 8)``` | Screw M2 cap x 8mm |
|
||||
| 3 | ```screw(M2_cap_screw, 8)``` | Screw M2 cap x 8mm |
|
||||
| 3 | ```screw(M2p5_pan_screw, 10)``` | Screw M2.5 pan x 10mm |
|
||||
| 3 | ```screw(M3_dome_screw, 10)``` | Screw M3 dome x 10mm |
|
||||
| 3 | ```screw(M4_dome_screw, 12)``` | Screw M4 dome x 12mm |
|
||||
@@ -3722,7 +4035,7 @@ Star washers can be omitted by setting ```star_washers``` to false.
|
||||
| 3 | ```insert(F1BM2p5)``` | Heatfit insert M2.5 |
|
||||
| 3 | ```insert(F1BM3)``` | Heatfit insert M3 |
|
||||
| 3 | ```insert(F1BM4)``` | Heatfit insert M4 |
|
||||
| 3 | ```screw(M2_cap_screw, 8)``` | Screw M2 cap x 8mm |
|
||||
| 3 | ```screw(M2_cap_screw, 8)``` | Screw M2 cap x 8mm |
|
||||
| 3 | ```screw(M2p5_pan_screw, 10)``` | Screw M2.5 pan x 10mm |
|
||||
| 3 | ```screw(M3_dome_screw, 10)``` | Screw M3 dome x 10mm |
|
||||
| 3 | ```screw(M4_dome_screw, 16)``` | Screw M4 dome x 16mm |
|
||||
@@ -3866,7 +4179,7 @@ inserts don't grip well in rubber.
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```insert(F1BM3)``` | Heatfit insert M3 |
|
||||
| 1 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc |
|
||||
| 1 | ```screw(M3_cap_screw, 8)``` | Screw M3 cap x 8mm |
|
||||
| 1 | ```screw(M3_cap_screw, 8)``` | Screw M3 cap x 8mm |
|
||||
| 1 | ```screw(M4_cap_screw, 16)``` | Screw M4 cap x 16mm |
|
||||
| 1 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||
| 2 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
||||
@@ -4021,23 +4334,25 @@ The stl and assembly must be given a name and parameterless wrappers for the stl
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 4 | ```insert(F1BM3)``` | Heatfit insert M3 |
|
||||
| 4 | ```screw(M3_cap_screw, 10)``` | Screw M3 cap x 10mm |
|
||||
| 4 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||
| 4 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
|
||||
| 2 | ```ziptie(small_ziptie, 3)``` | Ziptie 2.5mm x 100mm min length |
|
||||
| 6 | ```insert(F1BM3)``` | Heatfit insert M3 |
|
||||
| 6 | ```screw(M3_cap_screw, 10)``` | Screw M3 cap x 10mm |
|
||||
| 6 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||
| 6 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
|
||||
| 3 | ```ziptie(small_ziptie, 3)``` | Ziptie 2.5mm x 100mm min length |
|
||||
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 1 | psu_shroud_PD_150_12.stl |
|
||||
| 1 | psu_shroud_S_250_48.stl |
|
||||
| 1 | psu_shroud_S_300_12.stl |
|
||||
|
||||
### Assemblies
|
||||
| Qty | Name |
|
||||
| ---:|:--- |
|
||||
| 1 | psu_shroud_PD_150_12_assembly |
|
||||
| 1 | psu_shroud_S_250_48_assembly |
|
||||
| 1 | psu_shroud_S_300_12_assembly |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -4281,7 +4596,7 @@ be fully customised by passing a list of properties.
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 2 | ```insert(F1BM3)``` | Heatfit insert M3 |
|
||||
| 2 | ```screw(M3_pan_screw, 8)``` | Screw M3 pan x 8mm |
|
||||
| 2 | ```screw(M3_pan_screw, 8)``` | Screw M3 pan x 8mm |
|
||||
| 2 | ```washer(M3_penny_washer)``` | Washer penny M3 x 12mm x 0.8mm |
|
||||
| 2 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
|
||||
|
||||
@@ -4753,7 +5068,7 @@ heirachical BOMs are also generated for real projects.
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```insert(F1BM3)``` | Heatfit insert M3 |
|
||||
| 1 | ```widget(3)``` | Rivit like thing for 3mm sheets |
|
||||
| 1 | ```screw(M3_cap_screw, 8)``` | Screw M3 cap x 8mm |
|
||||
| 1 | ```screw(M3_cap_screw, 8)``` | Screw M3 cap x 8mm |
|
||||
| 1 | ```sheet(PMMA3, 20, 20, 1)``` | Sheet acrylic 20mm x 20mm x 3mm |
|
||||
| 1 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||
| 1 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
|
||||
@@ -4961,11 +5276,12 @@ Small holes can get away without it, but they print better with truncated teardr
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```semi_teardrop(h, r, d = undef, center = true)``` | A semi teardrop in the positive Y domain |
|
||||
| ```teardrop(h, r, center = true, truncate = true)``` | For making horizontal holes that don't need support material, set ```truncate = false``` to make traditional RepRap teardrops that don't even need bridging |
|
||||
| ```teardrop_plus(h, r, center = true, truncate = true)``` | Slightly bigger teardrop to allow for the 3D printing staircase effect |
|
||||
| ```tearslot(h, r, w, center = true)``` | A horizontal slot that doesn't need support material |
|
||||
| ```vertical_tearslot(h, r, l, center = true)``` | A vertical slot that doesn't need support material |
|
||||
| ```semi_teardrop(h, r, d = undef, center = true, chamfer = 0)``` | A semi teardrop in the positive Y domain |
|
||||
| ```teardrop(h, r, center = true, truncate = true, chamfer = 0)``` | For making horizontal holes that don't need support material, set ```truncate = false``` to make traditional RepRap teardrops that don't even need bridging |
|
||||
| ```teardrop_chamfer(h, center, chamfer)``` | Helper module for adding chamfer to a teardrop |
|
||||
| ```teardrop_plus(h, r, center = true, truncate = true, chamfer = 0)``` | Slightly bigger teardrop to allow for the 3D printing staircase effect |
|
||||
| ```tearslot(h, r, w, center = true, chamfer = 0)``` | A horizontal slot that doesn't need support material |
|
||||
| ```vertical_tearslot(h, r, l, center = true, chamfer = 0)``` | A vertical slot that doesn't need support material |
|
||||
|
||||

|
||||
|
||||
|
@@ -40,7 +40,7 @@ These are located in the ```scripts``` subdirectory, which needs to be added to
|
||||
They should work with both Python 2 and Python 3.
|
||||
|
||||
| Script | Function |
|
||||
|:--|:--|''', file = doc_file)
|
||||
|:---|:---|''', file = doc_file)
|
||||
for file in os.listdir('scripts'):
|
||||
if file.endswith('.py'):
|
||||
blurb = ''
|
||||
|
@@ -85,48 +85,49 @@ def make_parts(target, part_type, parts = None):
|
||||
#
|
||||
lib_dir = os.environ['OPENSCADPATH'] + '/NopSCADlib/printed'
|
||||
module_suffix = '_dxf' if part_type == 'svg' else '_' + part_type
|
||||
for dir in [source_dir, lib_dir]:
|
||||
for filename in os.listdir(dir):
|
||||
if filename[-5:] == ".scad":
|
||||
#
|
||||
# find any modules ending in _<part_type>
|
||||
#
|
||||
with open(dir + "/" + filename, "r") as f:
|
||||
for line in f.readlines():
|
||||
words = line.split()
|
||||
if(len(words) and words[0] == "module"):
|
||||
module = words[1].split('(')[0]
|
||||
if module.endswith(module_suffix):
|
||||
base_name = module[:-4]
|
||||
part = base_name + '.' + part_type
|
||||
if part in targets:
|
||||
#
|
||||
# make a file to use the module
|
||||
#
|
||||
part_maker_name = part_type + ".scad"
|
||||
with open(part_maker_name, "w") as f:
|
||||
f.write("use <%s/%s>\n" % (dir, filename))
|
||||
f.write("%s();\n" % module);
|
||||
#
|
||||
# Run openscad on the created file
|
||||
#
|
||||
part_file = target_dir + "/" + part
|
||||
dname = deps_name(deps_dir, filename)
|
||||
changed = check_deps(part_file, dname)
|
||||
changed = times.check_have_time(changed, part)
|
||||
if part_type == 'stl' and not changed and not part in bounds_map:
|
||||
changed = "No bounds"
|
||||
if changed:
|
||||
print(changed)
|
||||
t = time.time()
|
||||
openscad.run("-D$bom=1", "-d", dname, "-o", part_file, part_maker_name)
|
||||
times.add_time(part, t)
|
||||
if part_type == 'stl':
|
||||
bounds = c14n_stl.canonicalise(part_file)
|
||||
bounds_map[part] = bounds
|
||||
for dir in [source_dir, source_dir + '/printed', lib_dir]:
|
||||
if os.path.isdir(dir):
|
||||
for filename in os.listdir(dir):
|
||||
if filename[-5:] == ".scad":
|
||||
#
|
||||
# find any modules ending in _<part_type>
|
||||
#
|
||||
with open(dir + "/" + filename, "r") as f:
|
||||
for line in f.readlines():
|
||||
words = line.split()
|
||||
if(len(words) and words[0] == "module"):
|
||||
module = words[1].split('(')[0]
|
||||
if module.endswith(module_suffix):
|
||||
base_name = module[:-4]
|
||||
part = base_name + '.' + part_type
|
||||
if part in targets:
|
||||
#
|
||||
# make a file to use the module
|
||||
#
|
||||
part_maker_name = part_type + ".scad"
|
||||
with open(part_maker_name, "w") as f:
|
||||
f.write("use <%s/%s>\n" % (dir, filename))
|
||||
f.write("%s();\n" % module);
|
||||
#
|
||||
# Run openscad on the created file
|
||||
#
|
||||
part_file = target_dir + "/" + part
|
||||
dname = deps_name(deps_dir, filename)
|
||||
changed = check_deps(part_file, dname)
|
||||
changed = times.check_have_time(changed, part)
|
||||
if part_type == 'stl' and not changed and not part in bounds_map:
|
||||
changed = "No bounds"
|
||||
if changed:
|
||||
print(changed)
|
||||
t = time.time()
|
||||
openscad.run("-D$bom=1", "-d", dname, "-o", part_file, part_maker_name)
|
||||
times.add_time(part, t)
|
||||
if part_type == 'stl':
|
||||
bounds = c14n_stl.canonicalise(part_file)
|
||||
bounds_map[part] = bounds
|
||||
|
||||
targets.remove(part)
|
||||
os.remove(part_maker_name)
|
||||
targets.remove(part)
|
||||
os.remove(part_maker_name)
|
||||
#
|
||||
# Write new bounds file
|
||||
#
|
||||
|
@@ -5,7 +5,7 @@ These are located in the ```scripts``` subdirectory, which needs to be added to
|
||||
They should work with both Python 2 and Python 3.
|
||||
|
||||
| Script | Function |
|
||||
|:--|:--|
|
||||
|:---|:---|
|
||||
| ```bom.py``` | Generates BOM files for the project. |
|
||||
| ```c14n_stl.py``` | OpenSCAD produces randomly ordered STL files. This script re-orders them consistently so that GIT can tell if they have changed or not. |
|
||||
| ```doc_scripts.py``` | Makes this document and doc/usage.md. |
|
||||
|
134
scripts/views.py
@@ -71,9 +71,10 @@ def bom_to_assemblies(bom_dir, bounds_map):
|
||||
#
|
||||
# Remove the main assembly if it is a shell
|
||||
#
|
||||
ass = flat_bom[-1]
|
||||
if len(ass["assemblies"]) < 2 and not ass["vitamins"] and not ass["printed"] and not ass["routed"]:
|
||||
flat_bom = flat_bom[:-1]
|
||||
if flat_bom:
|
||||
ass = flat_bom[-1]
|
||||
if len(ass["assemblies"]) < 2 and not ass["vitamins"] and not ass["printed"] and not ass["routed"]:
|
||||
flat_bom = flat_bom[:-1]
|
||||
return [assembly["name"] for assembly in flat_bom]
|
||||
|
||||
def eop(print_mode, doc_file, last = False, first = False):
|
||||
@@ -124,66 +125,67 @@ def views(target, do_assemblies = None):
|
||||
#
|
||||
main_blurb = None
|
||||
lib_dir = os.environ['OPENSCADPATH'] + '/NopSCADlib/printed'
|
||||
for dir in [source_dir, lib_dir]:
|
||||
for filename in os.listdir(dir):
|
||||
if filename.endswith('.scad'):
|
||||
#
|
||||
# find any modules with names ending in _assembly
|
||||
#
|
||||
with open(dir + "/" + filename, "r") as f:
|
||||
lines = f.readlines()
|
||||
line_no = 0
|
||||
for line in lines:
|
||||
words = line.split()
|
||||
if len(words) and words[0] == "module":
|
||||
module = words[1].split('(')[0]
|
||||
if is_assembly(module):
|
||||
if module in assemblies:
|
||||
#
|
||||
# Scrape the assembly instructions
|
||||
#
|
||||
for ass in flat_bom:
|
||||
if ass["name"] == module:
|
||||
if not "blurb" in ass:
|
||||
ass["blurb"] = blurb.scrape_module_blurb(lines[:line_no])
|
||||
break
|
||||
if not do_assemblies or module in do_assemblies:
|
||||
for dir in [source_dir, source_dir + '/printed', lib_dir]:
|
||||
if os.path.isdir(dir):
|
||||
for filename in os.listdir(dir):
|
||||
if filename.endswith('.scad'):
|
||||
#
|
||||
# find any modules with names ending in _assembly
|
||||
#
|
||||
with open(dir + "/" + filename, "r") as f:
|
||||
lines = f.readlines()
|
||||
line_no = 0
|
||||
for line in lines:
|
||||
words = line.split()
|
||||
if len(words) and words[0] == "module":
|
||||
module = words[1].split('(')[0]
|
||||
if is_assembly(module):
|
||||
if module in assemblies:
|
||||
#
|
||||
# make a file to use the module
|
||||
# Scrape the assembly instructions
|
||||
#
|
||||
png_maker_name = 'png.scad'
|
||||
with open(png_maker_name, "w") as f:
|
||||
f.write("use <%s/%s>\n" % (dir, filename))
|
||||
f.write("%s();\n" % module);
|
||||
#
|
||||
# Run openscad on the created file
|
||||
#
|
||||
dname = deps_name(deps_dir, filename)
|
||||
for explode in [0, 1]:
|
||||
png_name = target_dir + '/' + module + '.png'
|
||||
if not explode:
|
||||
png_name = png_name.replace('_assembly', '_assembled')
|
||||
changed = check_deps(png_name, dname)
|
||||
changed = times.check_have_time(changed, png_name)
|
||||
changed = options.have_changed(changed, png_name)
|
||||
tmp_name = 'tmp.png'
|
||||
if changed:
|
||||
print(changed)
|
||||
t = time.time()
|
||||
openscad.run_list(options.list() + ["-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)
|
||||
do_cmd(["magick", tmp_name, "-trim", "-resize", "1004x1004", "-bordercolor", background, "-border", "10", tmp_name])
|
||||
update_image(tmp_name, png_name)
|
||||
tn_name = png_name.replace('.png', '_tn.png')
|
||||
if mtime(png_name) > mtime(tn_name):
|
||||
do_cmd(("magick "+ png_name + " -trim -resize 280x280 -background " + background + " -gravity Center -extent 280x280 -bordercolor " + background + " -border 10 " + tmp_name).split())
|
||||
update_image(tmp_name, tn_name)
|
||||
os.remove(png_maker_name)
|
||||
done_assemblies.append(module)
|
||||
else:
|
||||
if module == 'main_assembly':
|
||||
main_blurb = blurb.scrape_module_blurb(lines[:line_no])
|
||||
line_no += 1
|
||||
for ass in flat_bom:
|
||||
if ass["name"] == module:
|
||||
if not "blurb" in ass:
|
||||
ass["blurb"] = blurb.scrape_module_blurb(lines[:line_no])
|
||||
break
|
||||
if not do_assemblies or module in do_assemblies:
|
||||
#
|
||||
# make a file to use the module
|
||||
#
|
||||
png_maker_name = 'png.scad'
|
||||
with open(png_maker_name, "w") as f:
|
||||
f.write("use <%s/%s>\n" % (dir, filename))
|
||||
f.write("%s();\n" % module);
|
||||
#
|
||||
# Run openscad on the created file
|
||||
#
|
||||
dname = deps_name(deps_dir, filename)
|
||||
for explode in [0, 1]:
|
||||
png_name = target_dir + '/' + module + '.png'
|
||||
if not explode:
|
||||
png_name = png_name.replace('_assembly', '_assembled')
|
||||
changed = check_deps(png_name, dname)
|
||||
changed = times.check_have_time(changed, png_name)
|
||||
changed = options.have_changed(changed, png_name)
|
||||
tmp_name = 'tmp.png'
|
||||
if changed:
|
||||
print(changed)
|
||||
t = time.time()
|
||||
openscad.run_list(options.list() + ["-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)
|
||||
do_cmd(["magick", tmp_name, "-trim", "-resize", "1004x1004", "-bordercolor", background, "-border", "10", tmp_name])
|
||||
update_image(tmp_name, png_name)
|
||||
tn_name = png_name.replace('.png', '_tn.png')
|
||||
if mtime(png_name) > mtime(tn_name):
|
||||
do_cmd(("magick "+ png_name + " -trim -resize 280x280 -background " + background + " -gravity Center -extent 280x280 -bordercolor " + background + " -border 10 " + tmp_name).split())
|
||||
update_image(tmp_name, tn_name)
|
||||
os.remove(png_maker_name)
|
||||
done_assemblies.append(module)
|
||||
else:
|
||||
if module == 'main_assembly':
|
||||
main_blurb = blurb.scrape_module_blurb(lines[:line_no])
|
||||
line_no += 1
|
||||
times.print_times()
|
||||
#
|
||||
# Build the document
|
||||
@@ -239,7 +241,7 @@ def views(target, do_assemblies = None):
|
||||
print('| <span style="writing-mode: vertical-rl; text-orientation: mixed;">%s</span> ' % name, file = doc_file, end = '')
|
||||
print('| <span style="writing-mode: vertical-rl; text-orientation: mixed;">TOTALS</span> | |', file = doc_file)
|
||||
|
||||
print(('|--:' * len(flat_bom) + '|--:|:--|'), file = doc_file)
|
||||
print(('|---:' * len(flat_bom) + '|---:|:---|'), file = doc_file)
|
||||
|
||||
for t in types:
|
||||
if things[t]:
|
||||
@@ -282,7 +284,7 @@ def views(target, do_assemblies = None):
|
||||
if vitamins:
|
||||
print("### Vitamins", file = doc_file)
|
||||
print("|Qty|Description|", file = doc_file)
|
||||
print("|--:|:----------|", file = doc_file)
|
||||
print("|---:|:----------|", file = doc_file)
|
||||
for v in sorted(vitamins, key = lambda s: s.split(":")[-1]):
|
||||
print("|%d|%s|" % (vitamins[v], v.split(":")[1]), file = doc_file)
|
||||
print("\n", file = doc_file)
|
||||
@@ -296,7 +298,7 @@ def views(target, do_assemblies = None):
|
||||
print('%s %d x %s |' % ('\n|' if not (i % 3) else '', printed[p], p), file = doc_file, end = '')
|
||||
if (i % 3) == 2 or i == len(printed) - 1:
|
||||
n = (i % 3) + 1
|
||||
print('\n|%s' % ('--|' * n), file = doc_file)
|
||||
print('\n|%s' % ('---|' * n), file = doc_file)
|
||||
for j in range(n):
|
||||
part = keys[i - n + j + 1]
|
||||
print('|  %s' % (part, part.replace('.stl','.png'), '|\n' if j == j - 1 else ''), end = '', file = doc_file)
|
||||
@@ -312,7 +314,7 @@ def views(target, do_assemblies = None):
|
||||
print('%s %d x %s |' % ('\n|' if not (i % 3) else '', routed[r], r), file = doc_file, end = '')
|
||||
if (i % 3) == 2 or i == len(routed) - 1:
|
||||
n = (i % 3) + 1
|
||||
print('\n|%s' % ('--|' * n), file = doc_file)
|
||||
print('\n|%s' % ('---|' * n), file = doc_file)
|
||||
for j in range(n):
|
||||
part = keys[i - n + j + 1]
|
||||
print('|  %s' % (part, part.replace('.dxf','.png'), '|\n' if j == j - 1 else ''), end = '', file = doc_file)
|
||||
@@ -328,7 +330,7 @@ def views(target, do_assemblies = None):
|
||||
print('%s %d x %s |' % ('\n|' if not (i % 3) else '', sub_assemblies[a], a), file = doc_file, end = '')
|
||||
if (i % 3) == 2 or i == len(keys) - 1:
|
||||
n = (i % 3) + 1
|
||||
print('\n|%s' % ('--|' * n), file = doc_file)
|
||||
print('\n|%s' % ('---|' * n), file = doc_file)
|
||||
for j in range(n):
|
||||
a = keys[i - n + j + 1].replace('_assembly', '_assembled')
|
||||
print('|  %s' % (a, a + '_tn.png', '|\n' if j == j - 1 else ''), end = '', file = doc_file)
|
||||
|
@@ -20,8 +20,8 @@ include <../core.scad>
|
||||
|
||||
include <../vitamins/belts.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
include <../vitamins/pulleys.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
module belt_test() {
|
||||
@@ -67,7 +67,7 @@ module belt_test() {
|
||||
translate([-25, 0])
|
||||
layout([for(b = belts) belt_width(b)], 10)
|
||||
rotate([0, 90, 0])
|
||||
belt(belts[$i], [[0, 0, 20], [0, 1, 20]]);
|
||||
belt(belts[$i], [[0, 0, 20], [0, 1, 20]], belt_colour = $i%2==0 ? grey90 : grey20, tooth_colour = $i%2==0 ? grey70 : grey50);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
|
@@ -22,8 +22,8 @@
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
include <../vitamins/sheets.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
$explode = 1; // Normally set on the command line when generating assembly views with views.py
|
||||
|
||||
screw = M3_cap_screw;
|
||||
|
@@ -20,7 +20,7 @@ include <../core.scad>
|
||||
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/sheets.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
use <../printed/box.scad>
|
||||
|
||||
|
@@ -20,7 +20,7 @@ include <../core.scad>
|
||||
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/sheets.scad>
|
||||
include <../vitamins/inserts.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
|
||||
include <../printed/butt_box.scad>
|
||||
|
||||
|
65
tests/extrusion_brackets.scad
Normal file
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// 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 <../vitamins/extrusion_brackets.scad>
|
||||
include <../vitamins/extrusions.scad>
|
||||
include <../vitamins/washers.scad>
|
||||
include <../vitamins/nuts.scad>
|
||||
|
||||
module extrusion_brackets(examples = false) {
|
||||
extrusion_inner_corner_bracket(E20_inner_corner_bracket);
|
||||
|
||||
translate([30, 0])
|
||||
extrusion_inner_corner_bracket(E20_inner_corner_bracket, grub_screws = false);
|
||||
|
||||
translate([60, 0])
|
||||
extrusion_corner_bracket_assembly(E20_corner_bracket);
|
||||
|
||||
eWidth = extrusion_width(E2020);
|
||||
|
||||
if(examples) {
|
||||
translate([20, 60, 10]) rotate([90, 0, 180]) {
|
||||
extrusion_inner_corner_bracket(E20_inner_corner_bracket);
|
||||
|
||||
translate([-eWidth / 2, 0, 0])
|
||||
rotate([-90, 0, 0])
|
||||
extrusion(E2020, 20, false);
|
||||
|
||||
translate([-eWidth, -eWidth / 2, 0])
|
||||
rotate([0, 90, 0])
|
||||
extrusion(E2020, 40, false);
|
||||
}
|
||||
|
||||
translate([100, 60, 10]) rotate([90, 0, 180]) {
|
||||
extrusion_corner_bracket_assembly(E20_corner_bracket);
|
||||
|
||||
translate([-eWidth / 2, 0, 0])
|
||||
rotate([-90, 0, 0])
|
||||
extrusion(E2020, 30, false);
|
||||
|
||||
translate([-eWidth, -eWidth / 2, 0])
|
||||
rotate([0, 90, 0])
|
||||
extrusion(E2020, 50, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($preview)
|
||||
extrusion_brackets(true);
|
34
tests/kp_pillow_blocks.scad
Normal file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2018
|
||||
// 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/layout.scad>
|
||||
|
||||
include <../vitamins/kp_pillow_blocks.scad>
|
||||
include <../vitamins/nuts.scad>
|
||||
|
||||
module kp_pillow_blocks() {
|
||||
screws = [M4_cap_screw, M4_cap_screw, M5_cap_screw, M5_cap_screw];
|
||||
nuts = [M4_sliding_t_nut, M4_hammer_nut, M5_sliding_t_nut, M5_nut];
|
||||
assert(len(screws) == len(kp_pillow_blocks) && len(nuts) == len(kp_pillow_blocks));
|
||||
layout([for(k = kp_pillow_blocks) 2 * kp_size(k)[1]])
|
||||
kp_pillow_block_assembly(kp_pillow_blocks[$i], screw_type = screws[$i], nut_type = nuts[$i]);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
kp_pillow_blocks();
|
@@ -58,10 +58,10 @@ module nuts() {
|
||||
|
||||
translate([0, 80]) {
|
||||
if(n == M3_nut)
|
||||
hammer_nut(M3_hammer_nut);
|
||||
sliding_t_nut(M3_hammer_nut);
|
||||
|
||||
if(n == M4_nut)
|
||||
hammer_nut(M4_hammer_nut);
|
||||
sliding_t_nut(M4_hammer_nut);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
109
tests/pcb.scad
Normal file
@@ -0,0 +1,109 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// 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 <../vitamins/pcb.scad>
|
||||
include <../vitamins/microswitches.scad>
|
||||
include <../vitamins/d_connectors.scad>
|
||||
|
||||
gt_5x17 = ["gt_5x17", 5, 10, 17, 5, 11, 0.4, 9, 2,1.5, 1, 3, 6, 0, 0, 0];
|
||||
gt_5x11 = ["gt_5x11", 5, 8, 11, 5, 7, 0.4, 7, 1.5,1.5, 1,2.5, 6, 0, 0, 0];
|
||||
|
||||
TMC2130HeatSinkColor = "DeepSkyBlue";
|
||||
TMC2130 = ["TMC2130", "TMC2130",
|
||||
20, 14, 1.6, 0, 3, 0, "white", false, [],
|
||||
[
|
||||
[ 10, 1, 0, "-2p54header", 8, 1 ,undef, "blue" ],
|
||||
[ 10, 13, 0, "-2p54header", 8, 1],
|
||||
[ 12, 7, 0, "-chip", 6, 4, 1, grey20 ],
|
||||
// mock up a heat sink
|
||||
[ 10, 7, 0, "block", 9, 9, 2, TMC2130HeatSinkColor ],
|
||||
[ 10, 11, 0, "block", 9, 1, 11, TMC2130HeatSinkColor ],
|
||||
[ 10, 9, 0, "block", 9, 1, 11, TMC2130HeatSinkColor ],
|
||||
[ 10, 7, 0, "block", 9, 1, 11, TMC2130HeatSinkColor ],
|
||||
[ 10, 5, 0, "block", 9, 1, 11, TMC2130HeatSinkColor ],
|
||||
[ 10, 3, 0, "block", 9, 1, 11, TMC2130HeatSinkColor ],
|
||||
],
|
||||
[]
|
||||
];
|
||||
|
||||
test_pcb = ["TestPCB", "Test PCB",
|
||||
50, 500, 1.6, // length, width, thickness
|
||||
3, // Corner radius
|
||||
2.75, // Mounting hole diameter
|
||||
6, // Pad around mounting hole
|
||||
"green",// Color
|
||||
false, // True if the parts should be separate BOM items
|
||||
// hole offsets
|
||||
[ [3, 3], [3, -3], [-3, 3], [-3, -3] ],
|
||||
// components
|
||||
[
|
||||
[ 10, 10, 0, "2p54header", 4, 1],
|
||||
[ 25, 10, 0, "2p54header", 5, 1, undef, "blue" ],
|
||||
[ 10, 20, 0, "2p54boxhdr", 4, 2],
|
||||
[ 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"],
|
||||
[ 8, 140, 180, "usb_B"],
|
||||
[ 10, 160, 0, "buzzer"],
|
||||
[ 25, 160, 0, "buzzer", 4.5, 8.5],
|
||||
[ 10, 175, 0, "potentiometer"],
|
||||
[ 30, 175, 0, "potentiometer", 7, 8],
|
||||
[ 8, 190, 180, "jack"],
|
||||
[ 6, 200, 180, "barrel_jack"],
|
||||
[ 5, 220, 180, "hdmi"],
|
||||
[ 3, 240, 180, "mini_hdmi"],
|
||||
[ 10, 250, 0, "flex"],
|
||||
[ 10, 265, 0, "flat_flex"],
|
||||
[ 10, 280, 0, "D_plug", DCONN9],
|
||||
[ 10, 300, 0, "molex_hdr", 2],
|
||||
[ 10, 310, 0, "jst_xh", 2],
|
||||
[ 10, 320, 180, "term254", 3],
|
||||
[ 20, 320, 180, "term254", 3, undef, grey20],
|
||||
[ 10, 340, 180, "gterm35", 4, [1,2]],
|
||||
[ 20, 340, 180, "gterm35", 4, [1,2], "red"],
|
||||
[ 30, 340, 180, "gterm", gt_5x11, 3],
|
||||
[ 10, 360, 180, "gterm635", 2],
|
||||
[ 25, 360, 180, "gterm635", 2, undef, "blue"],
|
||||
[ 40, 360, 180, "gterm", gt_5x17, 2, undef, grey20],
|
||||
[ 40, 340, 180, "gterm", gt_5x17, 3, [1], "red"],
|
||||
[ 10, 380, 180, "term35", 4],
|
||||
[ 20, 380, 180, "term35", 3, "lime"],
|
||||
[ 10, 400, 0, "transition", 5],
|
||||
[ 10, 410, 0, "block", 10, 5, 8, "orange"],
|
||||
[ 10, 420, 0, "button_6mm"],
|
||||
[ 10, 435, 0, "microswitch", small_microswitch],
|
||||
[ 12, 450, 0, "pcb", 11, TMC2130 ],
|
||||
[ 12, 456, 0, "2p54socket", 8, 1 ],
|
||||
[ 12, 444, 0, "2p54socket", 8, 1, undef, undef, undef, "red" ],
|
||||
[ 10, 470, 0, "standoff", 5, 4.5, 12.5, 2.54],
|
||||
[ 6, 480, 180, "uSD", [12, 11.5, 1.4]],
|
||||
],
|
||||
// accessories
|
||||
[]
|
||||
];
|
||||
|
||||
|
||||
if($preview)
|
||||
let($show_threads = true)
|
||||
pcb(test_pcb);
|
@@ -16,7 +16,7 @@
|
||||
// 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>
|
||||
include <../core.scad>
|
||||
use <../printed/pcb_mount.scad>
|
||||
|
||||
PI_IO = ["PI_IO", "PI_IO V2", 35.56, 25.4, 1.6, 0, 0, 0, "green", true, [],
|
||||
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 118 KiB |
BIN
tests/png/extrusion_brackets.png
Normal file
After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 89 KiB |
BIN
tests/png/kp_pillow_blocks.png
Normal file
After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 54 KiB |
BIN
tests/png/pcb.png
Normal file
After Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 214 KiB |
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 188 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 75 KiB |
BIN
tests/png/scs_bearing_blocks.png
Normal file
After Width: | Height: | Size: 88 KiB |
BIN
tests/png/sk_brackets.png
Normal file
After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 162 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 215 KiB After Width: | Height: | Size: 219 KiB |
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 94 KiB |
@@ -21,9 +21,13 @@ use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/rockers.scad>
|
||||
|
||||
module rockers()
|
||||
layout([for(r = rockers) rocker_flange_w(r)], 5)
|
||||
module rockers() {
|
||||
layout([for(r = rockers) rocker_flange_w(r)], 5) {
|
||||
rocker(rockers[$i]);
|
||||
translate([0, 25])
|
||||
rocker(rockers[$i], $i==0 ? "red" : "green");
|
||||
}
|
||||
}
|
||||
|
||||
if($preview)
|
||||
rockers();
|
||||
|
35
tests/scs_bearing_blocks.scad
Normal file
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// 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/layout.scad>
|
||||
|
||||
include <../vitamins/scs_bearing_blocks.scad>
|
||||
|
||||
module scs_bearing_blocks()
|
||||
layout([for(s = scs_bearing_blocks) scs_size(s).x], 10) {
|
||||
part_thickness = 5;
|
||||
scs_bearing_block_assembly(scs_bearing_blocks[$i], part_thickness);
|
||||
|
||||
if($i > 0) // skip $i==0, since no SCS6LUU long variant to match SCS6UU
|
||||
translate([0, 60])
|
||||
scs_bearing_block_assembly(scs_bearing_blocks_long[$i - 1], part_thickness);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
scs_bearing_blocks();
|
39
tests/sk_brackets.scad
Normal file
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2018
|
||||
// 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/layout.scad>
|
||||
|
||||
include <../vitamins/sk_brackets.scad>
|
||||
include <../vitamins/extrusions.scad>
|
||||
|
||||
module sk_brackets() {
|
||||
screws = [M4_dome_screw, M4_cap_screw, M5_cap_screw, M5_cap_screw];
|
||||
nuts = [M4_hammer_nut, M4_sliding_t_nut, M5_sliding_t_nut, undef];
|
||||
// channel depth = 6 for 2020 extrusion, 9 for 3030 extrusion
|
||||
depths = [6, 6, 9, 0];
|
||||
layout([for(s = sk_brackets) 1.5 * sk_size(s)[1]]) {
|
||||
sk_bracket_assembly(sk_brackets[$i], screw_type = screws[$i], nut_type = nuts[$i], max_screw_depth = depths[$i]);
|
||||
translate([0, -sk_hole_offset(sk_brackets[$i]) - extrusion_width($i < 2 ? E2020 : E3030) / 2, 0])
|
||||
rotate([0, 90, 0])
|
||||
extrusion($i < 2 ? E2020 : E3030, 20, false);
|
||||
}
|
||||
}
|
||||
|
||||
if($preview)
|
||||
sk_brackets();
|
@@ -23,9 +23,9 @@ use <../utils/layout.scad>
|
||||
include <../vitamins/spools.scad>
|
||||
|
||||
module spools()
|
||||
layout([for(s = spools) spool_height(s)], 100)
|
||||
layout([for(s = spools) spool_height(s)], 100) let(s = spools[$i])
|
||||
rotate([90, 0, 90])
|
||||
spool(spools[$i]);
|
||||
spool(s, filament_depth = spool_depth(s) / 2, filament_colour = [pp1_colour, pp2_colour, pp3_colour, pp4_colour][$i % 4], filament_d = $i ? 3 : 1.75);
|
||||
|
||||
if($preview)
|
||||
spools();
|
||||
|
@@ -27,8 +27,10 @@ module stepper_motors()
|
||||
rotate(180)
|
||||
NEMA(stepper_motors[$i]);
|
||||
|
||||
NEMA_screws(stepper_motors[$i], M3_pan_screw);
|
||||
translate_z(4)
|
||||
NEMA_screws(stepper_motors[$i], M3_pan_screw, n = $i, earth = $i > 4 ? undef : $i - 1);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
stepper_motors();
|
||||
let($show_threads = 1)
|
||||
stepper_motors();
|
||||
|
@@ -22,25 +22,47 @@ include <../core.scad>
|
||||
module teardrops() {
|
||||
color(pp1_colour)
|
||||
rotate([90, 0, -45])
|
||||
linear_extrude(height = 3)
|
||||
difference() {
|
||||
square(40);
|
||||
difference() {
|
||||
linear_extrude(height = 3) {
|
||||
difference() {
|
||||
square([80, 40]);
|
||||
|
||||
translate([10, 10])
|
||||
teardrop(h = 0, r = 3);
|
||||
|
||||
translate([10, 20])
|
||||
teardrop_plus(h = 0, r = 3);
|
||||
|
||||
translate([20, 30])
|
||||
tearslot(h = 0, r = 3, w = 10);
|
||||
|
||||
translate([30, 15])
|
||||
vertical_tearslot(h = 0, r =3, l = 10);
|
||||
|
||||
translate([20, 10])
|
||||
semi_teardrop(h = 0, r = 3);
|
||||
}
|
||||
}
|
||||
translate([40, 0, 1.5]) {
|
||||
h = 3 + eps;
|
||||
chamfer = 0.5;
|
||||
|
||||
translate([10, 10])
|
||||
teardrop(h = 0, r = 3);
|
||||
teardrop(h = h, r = 3, chamfer = chamfer);
|
||||
|
||||
translate([10, 20])
|
||||
teardrop_plus(h = 0, r = 3);
|
||||
teardrop_plus(h = h, r = 3, chamfer = chamfer);
|
||||
|
||||
translate([20, 30])
|
||||
tearslot(h = 0, r = 3, w = 10);
|
||||
tearslot(h = h, r = 3, w = 10, chamfer = chamfer);
|
||||
|
||||
translate([30, 15])
|
||||
vertical_tearslot(h = 0, r =3, l = 10);
|
||||
vertical_tearslot(h = h, r =3, l = 10, chamfer = chamfer);
|
||||
|
||||
translate([20, 10])
|
||||
semi_teardrop(h = 0, r = 3);
|
||||
semi_teardrop(h = h, r = 3, chamfer = chamfer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
teardrops();
|
||||
|
@@ -21,45 +21,106 @@
|
||||
//! For making horizontal holes that don't need support material.
|
||||
//! Small holes can get away without it, but they print better with truncated teardrops.
|
||||
//
|
||||
module teardrop(h, r, center = true, truncate = true) //! For making horizontal holes that don't need support material, set ```truncate = false``` to make traditional RepRap teardrops that don't even need bridging
|
||||
render(convexity = 5)
|
||||
extrude_if(h, center)
|
||||
hull() {
|
||||
circle4n(r);
|
||||
|
||||
if(truncate)
|
||||
translate([0, r / 2])
|
||||
square([2 * r * (sqrt(2) - 1), r], center = true);
|
||||
else
|
||||
polygon([[0, 0], [eps, 0], [0, r * sqrt(2)]]);
|
||||
}
|
||||
|
||||
module semi_teardrop(h, r, d = undef, center = true) //! A semi teardrop in the positive Y domain
|
||||
render(convexity = 5)
|
||||
extrude_if(h, center)
|
||||
intersection() {
|
||||
R = is_undef(d) ? r : d / 2;
|
||||
teardrop(r = R, h = 0);
|
||||
|
||||
sq = R + 1;
|
||||
translate([-sq, 0])
|
||||
square([2 * sq, sq]);
|
||||
}
|
||||
|
||||
module teardrop_plus(h, r, center = true, truncate = true) //! Slightly bigger teardrop to allow for the 3D printing staircase effect
|
||||
teardrop(h, r + layer_height / 4, center, truncate);
|
||||
|
||||
module tearslot(h, r, w, center = true) //! A horizontal slot that doesn't need support material
|
||||
extrude_if(h, center)
|
||||
module teardrop(h, r, center = true, truncate = true, chamfer = 0) { //! For making horizontal holes that don't need support material, set ```truncate = false``` to make traditional RepRap teardrops that don't even need bridging
|
||||
module teardrop_2d(r, truncate) {
|
||||
hull() {
|
||||
translate([-w/2,0,0]) teardrop(r = r, h = 0);
|
||||
translate([ w/2,0,0]) teardrop(r = r, h = 0);
|
||||
circle4n(r);
|
||||
if(truncate)
|
||||
translate([0, r / 2])
|
||||
square([2 * r * (sqrt(2) - 1), r], center = true);
|
||||
else
|
||||
polygon([[0, 0], [eps, 0], [0, r * sqrt(2)]]);
|
||||
}
|
||||
}
|
||||
|
||||
render(convexity = 5)
|
||||
extrude_if(h, center)
|
||||
teardrop_2d(r, truncate);
|
||||
|
||||
teardrop_chamfer(h, center, chamfer) {
|
||||
linear_extrude(eps, center = true)
|
||||
teardrop_2d(r + chamfer / 2, truncate);
|
||||
translate_z(-chamfer / 2)
|
||||
linear_extrude(eps, center = true)
|
||||
teardrop_2d(r, truncate);
|
||||
}
|
||||
}
|
||||
|
||||
module semi_teardrop(h, r, d = undef, center = true, chamfer = 0) { //! A semi teardrop in the positive Y domain
|
||||
module semi_teardrop_2d(r, d) {
|
||||
intersection() {
|
||||
R = is_undef(d) ? r : d / 2;
|
||||
teardrop(r = R, h = 0);
|
||||
|
||||
sq = R + 1;
|
||||
translate([-sq, 0])
|
||||
square([2 * sq, sq]);
|
||||
}
|
||||
}
|
||||
|
||||
render(convexity = 5)
|
||||
extrude_if(h, center)
|
||||
semi_teardrop_2d(r, d);
|
||||
|
||||
teardrop_chamfer(h, center, chamfer) {
|
||||
linear_extrude(eps, center = true)
|
||||
semi_teardrop_2d(r + chamfer / 2, d);
|
||||
translate_z(-chamfer / 2)
|
||||
linear_extrude(eps, center = true)
|
||||
semi_teardrop_2d(r, d);
|
||||
}
|
||||
}
|
||||
|
||||
module teardrop_plus(h, r, center = true, truncate = true, chamfer = 0) //! Slightly bigger teardrop to allow for the 3D printing staircase effect
|
||||
teardrop(h, r + layer_height / 4, center, truncate, chamfer);
|
||||
|
||||
module tearslot(h, r, w, center = true, chamfer = 0) { //! A horizontal slot that doesn't need support material
|
||||
module tearslot_2d(r, w) {
|
||||
hull() {
|
||||
translate([-w / 2, 0]) teardrop(r = r, h = 0);
|
||||
translate([w / 2, 0]) teardrop(r = r, h = 0);
|
||||
}
|
||||
}
|
||||
|
||||
module vertical_tearslot(h, r, l, center = true) //! A vertical slot that doesn't need support material
|
||||
extrude_if(h, center)
|
||||
tearslot_2d(r, w);
|
||||
|
||||
teardrop_chamfer(h, center, chamfer) {
|
||||
linear_extrude(eps, center = true)
|
||||
tearslot_2d(r + chamfer / 2, w);
|
||||
translate_z(-chamfer / 2)
|
||||
linear_extrude(eps, center = true)
|
||||
tearslot_2d(r, w);
|
||||
}
|
||||
}
|
||||
|
||||
module vertical_tearslot(h, r, l, center = true, chamfer = 0) { //! A vertical slot that doesn't need support material
|
||||
module vertical_tearslot_2d(r, l) {
|
||||
hull() {
|
||||
translate([0, l / 2]) teardrop(0, r, true);
|
||||
translate([0, -l / 2])
|
||||
circle4n(r);
|
||||
translate([0, -l / 2]) circle4n(r);
|
||||
}
|
||||
}
|
||||
|
||||
extrude_if(h, center)
|
||||
vertical_tearslot_2d(r, l);
|
||||
|
||||
teardrop_chamfer(h, center, chamfer) {
|
||||
linear_extrude(eps, center = true)
|
||||
vertical_tearslot_2d(r + chamfer / 2, l);
|
||||
translate_z(-chamfer / 2)
|
||||
linear_extrude(eps, center = true)
|
||||
vertical_tearslot_2d(r, l);
|
||||
}
|
||||
}
|
||||
|
||||
module teardrop_chamfer(h, center, chamfer) { //! Helper module for adding chamfer to a teardrop
|
||||
if(h && chamfer)
|
||||
translate_z(center ? 0 : h / 2)
|
||||
for(m = [0, 1])
|
||||
mirror([0, 0, m])
|
||||
translate_z((h - eps ) / 2)
|
||||
hull()
|
||||
children();
|
||||
}
|
||||
|
||||
|
@@ -18,7 +18,9 @@
|
||||
//
|
||||
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];
|
||||
ball_bearings = [BB624, BB608, BB6200, BB6201];
|
||||
|
||||
use <ball_bearing.scad>
|
||||
|
@@ -41,9 +41,7 @@ function no_point(str) = chr([for(c = str) if(c == ".") ord("p") else ord(c)]);
|
||||
// We model the belt path at the pitch radius of the pulleys and the pitch line of the belt to get an accurate length.
|
||||
// The belt is then drawn by offseting each side from the pitch line.
|
||||
//
|
||||
module belt(type, points, gap = 0, gap_pt = undef) { //! Draw a belt path given a set of points and pitch radii where the pulleys are. Closed loop unless a gap is specified
|
||||
belt_colour = grey20;
|
||||
tooth_colour = grey50;
|
||||
module belt(type, points, gap = 0, gap_pt = undef, belt_colour = grey20, tooth_colour = grey50) { //! Draw a belt path given a set of points and pitch radii where the pulleys are. Closed loop unless a gap is specified
|
||||
width = belt_width(type);
|
||||
pitch = belt_pitch(type);
|
||||
thickness = belt_thickness(type);
|
||||
|
@@ -43,7 +43,7 @@ module extrusion_cross_section(type, cornerHole) {
|
||||
fillet = extrusion_fillet(type);
|
||||
cornerSize = (width-channelWidth)/2;
|
||||
cornerSquare = (width-extrusion_channel_width_internal(type))/2;
|
||||
cornerHoleDiameter =extrusion_corner_hole(type);
|
||||
cornerHoleDiameter = extrusion_corner_hole(type);
|
||||
|
||||
translate([-width/2,-width/2]) {
|
||||
difference() {
|
||||
@@ -57,7 +57,7 @@ module extrusion_cross_section(type, cornerHole) {
|
||||
translate([fillet,fillet])
|
||||
square([cornerSquare-fillet,cornerSquare-fillet]);
|
||||
}
|
||||
if(cornerHole)
|
||||
if(cornerHole && cornerHoleDiameter > 0)
|
||||
translate([cornerSquare/2,cornerSquare/2])
|
||||
circle(d=cornerHoleDiameter);
|
||||
}
|
||||
@@ -117,12 +117,11 @@ module extrusion_cross_section(type, cornerHole) {
|
||||
extrusion_center_section(type);
|
||||
}
|
||||
|
||||
module extrusion(type, length, cornerHole = false) { //! Draw the specified extrusion
|
||||
module extrusion(type, length, center = true, cornerHole = false) { //! Draw the specified extrusion
|
||||
|
||||
vitamin(str("extrusion(", type[0], ", ", length, "): Extrusion ", type[0], " x ", length, "mm"));
|
||||
vitamin(str("extrusion(", type[0], ", ", length, arg(cornerHole, false, "cornerHole"), "): Extrusion ", type[0], " x ", length, "mm"));
|
||||
|
||||
color(grey90)
|
||||
linear_extrude(height = length)
|
||||
linear_extrude(length, center = center)
|
||||
extrusion_cross_section(type, cornerHole);
|
||||
}
|
||||
|
||||
|
138
vitamins/extrusion_bracket.scad
Normal file
@@ -0,0 +1,138 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
//! Brackets for joining extrusions at a corner.
|
||||
|
||||
include <NopSCADlib/core.scad>
|
||||
include <screws.scad>
|
||||
include <nuts.scad>
|
||||
|
||||
function extrusion_inner_corner_bracket_size(type) = type[1]; //! Size of inner bracket
|
||||
|
||||
module extrusion_inner_corner_bracket(type, grub_screws = true) { //! Inner corner bracket for extrusion
|
||||
vitamin(str("extrusion_inner_corner_bracket(", type[0], ", ", grub_screws, "): Extrusion inner corner bracket ", type[1].z));
|
||||
|
||||
size = extrusion_inner_corner_bracket_size(type);
|
||||
armLength = size.x;
|
||||
bottomTabOffset = 4;
|
||||
topTabOffset = 10;
|
||||
sizeBottom = [armLength - bottomTabOffset, 6, size.z];
|
||||
sizeTop = [armLength - topTabOffset, 6, size.z];
|
||||
tabSizeY1 = 10;
|
||||
tabSizeY2 = 6;
|
||||
tabSizeZ = 3.25;
|
||||
holeRadius = M4_tap_radius;
|
||||
|
||||
translate([-size.z - 0.75, -size.z - 0.75, 0])
|
||||
rotate([-90, 0, 0]) {
|
||||
color("silver") {
|
||||
translate([(armLength + bottomTabOffset) / 2, 0, tabSizeZ])
|
||||
rotate([0, 180, 0])
|
||||
extrusionSlidingNut(sizeBottom, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, (bottomTabOffset - armLength) / 2 + 5);
|
||||
translate([tabSizeZ, 0, (armLength + topTabOffset) / 2])
|
||||
rotate([0, -90, 0])
|
||||
extrusionSlidingNut(sizeTop, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius,-(topTabOffset - armLength) / 2 - 5);
|
||||
translate([0, -size.z / 2, 0]) {
|
||||
cube([bottomTabOffset, size.z, size.z]);
|
||||
cube([size.z, size.z, topTabOffset]);
|
||||
}
|
||||
}
|
||||
if(grub_screws)
|
||||
not_on_bom() no_explode() {
|
||||
grubScrewLength = 6;
|
||||
for(angle = [[0, 0, 0], [0, -90, 180]])
|
||||
rotate(angle)
|
||||
translate([armLength - 5, 0, size.z])
|
||||
screw(M3_grub_screw, grubScrewLength);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function extrusion_corner_bracket_size(type) = type[1]; //! Size of bracket
|
||||
function extrusion_corner_bracket_base_thickness(type) = type[2]; //! Thickness of base of bracket
|
||||
function extrusion_corner_bracket_side_thickness(type) = type[3]; //! Thickness of side of bracket
|
||||
function extrusion_corner_bracket_hole_offset(type) = type[4]; //! Hole offset from corner
|
||||
|
||||
module extrusion_corner_bracket(type) { //! Corner bracket for extrusion
|
||||
vitamin(str("extrusion_corner_bracket(", type[0], "): Extrusion corner bracket ", type[1].z));
|
||||
|
||||
eSize = extrusion_corner_bracket_size(type).z;
|
||||
cbSize = extrusion_corner_bracket_size(type).x;
|
||||
baseThickness = extrusion_corner_bracket_base_thickness(type);
|
||||
|
||||
module base() {
|
||||
linear_extrude(baseThickness)
|
||||
difference() {
|
||||
translate([0, -eSize / 2, 0])
|
||||
square([cbSize, eSize]);
|
||||
hull() {
|
||||
translate([extrusion_corner_bracket_hole_offset(type) + 1.5, 0, 0])
|
||||
circle(r = M5_clearance_radius);
|
||||
translate([extrusion_corner_bracket_hole_offset(type) - 1.5, 0, 0])
|
||||
circle(r = M5_clearance_radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
color("silver") {
|
||||
rotate([90, 0, 90])
|
||||
base();
|
||||
translate([0, baseThickness, 0])
|
||||
rotate([90, 0, 0])
|
||||
base();
|
||||
sideThickness = extrusion_corner_bracket_side_thickness(type);
|
||||
for(z = [-eSize / 2, eSize / 2 - sideThickness]) {
|
||||
translate_z(z) {
|
||||
right_triangle(cbSize, cbSize, sideThickness, center = false);
|
||||
cube([5, cbSize, sideThickness]);
|
||||
cube([cbSize, 5, sideThickness]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module extrusion_corner_bracket_hole_positions(type) { //! Place children at hole positions
|
||||
for(angle = [ [0, 90, 0], [-90, -90, 0] ])
|
||||
rotate(angle)
|
||||
translate([0, extrusion_corner_bracket_hole_offset(type), extrusion_corner_bracket_base_thickness(type)])
|
||||
children();
|
||||
}
|
||||
|
||||
module extrusion_corner_bracket_assembly(type, part_thickness = 2, screw_type = M4_cap_screw, nut_type = M4_sliding_t_nut, max_screw_depth = 6) { //! Assembly with fasteners in place
|
||||
extrusion_corner_bracket(type);
|
||||
|
||||
screw_washer_thickness = washer_thickness(screw_washer(screw_type));
|
||||
nut_washer_type = nut_washer(nut_type);
|
||||
nut_washer_thickness = nut_washer_type ? washer_thickness(nut_washer_type) : 0;
|
||||
|
||||
nut_offset = extrusion_corner_bracket_base_thickness(type) + part_thickness;
|
||||
screw_length = max_screw_depth ? screw_shorter_than(extrusion_corner_bracket_base_thickness(type) + screw_washer_thickness + max_screw_depth)
|
||||
: screw_longer_than(nut_offset + screw_washer_thickness + nut_washer_thickness + nut_thickness(nut_type));
|
||||
|
||||
extrusion_corner_bracket_hole_positions(type) {
|
||||
screw_and_washer(screw_type, screw_length);
|
||||
translate_z(-nut_offset)
|
||||
vflip()
|
||||
if(nut_washer_type)
|
||||
nut_and_washer(nut_type);
|
||||
else
|
||||
rotate(90)
|
||||
sliding_t_nut(nut_type);
|
||||
}
|
||||
}
|
29
vitamins/extrusion_brackets.scad
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// 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/>.
|
||||
//
|
||||
//
|
||||
// Extrusion brackets
|
||||
//
|
||||
|
||||
E20_inner_corner_bracket = [ "E20_inner_corner_bracket", [25, 25, 4.5] ];
|
||||
|
||||
E20_corner_bracket = [ "E20_corner_bracket", [28, 28, 20], 2, 3, 19.5];
|
||||
|
||||
|
||||
use <extrusion_bracket.scad>
|
||||
|
@@ -20,10 +20,10 @@
|
||||
// Extrusion
|
||||
//
|
||||
// W H d1 d2 s cw cwi t st f
|
||||
E2020 = [ "E2020", 20, 20, 4.2, 0, 8, 6, 12.0, 2, 2, 1 ];
|
||||
E2040 = [ "E2040", 20, 40, 4.2, 0, 8, 6, 12.0, 2, 2, 1 ];
|
||||
E2060 = [ "E2060", 20, 60, 4.2, 0, 8, 6, 12.0, 2, 2, 1 ];
|
||||
E2080 = [ "E2080", 20, 80, 4.2, 0, 8, 6, 12.0, 2, 2, 1 ];
|
||||
E2020 = [ "E2020", 20, 20, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ];
|
||||
E2040 = [ "E2040", 20, 40, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ];
|
||||
E2060 = [ "E2060", 20, 60, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ];
|
||||
E2080 = [ "E2080", 20, 80, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ];
|
||||
E3030 = [ "E3030", 30, 30, 6.8, 4.2, 12, 8, 16.5, 2, 2, 1 ];
|
||||
E3060 = [ "E3060", 30, 60, 6.8, 4.2, 12, 8, 16.5, 2, 2, 1 ];
|
||||
E4040 = [ "E4040", 40, 40, 10.5, 6.0, 15, 10, 20.0, 5.5, 3, 1 ];
|
||||
|
@@ -39,9 +39,8 @@ function gt_y_offset(type) = type[13]; //! Offset of the pins from centre o
|
||||
function gt_y_offset2(type) = type[14]; //! Offset of the pins screws from the screws
|
||||
function gt_tube_h(type) = type[15]; //! Height of optional tubes around the screws
|
||||
|
||||
module green_terminal(type, ways, skip = []) { //! Draw green terminal blocks, skip can be used to remove pins.
|
||||
module green_terminal(type, ways, skip = [], colour = "lime") { //! Draw green terminal blocks, skip can be used to remove pins.
|
||||
pitch = gt_pitch(type);
|
||||
|
||||
imperial = str(pitch / inch(1));
|
||||
vitamin(str("green_terminal(", type[0], ", ", ways, "): Terminal block ", ways, " way ", len(imperial) < 5 ? str(pitch / inch(1), "\"") : str(pitch, "mm")));
|
||||
width = ways * pitch;
|
||||
@@ -79,7 +78,7 @@ module green_terminal(type, ways, skip = []) { //! Draw green terminal blocks, s
|
||||
}
|
||||
}
|
||||
|
||||
color("lime") {
|
||||
color(colour) {
|
||||
rotate([90, 0, 0])
|
||||
linear_extrude(height = pitch, center = true, convexity = 5)
|
||||
polygon(points = [ // Vertical section
|
||||
|
@@ -18,6 +18,14 @@
|
||||
//
|
||||
// Green terminal blocks
|
||||
//
|
||||
|
||||
// f b y y
|
||||
// h h f h b s f o o
|
||||
// p d e e d e d c r f f t
|
||||
// i e i i e i e r o b b f f u
|
||||
// t p g t g p g p e n o o s s b
|
||||
// c t h o h t h t w t x x e t e
|
||||
// h h t p t h t h r t w h t 2 h
|
||||
gt_2p54 = ["gt_2p54", 2.54, 6.6, 10, 3, 6, 0.4, 6.4, 1, 1, 0.2, 2, 2, 0, 0, 0];
|
||||
gt_3p5 = ["gt_3p5", 3.5, 7.3, 8.5, 4, 5, 0.4, 4, 0, 1.35, 0.4, 1.8, 2, 0, 0, 0];
|
||||
gt_6p35 = ["gt_6p35", 6.35, 12.6, 17.4, 6.8, 12, 0.4, 11, 2, 2.7, 0.8, 3.4, 4.2, 1.8, 1.1, 21.4];
|
||||
|
@@ -25,7 +25,7 @@ use <screw.scad>
|
||||
use <nut.scad>
|
||||
use <washer.scad>
|
||||
use <spade.scad>
|
||||
include <inserts.scad>
|
||||
use <insert.scad>
|
||||
|
||||
function iec_part(type) = type[1]; //! Description
|
||||
function iec_screw(type) = type[2]; //! Screw type
|
||||
|
@@ -36,8 +36,4 @@ F1BM4 = [ "F1BM4", 8.2, 6.3, 5.6, 4, 5.15, 2.3, 6.0, 5.55 ];
|
||||
|
||||
inserts = [ F1BM2, F1BM2p5, F1BM3, F1BM4 ];
|
||||
|
||||
function screw_insert(screw, i = 0) = let(d = screw_radius(screw) * 2)
|
||||
i >= len(inserts) ? undef
|
||||
: insert_screw_diameter(inserts[i]) == d ? inserts[i]
|
||||
: screw_insert(screw, i + 1);
|
||||
use <insert.scad>
|
||||
|
119
vitamins/kp_pillow_block.scad
Normal file
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// 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/>.
|
||||
|
||||
//
|
||||
//! KP pillow block bearings
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../utils/tube.scad>
|
||||
|
||||
include <screws.scad>
|
||||
use <washer.scad>
|
||||
use <ball_bearing.scad>
|
||||
|
||||
kp_pillow_block_color = grey70;
|
||||
|
||||
function kp_diameter(type) = type[1]; //! Rod hole diameter
|
||||
function kp_hole_offset(type) = type[2]; //! Rod hole offset
|
||||
function kp_size(type) = [type[3],type[8],type[5]]; //! Size of bracket
|
||||
function kp_base_height(type) = type[7]; //! Height of base containing the bolts
|
||||
function kp_screw_separation(type) = type[4]; //! Separation of bolts in the base
|
||||
|
||||
|
||||
module kp_pillow_block(type) { //! Draw the KP pillow block
|
||||
vitamin(str("kp_pillow_block(", type[0], "): ", type[0], " pillow block"));
|
||||
|
||||
d = kp_diameter(type);
|
||||
H = kp_hole_offset(type);
|
||||
L = kp_size(type)[0];
|
||||
J = kp_screw_separation(type);
|
||||
A = kp_size(type)[2];// sizeZ, includes protruding center
|
||||
N = type[6];
|
||||
H1 = kp_base_height(type);
|
||||
H0 = kp_size(type)[1];
|
||||
K = type[9];
|
||||
S = type[10];
|
||||
b = type[11];
|
||||
bolthole_radius = type[12];
|
||||
|
||||
color(kp_pillow_block_color)
|
||||
translate([0, -H, 0]) {
|
||||
fillet = 1;
|
||||
squareSizeX = (L - H0) / 2 + fillet;
|
||||
rotate([-90, 0, 0])
|
||||
linear_extrude(H1)
|
||||
difference() {
|
||||
union() {
|
||||
for(i = [-L / 2, L / 2 - squareSizeX])
|
||||
translate([i, -A / 2])
|
||||
rounded_square([squareSizeX, A], fillet, center = false);
|
||||
}
|
||||
for(i = [-J / 2, J / 2])
|
||||
translate([i, 0])
|
||||
circle(r = bolthole_radius);
|
||||
}
|
||||
|
||||
translate_z(-A / 2) {
|
||||
for(x = [- L / 2 + squareSizeX - fillet, L / 2 - squareSizeX + fillet - 2])
|
||||
translate([x, 0, 0])
|
||||
cube([2, H, A]);
|
||||
translate([0 , H, 0])
|
||||
tube(H0 / 2, b / 2, A, center = false);
|
||||
}
|
||||
stripThickness = 4;
|
||||
translate([-H0 / 2, 0, -stripThickness / 2])
|
||||
linear_extrude(stripThickness) difference() {
|
||||
square([H0, H]);
|
||||
translate([H0 / 2, H])
|
||||
circle(b / 2);
|
||||
}
|
||||
}
|
||||
|
||||
not_on_bom() no_explode()
|
||||
ball_bearing(type[13]);
|
||||
}
|
||||
|
||||
module kp_pillow_block_hole_positions(type) { //! Place children at hole positions
|
||||
for(x = [-kp_screw_separation(type), kp_screw_separation(type)])
|
||||
translate([x / 2, kp_base_height(type) - kp_hole_offset(type), 0])
|
||||
rotate([-90,0,0])
|
||||
children();
|
||||
}
|
||||
|
||||
module kp_pillow_block_assembly(type, part_thickness = 2, screw_type = M5_cap_screw, nut_type = undef) { //! Assembly with fasteners in place
|
||||
kp_pillow_block(type);
|
||||
|
||||
screw_washer_thickness = washer_thickness(screw_washer(screw_type));
|
||||
nut_type = is_undef(nut_type) ? screw_nut(screw_type) : nut_type;
|
||||
nut_washer_type = nut_washer(nut_type);
|
||||
nut_washer_thickness = nut_washer_type ? washer_thickness(nut_washer_type) : 0;
|
||||
|
||||
nut_offset = kp_base_height(type) + part_thickness;
|
||||
screw_length = screw_shorter_than(nut_offset + screw_washer_thickness + nut_thickness(nut_type) + nut_washer_thickness);
|
||||
|
||||
kp_pillow_block_hole_positions(type) {
|
||||
screw_and_washer(screw_type, screw_length);
|
||||
|
||||
translate_z(-nut_offset)
|
||||
vflip()
|
||||
if(nut_washer_type)
|
||||
nut_and_washer(nut_type);
|
||||
else
|
||||
sliding_t_nut(nut_type);
|
||||
}
|
||||
}
|
35
vitamins/kp_pillow_blocks.scad
Normal file
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! KP pillow block bearings
|
||||
//
|
||||
|
||||
include <screws.scad>
|
||||
include <ball_bearings.scad>
|
||||
|
||||
// d H L J A N H1 H0 K S b bolthole bearing
|
||||
KP08_15 = ["KP08_15", 8, 15, 55, 42, 13, 4.5, 5, 29, 0.0, 0, 22, M4_clearance_radius, BB608];
|
||||
KP08_18 = ["KP08_18", 8, 18, 55, 42, 13, 4.5, 5, 29, 0.0, 0, 22, M4_clearance_radius, BB608];
|
||||
KP000 = ["KP000", 10, 18, 67, 53, 16, 7.0, 6, 35, 14.0, 4, 30, M6_clearance_radius, BB6200];
|
||||
KP001 = ["KP001", 12, 19, 71, 56, 16, 7.0, 6, 38, 14.5, 4, 32, M6_clearance_radius, BB6201];
|
||||
|
||||
kp_pillow_blocks = [KP08_15, KP08_18, KP000, KP001];
|
||||
|
||||
use <kp_pillow_block.scad>
|
@@ -23,7 +23,7 @@
|
||||
include <../core.scad>
|
||||
include <screws.scad>
|
||||
include <ring_terminals.scad>
|
||||
include <inserts.scad>
|
||||
use <insert.scad>
|
||||
|
||||
function mains_socket_width(type) = type[1]; //! Width at the base
|
||||
function mains_socket_depth(type) = type[2]; //! Depth at the base
|
||||
|
@@ -132,75 +132,60 @@ module wingnut(type) { //! Draw a wingnut
|
||||
}
|
||||
|
||||
module sliding_t_nut(type) {
|
||||
vitamin(str("sliding_t_nut(", type[0], "): Nut M", nut_size(type), " sliding T"));
|
||||
hammerNut = type[10];
|
||||
vitamin(str("sliding_t_nut(", type[0], "): Nut M", nut_size(type), hammerNut ? " hammer" : " sliding T"));
|
||||
|
||||
size = [type[7], type[2], nut_thickness(type)];
|
||||
size = [type[7], type[2], nut_thickness(type, true)];
|
||||
tabSizeY1 = type[8];
|
||||
tabSizeY2 = type[9];
|
||||
tabSizeZ = type[10];
|
||||
tabSizeZ = nut_thickness(type);
|
||||
holeRadius = nut_size(type) / 2;
|
||||
|
||||
if($preview)
|
||||
color(grey80)
|
||||
extrusionSlidingNut(size, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius);
|
||||
|
||||
}
|
||||
|
||||
module hammer_nut(type) {
|
||||
vitamin(str("hammer_nut(", type[0], "): Nut M", nut_size(type), " hammer"));
|
||||
|
||||
size = [type[7], type[2], nut_thickness(type)];
|
||||
tabSizeY1 = type[8];
|
||||
tabSizeY2 = type[9];
|
||||
tabSizeZ = type[10];
|
||||
holeRadius = nut_size(type) / 2;
|
||||
|
||||
if($preview)
|
||||
color(grey80)
|
||||
extrusionSlidingNut(size, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, 0, hammerNut = true);
|
||||
|
||||
color(grey80)
|
||||
extrusionSlidingNut(size, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, 0, hammerNut);
|
||||
}
|
||||
|
||||
module extrusionSlidingNut(size, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, holeOffset = 0, hammerNut = false) {
|
||||
// center section
|
||||
linear_extrude(size[2] - tabSizeZ)
|
||||
difference() {
|
||||
square([size[0], size[1]], center = true);
|
||||
if(hammerNut) {
|
||||
translate([size[0] / 2, size[1] / 2])
|
||||
rotate(180)
|
||||
fillet(1);
|
||||
translate([-size[0] / 2, -size[1] / 2])
|
||||
fillet(1);
|
||||
}
|
||||
if(holeRadius)
|
||||
translate([holeOffset, 0])
|
||||
circle(holeRadius);
|
||||
}
|
||||
translate_z(size[2] - tabSizeZ)
|
||||
linear_extrude(tabSizeZ)
|
||||
stem_h = size.z - tabSizeZ;
|
||||
translate_z(-stem_h)
|
||||
linear_extrude(stem_h)
|
||||
difference() {
|
||||
square([size[0], tabSizeY2], center = true);
|
||||
square([size.x, size.y], center = true);
|
||||
if(hammerNut) {
|
||||
translate([size.x / 2, size.y / 2])
|
||||
rotate(180)
|
||||
fillet(1);
|
||||
translate([-size.x / 2, -size.y / 2])
|
||||
fillet(1);
|
||||
}
|
||||
if(holeRadius)
|
||||
translate([holeOffset, 0])
|
||||
circle(holeRadius);
|
||||
}
|
||||
linear_extrude(tabSizeZ)
|
||||
difference() {
|
||||
square([size.x, tabSizeY2], center = true);
|
||||
if(holeRadius)
|
||||
translate([holeOffset, 0])
|
||||
circle(holeRadius);
|
||||
}
|
||||
|
||||
thread_d = 2 * holeRadius;
|
||||
if(show_threads)
|
||||
translate([holeOffset, 0])
|
||||
female_metric_thread(thread_d, metric_coarse_pitch(thread_d), size[2], center = false);
|
||||
translate([holeOffset, 0, -stem_h])
|
||||
female_metric_thread(thread_d, metric_coarse_pitch(thread_d), size.z, center = false);
|
||||
|
||||
// add the side tabs
|
||||
for(m = [0, 1])
|
||||
mirror([0, m, 0])
|
||||
translate([0, tabSizeY2 / 2, size[2] - tabSizeZ]) {
|
||||
translate([0, tabSizeY2 / 2]) {
|
||||
cubeZ = 1;
|
||||
translate([-size[0] / 2, 0, 0])
|
||||
cube([size[0], (tabSizeY1 - tabSizeY2) / 2, cubeZ]);
|
||||
translate([-size.x / 2, 0])
|
||||
cube([size.x, (tabSizeY1 - tabSizeY2) / 2, cubeZ]);
|
||||
translate_z(cubeZ)
|
||||
rotate([0, -90, 0])
|
||||
right_triangle(tabSizeZ - cubeZ, (tabSizeY1 - tabSizeY2) / 2, size[0], center = true);
|
||||
right_triangle(tabSizeZ - cubeZ, (tabSizeY1 - tabSizeY2) / 2, size.x, center = true);
|
||||
}
|
||||
}
|
||||
|
||||
|