mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
remove debug echo and update test for circum
This commit is contained in:
parent
68d911618b
commit
42e5ca0f04
2 changed files with 1 additions and 2 deletions
|
@ -1771,7 +1771,6 @@ function _dual_vertices(vnf) =
|
|||
|
||||
function spheroid(r, style="aligned", d, circum=false, anchor=CENTER, spin=0, orient=UP) =
|
||||
let(
|
||||
ff=echo("running sphereoid with ",circum=circum),
|
||||
r = get_radius(r=r, d=d, dflt=1),
|
||||
hsides = segs(r),
|
||||
vsides = max(2,ceil(hsides/2)),
|
||||
|
|
|
@ -65,7 +65,7 @@ module test_spheroid() {
|
|||
$fn=6;
|
||||
assert_approx(spheroid(r=50),[[[0,0,50],[43.3012701892,0,25],[21.6506350946,37.5,25],[-21.6506350946,37.5,25],[-43.3012701892,0,25],[-21.6506350946,-37.5,25],[21.6506350946,-37.5,25],[43.3012701892,0,-25],[21.6506350946,37.5,-25],[-21.6506350946,37.5,-25],[-43.3012701892,0,-25],[-21.6506350946,-37.5,-25],[21.6506350946,-37.5,-25],[0,0,-50]],[[1,0,2],[13,7,8],[2,0,3],[13,8,9],[3,0,4],[13,9,10],[4,0,5],[13,10,11],[5,0,6],[13,11,12],[6,0,1],[13,12,7],[1,2,8],[1,8,7],[2,3,9],[2,9,8],[3,4,10],[3,10,9],[4,5,11],[4,11,10],[5,6,12],[5,12,11],[6,1,7],[6,7,12]]]);
|
||||
assert_approx(spheroid(d=100),[[[0,0,50],[43.3012701892,0,25],[21.6506350946,37.5,25],[-21.6506350946,37.5,25],[-43.3012701892,0,25],[-21.6506350946,-37.5,25],[21.6506350946,-37.5,25],[43.3012701892,0,-25],[21.6506350946,37.5,-25],[-21.6506350946,37.5,-25],[-43.3012701892,0,-25],[-21.6506350946,-37.5,-25],[21.6506350946,-37.5,-25],[0,0,-50]],[[1,0,2],[13,7,8],[2,0,3],[13,8,9],[3,0,4],[13,9,10],[4,0,5],[13,10,11],[5,0,6],[13,11,12],[6,0,1],[13,12,7],[1,2,8],[1,8,7],[2,3,9],[2,9,8],[3,4,10],[3,10,9],[4,5,11],[4,11,10],[5,6,12],[5,12,11],[6,1,7],[6,7,12]]]);
|
||||
assert_approx(spheroid(r=50,circum=true),[[[0,0,66.6666666667],[57.735026919,0,33.3333333333],[28.8675134595,50,33.3333333333],[-28.8675134595,50,33.3333333333],[-57.735026919,0,33.3333333333],[-28.8675134595,-50,33.3333333333],[28.8675134595,-50,33.3333333333],[57.735026919,0,-33.3333333333],[28.8675134595,50,-33.3333333333],[-28.8675134595,50,-33.3333333333],[-57.735026919,0,-33.3333333333],[-28.8675134595,-50,-33.3333333333],[28.8675134595,-50,-33.3333333333],[0,0,-66.6666666667]],[[1,0,2],[13,7,8],[2,0,3],[13,8,9],[3,0,4],[13,9,10],[4,0,5],[13,10,11],[5,0,6],[13,11,12],[6,0,1],[13,12,7],[1,2,8],[1,8,7],[2,3,9],[2,9,8],[3,4,10],[3,10,9],[4,5,11],[4,11,10],[5,6,12],[5,12,11],[6,1,7],[6,7,12]]]);
|
||||
assert_approx(spheroid(r=50,circum=true), [[[0,0,57.735026919],[28.8675134595,50,28.8675134595],[-28.8675134595,50,28.8675134595],[-57.735026919,-3.5527136788e-15,28.8675134595],[-28.8675134595,-50,28.8675134595],[28.8675134595,-50,28.8675134595],[57.735026919,3.5527136788e-15,28.8675134595],[28.8675134595,50,-28.8675134595],[-28.8675134595,50,-28.8675134595],[-57.735026919,-3.5527136788e-15,-28.8675134595],[-28.8675134595,-50,-28.8675134595],[28.8675134595,-50,-28.8675134595],[57.735026919,3.5527136788e-15,-28.8675134595],[0,0,-57.735026919]],[[1,0,2],[13,7,8],[2,0,3],[13,8,9],[3,0,4],[13,9,10],[4,0,5],[13,10,11],[5,0,6],[13,11,12],[6,0,1],[13,12,7],[1,2,8],[1,8,7],[2,3,9],[2,9,8],[3,4,10],[3,10,9],[4,5,11],[4,11,10],[5,6,12],[5,12,11],[6,1,7],[6,7,12]]]);
|
||||
assert_approx(spheroid(r=50,style="orig"),[[[25,0,43.3012701892],[12.5,21.6506350946,43.3012701892],[-12.5,21.6506350946,43.3012701892],[-25,0,43.3012701892],[-12.5,-21.6506350946,43.3012701892],[12.5,-21.6506350946,43.3012701892],[50,0,0],[25,43.3012701892,0],[-25,43.3012701892,0],[-50,0,0],[-25,-43.3012701892,0],[25,-43.3012701892,0],[25,0,-43.3012701892],[12.5,21.6506350946,-43.3012701892],[-12.5,21.6506350946,-43.3012701892],[-25,0,-43.3012701892],[-12.5,-21.6506350946,-43.3012701892],[12.5,-21.6506350946,-43.3012701892]],[[5,4,3,2,1,0],[12,13,14,15,16,17],[6,0,1],[6,1,7],[7,1,2],[7,2,8],[8,2,3],[8,3,9],[9,3,4],[9,4,10],[10,4,5],[10,5,11],[11,5,0],[11,0,6],[12,6,7],[12,7,13],[13,7,8],[13,8,14],[14,8,9],[14,9,15],[15,9,10],[15,10,16],[16,10,11],[16,11,17],[17,11,6],[17,6,12]]]);
|
||||
assert_approx(spheroid(r=50,style="aligned"),[[[0,0,50],[43.3012701892,0,25],[21.6506350946,37.5,25],[-21.6506350946,37.5,25],[-43.3012701892,0,25],[-21.6506350946,-37.5,25],[21.6506350946,-37.5,25],[43.3012701892,0,-25],[21.6506350946,37.5,-25],[-21.6506350946,37.5,-25],[-43.3012701892,0,-25],[-21.6506350946,-37.5,-25],[21.6506350946,-37.5,-25],[0,0,-50]],[[1,0,2],[13,7,8],[2,0,3],[13,8,9],[3,0,4],[13,9,10],[4,0,5],[13,10,11],[5,0,6],[13,11,12],[6,0,1],[13,12,7],[1,2,8],[1,8,7],[2,3,9],[2,9,8],[3,4,10],[3,10,9],[4,5,11],[4,11,10],[5,6,12],[5,12,11],[6,1,7],[6,7,12]]]);
|
||||
assert_approx(spheroid(r=50,style="stagger"),[[[0,0,50],[37.5,21.6506350946,25],[0,43.3012701892,25],[-37.5,21.6506350946,25],[-37.5,-21.6506350946,25],[0,-43.3012701892,25],[37.5,-21.6506350946,25],[43.3012701892,0,-25],[21.6506350946,37.5,-25],[-21.6506350946,37.5,-25],[-43.3012701892,0,-25],[-21.6506350946,-37.5,-25],[21.6506350946,-37.5,-25],[0,0,-50]],[[1,0,2],[13,7,8],[2,0,3],[13,8,9],[3,0,4],[13,9,10],[4,0,5],[13,10,11],[5,0,6],[13,11,12],[6,0,1],[13,12,7],[1,2,8],[1,8,7],[2,3,9],[2,9,8],[3,4,10],[3,10,9],[4,5,11],[4,11,10],[5,6,12],[5,12,11],[6,1,7],[6,7,12]]]);
|
||||
|
|
Loading…
Reference in a new issue