render anchors in a different color
This commit is contained in:
parent
7ea9f2a7ef
commit
e94deece49
1 changed files with 10 additions and 1 deletions
|
|
@ -18,6 +18,7 @@
|
||||||
FILL = KIRI.fill,
|
FILL = KIRI.fill,
|
||||||
FILLFIXED = KIRI.fill_fixed,
|
FILLFIXED = KIRI.fill_fixed,
|
||||||
COLOR = {
|
COLOR = {
|
||||||
|
anchor: { check: 0x999933, face: 0x999933, line: 0x999933, opacity: 1 },
|
||||||
shell: { check: 0x0077bb, face: 0x0077bb, line: 0x0077bb, opacity: 1 },
|
shell: { check: 0x0077bb, face: 0x0077bb, line: 0x0077bb, opacity: 1 },
|
||||||
fill: { check: 0x00bb77, face: 0x00bb77, line: 0x00bb77, opacity: 1 },
|
fill: { check: 0x00bb77, face: 0x00bb77, line: 0x00bb77, opacity: 1 },
|
||||||
infill: { check: 0x3322bb, face: 0x3322bb, line: 0x3322bb, opacity: 1 },
|
infill: { check: 0x3322bb, face: 0x3322bb, line: 0x3322bb, opacity: 1 },
|
||||||
|
|
@ -382,6 +383,7 @@
|
||||||
minx -= brim;
|
minx -= brim;
|
||||||
maxx += brim;
|
maxx += brim;
|
||||||
}
|
}
|
||||||
|
// array of added top.fill_sparse arrays
|
||||||
let adds = [];
|
let adds = [];
|
||||||
// add enough lead in layers to fill anchor area
|
// add enough lead in layers to fill anchor area
|
||||||
let anchorlen = process.firstLayerBeltLead * beltfact;
|
let anchorlen = process.firstLayerBeltLead * beltfact;
|
||||||
|
|
@ -424,10 +426,13 @@
|
||||||
// break;
|
// break;
|
||||||
}
|
}
|
||||||
let first = poly.first();
|
let first = poly.first();
|
||||||
|
// add up/over/down to anchor line (close = down)
|
||||||
|
// which completes the bump perimeter
|
||||||
poly.push(poly.last().add({x:0, y, z:0}));
|
poly.push(poly.last().add({x:0, y, z:0}));
|
||||||
poly.push(poly.first().add({x:0, y, z:0}));
|
poly.push(poly.first().add({x:0, y, z:0}));
|
||||||
poly.setClosed();
|
poly.setClosed();
|
||||||
if (count > 2 && maxx - minx > 10) {
|
if (count > 2 && maxx - minx > 10) {
|
||||||
|
// add vertical hatch lines insibe bump shell
|
||||||
let mp = (maxx + minx) / 2;
|
let mp = (maxx + minx) / 2;
|
||||||
let dx = (maxx - minx - 2);
|
let dx = (maxx - minx - 2);
|
||||||
dx = (Math.floor(dx / 3) * 3) / 2;
|
dx = (Math.floor(dx / 3) * 3) / 2;
|
||||||
|
|
@ -644,10 +649,14 @@
|
||||||
.setLayer("solid fill", isSynth ? COLOR.support : COLOR.fill)
|
.setLayer("solid fill", isSynth ? COLOR.support : COLOR.fill)
|
||||||
.addLines(top.fill_lines || [], vopt({ offset: offset * solidWidth, height }));
|
.addLines(top.fill_lines || [], vopt({ offset: offset * solidWidth, height }));
|
||||||
|
|
||||||
output
|
if (!(slice.belt && slice.belt.anchor)) output
|
||||||
.setLayer("sparse fill", COLOR.infill)
|
.setLayer("sparse fill", COLOR.infill)
|
||||||
.addPolys(top.fill_sparse || [], vopt({ offset, height, outline: true, trace:true }))
|
.addPolys(top.fill_sparse || [], vopt({ offset, height, outline: true, trace:true }))
|
||||||
|
|
||||||
|
if (slice.belt && slice.belt.anchor) output
|
||||||
|
.setLayer("anchor", COLOR.anchor)
|
||||||
|
.addPolys(top.fill_sparse || [], vopt({ offset, height, outline: true, trace:true }))
|
||||||
|
|
||||||
if (top.thin_fill) output
|
if (top.thin_fill) output
|
||||||
.setLayer("thin fill", COLOR.fill)
|
.setLayer("thin fill", COLOR.fill)
|
||||||
.addLines(top.thin_fill, vopt({ offset, height }));
|
.addLines(top.thin_fill, vopt({ offset, height }));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue