select bottom of new split (for easy deletion)
This commit is contained in:
parent
72d9469699
commit
a18bce59e1
2 changed files with 4 additions and 3 deletions
|
|
@ -201,6 +201,7 @@ let split = {
|
||||||
let { models, plane, zlist } = split.state;
|
let { models, plane, zlist } = split.state;
|
||||||
log.emit(`splitting ${models.length} model(s) at ${plane.z.round(3)}`).pin();
|
log.emit(`splitting ${models.length} model(s) at ${plane.z.round(3)}`).pin();
|
||||||
Promise.all(models.map(m => m.split(plane))).then(models => {
|
Promise.all(models.map(m => m.split(plane))).then(models => {
|
||||||
|
mesh.api.selection.set(models);
|
||||||
log.emit('split complete').unpin();
|
log.emit('split complete').unpin();
|
||||||
split.end();
|
split.end();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -357,14 +357,14 @@ mesh.model = class MeshModel extends mesh.object {
|
||||||
file: `${this.file}`,
|
file: `${this.file}`,
|
||||||
mesh: o2
|
mesh: o2
|
||||||
}).applyMatrix4(m4)).select();
|
}).applyMatrix4(m4)).select();
|
||||||
// this becomes bottom
|
|
||||||
if (o1.length) {
|
if (o1.length) {
|
||||||
|
// this becomes bottom
|
||||||
this.reload(o1);
|
this.reload(o1);
|
||||||
|
resolve(this);
|
||||||
} else {
|
} else {
|
||||||
this.remove();
|
this.remove();
|
||||||
|
resolve(model);
|
||||||
}
|
}
|
||||||
// return the split model
|
|
||||||
resolve(model);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue