mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2025-02-25 03:54:10 -05:00
Made the ground surfaces of steppers lighter.
This commit is contained in:
parent
7b3d7fab55
commit
f5980b4703
BIN
libtest.png
BIN
libtest.png
Binary file not shown.
Before Width: | Height: | Size: 774 KiB After Width: | Height: | Size: 775 KiB |
Binary file not shown.
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 94 KiB |
@ -42,6 +42,7 @@ function NEMA_big_hole(type) = NEMA_boss_radius(type) + 0.2; //! Clearance ho
|
||||
|
||||
stepper_body_colour = "black";
|
||||
stepper_cap_colour = grey50;
|
||||
stepper_machined_colour = grey90;
|
||||
|
||||
module NEMA_outline(type) //! 2D outline
|
||||
intersection() {
|
||||
@ -62,7 +63,19 @@ module NEMA(type, shaft_angle = 0) { //! Draw specified NEMA stepper motor
|
||||
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() {
|
||||
module cap_shape(end)
|
||||
difference() {
|
||||
intersection() {
|
||||
square([side, side], center = true);
|
||||
|
||||
circle(NEMA_radius(type), $fn = 360);
|
||||
}
|
||||
if(end > 0)
|
||||
for(x = NEMA_holes(type), y = NEMA_holes(type))
|
||||
translate([x, y])
|
||||
circle(d = thread_d);
|
||||
}
|
||||
|
||||
color(stepper_body_colour) // black laminations
|
||||
translate_z(-length / 2)
|
||||
linear_extrude(length - cap * 2, center = true)
|
||||
@ -72,24 +85,19 @@ module NEMA(type, shaft_angle = 0) { //! Draw specified NEMA stepper motor
|
||||
circle(body_rad);
|
||||
}
|
||||
|
||||
color(stepper_cap_colour) { // aluminium end caps
|
||||
color(stepper_machined_colour) {
|
||||
tube(or = boss_rad, ir = shaft_rad + 2, h = boss_height * 2); // raised boss
|
||||
|
||||
linear_extrude(eps)
|
||||
cap_shape(true);
|
||||
}
|
||||
|
||||
color(stepper_cap_colour) // aluminium end caps
|
||||
for(end = [-1, 1])
|
||||
translate_z(-length / 2 + end * (length - cap) / 2) {
|
||||
translate_z(-length / 2 + end * (length - cap) / 2)
|
||||
linear_extrude(cap, center = true)
|
||||
difference() {
|
||||
intersection() {
|
||||
square([side, side], center = true);
|
||||
circle(NEMA_radius(type));
|
||||
}
|
||||
if(end > 0)
|
||||
for(x = NEMA_holes(type), y = NEMA_holes(type))
|
||||
translate([x, y])
|
||||
circle(d = thread_d);
|
||||
}
|
||||
}
|
||||
}
|
||||
cap_shape(end);
|
||||
|
||||
if(show_threads)
|
||||
for(x = NEMA_holes(type), y = NEMA_holes(type))
|
||||
translate([x, y, -cap / 2])
|
||||
@ -99,7 +107,7 @@ module NEMA(type, shaft_angle = 0) { //! Draw specified NEMA stepper motor
|
||||
translate_z(-5)
|
||||
rotate(shaft_angle)
|
||||
if(!is_list(shaft))
|
||||
color(stepper_cap_colour)
|
||||
color(stepper_machined_colour)
|
||||
cylinder(r = shaft_rad, h = shaft + 5); // shaft
|
||||
else
|
||||
not_on_bom()
|
||||
@ -112,7 +120,6 @@ module NEMA(type, shaft_angle = 0) { //! Draw specified NEMA stepper motor
|
||||
color(["red", "blue","green","black"][i])
|
||||
translate([1, 0, 0])
|
||||
cylinder(r = 1.5 / 2, h = 12, center = true);
|
||||
}
|
||||
}
|
||||
|
||||
module NEMA_screw_positions(type, n = 4) { //! Positions children at the screw holes
|
||||
|
Loading…
x
Reference in New Issue
Block a user