fixes #206 empty surfaces with multi-part and pocket

This commit is contained in:
Stewart Allen 2022-06-05 19:17:43 -04:00
commit 0e7d01c8fa
6 changed files with 98 additions and 48 deletions

View file

@ -522,7 +522,8 @@ function load_files_opt(files, opt) {
// add object loader
function space_load(data) {
mesh.api.group.new(data.flat().map(el => new mesh.model(el)))
if (data && data.length && (data = data.flat()).length)
mesh.api.group.new(data.map(el => new mesh.model(el)))
.promote()
.focus();
}