2019-11-09 00:25:47 +00:00
|
|
|
include <BOSL2/std.scad>
|
|
|
|
include <BOSL2/skin.scad>
|
|
|
|
|
|
|
|
|
|
|
|
module test_skin() {
|
2020-05-30 02:04:34 +00:00
|
|
|
profiles = [
|
|
|
|
[[-100,-100,0], [0,100,0], [100,-100,0]],
|
|
|
|
[[-100,-100,100], [-100,100,100], [100,100,100], [100,-100,100]],
|
|
|
|
];
|
2020-06-15 08:29:23 +00:00
|
|
|
vnf1 = skin(profiles, slices=0, caps=false, method="distance");
|
2020-07-08 04:21:05 +00:00
|
|
|
assert_equal(vnf1, [[[-100,-100,0],[0,100,0],[0,100,0],[100,-100,0],[-100,-100,100],[-100,100,100],[100,100,100],[100,-100,100]],[[0,5,4],[0,1,5],[1,6,5],[1,2,6],[2,3,6],[3,7,6],[3,4,7],[3,0,4]]]);
|
2020-06-15 08:29:23 +00:00
|
|
|
vnf2 = skin(profiles, slices=0, caps=true, method="distance");
|
2020-07-08 04:21:05 +00:00
|
|
|
assert_equal(vnf2, [[[-100,-100,0],[0,100,0],[0,100,0],[100,-100,0],[-100,-100,100],[-100,100,100],[100,100,100],[100,-100,100]],[[0,5,4],[0,1,5],[1,6,5],[1,2,6],[2,3,6],[3,7,6],[3,4,7],[3,0,4],[3,2,1,0],[4,5,6,7]]]);
|
2020-05-30 02:04:34 +00:00
|
|
|
vnf_polyhedron(vnf2);
|
2019-11-09 00:25:47 +00:00
|
|
|
}
|
|
|
|
test_skin();
|
|
|
|
|
|
|
|
|
2020-05-30 02:04:34 +00:00
|
|
|
// vim: expandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap
|