diff --git a/src/mesh/model.js b/src/mesh/model.js index 0ca8d637..233fa149 100644 --- a/src/mesh/model.js +++ b/src/mesh/model.js @@ -259,10 +259,11 @@ mesh.model = class MeshModel extends mesh.object { let material = new MeshPhongMaterial( { color: 0x777777, transparent: true, opacity: 0.25 } ); let sphere = new Mesh( geometry, material ); let { x, y, z } = point; + let { a, b, c } = face; sphere.position.set(x,y,z); space.scene.add(sphere); - worker.model_locate({ - id: this.id, x, y:-z, z:y, matrix: this.matrix + worker.model_select({ + id: this.id, x, y:-z, z:y, a, b, c, matrix: this.matrix }).then(data => { console.log('located', data); }); diff --git a/src/mesh/work.js b/src/mesh/work.js index 759ce8b1..3bff726d 100644 --- a/src/mesh/work.js +++ b/src/mesh/work.js @@ -101,11 +101,13 @@ let model = { }, // given model and point, locate matching vertices, lines, and faces - locate(data) { - let { id, x, y, z, matrix } = data; + select(data) { + let { id, x, y, z, a, b, c, matrix } = data; let arr = translate_encode(id, matrix); let eps = 2; for (let i=0, l=arr.length; i