fix fdm support on-demand detection

This commit is contained in:
Stewart Allen 2025-12-07 11:09:04 -05:00
commit 28afba27d5
2 changed files with 5 additions and 4 deletions

View file

@ -65,7 +65,7 @@
"three": "^0.178.0",
"three-mesh-bvh": "^0.7.6",
"uglify-js": "3.14.5",
"validator": ">=13.15.15",
"validator": ">=13.15.23",
"ws": "^8.18.2"
},
"devDependencies": {

View file

@ -1,9 +1,10 @@
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
import { util } from '../../../geo/base.js';
import { fdm_slice, sliceAll } from './slice.js';
import { fdm_slice, sliceAll, supports } from './slice.js';
import { fdm_prepare } from './prepare.js';
import { fdm_export } from './export.js';
import { codec } from '../../core/codec.js';
// noz = nozzle diameter
// fil = filament diameter
@ -26,8 +27,8 @@ function init(worker) {
worker.dispatch.fdm_support_generate = function(data, send) {
const { settings } = data;
const widgets = Object.values(worker.cache);
const fresh = widgets.filter(widget => FDM.supports(settings, widget));
send.done(kiri.codec.encode(fresh.map(widget => { return {
const fresh = widgets.filter(widget => supports(settings, widget));
send.done(codec.encode(fresh.map(widget => { return {
id: widget.id,
supports: widget.supports,
} } )));