stub in area surface menu

This commit is contained in:
Stewart Allen 2025-11-29 18:00:26 -05:00
commit e9c5cf8712
4 changed files with 19 additions and 7 deletions

View file

@ -426,7 +426,8 @@ export const conf = {
camAreaSpindle: 1000,
camAreaTool: 1000,
camAreaMode: "clear",
camAreaOffset: "none",
camAreaTrace: "none",
camAreaSurface: "linear",
camAreaOver: 0.4,
camAreaDown: 1,
camAreaSpeed: 1000,

View file

@ -126,6 +126,10 @@ const LISTS = {
{ name: "clear" },
{ name: "trace" },
{ name: "surface" }
],
surftyp: [
{ name: "linear" },
{ name: "offset" },
]
};

View file

@ -669,7 +669,8 @@ export function createPopOps() {
spindle: 'camAreaSpindle',
tool: 'camAreaTool',
mode: 'camAreaMode',
offset: 'camAreaOffset',
tr_off: 'camAreaTrace',
sr_typ: 'camAreaSurface',
over: 'camAreaOver',
down: 'camAreaDown',
rate: 'camAreaSpeed',
@ -685,7 +686,8 @@ export function createPopOps() {
}).inputs = {
tool: UC.newSelect(LANG.cc_tool, {}, "tools"),
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" }),
menu: UC.newRow([
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() }),
expand: UC.newInput(LANG.cp_xpnd_s, { title: LANG.cp_xpnd_l, convert: toFloat, units }),
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() }),
sep: UC.newBlank({ class: "pop-sep", show: isSurface }),
refine: UC.newInput(LANG.cp_refi_s, { title: LANG.cp_refi_l, convert: toInt, show: isSurface }),

View file

@ -20,7 +20,7 @@ class OpArea extends CamOp {
async slice(progress) {
const pocket = 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 { settings, widget, tabs, color } = state;
let { addSlices, setToolDiam, cutTabs, healPolys, shadowAt, workarea } = state;
@ -166,10 +166,10 @@ class OpArea extends CamOp {
let slice = newLayer();
let layers = slice.output();
let outs = [];
if (offset === 'none') {
if (tr_off === 'none') {
outs = [ area.clone().setZ(z) ];
} 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
});
}
@ -191,7 +191,12 @@ class OpArea extends CamOp {
progress(proc, 'trace');
} else
if (mode === 'surface') {
if (sr_typ === 'linear') {
} else
if (sr_typ === 'offset') {
}
}
}