Fixed skin() regression.

This commit is contained in:
Revar Desmera 2020-06-15 01:29:23 -07:00
parent e3b64888a8
commit 5b39cefe7b
2 changed files with 5 additions and 5 deletions

View file

@ -7,10 +7,10 @@ module test_skin() {
[[-100,-100,0], [0,100,0], [100,-100,0]], [[-100,-100,0], [0,100,0], [100,-100,0]],
[[-100,-100,100], [-100,100,100], [100,100,100], [100,-100,100]], [[-100,-100,100], [-100,100,100], [100,100,100], [100,-100,100]],
]; ];
vnf1 = skin(profiles, caps=false, method="distance"); vnf1 = skin(profiles, slices=0, caps=false, method="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]]]); assert(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, 1, 4], [4, 1, 5], [1, 2, 5], [5, 2, 6], [2, 3, 6], [6, 3, 7], [3, 0, 7], [7, 0, 4]]]);
vnf2 = skin(profiles, caps=true, method="distance"); vnf2 = skin(profiles, slices=0, caps=true, method="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]]]); assert(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, 1, 4], [4, 1, 5], [1, 2, 5], [5, 2, 6], [2, 3, 6], [6, 3, 7], [3, 0, 7], [7, 0, 4], [3, 2, 1, 0], [4, 5, 6, 7]]]);
vnf_polyhedron(vnf2); vnf_polyhedron(vnf2);
} }
test_skin(); test_skin();

View file

@ -8,7 +8,7 @@
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
BOSL_VERSION = [2,0,339]; BOSL_VERSION = [2,0,340];
// Section: BOSL Library Version Functions // Section: BOSL Library Version Functions