1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-10 17:33:57 +02:00

Added earth_rot parameter to NEMA_screws().

This commit is contained in:
Chris Palmer
2022-02-01 23:25:04 +00:00
parent e696dc4718
commit 04e94a859a
2 changed files with 3 additions and 3 deletions

View File

@@ -3876,7 +3876,7 @@ NEMA stepper motor model.
| `NEMA(type, shaft_angle = 0, jst_connector = false)` | Draw specified NEMA stepper motor |
| `NEMA_outline(type)` | 2D outline |
| `NEMA_screw_positions(type, n = 4)` | Positions children at the screw holes |
| `NEMA_screws(type, screw, n = 4, screw_length = 8, earth = undef)` | Place screws and optional earth tag |
| `NEMA_screws(type, screw, n = 4, screw_length = 8, earth = undef, earth_rot = undef)` | Place screws and optional earth tag |
![stepper_motors](tests/png/stepper_motors.png)

View File

@@ -205,12 +205,12 @@ module NEMA_screw_positions(type, n = 4) { //! Positions children at the screw h
children();
}
module NEMA_screws(type, screw, n = 4, screw_length = 8, earth = undef) //! Place screws and optional earth tag
module NEMA_screws(type, screw, n = 4, screw_length = 8, earth = undef, earth_rot = undef) //! Place screws and optional earth tag
NEMA_screw_positions(type, n)
if($i != earth)
screw_and_washer(screw, screw_length, true);
else
rotate($i > 1 ? 180 : 0)
rotate(is_undef(earth_rot) ? $i > 1 ? 180 : 0 : earth_rot)
ring_terminal(M3_ringterm)
star_washer(screw_washer(screw))
screw(screw, screw_length);