mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-20 06:21:39 +02:00
change is_closed_path to are_ends_equal
sphere bugfix
This commit is contained in:
@@ -121,6 +121,18 @@ module test_is_decreasing() {
|
||||
test_is_decreasing();
|
||||
|
||||
|
||||
|
||||
module test_are_ends_equal() {
|
||||
assert(!are_ends_equal([[1,2,3],[4,5,6],[1,8,9]]));
|
||||
assert(are_ends_equal([[1,2,3],[4,5,6],[1,8,9],[1,2,3]]));
|
||||
assert(are_ends_equal([1,2,3,1.00004],eps=1e-2));
|
||||
assert(are_ends_equal([3]));
|
||||
}
|
||||
test_are_ends_equal();
|
||||
|
||||
|
||||
|
||||
|
||||
module test_find_approx() {
|
||||
assert(find_approx(1, [2,3,1.05,4,1,2,.99], eps=.1)==2);
|
||||
assert(find_approx(1, [2,3,1.05,4,1,2,.99], all=true, eps=.1)==[2,4,6]);
|
||||
|
@@ -33,13 +33,6 @@ test_is_1region();
|
||||
|
||||
|
||||
|
||||
module test_is_closed_path() {
|
||||
assert(!is_closed_path([[1,2,3],[4,5,6],[1,8,9]]));
|
||||
assert(is_closed_path([[1,2,3],[4,5,6],[1,8,9],[1,2,3]]));
|
||||
}
|
||||
test_is_closed_path();
|
||||
|
||||
|
||||
module test_close_path() {
|
||||
assert(close_path([[1,2,3],[4,5,6],[1,8,9]]) == [[1,2,3],[4,5,6],[1,8,9],[1,2,3]]);
|
||||
assert(close_path([[1,2,3],[4,5,6],[1,8,9],[1,2,3]]) == [[1,2,3],[4,5,6],[1,8,9],[1,2,3]]);
|
||||
|
@@ -94,28 +94,28 @@ module test_cyl() {
|
||||
$fn=12;
|
||||
shape_compare() {
|
||||
cyl(r=50,l=10,circum=true,anchor=BOTTOM);
|
||||
cylinder(r=50/cos(180/12),l=10);
|
||||
cylinder(r=50/cos(180/12),h=10);
|
||||
}
|
||||
shape_compare() {
|
||||
cyl(r=50,l=10,circum=false,anchor=BOTTOM);
|
||||
cylinder(r=50,l=10);
|
||||
cylinder(r=50,h=10);
|
||||
}
|
||||
shape_compare() {
|
||||
cyl(r=50,l=10,chamfer=1,circum=true,anchor=BOTTOM);
|
||||
union() {
|
||||
r=50/cos(180/12);
|
||||
cylinder(r1=r-1,r2=r,l=1);
|
||||
up(1) cylinder(r=r,l=8);
|
||||
up(9) cylinder(r1=r,r2=r-1,l=1);
|
||||
cylinder(r1=r-1,r2=r,h=1);
|
||||
up(1) cylinder(r=r,h=8);
|
||||
up(9) cylinder(r1=r,r2=r-1,h=1);
|
||||
}
|
||||
}
|
||||
shape_compare() {
|
||||
cyl(r=50,l=10,chamfer=1,circum=false,anchor=BOTTOM);
|
||||
union() {
|
||||
r=50;
|
||||
cylinder(r1=r-1,r2=r,l=1);
|
||||
up(1) cylinder(r=r,l=8);
|
||||
up(9) cylinder(r1=r,r2=r-1,l=1);
|
||||
cylinder(r1=r-1,r2=r,h=1);
|
||||
up(1) cylinder(r=r,h=8);
|
||||
up(9) cylinder(r1=r,r2=r-1,h=1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user