stub in sliceAll
This commit is contained in:
parent
a97eed694c
commit
e3c73dc449
4 changed files with 23 additions and 11 deletions
|
|
@ -203,6 +203,10 @@ KIRI.work = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
sliceAll: function(settings, callback) {
|
||||||
|
send("sliceAll", { settings }, callback);
|
||||||
|
},
|
||||||
|
|
||||||
prepare: function(settings, update, done) {
|
prepare: function(settings, update, done) {
|
||||||
send("prepare", { settings }, function(reply) {
|
send("prepare", { settings }, function(reply) {
|
||||||
if (reply.progress) {
|
if (reply.progress) {
|
||||||
|
|
|
||||||
|
|
@ -1051,12 +1051,12 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
if (toSlice.length) {
|
if (toSlice.length) {
|
||||||
sliceWidget(toSlice.shift())
|
sliceWidget(toSlice.shift())
|
||||||
} else {
|
} else {
|
||||||
sliceDone();
|
KIRI.client.sliceAll(settings, sliceDone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function sliceWidget(widget) {
|
function sliceWidget(widget) {
|
||||||
let stack = widget.stack = STACKS.create(widget.id, widget.mesh),
|
widget.stack = STACKS.create(widget.id, widget.mesh),
|
||||||
factor = (widget.getVertices().count / defvert);
|
factor = (widget.getVertices().count / defvert);
|
||||||
|
|
||||||
widget.slice(settings, function(sliced, error) {
|
widget.slice(settings, function(sliced, error) {
|
||||||
|
|
|
||||||
|
|
@ -361,6 +361,19 @@ KIRI.worker = {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
sliceAll: function(data, send) {
|
||||||
|
const drivers = KIRI.driver;
|
||||||
|
const settings = data.settings;
|
||||||
|
const mode = settings.mode;
|
||||||
|
const driver = drivers[mode];
|
||||||
|
|
||||||
|
if (driver.sliceAll) {
|
||||||
|
driver.sliceAll(settings, send.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
send.done({done: true});
|
||||||
|
},
|
||||||
|
|
||||||
prepare: function(data, send) {
|
prepare: function(data, send) {
|
||||||
// create widget array from id:widget cache
|
// create widget array from id:widget cache
|
||||||
const widgets = Object.values(wcache);
|
const widgets = Object.values(wcache);
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
gaps: { check: 0xaa3366, face: 0xaa3366, line: 0xaa3366, opacity: 1 }
|
gaps: { check: 0xaa3366, face: 0xaa3366, line: 0xaa3366, opacity: 1 }
|
||||||
},
|
},
|
||||||
PROTO = Object.clone(COLOR),
|
PROTO = Object.clone(COLOR),
|
||||||
bwcomp = (1 / Math.cos(Math.PI/4)),
|
|
||||||
getRangeParameters = FDM.getRangeParameters,
|
getRangeParameters = FDM.getRangeParameters,
|
||||||
noop = function() {},
|
noop = function() {},
|
||||||
profile = false,
|
profile = false,
|
||||||
|
|
@ -37,14 +36,6 @@
|
||||||
isFlat = false, // force flat rendering
|
isFlat = false, // force flat rendering
|
||||||
offset = 0; // poly line generation offsets
|
offset = 0; // poly line generation offsets
|
||||||
|
|
||||||
let lastLogTime = 0;
|
|
||||||
|
|
||||||
function timelog() {
|
|
||||||
let now = Date.now();
|
|
||||||
console.log(now - (lastLogTime || now), ...arguments);
|
|
||||||
lastLogTime = now;
|
|
||||||
}
|
|
||||||
|
|
||||||
function vopt(opt) {
|
function vopt(opt) {
|
||||||
if (opt) {
|
if (opt) {
|
||||||
if (isFlat) {
|
if (isFlat) {
|
||||||
|
|
@ -104,6 +95,10 @@
|
||||||
data.tops = nutops;
|
data.tops = nutops;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
FDM.sliceAll = function(settings, onupdate) {
|
||||||
|
// future home of brim and anchor generation
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DRIVER SLICE CONTRACT
|
* DRIVER SLICE CONTRACT
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue