1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-03 21:37:39 +02:00

add type, one_spiral params

This commit is contained in:
Justin Lin
2022-06-05 21:01:58 +08:00
parent 9333145a6d
commit 6bfe94ce1c

View File

@@ -3,13 +3,16 @@ use <util/radians.scad>;
use <util/lerp.scad>;
use <ptf/ptf_rotate.scad>;
spirals = 8;
spirals = 7;
start_n = 1; // spiral start from 360 / spirals * start_n
degrees = 150;
thickness = 2.5;
offset_r = 0.4;
$fn = 24;
model = "ALL";
one_spiral = false;
golden_spiral_jigsaw();
module golden_spiral_jigsaw() {
@@ -71,7 +74,8 @@ module golden_spiral_jigsaw() {
polygons = piece_polygons(start, a_step, degrees * 2);
for(i = [0:spirals - 1]) {
if(model != "PLATE") {
for(i = [0:one_spiral ? 0 : spirals - 1]) {
rotate(a_step * i)
for(j = [0:len(polygons) - 5]) {
poly = polygons[j];
@@ -95,7 +99,9 @@ module golden_spiral_jigsaw() {
interlocking_part2(poly, 0);
}
}
}
if(model != "SPIRALS") {
// plate
polygons2 = piece_polygons(-a_step, a_step, start + a_step * 4);
points = [
@@ -158,3 +164,4 @@ module golden_spiral_jigsaw() {
}
}
}
}