diff --git a/src/main/mesh.js b/src/main/mesh.js index 21ee2ba8..069ddaf5 100644 --- a/src/main/mesh.js +++ b/src/main/mesh.js @@ -295,6 +295,7 @@ function space_init(data) { case 'KeyL': return api.log.toggle(); case 'KeyS': + if (shiftKey) return call.edit_split(); return selection.visible({toggle:true}); case 'KeyB': return selection.boundsBox({toggle:true}); diff --git a/src/mesh/group.js b/src/mesh/group.js index f8a851c9..3adf83ed 100644 --- a/src/mesh/group.js +++ b/src/mesh/group.js @@ -152,6 +152,7 @@ mesh.group = class MeshGroup extends mesh.object { // ok, this is confusing, but necessary for now :/ setSelected() { super.select(); + return this; } }; diff --git a/src/mesh/model.js b/src/mesh/model.js index a46fd06e..717f7bdb 100644 --- a/src/mesh/model.js +++ b/src/mesh/model.js @@ -143,10 +143,13 @@ mesh.model = class MeshModel extends mesh.object { id: this.id, opt }).then(data => { - mesh.api.group.new([new mesh.model({ + let group = mesh.api.group.new([new mesh.model({ file: `${this.file}`, mesh: data })]).setSelected(); + if (opt.mirror) { + group.move(0, 0, group.bounds.dim.z); + } }); } diff --git a/src/mesh/work.js b/src/mesh/work.js index 8158f332..815afea5 100644 --- a/src/mesh/work.js +++ b/src/mesh/work.js @@ -75,13 +75,13 @@ let model = { let { id, matrix, opt } = data; let array = translate_encode(id, matrix); if (opt.mirror) { + array = array.slice(); // find max z and invert z let maxz = -Infinity; for (let i=2, l=array.length; i