same_shape bugfix (fails if b==undef)

check for collinear points in round_corners plus other fixes
fix path_cut to work correctly when closed==true, and change it to
fail with error when cut is too long instead of returning undef.
Add path_cut_segs.
This commit is contained in:
Adrian Mariano
2021-03-05 16:35:41 -05:00
parent 863c410404
commit f736ef98f7
4 changed files with 98 additions and 29 deletions

View File

@@ -245,6 +245,12 @@ test_is_consistent();
module test_same_shape() {
assert(same_shape([3,[4,5]],[7,[3,4]]));
assert(!same_shape([3,4,5], [7,[3,4]]));
assert(!same_shape([3,4,5],undef));
assert(!same_shape([5,3],3));
assert(!same_shape(undef,[3,4]));
assert(same_shape(4,5));
assert(!same_shape(5,undef));
}
test_same_shape();