fix adaptive layering first layer
This commit is contained in:
parent
a2a75dc5f7
commit
87de4ed055
3 changed files with 18 additions and 11 deletions
5
notes.md
5
notes.md
|
|
@ -33,7 +33,7 @@
|
|||
# FDM
|
||||
|
||||
* `B` dwell / extrude engage reversed?
|
||||
* `B` fix adaptive slicing. also with multi-extruder
|
||||
* `B` fix adaptive slicing with multi-extruder
|
||||
* `B` fix supports with grouped parts
|
||||
* `B` sparse infill should follow polys it intersects
|
||||
* `B` multi-extruder rendering of raft fails to offset the rest of the print
|
||||
|
|
@ -63,9 +63,11 @@
|
|||
|
||||
# CAM
|
||||
|
||||
* `B` climb vs conventional not fully consistent after refactor
|
||||
* `B` outside cutting direction in roughing mode inverted
|
||||
* `B` clear voids has double interior pass because wrong offset shadow used
|
||||
* `B` top clearing operations should use linear, not offset, passes
|
||||
* `F` parameterize dropping close points in prep.js. ensure long segments remain straight
|
||||
* `F` flat and volumetric rendering of paths
|
||||
* `F` z bounded slices (extension of z bottom offset feature)
|
||||
* `F` z planar settings visualizations
|
||||
|
|
@ -77,7 +79,6 @@
|
|||
* `F` ease-in and ease-out especially on tab cut-out start/stop
|
||||
* `F` implement z line-only follows for ball/taper
|
||||
* `F` add option to spiral in vs out (optimal tool life) vs mixed (optimal path)
|
||||
* `F` add endmill spiral direction to fully respect climb vs conventional
|
||||
* `F` add support for tapered ball mills
|
||||
* `F` warn when part > stock or cuts go outside bed
|
||||
* `P` crossing open space check point is outside camshell before returning max z
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@
|
|||
} else if (zIncMin) {
|
||||
// console.log('adaptive slicing', zIncMin, ':', zInc, 'from', zMin, 'to', zMax);
|
||||
// FDM adaptive slicing
|
||||
let zPos = zMin + zIncFirst,
|
||||
let zPos = zIncFirst,
|
||||
zOI = 0,
|
||||
zDelta,
|
||||
zDivMin,
|
||||
|
|
@ -298,12 +298,18 @@
|
|||
// first slice is fixed
|
||||
zHeights.push(zIncFirst);
|
||||
zIndexes.push(zIncFirst / 2);
|
||||
|
||||
// console.log({zIncFirst, zOrdered})
|
||||
while (zPos < zMax && zOI < zOrdered.length) {
|
||||
nextZ = zOrdered[zOI++];
|
||||
if (zPos >= nextZ) continue;
|
||||
if (zPos >= nextZ) {
|
||||
// console.log('skip',{zPos},'>=',{nextZ});
|
||||
continue;
|
||||
}
|
||||
zDelta = nextZ - zPos;
|
||||
if (zDelta < zIncMin) continue;
|
||||
if (zDelta < zIncMin) {
|
||||
// console.log('skip',{zDelta},'<',{zIncMin});
|
||||
continue;
|
||||
}
|
||||
|
||||
zDivMin = Math.floor(zDelta / zIncMin);
|
||||
zDivMax = Math.floor(zDelta / zInc);
|
||||
|
|
|
|||
|
|
@ -106,10 +106,13 @@
|
|||
spro.firstSliceHeight = sliceHeight;
|
||||
}
|
||||
|
||||
const sliceMinHeight = spro.sliceAdaptive && spro.sliceMinHeight > 0 ?
|
||||
Math.min(spro.sliceMinHeight, sliceHeight) : 0;
|
||||
|
||||
if (spro.firstSliceHeight < sliceHeight) {
|
||||
DBUG.log("invalid first layer height < slice height");
|
||||
DBUG.log("reverting to slice height");
|
||||
spro.firstSliceHeight = sliceHeight;
|
||||
DBUG.log("reverting to min valid slice height");
|
||||
spro.firstSliceHeight = sliceMinHeight || sliceHeight;
|
||||
}
|
||||
|
||||
// const slicer = new KIRI.slicer2(widget.getPoints(), { });
|
||||
|
|
@ -134,9 +137,6 @@
|
|||
// } });
|
||||
// onSliceDone(slices);
|
||||
|
||||
const sliceMinHeight = spro.sliceAdaptive && spro.sliceMinHeight > 0 ?
|
||||
Math.min(spro.sliceMinHeight, sliceHeight) : 0;
|
||||
|
||||
SLICER.sliceWidget(widget, {
|
||||
height: sliceHeight,
|
||||
minHeight: sliceMinHeight,
|
||||
|
|
|
|||
Loading…
Reference in a new issue