From ac9ef3b9e4f59d46ef7e0d7385fa1a9d3f780021 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Sun, 26 May 2019 23:56:41 -0700 Subject: [PATCH] Docs tweaks --- paths.scad | 4 ++-- scripts/docs_gen.py | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/paths.scad b/paths.scad index a5c81f5..be7a541 100644 --- a/paths.scad +++ b/paths.scad @@ -409,8 +409,8 @@ module trace_polyline(pline, N=1, showpts=false, size=1, color="yellow") { // Example(Big2D): // debug_polygon( // points=concat( -// regular_ngon(r=10, n=8), -// regular_ngon(r=8, n=8) +// regular_ngon(or=10, n=8), +// regular_ngon(or=8, n=8) // ), // paths=[ // [for (i=[0:7]) i], diff --git a/scripts/docs_gen.py b/scripts/docs_gen.py index 43c7715..89823f6 100755 --- a/scripts/docs_gen.py +++ b/scripts/docs_gen.py @@ -254,10 +254,9 @@ class ImageProcessing(object): os.rename(newimgfile, targimgfile) else: if targimgfile.endswith(".gif"): - cmpcmd = ["cmp", newimgfile, targimgfile] - p = subprocess.Popen(cmpcmd, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True) - err = p.stdout.read() - issame = p.returncode == 0 + cmpcmd = ["cmp", "-s", newimgfile, targimgfile] + res = subprocess.call(cmpcmd) + issame = res == 0 else: cmpcmd = [COMPARE, "-metric", "MAE", newimgfile, targimgfile, "null:"] p = subprocess.Popen(cmpcmd, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True)