From 22f8d6599178184f36361c83cff366eb38fc6b99 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Sat, 25 Apr 2020 14:44:41 -0700 Subject: [PATCH] Example image bugfixes. --- beziers.scad | 6 +++--- involute_gears.scad | 18 ++++++++++-------- version.scad | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/beziers.scad b/beziers.scad index e6116a4..d75e2e2 100644 --- a/beziers.scad +++ b/beziers.scad @@ -465,7 +465,7 @@ function bezier_close_to_axis(bezier, N=3, axis="X") = // closed = bezier_offset([-5,0], bez); // trace_bezier(closed, size=1); function bezier_offset(offset, bezier, N=3) = - assert(is_num(offset)) + assert(is_vector(offset,2)) assert(is_path(bezier,2), "bezier_offset() can only work on 2D bezier paths.") assert(is_int(N)) assert(len(bezier)%N == 1, str("A degree ",N," bezier path shound have a multiple of ",N," points in it, plus 1.")) @@ -660,8 +660,8 @@ module bezier_sweep_bezier(bezier, path, pathsteps=16, bezsteps=16, bezN=3, path assert(is_int(bezsteps)); assert(is_int(bezN)); assert(is_int(pathN)); - assert(len(bezier)%bezN == 1, str("For argument bezier, a degree ",N," bezier path shound have a multiple of ",N," points in it, plus 1.")); - assert(len(path)%pathN == 1, str("For argument bezier, a degree ",N," bezier path shound have a multiple of ",N," points in it, plus 1.")); + assert(len(bezier)%bezN == 1, str("For argument bezier, a degree ",bezN," bezier path shound have a multiple of ",bezN," points in it, plus 1.")); + assert(len(path)%pathN == 1, str("For argument bezier, a degree ",pathN," bezier path shound have a multiple of ",pathN," points in it, plus 1.")); bez_points = simplify_path(bezier_polyline(bezier, bezsteps, bezN)); path_points = simplify_path(path3d(bezier_polyline(path, pathsteps, pathN))); path_sweep(bez_points, path_points); diff --git a/involute_gears.scad b/involute_gears.scad index 55fdc10..8b080d9 100644 --- a/involute_gears.scad +++ b/involute_gears.scad @@ -517,14 +517,16 @@ module bevel_gear( ), pp = rot(theta, cp=spiral_cp, p=[0,Rm,0]), ang = atan2(pp.y,pp.x)-90, - pts = apply_list(profile, [ - move([0,-p,0]), - rot([0,ang,0]), - rot([bevelang,0,0]), - move(pp), - rot(tooth*360/teeth), - move([0,0,thickness*u]) - ]) + pts = apply_list( + path3d(profile), [ + move([0,-p,0]), + rot([0,ang,0]), + rot([bevelang,0,0]), + move(pp), + rot(tooth*360/teeth), + move([0,0,thickness*u]) + ] + ) ) each pts ], [ [0,0,-dy], [0,0,thickness] diff --git a/version.scad b/version.scad index add2b84..1367658 100644 --- a/version.scad +++ b/version.scad @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,280]; +BOSL_VERSION = [2,0,281]; // Section: BOSL Library Version Functions