fix multi-widget slice / export layout in sla mode

This commit is contained in:
Stewart Allen 2020-04-19 21:32:06 -04:00
commit 858f4c7bc0
5 changed files with 57 additions and 1 deletions

View file

@ -231,6 +231,7 @@ let gs_kiri_sla = exports;
let traces = POLY.flatten(slice.gatherTraces([]));
let polys = slice.solids.unioned;
polys.forEach(poly => {
poly.move(widget.track.pos);
ctx.beginPath();
polyout(poly.setClockwise(), ctx);
if (poly.inner) {
@ -332,6 +333,7 @@ let gs_kiri_sla = exports;
}
let polys = slice.solids.unioned;
polys.forEach(poly => {
poly = poly.clone(true).move(widget.track.pos);
layer.poly(poly, 0x010101, true);
layer.solid(poly, 0x00bbee);
count++;

View file

@ -1468,7 +1468,7 @@ var gs_kiri_init = exports;
slaBasePeelDist: UC.newInput('peel distance', {title:'peel distance\nin millimeters', convert:UC.toFloat, modes:SLA}),
slaBasePeelLiftRate: UC.newInput('peel lift rate', {title:'peel lift speed\nin mm/sec', convert:UC.toFloat, modes:SLA}),
slaFill: UC.newGroup('infill', null, {modes:SLA, group:"sla-first"}),
slaFill: UC.newGroup('infill', null, {modes:SLA, group:"sla-infill"}),
slaFillDensity: UC.newInput('density', {title:'percent infill\n0.0-1.0', convert:UC.toFloat, bound:UC.bound(0,1), modes:SLA}),
slaFillLine: UC.newInput('line width', {title:'hatch line width\nin millimeters', convert:UC.toFloat, bound:UC.bound(0,5), modes:SLA}),

View file

@ -96,6 +96,7 @@ KIRI.work = {
settings: settings,
vertices: vertices,
position: widget.mesh.position,
tracking: widget.track,
snapshot: snapshot
}, function(reply) {
if (reply.done || reply.error) delete slicing[widget.id];

View file

@ -38,6 +38,7 @@ let dispatch = {
let settings = data.settings,
vertices = new Float32Array(data.vertices),
position = data.position,
tracking = data.tracking,
points = Widget.verticesToPoints(vertices);
send.data({update:0.05, updateStatus:"slicing"});
@ -50,6 +51,7 @@ let dispatch = {
cache[data.id] = widget;
// fake mesh object to satisfy printing
widget.track = tracking;
widget.mesh = {
widget: widget,
position: position