mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-22 21:47:59 +01:00
Throw error when provided mesh is empty
@peteruithoven
This commit is contained in:
parent
8b475d8e4b
commit
cb465b9eee
@ -23,6 +23,10 @@ export function sliceGeometry(settings, geometry, matrix, sync = false, onProgre
|
|||||||
throw new Error('Geometry is not an instance of BufferGeometry or Geometry');
|
throw new Error('Geometry is not an instance of BufferGeometry or Geometry');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (geometry.faces.length === 0) {
|
||||||
|
throw new Error('Geometry does not contain any data');
|
||||||
|
}
|
||||||
|
|
||||||
if (matrix) {
|
if (matrix) {
|
||||||
geometry.applyMatrix(matrix);
|
geometry.applyMatrix(matrix);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user