1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-20 14:21:40 +02:00

Printed screw_knob() is now fully customisable by passing a parameter

list, constructed by screw_knob(), in place of the screw.

Screws can still be passed for backwards compaibility.
This commit is contained in:
Chris Palmer
2022-04-01 16:31:45 +01:00
parent b9f676a753
commit d46913ce4f
6 changed files with 116 additions and 41 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View File

@@ -17,20 +17,26 @@
// If not, see <https://www.gnu.org/licenses/>.
//
include <../core.scad>
use <../utils/layout.scad>
use <../printed/screw_knob.scad>
screws = [M3_hex_screw, M4_hex_screw];
knobs = [
M3_hex_screw,
M4_hex_screw,
screw_knob(M5_hex_screw, flange_r = 12, flange_t = 6, stem_h = 2, waves = 6),
screw_knob(M6_hex_screw, flange_r = 15, flange_t = 6, solid = false, stem_h = 2, waves = 6, wall = 1.6, fluted = true),
];
module do_screw_knob(screw)
module do_screw_knob(knob) {
if($preview)
screw_knob_assembly(screw, 16);
screw_knob_assembly(knob, 16);
else
screw_knob(screw);
screw_knob(knob);
}
module screw_knobs()
for(i = [0 : len(screws) - 1])
translate([i * 30, 0])
do_screw_knob(screws[i]);
layout([for(k = knobs) 2 * screw_knob_flange_r(k)], 10)
do_screw_knob(knobs[$i]);
screw_knobs();