From cc250e8a499cc8bcb1828bb332a010d90b8f515a Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Thu, 31 Mar 2022 21:33:22 -0400 Subject: [PATCH] bump rev 3.3.D16 --- package.json | 2 +- src/main/kiri.js | 2 +- src/mesh/tool.js | 7 ++++++- src/mesh/work.js | 3 +-- src/moto/license.js | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 556be707..110e0333 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grid-apps", - "version": "3.3.15D", + "version": "3.3.16D", "description": "grid.space 3d slice & modeling tools", "author": "Stewart Allen ", "license": "MIT", diff --git a/src/main/kiri.js b/src/main/kiri.js index a3d0f745..34750087 100644 --- a/src/main/kiri.js +++ b/src/main/kiri.js @@ -15,7 +15,7 @@ gapp.main("main.kiri", [], (root) => { const modfns = root.kirimod = ( root.kirimod || [] ); const kiri = root.kiri = { - beta: 3315, + beta: 3316, driver: {}, // driver modules load(fn) { modfns.push(fn); diff --git a/src/mesh/tool.js b/src/mesh/tool.js index d003cb8c..8ea1ae38 100644 --- a/src/mesh/tool.js +++ b/src/mesh/tool.js @@ -158,11 +158,15 @@ mesh.tool = class MeshTool { } findConnectedSurface(faces, radians) { + const found = {}; const check = faces.slice(); + for (let face of faces) { + found[face] = 1; + } while (check.length) { const face = check.shift(); const norm = this.normals[face]; - const fadj = this.getAdjacentFaces(face).filter(f => !faces.contains(f)); + const fadj = this.getAdjacentFaces(face).filter(f => !found[f]); for (let f of fadj) { const fn = this.normals[f] .map((v,i) => Math.abs(norm[i] - v)) @@ -170,6 +174,7 @@ mesh.tool = class MeshTool { if (fn <= radians) { faces.push(f); check.push(f) + found[f] = 1; } } } diff --git a/src/mesh/work.js b/src/mesh/work.js index ebd91abb..ca8ac0da 100644 --- a/src/mesh/work.js +++ b/src/mesh/work.js @@ -325,8 +325,7 @@ let model = { } const tool = rec.tool; if (tool && tool.sides && radians) { - const surface = tool.findConnectedSurface(faces, radians); - // console.log({surface}); + tool.findConnectedSurface(faces, radians); } return { faces, edges, verts, point }; }, diff --git a/src/moto/license.js b/src/moto/license.js index 51afa586..9ac36819 100644 --- a/src/moto/license.js +++ b/src/moto/license.js @@ -3,7 +3,7 @@ let terms = { COPYRIGHT: "Copyright (C) Stewart Allen - All Rights Reserved", LICENSE: "See the license.md file included with the source distribution", - VERSION: "3.3.D15" + VERSION: "3.3.D16" }; if (typeof(module) === 'object') {