mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-01 14:00:30 +02:00
Added regressions and bugfixes for skin.scad
This commit is contained in:
19
tests/test_skin.scad
Normal file
19
tests/test_skin.scad
Normal file
@@ -0,0 +1,19 @@
|
||||
include <BOSL2/std.scad>
|
||||
include <BOSL2/skin.scad>
|
||||
|
||||
|
||||
module test_skin() {
|
||||
profiles = [
|
||||
[[-100,-100,0], [0,100,0], [100,-100,0]],
|
||||
[[-100,-100,100], [-100,100,100], [100,100,100], [100,-100,100]],
|
||||
];
|
||||
vnf1 = skin(profiles, caps=false, matching="distance");
|
||||
assert(vnf1 == [[[-100,-100,0],[-100,100,100],[-100,-100,100],[0,100,0],[100,100,100],[100,-100,0],[100,-100,100]],[[0,1,2],[0,3,1],[3,4,1],[3,5,4],[5,6,4],[5,2,6],[5,0,2]]]);
|
||||
vnf2 = skin(profiles, caps=true, matching="distance");
|
||||
assert(vnf2 == [[[-100,-100,0],[-100,100,100],[-100,-100,100],[0,100,0],[100,100,100],[100,-100,0],[100,-100,100],[100,-100,0],[0,100,0],[-100,-100,0],[-100,-100,100],[-100,100,100],[100,100,100],[100,-100,100]],[[0,1,2],[0,3,1],[3,4,1],[3,5,4],[5,6,4],[5,2,6],[5,0,2],[7,8,9],[10,11,12],[12,13,10]]]);
|
||||
vnf_polyhedron(vnf2);
|
||||
}
|
||||
test_skin();
|
||||
|
||||
|
||||
// vim: noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap
|
Reference in New Issue
Block a user