stub in area surface menu
This commit is contained in:
parent
af400267c0
commit
e9c5cf8712
4 changed files with 19 additions and 7 deletions
|
|
@ -426,7 +426,8 @@ export const conf = {
|
||||||
camAreaSpindle: 1000,
|
camAreaSpindle: 1000,
|
||||||
camAreaTool: 1000,
|
camAreaTool: 1000,
|
||||||
camAreaMode: "clear",
|
camAreaMode: "clear",
|
||||||
camAreaOffset: "none",
|
camAreaTrace: "none",
|
||||||
|
camAreaSurface: "linear",
|
||||||
camAreaOver: 0.4,
|
camAreaOver: 0.4,
|
||||||
camAreaDown: 1,
|
camAreaDown: 1,
|
||||||
camAreaSpeed: 1000,
|
camAreaSpeed: 1000,
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,10 @@ const LISTS = {
|
||||||
{ name: "clear" },
|
{ name: "clear" },
|
||||||
{ name: "trace" },
|
{ name: "trace" },
|
||||||
{ name: "surface" }
|
{ name: "surface" }
|
||||||
|
],
|
||||||
|
surftyp: [
|
||||||
|
{ name: "linear" },
|
||||||
|
{ name: "offset" },
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -669,7 +669,8 @@ export function createPopOps() {
|
||||||
spindle: 'camAreaSpindle',
|
spindle: 'camAreaSpindle',
|
||||||
tool: 'camAreaTool',
|
tool: 'camAreaTool',
|
||||||
mode: 'camAreaMode',
|
mode: 'camAreaMode',
|
||||||
offset: 'camAreaOffset',
|
tr_off: 'camAreaTrace',
|
||||||
|
sr_typ: 'camAreaSurface',
|
||||||
over: 'camAreaOver',
|
over: 'camAreaOver',
|
||||||
down: 'camAreaDown',
|
down: 'camAreaDown',
|
||||||
rate: 'camAreaSpeed',
|
rate: 'camAreaSpeed',
|
||||||
|
|
@ -685,7 +686,8 @@ export function createPopOps() {
|
||||||
}).inputs = {
|
}).inputs = {
|
||||||
tool: UC.newSelect(LANG.cc_tool, {}, "tools"),
|
tool: UC.newSelect(LANG.cc_tool, {}, "tools"),
|
||||||
mode: UC.newSelect(LANG.mo_menu, {}, "opmode"),
|
mode: UC.newSelect(LANG.mo_menu, {}, "opmode"),
|
||||||
offset: UC.newSelect(LANG.cc_offs_s, { title: LANG.cc_offs_l, show: isTrace }, "traceoff"),
|
tr_off: UC.newSelect(LANG.cc_offs_s, { title: LANG.cc_offs_l, show: isTrace }, "traceoff"),
|
||||||
|
sr_typ: UC.newSelect("pattern", { title: "pattern", show: isSurface }, "surftyp"),
|
||||||
sep: UC.newBlank({ class: "pop-sep" }),
|
sep: UC.newBlank({ class: "pop-sep" }),
|
||||||
menu: UC.newRow([
|
menu: UC.newRow([
|
||||||
UC.newButton("edge", traceAdd),
|
UC.newButton("edge", traceAdd),
|
||||||
|
|
@ -694,7 +696,7 @@ export function createPopOps() {
|
||||||
outline: UC.newBoolean(LANG.cp_outl_s, undefined, { title: LANG.cp_outl_l, show: () => isClear() || isTrace() }),
|
outline: UC.newBoolean(LANG.cp_outl_s, undefined, { title: LANG.cp_outl_l, show: () => isClear() || isTrace() }),
|
||||||
expand: UC.newInput(LANG.cp_xpnd_s, { title: LANG.cp_xpnd_l, convert: toFloat, units }),
|
expand: UC.newInput(LANG.cp_xpnd_s, { title: LANG.cp_xpnd_l, convert: toFloat, units }),
|
||||||
sep: UC.newBlank({ class: "pop-sep" }),
|
sep: UC.newBlank({ class: "pop-sep" }),
|
||||||
over: UC.newInput(LANG.cc_sovr_s, { title: LANG.cc_sovr_l, convert: toFloat, bound: UC.bound(0.001, 100.0), units, show: isClear }),
|
over: UC.newInput(LANG.cc_sovr_s, { title: LANG.cc_sovr_l, convert: toFloat, bound: UC.bound(0.001, 100.0), units, show: () => isClear() || isSurface() }),
|
||||||
down: UC.newInput(LANG.cc_sdwn_s, { title: LANG.cc_sdwn_l, convert: toFloat, bound: UC.bound(0, 100.0), units, show: () => isClear() || isTrace() }),
|
down: UC.newInput(LANG.cc_sdwn_s, { title: LANG.cc_sdwn_l, convert: toFloat, bound: UC.bound(0, 100.0), units, show: () => isClear() || isTrace() }),
|
||||||
sep: UC.newBlank({ class: "pop-sep", show: isSurface }),
|
sep: UC.newBlank({ class: "pop-sep", show: isSurface }),
|
||||||
refine: UC.newInput(LANG.cp_refi_s, { title: LANG.cp_refi_l, convert: toInt, show: isSurface }),
|
refine: UC.newInput(LANG.cp_refi_s, { title: LANG.cp_refi_l, convert: toInt, show: isSurface }),
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class OpArea extends CamOp {
|
||||||
async slice(progress) {
|
async slice(progress) {
|
||||||
const pocket = this;
|
const pocket = this;
|
||||||
let { op, state } = this;
|
let { op, state } = this;
|
||||||
let { tool, mode, down, over, follow, expand, offset, outline, smooth, tolerance } = op;
|
let { tool, mode, down, over, follow, expand, tr_off, sr_typ, outline, refine, smooth, tolerance } = op;
|
||||||
let { ov_topz, ov_botz, ov_conv } = op;
|
let { ov_topz, ov_botz, ov_conv } = op;
|
||||||
let { settings, widget, tabs, color } = state;
|
let { settings, widget, tabs, color } = state;
|
||||||
let { addSlices, setToolDiam, cutTabs, healPolys, shadowAt, workarea } = state;
|
let { addSlices, setToolDiam, cutTabs, healPolys, shadowAt, workarea } = state;
|
||||||
|
|
@ -166,10 +166,10 @@ class OpArea extends CamOp {
|
||||||
let slice = newLayer();
|
let slice = newLayer();
|
||||||
let layers = slice.output();
|
let layers = slice.output();
|
||||||
let outs = [];
|
let outs = [];
|
||||||
if (offset === 'none') {
|
if (tr_off === 'none') {
|
||||||
outs = [ area.clone().setZ(z) ];
|
outs = [ area.clone().setZ(z) ];
|
||||||
} else {
|
} else {
|
||||||
POLY.offset([ area ], offset === 'inside' ? [ -toolDiam / 2 ] : [ toolDiam / 2 ], {
|
POLY.offset([ area ], tr_off === 'inside' ? [ -toolDiam / 2 ] : [ toolDiam / 2 ], {
|
||||||
count: 1, outs, flat: true, z, minArea: 0
|
count: 1, outs, flat: true, z, minArea: 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -191,7 +191,12 @@ class OpArea extends CamOp {
|
||||||
progress(proc, 'trace');
|
progress(proc, 'trace');
|
||||||
} else
|
} else
|
||||||
if (mode === 'surface') {
|
if (mode === 'surface') {
|
||||||
|
if (sr_typ === 'linear') {
|
||||||
|
|
||||||
|
} else
|
||||||
|
if (sr_typ === 'offset') {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue