mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-22 22:35:18 +02:00
change param
This commit is contained in:
@@ -4,11 +4,11 @@ number_of_polygons = 10;
|
||||
height = 20;
|
||||
thickness = 1.5;
|
||||
spacing = 0.5 * thickness;
|
||||
extrude_ratio = 1;
|
||||
slope = 1.2;
|
||||
|
||||
fidget_polygon(beginning_radius, fn, number_of_polygons, height, thickness, spacing, extrude_ratio);
|
||||
fidget_polygon(beginning_radius, fn, number_of_polygons, height, thickness, spacing, slope);
|
||||
|
||||
module fidget_polygon(beginning_radius, fn, n, height, thickness, spacing, extrude_ratio) {
|
||||
module fidget_polygon(beginning_radius, fn, n, height, thickness, spacing, slope) {
|
||||
theta = 180 / fn;
|
||||
|
||||
y = beginning_radius - beginning_radius * cos(theta);
|
||||
@@ -23,11 +23,11 @@ module fidget_polygon(beginning_radius, fn, n, height, thickness, spacing, extru
|
||||
|
||||
rs = [for(i = [0: n]) beginning_radius + i * dr];
|
||||
//as = [for(i = [1: n]) a(rs[i - 1], rs[i], i) / 2];
|
||||
|
||||
s = [for(i = [1: n]) (rs[i] + thickness + spacing) / rs[i - 1]] * extrude_ratio;
|
||||
|
||||
half_height = height / 2;
|
||||
|
||||
s = [for(i = [1: n]) (rs[i] + slope * half_height) / rs[i]];
|
||||
|
||||
module half() {
|
||||
translate([0, 0, -half_height]) {
|
||||
linear_extrude(half_height, scale = s[0])
|
||||
|
Reference in New Issue
Block a user