1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-04 12:45:30 +02:00

Compare commits

...

7 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
21 changed files with 215 additions and 113 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 769 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

@@ -626,10 +626,10 @@ Brackets for joining extrusions at a corner.
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | ```extrusion(E2020, 20, false)``` | Extrusion E2020 x 20mm |
| 1 | ```extrusion(E2020, 30, false)``` | Extrusion E2020 x 30mm |
| 1 | ```extrusion(E2020, 40, false)``` | Extrusion E2020 x 40mm |
| 1 | ```extrusion(E2020, 50, false)``` | Extrusion E2020 x 50mm |
| 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 |
@@ -669,21 +669,21 @@ Aluminium extrusion.
### Modules
| Module | Description |
|:--- |:--- |
| ```extrusion(type, length, center = false, cornerHole = false)``` | Draw the specified extrusion |
| ```extrusion(type, length, center = true, cornerHole = false)``` | Draw the specified extrusion |
![extrusions](tests/png/extrusions.png)
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | ```extrusion(E2020, 80, false)``` | Extrusion E2020 x 80mm |
| 1 | ```extrusion(E2040, 80, false)``` | Extrusion E2040 x 80mm |
| 1 | ```extrusion(E2060, 80, false)``` | Extrusion E2060 x 80mm |
| 1 | ```extrusion(E2080, 80, false)``` | Extrusion E2080 x 80mm |
| 1 | ```extrusion(E3030, 80, false)``` | Extrusion E3030 x 80mm |
| 1 | ```extrusion(E3060, 80, false)``` | Extrusion E3060 x 80mm |
| 1 | ```extrusion(E4040, 80, false)``` | Extrusion E4040 x 80mm |
| 1 | ```extrusion(E4080, 80, false)``` | Extrusion E4080 x 80mm |
| 1 | ```extrusion(E2020, 80)``` | Extrusion E2020 x 80mm |
| 1 | ```extrusion(E2040, 80)``` | Extrusion E2040 x 80mm |
| 1 | ```extrusion(E2060, 80)``` | Extrusion E2060 x 80mm |
| 1 | ```extrusion(E2080, 80)``` | Extrusion E2080 x 80mm |
| 1 | ```extrusion(E3030, 80)``` | Extrusion E3030 x 80mm |
| 1 | ```extrusion(E3060, 80)``` | Extrusion E3060 x 80mm |
| 1 | ```extrusion(E4040, 80)``` | Extrusion E4040 x 80mm |
| 1 | ```extrusion(E4080, 80)``` | Extrusion E4080 x 80mm |
<a href="#top">Top</a>
@@ -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>
@@ -2603,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.
@@ -2784,8 +2785,8 @@ SK shaft support brackets
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 2 | ```extrusion(E2020, 20, false)``` | Extrusion E2020 x 20mm |
| 2 | ```extrusion(E3030, 20, false)``` | Extrusion E3030 x 20mm |
| 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 |
@@ -3019,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>
@@ -4332,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

@@ -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):

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: 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: 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

@@ -117,12 +117,11 @@ module extrusion_cross_section(type, cornerHole) {
extrusion_center_section(type);
}
module extrusion(type, length, center = false, cornerHole = false) { //! Draw the specified extrusion
module extrusion(type, length, center = true, cornerHole = false) { //! Draw the specified extrusion
vitamin(str("extrusion(", type[0], ", ", length, ", ", center, "): 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(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

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

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

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)