add fill repeat option on linear
This commit is contained in:
parent
e19c27170a
commit
cafe1e3086
5 changed files with 18 additions and 3 deletions
|
|
@ -301,6 +301,7 @@
|
|||
sliceFillWidth: 1,
|
||||
sliceFillOverlap: 0.35,
|
||||
sliceFillSparse: 0.25,
|
||||
sliceFillRepeat: 1,
|
||||
sliceFillRate: 0,
|
||||
sliceFillType: "hex",
|
||||
sliceSupportDensity: 0.25,
|
||||
|
|
|
|||
|
|
@ -1693,8 +1693,9 @@
|
|||
outputRaft: UC.newBoolean(LANG.fr_nabl_s, onBooleanClick, {title:LANG.fr_nabl_l, modes:FDM, trigger: true, show:isNotBelt}),
|
||||
|
||||
fdmInfill: UC.newGroup(LANG.fi_menu, $('settings'), {modes:FDM}),
|
||||
sliceFillType: UC.newSelect(LANG.fi_type, {modes:FDM}, "infill"),
|
||||
sliceFillType: UC.newSelect(LANG.fi_type, {modes:FDM, trigger:true}, "infill"),
|
||||
sliceFillSparse: UC.newInput(LANG.fi_pcnt_s, {title:LANG.fi_pcnt_l, convert:UC.toFloat, bound:UC.bound(0.0,1.0), modes:FDM}),
|
||||
sliceFillRepeat: UC.newInput(LANG.fi_rept_s, {title:LANG.fi_rept_l, convert:UC.toInt, bound:UC.bound(1,10), show:fillShow, modes:FDM}),
|
||||
fdmSep: UC.newBlank({class:"pop-sep", modes:FDM}),
|
||||
sliceFillOverlap: UC.newInput(LANG.fi_over_s, {title:LANG.fi_over_l, convert:UC.toFloat, bound:UC.bound(0.0,2.0), modes:FDM}),
|
||||
sliceFillRate: UC.newInput(LANG.ou_feed_s, {title:LANG.fi_rate_l, convert:UC.toInt, bound:UC.bound(0,300), modes:FDM}),
|
||||
|
|
@ -1879,6 +1880,14 @@
|
|||
settingsSave(undefined, UI.settingsName.value);
|
||||
};
|
||||
|
||||
function optSelected(sel) {
|
||||
return sel.options[sel.selectedIndex].value;
|
||||
}
|
||||
|
||||
function fillShow() {
|
||||
return optSelected(UI.sliceFillType) === 'linear';
|
||||
}
|
||||
|
||||
function spindleShow() {
|
||||
return settings().device.spindleMax > 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@
|
|||
function fillLinear(target) {
|
||||
let bounds = target.bounds();
|
||||
let height = target.zHeight();
|
||||
|
||||
let repeat = target.repeat();
|
||||
let density = target.density();
|
||||
let line = target.lineWidth();
|
||||
|
||||
|
|
@ -166,7 +166,9 @@
|
|||
let step_x = span_x / steps_x;
|
||||
let step_y = span_x / steps_x;
|
||||
|
||||
if (target.zIndex() % 2 === 1) {
|
||||
let zindex = Math.floor(target.zIndex() / repeat);
|
||||
|
||||
if (zindex % 2 === 1) {
|
||||
for (let tx=bounds.min.x; tx<=bounds.max.x; tx += step_x) {
|
||||
target.newline();
|
||||
target.emit(tx, bounds.min.y);
|
||||
|
|
|
|||
|
|
@ -799,6 +799,7 @@
|
|||
zHeight: function() { return height },
|
||||
offset: function() { return spacing },
|
||||
density: function() { return density },
|
||||
repeat: function() { return process.sliceFillRepeat },
|
||||
// output functions
|
||||
emit: function(x,y) {
|
||||
if (isNaN(x)) {
|
||||
|
|
|
|||
|
|
@ -280,6 +280,8 @@ kiri.lang['en-us'] = {
|
|||
fi_type: "fill type",
|
||||
fi_pcnt_s: "fill fraction",
|
||||
fi_pcnt_l: ["fill density values","0.0 - 1.0"],
|
||||
fi_rept_s: "fill repeat",
|
||||
fi_rept_l: ["number of times to repeat","unchanged fill layers"],
|
||||
fi_angl_s: "solid start",
|
||||
fi_angl_l: ["starting angle in degrees","90 degrees added to ","each following layer","applies only to solid layers"],
|
||||
fi_wdth_s: "solid width",
|
||||
|
|
|
|||
Loading…
Reference in a new issue