1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-03 20:32:35 +02:00

Compare commits

...

18 Commits

Author SHA1 Message Date
Chris Palmer
95c4359421 Better test coverage of stepper earth tag position. 2020-02-28 14:27:35 +00:00
Chris Palmer
bcff26a27b Added threads to stepper motors and made the test show them. 2020-02-28 12:02:24 +00:00
Chris Palmer
07b00fabe0 Added a guard against and empty BOM in views.py. 2020-02-28 09:22:50 +00:00
Chris Palmer
8ed0f3c1af Updated readme and images. 2020-02-28 09:05:59 +00:00
Martin Budden
0e8e387d35 Improved S_300_12 PSU. 2020-02-28 03:05:45 +00:00
Chris Palmer
0c17620adb Removed echo from extrusion_bracket.scad 2020-02-28 01:59:00 +00:00
Chris Palmer
6470f1b004 Extrusions now default to centered. New parts added to the libtest picture.
Extrusion bracket examples rotated for clearer view and made optional.
Added missing description for scs_bearing_blocks.
Extrusion no longer shows centre parameter but does show no default cornerHole.
2020-02-27 17:55:03 +00:00
Chris Palmer
29ba402530 Updated image 2020-02-27 11:22:02 +00:00
Chris Palmer
aed4a699f2 Merge branch 'kp_pillow_block_fix' of https://github.com/martinbudden/NopSCADlib into martinbudden-kp_pillow_block_fix 2020-02-27 11:18:54 +00:00
Chris Palmer
10b846c0d5 Updated images 2020-02-27 11:17:07 +00:00
Martin Budden
2de479d691 Fixed incomplete webbing on side of kp_pillow_block. 2020-02-27 10:44:00 +00:00
Chris Palmer
054dab5025 Merge branch 'linear_rail_groove' of https://github.com/martinbudden/NopSCADlib into martinbudden-linear_rail_groove 2020-02-27 10:35:09 +00:00
Chris Palmer
b559319b03 Ensured all Markdown table heading markers have at least three dashes. 2020-02-27 10:15:37 +00:00
Martin Budden
a487ca0f20 Added groove to linear_rail. 2020-02-27 09:47:36 +00:00
Chris Palmer
a2ce3f1278 Updated readme 2020-02-27 09:44:54 +00:00
Chris Palmer
01eb6931d9 Merge branch 'extrusion_center' of https://github.com/martinbudden/NopSCADlib into martinbudden-extrusion_center 2020-02-27 09:41:01 +00:00
Chris Palmer
c09a74b4c9 Added center option to spring and documented the origin of rods, etc. 2020-02-27 09:39:05 +00:00
Martin Budden
aab7f3d683 Added center parameter. Added cornerhole dimensions to E20. 2020-02-27 09:03:23 +00:00
45 changed files with 274 additions and 142 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -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&nbsp;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** |
| &nbsp;&nbsp;.&nbsp; | &nbsp;&nbsp;.&nbsp; | &nbsp;&nbsp;.&nbsp; | &nbsp;&nbsp;2&nbsp; | &nbsp;&nbsp;2&nbsp; | &nbsp;&nbsp; 4mm shielded jack socket blue |
| &nbsp;&nbsp;.&nbsp; | &nbsp;&nbsp;.&nbsp; | &nbsp;&nbsp;.&nbsp; | &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp;1&nbsp; | &nbsp;&nbsp; 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 |
|--|
|---|
| ![socket_box.stl](stls/socket_box.png)
@@ -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 |
|--|
|---|
| ![foot.stl](stls/foot.png)
@@ -105,7 +105,7 @@ Earth leakage can be measured Canadian CSA style by disconnected the neutral lin
### Sub-assemblies
| 1 x base_assembly |
|--|
|---|
| ![base_assembled](assemblies/base_assembled_tn.png)
@@ -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 |
|--|
|---|
| ![feet_assembled](assemblies/feet_assembled_tn.png)
@@ -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 |
|--|
|---|
| ![mains_in_assembled](assemblies/mains_in_assembled_tn.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 KiB

After

Width:  |  Height:  |  Size: 782 KiB

View File

@@ -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;
@@ -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();

View File

@@ -669,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 |
![extrusions](tests/png/extrusions.png)
@@ -2008,15 +2008,13 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 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 |
| 4 | ```screw(M2p5_cap_screw, 35)``` | Screw M2.5 cap x 35mm |
| 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 |
@@ -2029,24 +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_spacer25130_2.stl |
| 4 | pcb_spacer25240.stl |
| 4 | pcb_spacer2570.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>
@@ -2474,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.
@@ -2601,6 +2601,9 @@ Machine screws and wood screws with various head styles.
---
<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.
@@ -2885,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.
@@ -2913,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. |
![springs](tests/png/springs.png)
@@ -3015,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>
@@ -4328,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>

View File

@@ -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 = ''

View 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. |

View File

@@ -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):
@@ -240,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]:
@@ -283,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)
@@ -297,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](stls/%s) %s' % (part, part.replace('.stl','.png'), '|\n' if j == j - 1 else ''), end = '', file = doc_file)
@@ -313,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](dxfs/%s) %s' % (part, part.replace('.dxf','.png'), '|\n' if j == j - 1 else ''), end = '', file = doc_file)
@@ -329,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](assemblies/%s) %s' % (a, a + '_tn.png', '|\n' if j == j - 1 else ''), end = '', file = doc_file)

