diff --git a/src/stereographic_extrude.scad b/src/stereographic_extrude.scad index 2b4e16b9..efd57169 100644 --- a/src/stereographic_extrude.scad +++ b/src/stereographic_extrude.scad @@ -32,4 +32,12 @@ module stereographic_extrude(shadow_side_leng) { linear_extrude(outer_sphere_r * 2, scale = 0.01) children(); } + + // hook for testing + test_stereographic_extrude_rs(outer_sphere_r, inner_sphere_r); +} + +// override for testing +module test_stereographic_extrude_rs(outer_sphere_r, inner_sphere_r) { + } \ No newline at end of file diff --git a/test/test_all.scad b/test/test_all.scad index 07d5f21b..c49cfe73 100644 --- a/test/test_all.scad +++ b/test/test_all.scad @@ -39,6 +39,7 @@ include ; // Extrude include ; +include ; // 2D Shape include ; diff --git a/test/test_stereographic_extrude.scad b/test/test_stereographic_extrude.scad new file mode 100644 index 00000000..fa284aaa --- /dev/null +++ b/test/test_stereographic_extrude.scad @@ -0,0 +1,22 @@ +include ; + +module test_stereographic_extrude() { + echo("==== test_stereographic_extrude ===="); + + include ; + + module test_stereographic_extrude_rs(outer_sphere_r, inner_sphere_r) { + assertEqualPoint([16.6667, 15.0756], [outer_sphere_r, inner_sphere_r]); + } + + dimension = 100; + + stereographic_extrude(shadow_side_leng = dimension) + text( + "M", size = dimension, + valign = "center", halign = "center" + ); + +} + +test_stereographic_extrude(); \ No newline at end of file