mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2025-02-14 14:43:45 -05:00
Added threads to stepper motors and made the test show them.
This commit is contained in:
parent
07b00fabe0
commit
bcff26a27b
BIN
libtest.png
BIN
libtest.png
Binary file not shown.
Before Width: | Height: | Size: 776 KiB After Width: | Height: | Size: 782 KiB |
@ -3020,15 +3020,16 @@ NEMA stepper motor model.
|
|||||||
### Vitamins
|
### Vitamins
|
||||||
| Qty | Module call | BOM entry |
|
| 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(NEMA14)``` | Stepper motor NEMA14 x 36mm |
|
||||||
| 1 | ```NEMA(NEMA16)``` | Stepper motor NEMA16 x 19.2mm |
|
| 1 | ```NEMA(NEMA16)``` | Stepper motor NEMA16 x 19.2mm |
|
||||||
| 1 | ```NEMA(NEMA17S)``` | Stepper motor NEMA17 x 34mm |
|
| 1 | ```NEMA(NEMA17S)``` | Stepper motor NEMA17 x 34mm |
|
||||||
| 1 | ```NEMA(NEMA17M)``` | Stepper motor NEMA17 x 40mm |
|
| 1 | ```NEMA(NEMA17M)``` | Stepper motor NEMA17 x 40mm |
|
||||||
| 1 | ```NEMA(NEMA17)``` | Stepper motor NEMA17 x 47mm |
|
| 1 | ```NEMA(NEMA17)``` | Stepper motor NEMA17 x 47mm |
|
||||||
| 1 | ```NEMA(NEMA23)``` | Stepper motor NEMA22 x 51.2mm |
|
| 1 | ```NEMA(NEMA23)``` | Stepper motor NEMA22 x 51.2mm |
|
||||||
| 24 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
| 11 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||||
| 24 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
|
| 15 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
|
||||||
|
|
||||||
|
|
||||||
<a href="#top">Top</a>
|
<a href="#top">Top</a>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 84 KiB |
@ -27,8 +27,10 @@ module stepper_motors()
|
|||||||
rotate(180)
|
rotate(180)
|
||||||
NEMA(stepper_motors[$i]);
|
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 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($preview)
|
if($preview)
|
||||||
|
let($show_threads = 1)
|
||||||
stepper_motors();
|
stepper_motors();
|
||||||
|
@ -26,6 +26,7 @@ include <screws.scad>
|
|||||||
use <washer.scad>
|
use <washer.scad>
|
||||||
include <ring_terminals.scad>
|
include <ring_terminals.scad>
|
||||||
use <../utils/tube.scad>
|
use <../utils/tube.scad>
|
||||||
|
use <../utils/thread.scad>
|
||||||
use <rod.scad>
|
use <rod.scad>
|
||||||
|
|
||||||
function NEMA_width(type) = type[1]; //! Width of the square face
|
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;
|
shaft_rad = NEMA_shaft_dia(type) / 2;
|
||||||
cap = 8;
|
cap = 8;
|
||||||
vitamin(str("NEMA(", type[0], "): Stepper motor NEMA", round(NEMA_width(type) / 2.54), " x ", length, "mm"));
|
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() {
|
union() {
|
||||||
color(stepper_body_colour) // black laminations
|
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
|
tube(or = boss_rad, ir = shaft_rad + 2, h = boss_height * 2); // raised boss
|
||||||
|
|
||||||
for(end = [-1, 1])
|
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)
|
linear_extrude(height = cap, center = true)
|
||||||
difference() {
|
difference() {
|
||||||
intersection() {
|
intersection() {
|
||||||
@ -85,9 +87,14 @@ module NEMA(type, shaft_angle = 0) { //! Draw specified NEMA stepper motor
|
|||||||
if(end > 0)
|
if(end > 0)
|
||||||
for(x = NEMA_holes(type), y = NEMA_holes(type))
|
for(x = NEMA_holes(type), y = NEMA_holes(type))
|
||||||
translate([x, y])
|
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);
|
shaft = NEMA_shaft_length(type);
|
||||||
translate_z(-5)
|
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
|
module NEMA_screw_positions(type, n = 4) { //! Positions children at the screw holes
|
||||||
pitch = NEMA_hole_pitch(type);
|
pitch = NEMA_hole_pitch(type);
|
||||||
|
|
||||||
for($i = [0 : n - 1])
|
for($i = [0 : 1 : min(n - 1, 4)])
|
||||||
rotate($i * 90)
|
rotate($i * 90)
|
||||||
translate([pitch / 2, pitch / 2])
|
translate([pitch / 2, pitch / 2])
|
||||||
rotate($i * -90)
|
rotate($i * -90)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user