add support gap layers
This commit is contained in:
parent
0c79e93580
commit
6262adb49f
5 changed files with 14 additions and 12 deletions
|
|
@ -139,7 +139,7 @@ var gs_kiri_fdm = exports;
|
|||
// calculations only relevant when supports are enabled
|
||||
if (supportEnabled) {
|
||||
forSlices(0.5, 0.7, function(slice) {
|
||||
slice.doSupport(spro.sliceSupportOffset, spro.sliceSupportSpan, spro.sliceSupportExtra, supportMinArea, spro.sliceSupportSize, spro.sliceSupportOffset);
|
||||
slice.doSupport(spro.sliceSupportOffset, spro.sliceSupportSpan, spro.sliceSupportExtra, supportMinArea, spro.sliceSupportSize, spro.sliceSupportOffset, spro.sliceSupportGap);
|
||||
}, "support");
|
||||
forSlices(0.7, 0.8, function(slice) {
|
||||
slice.doSupportFill(spri.nozzleSize, spro.sliceSupportDensity, supportMinArea);
|
||||
|
|
|
|||
|
|
@ -877,8 +877,9 @@ var gs_kiri_slice = exports;
|
|||
* @param {number} maxBridge max length before mid supports added
|
||||
* @param {number} expand outer support clip
|
||||
* @param {number} offset inner support clip
|
||||
* @param {number} gap layers between supports and part
|
||||
*/
|
||||
PRO.doSupport = function(minOffset, maxBridge, expand, minArea, pillarSize, offset) {
|
||||
PRO.doSupport = function(minOffset, maxBridge, expand, minArea, pillarSize, offset, gap) {
|
||||
var min = minArea || 0.1,
|
||||
size = (pillarSize || 2),
|
||||
mergeDist = size * 3, // pillar merge dist
|
||||
|
|
@ -991,7 +992,7 @@ var gs_kiri_slice = exports;
|
|||
if (culled.length === 0) break;
|
||||
|
||||
// new bridge polys for next pass (skip first layer below)
|
||||
if (depth > 0) down.supports.appendAll(culled);
|
||||
if (depth >= gap) down.supports.appendAll(culled);
|
||||
|
||||
supports = culled;
|
||||
down = down.down;
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ self.kiri.license = exports.LICENSE;
|
|||
sliceSupportEnable: 1,
|
||||
sliceSupportDensity: 1,
|
||||
sliceSupportOffset: 1,
|
||||
sliceSupportGap: 1,
|
||||
sliceSupportSize: 1,
|
||||
sliceSupportArea: 1,
|
||||
sliceSupportExtra: 1,
|
||||
|
|
@ -265,6 +266,7 @@ self.kiri.license = exports.LICENSE;
|
|||
sliceSupportEnable: false,
|
||||
sliceSupportDensity: 0.25,
|
||||
sliceSupportOffset: 1.0,
|
||||
sliceSupportGap: 1,
|
||||
sliceSupportSize: 10,
|
||||
sliceSupportArea: 1,
|
||||
sliceSupportExtra: 0,
|
||||
|
|
@ -2458,6 +2460,7 @@ self.kiri.license = exports.LICENSE;
|
|||
sliceSupportDensity: UC.newInput("density", {title:"0.0 - 1.0\nrecommended 0.15\n0 to disable", convert:UC.toFloat, bound:UC.bound(0.05,1.0), modes:FDM}),
|
||||
sliceSupportSize: UC.newInput("pillar size", {title:"width in millimeters", bound:UC.bound(1.0,200.0), convert:UC.toFloat, modes:FDM}),
|
||||
sliceSupportOffset: UC.newInput("part offset", {title:"millimeters\noffset from part", bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
|
||||
sliceSupportGap: UC.newInput("gap layers", {title:"number of layers\noffset from part", bound:UC.bound(0,5), convert:UC.toInt, modes:FDM}),
|
||||
sliceSupportSpan: UC.newInput("max bridge", {title:"span length that\ntriggers support\nin millimeters", bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
|
||||
sliceSupportArea: UC.newInput("min area", {title:"min area for a\nsupport column\nin millimeters", bound:UC.bound(0.1,200.0), convert:UC.toFloat, modes:FDM}),
|
||||
sliceSupportExtra: UC.newInput("expand", {title:"expand support area\nbeyond part boundary\nin millimeters", bound:UC.bound(0.0,200.0), convert:UC.toFloat, modes:FDM}),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
var exports = {
|
||||
COPYRIGHT:"Copyright (C) 2014-2017 Stewart Allen <stewart@neuron.com> - All Rights Reserved",
|
||||
LICENSE:"Unauthorized copying, modification and re-distribution are strictly prohibited without prior written consent.",
|
||||
VERSION:"1.0.90"
|
||||
VERSION:"1.0.91"
|
||||
};
|
||||
if (!module) var module = {};
|
||||
module.exports = exports;
|
||||
|
|
|
|||
Loading…
Reference in a new issue