test case for sticking out merged faces

This commit is contained in:
Val Erastov 2018-02-02 18:06:36 -08:00
parent 6bc6ec4e08
commit c6b17c60e5

View file

@ -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]]]
}
}
]);