add surface normal filtering for upward faces (cnc)

This commit is contained in:
Stewart Allen 2022-04-04 19:17:13 -04:00
commit 594a1daa07
3 changed files with 16 additions and 8 deletions

View file

@ -589,8 +589,7 @@ mesh.model = class MeshModel extends mesh.object {
}
// find adjacent faces to clicked point/line on a face
find(int, action, opt) {
let { radians, radius } = opt;
find(int, action, surface) {
let { point, face } = int;
let { x, y, z } = point;
let { a, b, c } = face;
@ -599,7 +598,7 @@ mesh.model = class MeshModel extends mesh.object {
mesh.api.log.emit("matching surface").pin();
}, 150);
worker.model_select({
id: this.id, x, y:-z, z:y, a, b, c, matrix: this.matrix, radians, radius
id: this.id, x, y:-z, z:y, a, b, c, matrix: this.matrix, surface
}).then(data => {
if (timer) {
clearTimeout(timer);