mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-11 01:04:07 +02:00
added test_stereographic_extrude
This commit is contained in:
@@ -32,4 +32,12 @@ module stereographic_extrude(shadow_side_leng) {
|
|||||||
linear_extrude(outer_sphere_r * 2, scale = 0.01)
|
linear_extrude(outer_sphere_r * 2, scale = 0.01)
|
||||||
children();
|
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) {
|
||||||
|
|
||||||
}
|
}
|
@@ -39,6 +39,7 @@ include <test_sphere_spiral.scad>;
|
|||||||
|
|
||||||
// Extrude
|
// Extrude
|
||||||
include <test_ellipse_extrude.scad>;
|
include <test_ellipse_extrude.scad>;
|
||||||
|
include <test_stereographic_extrude.scad>;
|
||||||
|
|
||||||
// 2D Shape
|
// 2D Shape
|
||||||
include <test_shape_arc.scad>;
|
include <test_shape_arc.scad>;
|
||||||
|
22
test/test_stereographic_extrude.scad
Normal file
22
test/test_stereographic_extrude.scad
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
include <unittest.scad>;
|
||||||
|
|
||||||
|
module test_stereographic_extrude() {
|
||||||
|
echo("==== test_stereographic_extrude ====");
|
||||||
|
|
||||||
|
include <stereographic_extrude.scad>;
|
||||||
|
|
||||||
|
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();
|
Reference in New Issue
Block a user