better trace contrast. improve trace routing. trace observes conventional setting
This commit is contained in:
parent
2af8b753df
commit
6318aad171
3 changed files with 9 additions and 11 deletions
|
|
@ -348,7 +348,7 @@
|
|||
let showTab, lastTab, tab, iw, ic;
|
||||
api.event.on("cam.tabs.add", func.tabAdd = () => {
|
||||
func.traceDone();
|
||||
alert = api.show.alert("[esc] key cancels tab editing");
|
||||
alert = api.show.alert("[esc] cancels tab editing");
|
||||
api.feature.hover = true;
|
||||
func.hover = func.tabHover;
|
||||
func.hoverUp = func.tabHoverUp;
|
||||
|
|
@ -441,7 +441,7 @@
|
|||
traceOn.classList.add("editing");
|
||||
CAM.traces((ids) => {
|
||||
api.hide.alert(alert);
|
||||
alert = api.show.alert("[esc] key cancels trace editing");
|
||||
alert = api.show.alert("[esc] cancels trace editing");
|
||||
KIRI.api.widgets.opacity(0.5);
|
||||
KIRI.api.widgets.for(widget => {
|
||||
if (ids.indexOf(widget.id) >= 0) {
|
||||
|
|
@ -459,7 +459,7 @@
|
|||
widget.traces.forEach(poly => {
|
||||
let match = areas.filter(arr => poly.matches(arr));
|
||||
let layers = new KIRI.Layers();
|
||||
layers.setLayer("trace", {line: 0x88aa55}, false).addPoly(poly);
|
||||
layers.setLayer("trace", {line: 0xaaaa55}, false).addPoly(poly);
|
||||
stack.addLayers(layers);
|
||||
stack.new_meshes.forEach(mesh => {
|
||||
mesh.trace = {widget, poly};
|
||||
|
|
@ -573,7 +573,7 @@
|
|||
color.b = colorSave.b = 0.1;
|
||||
if (!skip) wlist.push(poly._trace);
|
||||
} else {
|
||||
color.r = colorSave.r = 0x88/255;
|
||||
color.r = colorSave.r = 0xaa/255;
|
||||
color.g = colorSave.g = 0xaa/255;
|
||||
color.b = colorSave.b = 0x55/255;
|
||||
if (!skip) wlist.remove(poly._trace);
|
||||
|
|
|
|||
|
|
@ -660,16 +660,19 @@
|
|||
slice(progress) {
|
||||
let { op, state } = this;
|
||||
let { settings, widget, sliceAll, updateToolDiams } = state;
|
||||
let { process } = settings;
|
||||
let { tool, rate, plunge } = op;
|
||||
// generate tracing offsets from chosen features
|
||||
let sliceOut = this.sliceOut = [];
|
||||
let areas = op.areas[widget.id] || [];
|
||||
let { tool, rate, plunge } = op;
|
||||
let traceTool = new CAM.Tool(settings, tool);
|
||||
let traceToolDiam = traceTool.fluteDiameter();
|
||||
let cutdir = process.camConventional;
|
||||
updateToolDiams(traceToolDiam);
|
||||
areas.forEach(arr => {
|
||||
let slice = newSlice();
|
||||
let poly = newPolygon().fromArray(arr);
|
||||
POLY.setWinding([ poly ], cutdir, false);
|
||||
slice.addTop(poly);
|
||||
slice.camLines = [ poly ];
|
||||
slice.camTrace = { tool, rate, plunge };
|
||||
|
|
|
|||
|
|
@ -391,12 +391,7 @@
|
|||
setTool(tool, rate, plunge);
|
||||
let traceTool = new CAM.Tool(settings, tool);
|
||||
let traceToolDiam = traceTool.fluteDiameter();
|
||||
slice.camLines.forEach(poly => {
|
||||
let idx = 0, close = !poly.open;
|
||||
poly.forEachPoint(point => {
|
||||
camOut(point.clone(), idx++ > 0);
|
||||
}, close);
|
||||
});
|
||||
printPoint = poly2polyEmit(slice.camLines, printPoint, polyEmit);
|
||||
newLayer();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue