auto-select patches
This commit is contained in:
parent
91995b5762
commit
92ece197a1
2 changed files with 6 additions and 1 deletions
|
|
@ -315,6 +315,7 @@ let tool = {
|
|||
let newmdl = [];
|
||||
let mcore = new THREE.Matrix4().makeRotationX(Math.PI / 2);
|
||||
for (let m of models) {
|
||||
// todo - translate vertices with source model's matrix
|
||||
let p = worker.model_analyze(m.id).then(data => {
|
||||
let { areas, edges } = data.mapped;
|
||||
let nm = areas.map(area => new mesh.model({
|
||||
|
|
@ -327,7 +328,7 @@ let tool = {
|
|||
}
|
||||
Promise.all(promises).then(() => {
|
||||
if (newmdl.length) {
|
||||
mesh.api.group.new(newmdl, undefined, "patch");
|
||||
mesh.api.group.new(newmdl, undefined, "patch").select();
|
||||
}
|
||||
api.log.emit('analysis complete').unpin();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -66,6 +66,10 @@ mesh.object = class MeshObject {
|
|||
return this.applyMatrix(matrix.elements).matrixChanged();
|
||||
}
|
||||
|
||||
select() {
|
||||
mesh.api.selection.set([this]);
|
||||
}
|
||||
|
||||
focus() {
|
||||
mesh.api.focus(this.object);
|
||||
return this;
|
||||
|
|
|
|||
Loading…
Reference in a new issue