From c6b17c60e53badbb1448561aaae61ef3f8cd6873 Mon Sep 17 00:00:00 2001 From: Val Erastov Date: Fri, 2 Feb 2018 18:06:36 -0800 Subject: [PATCH] test case for sticking out merged faces --- web/test/cases/brep-bool-topo.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/web/test/cases/brep-bool-topo.js b/web/test/cases/brep-bool-topo.js index 25b21063..40a0e898 100644 --- a/web/test/cases/brep-bool-topo.js +++ b/web/test/cases/brep-bool-topo.js @@ -82,6 +82,22 @@ export default defineTests([ 'vertices': [[-250, -250, -250], [-250, -250, 250], [-250, 250, -250], [-250, 250, 250], [78, -146, 200], [78, -146, 250], [250, -139, 200], [250, -250, -250], [250, -250, 250], [250, -139, 250], [250, 140, 200], [250, 140, 250], [250, 250, -250], [250, 250, 250]], 'faces': [[[7, 8, 1, 0]], [[10, 6, 9, 8, 7, 12, 13, 11]], [[2, 3, 13, 12]], [[0, 1, 3, 2]], [[7, 0, 2, 12]], [[11, 5, 4, 10]], [[9, 6, 4, 5]], [[6, 10, 4]], [[9, 5, 11, 13, 3, 1, 8]]] } + }, + + { + 'name': 'AdjacentAndStickingOut', + 'state': { + 'sketches': {'0:3': {'Segment': [[[-510, 250], [91, 250]], [[91, 250], [91, -1]], [[91, -1], [-510, -1]], [[-510, -1], [-510, 250]]]}}, + 'operations': [{'type': 'BOX', 'params': {'width': 500, 'height': 500, 'depth': 500}}, { + 'type': 'CUT', + 'params': {'value': 50, 'prism': 1, 'angle': 0, 'rotation': 0, 'face': '0:3'} + }] + }, + 'expected': { + 'format': 'LOOPS', + 'vertices': [[-250, -250, -250], [-250, -250, 250], [-250, -1, -250], [-250, -1, 91], [-250, 250, 91], [-250, 250, 250], [-200, -1, -250], [-200, -1, 91], [-200, 250, -250], [-200, 250, 91], [250, -250, -250], [250, -250, 250], [250, 250, -250], [250, 250, 250]], + 'faces': [[[10, 11, 1, 0]], [[12, 13, 11, 10]], [[5, 1, 11, 13]], [[6, 8, 12, 10, 0, 2]], [[6, 2, 3, 7]], [[3, 4, 9, 7]], [[8, 6, 7, 9]], [[8, 9, 4, 5, 13, 12]], [[4, 3, 2, 0, 1, 5]]] + } } ]);