View File

@@ -23,7 +23,7 @@ include <../vitamins/extrusions.scad>
include <../vitamins/washers.scad>
include <../vitamins/nuts.scad>
module extrusion_brackets() {
module extrusion_brackets(examples = false) {
extrusion_inner_corner_bracket(E20_inner_corner_bracket);
translate([30, 0])
@@ -34,27 +34,32 @@ module extrusion_brackets() {
eWidth = extrusion_width(E2020);
translate([0, 60]) {
extrusion_inner_corner_bracket(E20_inner_corner_bracket);
translate([-eWidth / 2, 0, 0])
rotate([-90, 0, 0])
extrusion(E2020, 20);
translate([-eWidth, -eWidth / 2, 0])
rotate([0, 90, 0])
extrusion(E2020, 40);
}
if(examples) {
translate([20, 60, 10]) rotate([90, 0, 180]) {
extrusion_inner_corner_bracket(E20_inner_corner_bracket);
translate([60, 60]) {
extrusion_corner_bracket_assembly(E20_corner_bracket);
translate([-eWidth / 2, 0, 0])
rotate([-90, 0, 0])
extrusion(E2020, 30);
translate([-eWidth, -eWidth / 2, 0])
rotate([0, 90, 0])
extrusion(E2020, 50);
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)
let($show_threads = true)
extrusion_brackets();
extrusion_brackets(true);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View File

@@ -22,7 +22,7 @@ use <../utils/layout.scad>
include <../vitamins/scs_bearing_blocks.scad>
module scs_bearing_blocks()
layout([for(s = scs_bearing_blocks) 2 * scs_size(s)[0]]) {
layout([for(s = scs_bearing_blocks) scs_size(s).x], 10) {
part_thickness = 5;
scs_bearing_block_assembly(scs_bearing_blocks[$i], part_thickness);

View File

@@ -31,10 +31,9 @@ module sk_brackets() {
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);
extrusion($i < 2 ? E2020 : E3030, 20, false);
}
}
if($preview)
let($show_threads = true)
sk_brackets();
sk_brackets();

View File

@@ -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();

View File

@@ -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);
}

View File

@@ -70,7 +70,6 @@ function extrusion_corner_bracket_side_thickness(type) = type[3]; //! Thicknes
function extrusion_corner_bracket_hole_offset(type) = type[4]; //! Hole offset from corner
module extrusion_corner_bracket(type) { //! Corner bracket for extrusion
echo(type=type);
vitamin(str("extrusion_corner_bracket(", type[0], "): Extrusion corner bracket ", type[1].z));
eSize = extrusion_corner_bracket_size(type).z;

View File

@@ -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 ];

View File

@@ -72,13 +72,16 @@ module kp_pillow_block(type) { //! Draw the KP pillow block
for(x = [- L / 2 + squareSizeX - fillet, L / 2 - squareSizeX + fillet - 2])
translate([x, 0, 0])
cube([2, H, A]);
stripLength = J - 2 * bolthole_radius;
stripThickness = 4;
translate([-stripLength / 2, 0, (H1 + stripThickness) / 2])
cube([stripLength, H1, stripThickness]);
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()

View File

@@ -352,6 +352,6 @@ RAMPSEndstop = ["RAMPSEndstop", "RAMPS Endstop Switch",
[]];
pcbs = [ExtruderPCB, PI_IO, RPI0, EnviroPlus, RPI3, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PERF80x20, PERF70x50, PERF70x30, PERF60x40, PERF74x51, PSU12V1A, DuetE, Duex2, Duex5, Melzi, ZC_A0591, RAMPSEndstop];
pcbs = [RAMPSEndstop, ExtruderPCB, PI_IO, RPI0, EnviroPlus, RPI3, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PERF80x20, PERF70x50, PERF70x30, PERF60x40, PERF74x51, PSU12V1A, DuetE, Duex2, Duex5, Melzi, ZC_A0591];
use <pcb.scad>

View File

@@ -259,23 +259,26 @@ module psu(type) { //! Draw a power supply
square(16, center = true);
}
// earth strap
tab_w = w / 2 + cutout[2].x;
color("silver")
translate([-l / 2, w / 2 - tab_w, z])
cube([left, tab_w - bt, lt]);
// Earth pilar and screw
earth_inset = 4.5;
earth_d = 5;
translate([-l / 2 + earth_inset, w / 2 - tab_w / 2]) {
// if the cutout is too wide, then don't draw earth strap, pillar and screw
if (tab_w - bt > 0) {
// earth strap
color("silver")
cylinder(d = earth_d, h = z - pcb_thickness);
translate([-l / 2, w / 2 - tab_w, z])
cube([left, tab_w - bt, lt]);
translate_z(z + lt)
not_on_bom() no_explode()
spring_washer(M3_washer)
screw(M3_pan_screw, 8);
// Earth pillar and screw
earth_inset = 4.5;
earth_d = 5;
translate([-l / 2 + earth_inset, w / 2 - tab_w / 2]) {
color("silver")
cylinder(d = earth_d, h = z - pcb_thickness);
translate_z(z + lt)
not_on_bom() no_explode()
spring_washer(M3_washer)
screw(M3_pan_screw, 8);
}
}
// terminal block

View File

@@ -83,15 +83,76 @@ KY240W =
// This PSU, and ones very like it, are sold by LulzBot, and various sellers on eBay.
// The screw layout specified here uses the inner set of screw-mounts on the PSU, which are M4.
// The outer set don't appear to be M3, even though the datasheet claims they are.
S_300_12 =
["S_300_12", "S-300-12", 215, 115, 50, M4_cap_screw, M4_clearance_radius, false, 0, 0, [],
[ [[[ 215 / 2 - 32.5, 115 / 2 - 82.5],
[ 215 / 2 - 32.5, 115 / 2 - 32.5],
[ 215 / 2 - 182.5, 115 / 2 - 82.5],
[ 215 / 2 - 182.5, 115 / 2 - 32.5]]]
S_300_12 = [
"S_300_12",
"S-300-12",// part name
215, 115, 50,// length, width, height
M4_cap_screw, M4_clearance_radius,// screw type and clearance
false,// true if ATX style
13,// terminals bay depth
0,// heatsink bay depth
[// terminals
9,// count
18,// y offset
st_terminals
],
// faces
[
[// f_bottom, bottom
[// holes
[215/2 - 32.5, 115/2 - 82.5], [215/2 - 32.5, 115/2 - 32.5], [215/2 - 182.5, 115/2 - 82.5], [215/2 - 182.5, 115/2 - 32.5]
],
1.5,// thickness
[],// cutouts
false,// grill
[],[],[]// fan, iec, rocker
],
[]
];
[// f_top, top
[],// holes
0.5,// thickness
[],// coutouts
false,// grill
[215/2 - 47.5, 115/2 - 37.5, fan50x15]
],
[// f_left, front (terminals) after rotation
[],// holes
0.5,// thickness
[// cutouts
[
[-56, -25], [-56, -17],
[-60, -17], [-60, 0],
[115/2, 0], [115/2, -25]
]
],
false,// grill
],
[// f_right, back after rotation
[], // holes
1.5,// thickness
[],// cutouts
false,// grill
],
[// f_front, right after rotation
[// holes, offset from center
[215/2 - 32.5,-15], [215/2 - 182.5,-15],
[215/2 - 32.5, 10], [215/2 - 182.5, 10]
],
1.5,// thickness
[],// cutouts
false,// grill
],
[// f_back, left after rotation
[// holes, offset from center
[215/2 - 32.5, 15], [215/2 - 182.5, 15]
],
1.5,// thickness
[],// cutouts
false,// grill
],
],
// accessories to add to BOM
[]
];
External =
["External", "X Box", 0, 0, 0, false, false, false, 0, 0, [],
@@ -102,3 +163,4 @@ External =
psus = [PD_150_12, S_250_48, ATX500, KY240W, S_300_12];
use <psu.scad>

View File

@@ -133,20 +133,36 @@ module rail(type, length) { //! Draw the specified rail
vitamin(str("rail(", type[0], ", ", length, "): Linear rail ", type[0], " x ", length, "mm"));
color(grey90) {
linear_extrude(height = height - rail_bore_depth(type)) difference() {
linear_extrude(height - rail_bore_depth(type)) difference() {
square([length, width], center = true);
rail_hole_positions(type, length)
circle(d = rail_hole(type));
}
translate_z(rail_height(type) - rail_bore_depth(type))
linear_extrude(height = rail_bore_depth(type)) difference() {
square([length, width], center = true);
translate_z(rail_height(type) - rail_bore_depth(type)) {
h1 = rail_bore_depth(type) > 2 ? rail_bore_depth(type) / 3 : rail_bore_depth(type) / 2;
h0 = rail_bore_depth(type) > 2 ? (rail_bore_depth(type) - h1) / 2 : 0;
h2 = rail_bore_depth(type) - h1 - h0;
linear_extrude(h0) difference() {
square([length, width], center = true);
rail_hole_positions(type, length)
circle(d = rail_bore(type));
}
translate_z(h0)
linear_extrude(h1) difference() {
w1 = max(width - 2, rail_bore(type));
square([length, w1], center = true);
rail_hole_positions(type, length)
circle(d = rail_bore(type));
}
translate_z(h0 + h1)
linear_extrude(h2) difference() {
square([length, width], center = true);
rail_hole_positions(type, length)
circle(d = rail_bore(type));
}
}
}
}

View File

@@ -19,6 +19,8 @@
//
//! 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.
//
include <../core.scad>
use <../utils/thread.scad>

View File

@@ -18,7 +18,7 @@
//
//
// SCSnUU and SCSnLUU bearing blocks
//! SCSnUU and SCSnLUU bearing blocks
//

View File

@@ -19,6 +19,8 @@
//
//! 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.
//
include <../core.scad>
@@ -64,7 +66,7 @@ function comp_spring(type, l = 0) = //! Calculate the mesh for spring
profile = circle_points(wire_d / 2 - eps, $fn = 16)
) concat(type, [concat(sweep(path, profile), [l])]);
module comp_spring(type, l = 0) { //! Draw specified spring, l can be set to specify the compressed length.
module comp_spring(type, l = 0, center = false) { //! Draw specified spring, l can be set to specify the compressed length.
length = spring_length(type);
closed = spring_closed(type);
od = spring_od(type);
@@ -79,14 +81,17 @@ module comp_spring(type, l = 0) { //! Draw specified spring, l can be set to spe
mesh = len(type) > 9 ? spring_mesh(type) : spring_mesh(comp_spring(type, l));
assert(l == mesh[2], "can't change the length of a pre-generated spring");
color(spring_colour(type))
if(ground)
clip(zmin = 0, zmax = h)
len = l ? l : length;
translate_z(center ? - len / 2 : 0) {
color(spring_colour(type))
if(ground)
clip(zmin = 0, zmax = h)
polyhedron(mesh[0], mesh[1]);
else
polyhedron(mesh[0], mesh[1]);
else
polyhedron(mesh[0], mesh[1]);
if($children)
translate_z(l)
children();
if($children)
translate_z(len)
children();
}
}

View File

@@ -26,6 +26,7 @@ include <screws.scad>
use <washer.scad>
include <ring_terminals.scad>
use <../utils/tube.scad>
use <../utils/thread.scad>
use <rod.scad>
function NEMA_width(type) = type[1]; //! Width of the square face
@@ -60,6 +61,7 @@ module NEMA(type, shaft_angle = 0) { //! Draw specified NEMA stepper motor
shaft_rad = NEMA_shaft_dia(type) / 2;
cap = 8;
vitamin(str("NEMA(", type[0], "): Stepper motor NEMA", round(NEMA_width(type) / 2.54), " x ", length, "mm"));
thread_d = 3; // Is this always the case?
union() {
color(stepper_body_colour) // black laminations
@@ -75,7 +77,7 @@ module NEMA(type, shaft_angle = 0) { //! Draw specified NEMA stepper motor
tube(or = boss_rad, ir = shaft_rad + 2, h = boss_height * 2); // raised boss
for(end = [-1, 1])
translate_z(-length / 2 + end * (length - cap) / 2)
translate_z(-length / 2 + end * (length - cap) / 2) {
linear_extrude(height = cap, center = true)
difference() {
intersection() {
@@ -85,9 +87,14 @@ module NEMA(type, shaft_angle = 0) { //! Draw specified NEMA stepper motor
if(end > 0)
for(x = NEMA_holes(type), y = NEMA_holes(type))
translate([x, y])
circle(r = 3/2);
circle(d = thread_d);
}
}
}
if(show_threads)
for(x = NEMA_holes(type), y = NEMA_holes(type))
translate([x, y, -cap / 2])
female_metric_thread(thread_d, metric_coarse_pitch(thread_d), cap, colour = stepper_cap_colour);
shaft = NEMA_shaft_length(type);
translate_z(-5)
@@ -112,7 +119,7 @@ module NEMA(type, shaft_angle = 0) { //! Draw specified NEMA stepper motor
module NEMA_screw_positions(type, n = 4) { //! Positions children at the screw holes
pitch = NEMA_hole_pitch(type);
for($i = [0 : n - 1])
for($i = [0 : 1 : min(n - 1, 4)])
rotate($i * 90)
translate([pitch / 2, pitch / 2])
rotate($i * -90)