From 3e99c76356f376f22d71912cd41fd988c237b424 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Sun, 3 Mar 2024 19:19:14 -0800 Subject: [PATCH] Fixes for stale examples. --- examples/BOSL2logo.scad | 75 ++++++++++++++++++++------------------ examples/fractal_tree.scad | 2 +- 2 files changed, 40 insertions(+), 37 deletions(-) diff --git a/examples/BOSL2logo.scad b/examples/BOSL2logo.scad index a7836ec..33652cb 100644 --- a/examples/BOSL2logo.scad +++ b/examples/BOSL2logo.scad @@ -8,45 +8,48 @@ $fa=1; $fs=1; xdistribute(50) { - recolor("#f77") - diff("hole") - cuboid([45,45,10], chamfer=10, edges=[RIGHT+BACK,RIGHT+FRONT], anchor=FRONT) { - tag("hole")cuboid([30,30,11], chamfer=5, edges=[RIGHT+BACK,RIGHT+FRONT]); - attach(FRONT,BACK, overlap=5) { - diff("hole2") - cuboid([45,45,10], rounding=15, edges=[RIGHT+BACK,RIGHT+FRONT]) { - tag("hole2")cuboid([30,30,11], rounding=10, edges=[RIGHT+BACK,RIGHT+FRONT]); - } - } - } + recolor("#f77") + diff("hole") + cuboid([45,45,10], chamfer=10, edges=[RIGHT+BACK,RIGHT+FRONT], anchor=FRONT) { + tag("hole")cuboid([30,30,11], chamfer=5, edges=[RIGHT+BACK,RIGHT+FRONT]); + attach(FRONT,BACK, overlap=5) { + diff("hole2") + cuboid([45,45,10], rounding=15, edges=[RIGHT+BACK,RIGHT+FRONT]) { + tag("hole2")cuboid([30,30,11], rounding=10, edges=[RIGHT+BACK,RIGHT+FRONT]); + } + } + } recolor("#7f7") - bevel_gear(pitch=8, teeth=20, face_width=12, shaft_diam=25, pitch_angle=45, slices=12, spiral_angle=30); + bevel_gear(pitch=8, teeth=30, mate_teeth=30, face_width=12, shaft_diam=15, slices=12, spiral=30); - x = 18; - y = 20; - s1 = 25; - s2 = 20; - sbez = [ - [-x,-y], [-x,-y-s1], - [ x,-y-s1], [ x,-y], [ x,-y+s2], - [-x, y-s2], [-x, y], [-x, y+s1], - [ x, y+s1], [ x, y] - ]; - recolor("#99f") - path_sweep(regular_ngon(n=3,d=10,spin=90), bezpath_curve(sbez)); + x = 18; + y = 20; + s1 = 25; + s2 = 20; + sbez = [ + [-x,-y], [-x,-y-s1], + [ x,-y-s1], [ x,-y], [ x,-y+s2], + [-x, y-s2], [-x, y], [-x, y+s1], + [ x, y+s1], [ x, y] + ]; + recolor("#99f") + path_sweep(regular_ngon(n=3,d=10,spin=90), bezpath_curve(sbez)); - recolor("#0bf") - translate([-15,-35,0]) - cubetruss_corner(size=10, strut=1, h=1, bracing=false, extents=[3,8,0,0,0], clipthick=0); + recolor("#0bf") + translate([-15,-35,0]) + cubetruss_corner(size=10, strut=1, h=1, bracing=false, extents=[3,8,0,0,0], clipthick=0); - recolor("#777") - xdistribute(24) { - screw("M12,70", head="hex", anchor="origin", orient=BACK) - attach(BOT,CENTER) - nut("M12", thickness=10); - screw("M12,70", head="hex", anchor="origin", orient=BACK) - attach(BOT,CENTER) - nut("M12", thickness=10); - } + recolor("#777") + xdistribute(24) { + screw("M12,70", head="hex", anchor="origin", orient=BACK) + attach(BOT,CENTER) + nut("M12", thickness=10); + screw("M12,70", head="hex", anchor="origin", orient=BACK) + attach(BOT,CENTER) + nut("M12", thickness=10); + } } + + +// vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap diff --git a/examples/fractal_tree.scad b/examples/fractal_tree.scad index ea1f07d..5e7ff1b 100644 --- a/examples/fractal_tree.scad +++ b/examples/fractal_tree.scad @@ -1,7 +1,7 @@ include module tree(l=1500, sc=0.7, depth=10) recolor("lightgray") - cylinder(l=l, d1=l/5, d2=l/5*sc) + cylinder(h=l, d1=l/5, d2=l/5*sc) attach(TOP) if (depth>0) zrot(90)