mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-02 04:50:21 +02:00
add type, one_spiral params
This commit is contained in:
@@ -3,13 +3,16 @@ use <util/radians.scad>;
|
|||||||
use <util/lerp.scad>;
|
use <util/lerp.scad>;
|
||||||
use <ptf/ptf_rotate.scad>;
|
use <ptf/ptf_rotate.scad>;
|
||||||
|
|
||||||
spirals = 8;
|
spirals = 7;
|
||||||
start_n = 1; // spiral start from 360 / spirals * start_n
|
start_n = 1; // spiral start from 360 / spirals * start_n
|
||||||
degrees = 150;
|
degrees = 150;
|
||||||
thickness = 2.5;
|
thickness = 2.5;
|
||||||
offset_r = 0.4;
|
offset_r = 0.4;
|
||||||
$fn = 24;
|
$fn = 24;
|
||||||
|
|
||||||
|
model = "ALL";
|
||||||
|
one_spiral = false;
|
||||||
|
|
||||||
golden_spiral_jigsaw();
|
golden_spiral_jigsaw();
|
||||||
|
|
||||||
module golden_spiral_jigsaw() {
|
module golden_spiral_jigsaw() {
|
||||||
@@ -71,7 +74,8 @@ module golden_spiral_jigsaw() {
|
|||||||
|
|
||||||
polygons = piece_polygons(start, a_step, degrees * 2);
|
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)
|
rotate(a_step * i)
|
||||||
for(j = [0:len(polygons) - 5]) {
|
for(j = [0:len(polygons) - 5]) {
|
||||||
poly = polygons[j];
|
poly = polygons[j];
|
||||||
@@ -95,7 +99,9 @@ module golden_spiral_jigsaw() {
|
|||||||
interlocking_part2(poly, 0);
|
interlocking_part2(poly, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(model != "SPIRALS") {
|
||||||
// plate
|
// plate
|
||||||
polygons2 = piece_polygons(-a_step, a_step, start + a_step * 4);
|
polygons2 = piece_polygons(-a_step, a_step, start + a_step * 4);
|
||||||
points = [
|
points = [
|
||||||
@@ -157,4 +163,5 @@ module golden_spiral_jigsaw() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user