clip-to stock only for non-gpu topo3 contouring
This commit is contained in:
parent
4a47269972
commit
c279e1140b
6 changed files with 12 additions and 9 deletions
|
|
@ -614,7 +614,6 @@ export const conf = {
|
||||||
camZBottom: 0,
|
camZBottom: 0,
|
||||||
camZClearance: 1,
|
camZClearance: 1,
|
||||||
camZOffset: 0,
|
camZOffset: 0,
|
||||||
// camZThru: 0,
|
|
||||||
camZTop: 0,
|
camZTop: 0,
|
||||||
op2: [], // flip ops
|
op2: [], // flip ops
|
||||||
ops: [], // current ops
|
ops: [], // current ops
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,10 @@ function hasSpindle() {
|
||||||
return env.current.device.spindleMax > 0;
|
return env.current.device.spindleMax > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isWebGPU() {
|
||||||
|
return api.conf.get().controller.webGPU;
|
||||||
|
}
|
||||||
|
|
||||||
function zTop() {
|
function zTop() {
|
||||||
return api.conf.get().process.camZTop > 0;
|
return api.conf.get().process.camZTop > 0;
|
||||||
}
|
}
|
||||||
|
|
@ -317,6 +321,7 @@ export function createPopOps() {
|
||||||
bottom: 'camContourBottom',
|
bottom: 'camContourBottom',
|
||||||
curves: 'camContourCurves',
|
curves: 'camContourCurves',
|
||||||
inside: 'camContourIn',
|
inside: 'camContourIn',
|
||||||
|
clipto: 'camStockClipTo',
|
||||||
filter: 'camContourFilter',
|
filter: 'camContourFilter',
|
||||||
axis: 'X'
|
axis: 'X'
|
||||||
}).inputs = {
|
}).inputs = {
|
||||||
|
|
@ -338,6 +343,7 @@ export function createPopOps() {
|
||||||
curves: UC.newBoolean(LANG.cf_curv_s, undefined, { title: LANG.cf_curv_l }),
|
curves: UC.newBoolean(LANG.cf_curv_s, undefined, { title: LANG.cf_curv_l }),
|
||||||
inside: UC.newBoolean(LANG.cf_olin_s, undefined, { title: LANG.cf_olin_l }),
|
inside: UC.newBoolean(LANG.cf_olin_s, undefined, { title: LANG.cf_olin_l }),
|
||||||
bottom: UC.newBoolean(LANG.cf_botm_s, undefined, { title: LANG.cf_botm_l, show: (op, conf) => conf ? conf.process.camZBottom : 0 }),
|
bottom: UC.newBoolean(LANG.cf_botm_s, undefined, { title: LANG.cf_botm_l, show: (op, conf) => conf ? conf.process.camZBottom : 0 }),
|
||||||
|
clipto: UC.newBoolean(LANG.cf_clip_s, undefined, { title:LANG.cf_clip_l, show: () => !isWebGPU() }),
|
||||||
filter: UC.newRow([UC.newButton(LANG.filter, contourFilter)], { class: "ext-buttons f-row" })
|
filter: UC.newRow([UC.newButton(LANG.filter, contourFilter)], { class: "ext-buttons f-row" })
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,6 @@ export function menu() {
|
||||||
camStockZ: newInput(LANG.cs_hght_s, {title:LANG.cs_hght_l, convert:toFloat, bound:bound(0,9999), units}),
|
camStockZ: newInput(LANG.cs_hght_s, {title:LANG.cs_hght_l, convert:toFloat, bound:bound(0,9999), units}),
|
||||||
separator: newBlank({ class:"set-sep", driven }),
|
separator: newBlank({ class:"set-sep", driven }),
|
||||||
camStockOffset: newBoolean(LANG.cs_offs_s, onBooleanClick, {title:LANG.cs_offs_l}),
|
camStockOffset: newBoolean(LANG.cs_offs_s, onBooleanClick, {title:LANG.cs_offs_l}),
|
||||||
camStockClipTo: newBoolean(LANG.cs_clip_s, onBooleanClick, {title:LANG.cs_clip_l}),
|
|
||||||
camStockIndexed: newBoolean(LANG.cs_indx_s, onBooleanClick, {title:LANG.cs_indx_l}),
|
camStockIndexed: newBoolean(LANG.cs_indx_s, onBooleanClick, {title:LANG.cs_indx_l}),
|
||||||
camStockIndexGrid: newBoolean(LANG.cs_ishg_s, onBooleanClick, {title:LANG.cs_ishg_l, show:() => ui.camStockIndexed.checked}),
|
camStockIndexGrid: newBoolean(LANG.cs_ishg_s, onBooleanClick, {title:LANG.cs_ishg_l, show:() => ui.camStockIndexed.checked}),
|
||||||
_____: newGroup(LANG.cc_menu, $('cam-limits'), { modes:CAM, driven, separator }),
|
_____: newGroup(LANG.cc_menu, $('cam-limits'), { modes:CAM, driven, separator }),
|
||||||
|
|
@ -120,7 +119,6 @@ export function menu() {
|
||||||
camZOffset: newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:toFloat, units}),
|
camZOffset: newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:toFloat, units}),
|
||||||
camZTop: newInput(LANG.ou_ztop_s, {title:LANG.ou_ztop_l, convert:toFloat, units, trigger}),
|
camZTop: newInput(LANG.ou_ztop_s, {title:LANG.ou_ztop_l, convert:toFloat, units, trigger}),
|
||||||
camZBottom: newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:toFloat, units, trigger}),
|
camZBottom: newInput(LANG.ou_zbot_s, {title:LANG.ou_zbot_l, convert:toFloat, units, trigger}),
|
||||||
// camZThru: newInput(LANG.ou_ztru_s, {title:LANG.ou_ztru_l, convert:toFloat, bound:bound(0.0,100), units }),
|
|
||||||
camZClearance: newInput(LANG.ou_zclr_s, {title:LANG.ou_zclr_l, convert:toFloat, bound:bound(0.01,100), units }),
|
camZClearance: newInput(LANG.ou_zclr_s, {title:LANG.ou_zclr_l, convert:toFloat, bound:bound(0.01,100), units }),
|
||||||
separator: newBlank({ class:"set-sep", driven }),
|
separator: newBlank({ class:"set-sep", driven }),
|
||||||
camFastFeed: newInput(LANG.cc_rapd_s, {title:LANG.cc_rapd_l, convert:toFloat, units}),
|
camFastFeed: newInput(LANG.cc_rapd_s, {title:LANG.cc_rapd_l, convert:toFloat, units}),
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ export async function cam_slice(settings, widget, onupdate, ondone) {
|
||||||
|
|
||||||
let axisRotation, axisIndex,
|
let axisRotation, axisIndex,
|
||||||
bounds, dark, color, stock, tabs, track, tool, unsafe, units, workarea,
|
bounds, dark, color, stock, tabs, track, tool, unsafe, units, workarea,
|
||||||
camZTop, camZBottom, camZThru, minToolDiam, maxToolDiam,
|
camZTop, camZBottom, minToolDiam, maxToolDiam,
|
||||||
bottom_gap, bottom_part, bottom_stock, bottom_z,
|
bottom_gap, bottom_part, bottom_stock, bottom_z,
|
||||||
top_stock, top_part, top_gap, top_z,
|
top_stock, top_part, top_gap, top_z,
|
||||||
zBottom, zMin, zMax, zTop,
|
zBottom, zMin, zMax, zTop,
|
||||||
|
|
@ -70,7 +70,7 @@ export async function cam_slice(settings, widget, onupdate, ondone) {
|
||||||
// allow recomputing later if widget or settings changes
|
// allow recomputing later if widget or settings changes
|
||||||
const var_compute = () => {
|
const var_compute = () => {
|
||||||
let { camStockX, camStockY, camStockZ, camStockOffset } = proc;
|
let { camStockX, camStockY, camStockZ, camStockOffset } = proc;
|
||||||
({ camZTop, camZBottom, camZThru } = proc);
|
({ camZTop, camZBottom } = proc);
|
||||||
bounds = widget.getBoundingBox();
|
bounds = widget.getBoundingBox();
|
||||||
let pos = widget.track.pos;
|
let pos = widget.track.pos;
|
||||||
stock = camStockOffset ? {
|
stock = camStockOffset ? {
|
||||||
|
|
@ -637,7 +637,7 @@ export async function holes(settings, widget, individual, rec, onProgress) {
|
||||||
stock = settings.stock || {},
|
stock = settings.stock || {},
|
||||||
isIndexed = proc.camStockIndexed,
|
isIndexed = proc.camStockIndexed,
|
||||||
track = widget.track,
|
track = widget.track,
|
||||||
{ camZTop, camZBottom, camZThru } = proc,
|
{ camZBottom } = proc,
|
||||||
// widget top z as defined by setTopz()
|
// widget top z as defined by setTopz()
|
||||||
wztop = track.top,
|
wztop = track.top,
|
||||||
// distance between top of part and top of stock
|
// distance between top of part and top of stock
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ export class Topo {
|
||||||
gridDelta = Math.floor(partOff / resolution),
|
gridDelta = Math.floor(partOff / resolution),
|
||||||
debug_clips = true;
|
debug_clips = true;
|
||||||
|
|
||||||
if (process.camStockClipTo) {
|
if (contour.clipto) {
|
||||||
let { stock } = settings;
|
let { stock } = settings;
|
||||||
let { center, x, y } = stock;
|
let { center, x, y } = stock;
|
||||||
clipTo.push(newPolygon().centerRectangle(center, x, y));
|
clipTo.push(newPolygon().centerRectangle(center, x, y));
|
||||||
|
|
|
||||||
|
|
@ -585,6 +585,8 @@ self.lang['en-us'] = {
|
||||||
cf_linx_l: "linear y-axis finishing",
|
cf_linx_l: "linear y-axis finishing",
|
||||||
cf_liny_s: "enable x pass",
|
cf_liny_s: "enable x pass",
|
||||||
cf_liny_l: "linear x-axis finishing",
|
cf_liny_l: "linear x-axis finishing",
|
||||||
|
cf_clip_s: "clip to stock",
|
||||||
|
cf_clip_l: ["contour op only","clip cutting paths","to defined stock"],
|
||||||
|
|
||||||
// CNC TRACE
|
// CNC TRACE
|
||||||
cu_menu: "trace",
|
cu_menu: "trace",
|
||||||
|
|
@ -838,8 +840,6 @@ self.lang['en-us'] = {
|
||||||
cs_hght_l: ["height (z) in workspace units","0 defaults to part size"],
|
cs_hght_l: ["height (z) in workspace units","0 defaults to part size"],
|
||||||
cs_offs_s: "offset",
|
cs_offs_s: "offset",
|
||||||
cs_offs_l: ["use width, depth, height","as offsets from max","part size on platform"],
|
cs_offs_l: ["use width, depth, height","as offsets from max","part size on platform"],
|
||||||
cs_clip_s: "clip to",
|
|
||||||
cs_clip_l: ["contour op only","clip cutting paths","to defined stock"],
|
|
||||||
cs_ishg_s: "show grid",
|
cs_ishg_s: "show grid",
|
||||||
cs_ishg_l: ["show platform grid in indexed mode"],
|
cs_ishg_l: ["show platform grid in indexed mode"],
|
||||||
cs_indx_s: "indexed",
|
cs_indx_s: "indexed",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue