From 46a322f935a406db73a1155615ce75e3bc5c4eeb Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Sat, 29 Feb 2020 19:16:43 -0800 Subject: [PATCH 1/2] Docs example image bugfixes. --- joiners.scad | 2 +- rounding.scad | 7 ++++--- version.scad | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/joiners.scad b/joiners.scad index c98e476..30cef00 100644 --- a/joiners.scad +++ b/joiners.scad @@ -556,7 +556,7 @@ module dovetail(gender, length, l, width, w, height, h, angle, slope, taper, bac reverse(concat(smallend_points, xflip(p=reverse(smallend_points)))), reverse(concat(bigend_points, xflip(p=reverse(bigend_points)))) ], - convexity=4 + convexity=4, slices=0 ); } children(); diff --git a/rounding.scad b/rounding.scad index 3457ee0..f293cff 100644 --- a/rounding.scad +++ b/rounding.scad @@ -12,6 +12,7 @@ include include include +include // CommonCode: @@ -884,7 +885,7 @@ function os_profile(points, extra,check_valid, quality, offset_maxstep, offset) // Example: If you give a non-convex input you get a convex hull output // right(50) linear_extrude(height=7) star(5,r=22,ir=13); // convex_offset_extrude(bottom = os_chamfer(height=-2), top=os_chamfer(height=1), height=7) -// star(5,r=22,ir=13) +// star(5,r=22,ir=13); module convex_offset_extrude( height, h, l, top=[], bottom=[], @@ -911,8 +912,8 @@ module convex_offset_extrude( top = struct_set(argspec, top, grow=false); bottom = struct_set(argspec, bottom, grow=false); - offsets_bot = rounding_offsets(bottom, -1); - offsets_top = rounding_offsets(top, 1); + offsets_bot = _rounding_offsets(bottom, -1); + offsets_top = _rounding_offsets(top, 1); // "Extra" height enlarges the result beyond the requested height, so subtract it bottom_height = len(offsets_bot)==0 ? 0 : abs(select(offsets_bot,-1)[1]) - struct_val(bottom,"extra"); diff --git a/version.scad b/version.scad index 973c797..dd94137 100644 --- a/version.scad +++ b/version.scad @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,138]; +BOSL_VERSION = [2,0,139]; // Section: BOSL Library Version Functions From fd3d812f7e36f5e117ff5bb354b9f706a2ad38a2 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Sat, 29 Feb 2020 19:17:52 -0800 Subject: [PATCH 2/2] More docs example image bugfixes. --- scripts/docs_gen.py | 2 +- scripts/make_all_docs.sh | 2 +- skin.scad | 4 ++-- version.scad | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/docs_gen.py b/scripts/docs_gen.py index 3a25d84..b0c8ace 100755 --- a/scripts/docs_gen.py +++ b/scripts/docs_gen.py @@ -149,7 +149,7 @@ def run_openscad_script(libfile, infile, imgfile, imgsize=(320,240), eye=None, s p = subprocess.Popen(scadcmd, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) (stdoutdata, stderrdata) = p.communicate(None) res = p.returncode - if res != 0 or b"ERROR:" in stderrdata or b"WARNING:" in stderrdata: + if res != 0 or b"ERROR:" in stderrdata or b"TRACE:" in stderrdata: print("\n\n{}".format(stderrdata.decode('utf-8'))) print("////////////////////////////////////////////////////") print("// {}: {} for {}".format(libfile, infile, imgfile)) diff --git a/scripts/make_all_docs.sh b/scripts/make_all_docs.sh index 83c8a3e..8b8c6e0 100755 --- a/scripts/make_all_docs.sh +++ b/scripts/make_all_docs.sh @@ -17,7 +17,7 @@ done if [[ "$FILES" != "" ]]; then PREVIEW_LIBS="$FILES" else - PREVIEW_LIBS="version common errors attachments math arrays vectors affine coords geometry triangulation quaternions strings stacks queues structs vnf skin hull constants edges transforms primitives shapes masks shapes2d paths beziers rounding walls cubetruss metric_screws threading partitions involute_gears sliders joiners linear_bearings nema_steppers wiring phillips_drive torx_drive polyhedra knurling cubetruss debug" + PREVIEW_LIBS="affine arrays attachments beziers bosl1compat bottlecaps common constants coords cubetruss debug distributors edges errors geometry hingesnaps hull involute_gears joiners knurling linear_bearings masks math metric_screws mutators nema_steppers partitions paths phillips_drive polyhedra primitives quaternions queues regions rounding shapes shapes2d skin sliders stacks std strings structs threading torx_drive transforms triangulation vectors version vnf walls wiring" fi dir="$(basename $PWD)" diff --git a/skin.scad b/skin.scad index f9c4abc..1898ae2 100644 --- a/skin.scad +++ b/skin.scad @@ -1007,13 +1007,13 @@ function affine_frame_map(x,y,z, reverse=false) = // yzcircle = yrot(90,p=circle($fn=64, r=30)); // ushape = [[-10, 0],[-10, 10],[ -7, 10],[ -7, 2],[ 7, 2],[ 7, 7],[ 10, 7],[ 10, 0]]; // path_sweep(ushape, yzcircle, method="manual", normal=UP, closed=true); -// Examples: The "natural" method will introduce twists when the curvature changes direction. A warning is displayed. +// Example: The "natural" method will introduce twists when the curvature changes direction. A warning is displayed. // arc1 = path3d(arc(angle=90, r=30)); // arc2 = xrot(-90, cp=[0,30],p=path3d(arc(angle=[90,180], r=30))); // two_arcs = simplify_path(concat(arc1,arc2)); // ushape = [[-10, 0],[-10, 10],[ -7, 10],[ -7, 2],[ 7, 2],[ 7, 7],[ 10, 7],[ 10, 0]]; // path_sweep(ushape, two_arcs, method="natural"); -// Examples: The only simple way to get a good result is the "incremental" method: +// Example: The only simple way to get a good result is the "incremental" method: // arc1 = path3d(arc(angle=90, r=30)); // arc2 = xrot(-90, cp=[0,30],p=path3d(arc(angle=[90,180], r=30))); // arc3 = apply( translate([-30,60,30])*yrot(90), path3d(arc(angle=[270,180], r=30))); diff --git a/version.scad b/version.scad index dd94137..80fa107 100644 --- a/version.scad +++ b/version.scad @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,139]; +BOSL_VERSION = [2,0,140]; // Section: BOSL Library Version Functions