From 4af7fe8e05412ae476e2eded18dc98e777babbb9 Mon Sep 17 00:00:00 2001 From: Garth Minette Date: Mon, 28 Dec 2020 03:25:08 -0800 Subject: [PATCH] Make style=orig spheroid more accurately match built-in sphere. --- shapes.scad | 4 ++-- version.scad | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shapes.scad b/shapes.scad index 53149f6..0a984b9 100644 --- a/shapes.scad +++ b/shapes.scad @@ -1211,13 +1211,13 @@ module spheroid(r, d, circum=false, style="aligned", anchor=CENTER, spin=0, orie vsides = ceil(sides/2); attachable(anchor,spin,orient, r=r) { if (style=="orig") { - merids = [ for (i=[0:1:vsides]) 90-(i+0.5)*180/(vsides+1) ]; + merids = [ for (i=[0:1:vsides-1]) 90-(i+0.5)*180/vsides ]; path = [ let(a = merids[0]) [0, r*sin(a)], for (a=merids) r * [cos(a), sin(a)], let(a = select(merids,-1)) [0, r*sin(a)] ]; - rotate_extrude(convexity=2,$fn=sides) polygon(path); + rotate(180) rotate_extrude(convexity=2,$fn=sides) polygon(path); } else { vnf = spheroid(r=r, circum=circum, style=style); vnf_polyhedron(vnf, convexity=2); diff --git a/version.scad b/version.scad index e34c880..9935ce7 100644 --- a/version.scad +++ b/version.scad @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////////////// -BOSL_VERSION = [2,0,489]; +BOSL_VERSION = [2,0,490]; // Section: BOSL Library Version Functions