From f957022442ceeb4690662d76fc7f69f78e14550b Mon Sep 17 00:00:00 2001 From: Michael Diamond Date: Sat, 15 May 2021 12:00:11 -0700 Subject: [PATCH] Swap deprecated assign() calls for let(); https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Conditional_and_Iterator_Functions#Assign_Statement --- involute_gears.scad | 4 ++-- polyholes.scad | 2 +- screw.scad | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/involute_gears.scad b/involute_gears.scad index a2866ab..3e6632e 100644 --- a/involute_gears.scad +++ b/involute_gears.scad @@ -266,13 +266,13 @@ module involute_bevel_gear_tooth ( { for (i=[1:res]) { - assign ( + let ( point1= involute (base_radius*2,start_angle+(stop_angle - start_angle)*(i-1)/res), point2= involute (base_radius*2,start_angle+(stop_angle - start_angle)*(i)/res)) { - assign ( + let ( side1_point1 = rotate_point (centre_angle, point1), side1_point2 = rotate_point (centre_angle, point2), side2_point1 = mirror_point (rotate_point (centre_angle, point1)), diff --git a/polyholes.scad b/polyholes.scad index 3e86a83..266b0ce 100644 --- a/polyholes.scad +++ b/polyholes.scad @@ -20,7 +20,7 @@ difference() { translate([(i * i + i)/2 + 3 * i , 8,-1]) polyhole(h = 5, d = i); - assign(d = i + 0.5) + let(d = i + 0.5) translate([(d * d + d)/2 + 3 * d, 19,-1]) polyhole(h = 5, d = d); } diff --git a/screw.scad b/screw.scad index 737a1dc..2cea0b5 100644 --- a/screw.scad +++ b/screw.scad @@ -48,7 +48,7 @@ module ball_groove2(pitch, length, diameter, ball_radius, slices=200){ offset = length/slices; union(){ for (i = [0:slices]) { - assign (z = i*offset){ + let (z = i*offset){ translate(helix_curve(pitch, radius, z)) sphere(ball_radius, $fa=5, $fs=1); } }