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) {
|
||||
send("prepare", { settings }, function(reply) {
|
||||
if (reply.progress) {
|
||||
|
|
|
|||
|
|
@ -1051,12 +1051,12 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
|||
if (toSlice.length) {
|
||||
sliceWidget(toSlice.shift())
|
||||
} else {
|
||||
sliceDone();
|
||||
KIRI.client.sliceAll(settings, sliceDone);
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
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) {
|
||||
// create widget array from id:widget cache
|
||||
const widgets = Object.values(wcache);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
gaps: { check: 0xaa3366, face: 0xaa3366, line: 0xaa3366, opacity: 1 }
|
||||
},
|
||||
PROTO = Object.clone(COLOR),
|
||||
bwcomp = (1 / Math.cos(Math.PI/4)),
|
||||
getRangeParameters = FDM.getRangeParameters,
|
||||
noop = function() {},
|
||||
profile = false,
|
||||
|
|
@ -37,14 +36,6 @@
|
|||
isFlat = false, // force flat rendering
|
||||
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) {
|
||||
if (opt) {
|
||||
if (isFlat) {
|
||||
|
|
@ -104,6 +95,10 @@
|
|||
data.tops = nutops;
|
||||
};
|
||||
|
||||
FDM.sliceAll = function(settings, onupdate) {
|
||||
// future home of brim and anchor generation
|
||||
};
|
||||
|
||||
/**
|
||||
* DRIVER SLICE CONTRACT
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue