diff options
author | Marius Kintel <marius@kintel.net> | 2013-06-15 16:48:09 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-06-15 16:48:09 (GMT) |
commit | 3f936099faa34ff47f5226b21b640828532637dc (patch) | |
tree | 99df28024caf98797a68726afa3629f7245a73b3 /testdata/scad | |
parent | 75a5dad6b7f65c52568d2cd82f556caa538439c6 (diff) |
Clamp linear_extrude height to 0. Fixes #405
Diffstat (limited to 'testdata/scad')
-rw-r--r-- | testdata/scad/features/cylinder-tests.scad | 3 | ||||
-rw-r--r-- | testdata/scad/features/linear_extrude-tests.scad | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/testdata/scad/features/cylinder-tests.scad b/testdata/scad/features/cylinder-tests.scad index 3174bc4..75b06f2 100644 --- a/testdata/scad/features/cylinder-tests.scad +++ b/testdata/scad/features/cylinder-tests.scad @@ -16,4 +16,5 @@ translate([22,11,0]) cylinder(h=15, r=5, r2=5); // tend to "abuse" this for captured nut slots translate([-10,0,0]) cylinder(h=2, r=3, $fn=6); -translate([-10, -10, 0]) sphere(5, $fn=0.1); +// Test that we clamp number of sections to a minimum of 3 +translate([-10, -10, 0]) cylinder(r=3.5356, h=7.0711, $fn=0.1, center=true); diff --git a/testdata/scad/features/linear_extrude-tests.scad b/testdata/scad/features/linear_extrude-tests.scad index 528eea2..680bf53 100644 --- a/testdata/scad/features/linear_extrude-tests.scad +++ b/testdata/scad/features/linear_extrude-tests.scad @@ -22,3 +22,6 @@ translate([-15,20,0]) linear_extrude(height=20, scale=[4,5,6]) square(10); translate([-10,5,0]) linear_extrude(height=15, scale=-2) square(10, center=true); // scale given as undefined translate([-15,-15,0]) linear_extrude(height=10, scale=var_undef) square(10); + +// height is negative +translate([0,-25,0]) linear_extrude(-1) square(10, center=true); |