add short outline option
This commit is contained in:
parent
456f3f1e30
commit
963ea926f8
3 changed files with 14 additions and 3 deletions
|
|
@ -426,9 +426,15 @@ var gs_kiri_print = exports;
|
|||
shortSpeed = printSpeed * shortFact,
|
||||
moveSpeed = process.outputSeekrate,
|
||||
closest = poly.findClosestPointTo(startPoint),
|
||||
perimeter = poly.perimeter(),
|
||||
isShort = perimeter < process.outputShortPoly,
|
||||
first = true,
|
||||
last = startPoint;
|
||||
|
||||
if (isShort) {
|
||||
shortSpeed = shortSpeed + (printSpeed - shortSpeed) * (perimeter / process.outputShortPoly);
|
||||
}
|
||||
|
||||
poly.forEachPoint(function(point, pos, points, count) {
|
||||
if (first) {
|
||||
if (options.onfirst) options.onfirst(point);
|
||||
|
|
@ -440,7 +446,9 @@ var gs_kiri_print = exports;
|
|||
if (options.shorten && dist > options.shorten && count === points.length) {
|
||||
point = last.offsetPointFrom(point, options.shorten);
|
||||
}
|
||||
if (shortDist && dist < shortDist) {
|
||||
if (isShort) {
|
||||
addOutput(output, point, shellMult, shortSpeed);
|
||||
} else if (shortDist && dist < shortDist) {
|
||||
var shortRate = shortSpeed + (printSpeed - shortSpeed) * (dist / shortDist);
|
||||
addOutput(output, point, shellMult, shortRate);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -836,7 +836,7 @@ var gs_kiri_slice = exports;
|
|||
*/
|
||||
PRO.doThinFill = function(spacing, angle) {
|
||||
this.tops.forEach(function(top) {
|
||||
if (top.thin_fill.length > 0) {
|
||||
if (top.thin_fill && top.thin_fill.length > 0) {
|
||||
if (top.fill_lines) {
|
||||
top.fill_lines.appendAll(top.thin_fill)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ self.kiri.license = exports.LICENSE;
|
|||
outputRetractSpeed: 1,
|
||||
outputBrimCount: 1,
|
||||
outputBrimOffset: 1,
|
||||
outputShortPoly: 1,
|
||||
outputShortDistance: 1,
|
||||
outputShortFactor: 1,
|
||||
outputFinishFactor: 1,
|
||||
|
|
@ -292,6 +293,7 @@ self.kiri.license = exports.LICENSE;
|
|||
outputWipeDistance: 0,
|
||||
outputBrimCount: 2,
|
||||
outputBrimOffset: 3,
|
||||
outputShortPoly: 15.0,
|
||||
outputShortDistance: 5.0,
|
||||
outputShortFactor: 0.2,
|
||||
outputFinishFactor: 0,
|
||||
|
|
@ -2400,7 +2402,8 @@ self.kiri.license = exports.LICENSE;
|
|||
outputRetractSpeed: UC.newInput("retract rate", {title:"speed of filament\nretraction in mm/s", convert:UC.toInt, modes:FDM}),
|
||||
outputWipeSpeed: UC.newInput("wipe speed", {title:"speed while wiping\nnozzle in mm/s", convert:UC.toInt, modes:FDM}),
|
||||
outputWipeDistance: UC.newInput("wipe distance", {title:"distance to wipe nozzle after\neach enclosed island completes\nin millimeters. 0 to disable", convert:UC.toInt, modes:FDM}),
|
||||
outputShortDistance: UC.newInput("short distance", {title:"segment length cutoff\nfor short segments\nin millimeters", bound:UC.bound(0,200), convert:UC.toFloat, modes:FDM}),
|
||||
outputShortPoly: UC.newInput("short outline", {title:"poly perimeter length\ntriggers short slowdown\nin millimeters", bound:UC.bound(0,200), convert:UC.toFloat, modes:FDM}),
|
||||
outputShortDistance: UC.newInput("short segment", {title:"segment length cutoff\nfor short segments\nin millimeters", bound:UC.bound(0,200), convert:UC.toFloat, modes:FDM}),
|
||||
outputShortFactor: UC.newInput("short factor", {title:"max speed reduction factor\nfor short segments\nas % of print speed", bound:UC.bound(0.05,1), convert:UC.toFloat, modes:FDM}),
|
||||
outputFinishFactor: UC.newInput("finish factor", {title:"% of nozzle diameter to\nshorten finish path by\nvalues of 0-1", bound:UC.bound(0.0,1), convert:UC.toFloat, modes:FDM}),
|
||||
outputOuterFirst: UC.newBoolean("outer first", onBooleanClick, {title: "output outermost shell first", modes:FDM}),
|
||||
|
|
|
|||
Loading…
Reference in a new issue