add centering option to move()

This commit is contained in:
Adrian Mariano
2022-01-10 21:23:09 -05:00
parent dd9b197678
commit 7e388293e8
2 changed files with 20 additions and 2 deletions

View File

@@ -23,6 +23,10 @@ module test_move() {
// Verify that module at least doesn't crash.
move(x=-5) move(y=-5) move(z=-5) move([-5,-5,-5]) union(){};
move(x=5) move(y=5) move(z=5) move([5,5,5]) union(){};
sq = square(10);
assert_equal(move("centroid", sq), move(-centroid(sq),sq));
assert_equal(move("mean", vals), move(-mean(vals), vals));
assert_equal(move("box", vals), move(-mean(pointlist_bounds(vals)),vals));
}
test_move();