implements patterned deposits from US5653925A
This commit is contained in:
parent
75040f1047
commit
aa277216ed
4 changed files with 55 additions and 0 deletions
|
|
@ -104,6 +104,7 @@ FDM.slice = function(settings, widget, onupdate, ondone) {
|
|||
let render = settings.render !== false,
|
||||
{ process, device, controller } = settings,
|
||||
isBelt = device.bedBelt,
|
||||
isBrick = controller.devel && process.sliceZInterleave,
|
||||
isSynth = widget.track.synth,
|
||||
isSupport = widget.track.support,
|
||||
useAssembly = controller.assembly,
|
||||
|
|
@ -386,6 +387,51 @@ FDM.slice = function(settings, widget, onupdate, ondone) {
|
|||
}
|
||||
}).reverse();
|
||||
|
||||
if (isBrick) {
|
||||
let indices = slices.map(s => s.index);
|
||||
let first = indices[0];
|
||||
let last = indices.peek();
|
||||
let nu = [];
|
||||
for (let slice of slices) {
|
||||
let nuSlice = slice.clone();
|
||||
nuSlice.z -= slice.height / 2;
|
||||
if (slice.index === first) {
|
||||
nuSlice.z = slice.z - slice.height / 4;
|
||||
nuSlice.height = slice.height / 2;
|
||||
} else {
|
||||
nuSlice.height = slice.height;
|
||||
}
|
||||
nu.push(nuSlice);
|
||||
let ti = 0;
|
||||
for (let top of slice.tops) {
|
||||
let nuTop = nuSlice.tops[ti++];
|
||||
nuTop.shells = [];
|
||||
top.shells = top.shells.filter((s,i) => {
|
||||
if (i % 2 === 0) {
|
||||
return true;
|
||||
} else {
|
||||
nuTop.shells.push(s);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (slice.index === last) {
|
||||
let cap = nuSlice.clone();
|
||||
cap.z += (slice.height * 0.75);
|
||||
cap.height = (slice.height / 2);
|
||||
console.log({ cap });
|
||||
nu.push(cap);
|
||||
cap.tops.forEach((top, i) => {
|
||||
top.shells = nuSlice.tops[i].shells.clone();
|
||||
});
|
||||
}
|
||||
}
|
||||
slices.appendAll(nu);
|
||||
slices.sort((a,b) => a.z - b.z);
|
||||
slices.forEach((s,i) => s.index = i);
|
||||
console.log({ slices });
|
||||
}
|
||||
|
||||
// connect slices into linked list for island/bridge projections
|
||||
for (let i=1; i<slices.length; i++) {
|
||||
slices[i-1].up = slices[i];
|
||||
|
|
@ -1054,6 +1100,7 @@ function doShells(slice, count, offset1, offsetN, fillOffset, opt = {}) {
|
|||
}
|
||||
|
||||
slice.tops.forEach(function(top) {
|
||||
if (!top.fill_off) return; // missing for inner brick layers
|
||||
let lines = fillArea(top.fill_off, angle, spacing, null);
|
||||
top.fill_lines.appendAll(lines);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -300,6 +300,7 @@ const conf = exports({
|
|||
sliceSupportNozzle: 0,
|
||||
sliceSupportEnable: false,
|
||||
sliceSupportOutline: true,
|
||||
sliceZInterleave: false,
|
||||
sliceSolidMinArea: 1,
|
||||
sliceBottomLayers: 3,
|
||||
sliceTopLayers: 3,
|
||||
|
|
|
|||
|
|
@ -1072,6 +1072,7 @@ gapp.register("kiri.init", (root, exports) => {
|
|||
sliceShellOrder: newSelect(LANG.sl_ordr_s, { title:LANG.sl_ordr_l}, "shell"),
|
||||
sliceDetectThin: newSelect(LANG.ad_thin_s, { title: LANG.ad_thin_l, action: thinWallSave }, "thin"),
|
||||
outputAlternating: newBoolean(LANG.ad_altr_s, onBooleanClick, {title:LANG.ad_altr_l}),
|
||||
sliceZInterleave: newBoolean(LANG.ad_zint_s, onBooleanClick, {title:LANG.ad_zint_l, show:zIntShow}),
|
||||
_____: newGroup(LANG.fi_menu, $('fdm-fill'), { modes:FDM, driven, hideable, separator, group:"fdm-fill" }),
|
||||
sliceFillType: newSelect(LANG.fi_type, {trigger:true}, "infill"),
|
||||
sliceFillSparse: newInput(LANG.fi_pcnt_s, {title:LANG.fi_pcnt_l, convert:toFloat, bound:bound(0.0,1.0)}),
|
||||
|
|
@ -1325,6 +1326,10 @@ gapp.register("kiri.init", (root, exports) => {
|
|||
return settings().device.spindleMax > 0;
|
||||
}
|
||||
|
||||
function zIntShow() {
|
||||
return settings().controller.devel;
|
||||
}
|
||||
|
||||
// slider setup
|
||||
const mobile = moto.space.info.mob;
|
||||
const slbar = mobile ? 80 : 30;
|
||||
|
|
|
|||
|
|
@ -817,6 +817,8 @@ self.kiri.lang['en-us'] = {
|
|||
ad_lbir_l: ["always print shells touching the belt before any other shells. this is no longer a recommended setting based on extensive testing."],
|
||||
ad_altr_s: "alternating",
|
||||
ad_altr_l: ["alternate shell winding order","clockwise / counter-clockwise","may reduce warping in thin areas","and help with belt edge adhesion"],
|
||||
ad_zint_s: "interleave z",
|
||||
ad_zint_l: ["interleave Z heights with odd number shells"],
|
||||
ad_lret_s: "layer retract",
|
||||
ad_lret_l: ["force filament retraction","between layers"],
|
||||
ad_agap_s: "avoid gaps",
|
||||
|
|
|
|||
Loading…
Reference in a new issue