add codec factory option, improve geo vertex caching, fix surface find in indexed mode
This commit is contained in:
parent
341c971146
commit
d73f72586a
9 changed files with 71 additions and 23 deletions
|
|
@ -350,8 +350,9 @@ export function createPopOps() {
|
|||
createPopOp('lathe', {
|
||||
tool: 'camLatheTool',
|
||||
spindle: 'camLatheSpindle',
|
||||
step: 'camLatheOver',
|
||||
angle: 'camLatheAngle',
|
||||
step: 'camLatheOver',
|
||||
down: 'camLatheDown',
|
||||
rate: 'camLatheSpeed',
|
||||
tolerance: 'camTolerance',
|
||||
filter: 'camContourFilter',
|
||||
|
|
@ -365,8 +366,9 @@ export function createPopOps() {
|
|||
spindle: UC.newInput(LANG.cc_spnd_s, { title: LANG.cc_spnd_l, convert: toInt, show: hasSpindle }),
|
||||
rate: UC.newInput(LANG.cc_feed_s, { title: LANG.cc_feed_l, convert: toInt, units }),
|
||||
sep: UC.newBlank({ class: "pop-sep" }),
|
||||
step: UC.newInput(LANG.cc_sovr_s, { title: LANG.cc_sovr_l, convert: toFloat, bound: UC.bound(0.01, 100.0) }),
|
||||
angle: UC.newInput(LANG.cc_sang_s, { title: LANG.cc_sang_l, convert: toFloat, bound: UC.bound(0.01, 180.0) }),
|
||||
step: UC.newInput(LANG.cc_sovr_s, { title: LANG.cc_sovr_l, convert: toFloat, bound: UC.bound(0.01, 100.0) }),
|
||||
// down: UC.newInput(LANG.cc_sdwn_s, { title: LANG.cc_sdwn_l, convert: toFloat, units }),
|
||||
sep: UC.newBlank({ class: "pop-sep" }),
|
||||
offStart: UC.newInput(LANG.ci_laso_s, { title: LANG.ci_laso_l, convert: toFloat}),
|
||||
offEnd: UC.newInput(LANG.ci_laeo_s, { title: LANG.ci_laeo_l, convert: toFloat}),
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ function surface_prep(widget, index) {
|
|||
}
|
||||
};
|
||||
|
||||
function surface_find(widget, faces, radians) {
|
||||
function surface_find(widget, faces, radians, filterZ) {
|
||||
surface_prep(widget);
|
||||
return widget.tool.findConnectedSurface(faces, radians || 0, 0.0);
|
||||
return widget.tool.findConnectedSurface(faces, radians, filterZ);
|
||||
};
|
||||
|
||||
function init(worker) {
|
||||
|
|
|
|||
|
|
@ -114,6 +114,10 @@ export function menu() {
|
|||
camStockOffset: newBoolean(LANG.cs_offs_s, onBooleanClick, {title:LANG.cs_offs_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}),
|
||||
// separator: newBlank({ class:"set-sep", driven }),
|
||||
// camStockManual: newRow([
|
||||
// (ui.stockPlace = newButton('position', onButtonClick, { })),
|
||||
// ], {class:"ext-buttons f-row"}),
|
||||
_____: newGroup(LANG.cc_menu, $('cam-limits'), { modes:CAM, driven, separator }),
|
||||
camZAnchor: newSelect(LANG.ou_zanc_s, {title: LANG.ou_zanc_l, action:zAnchorSave, show:() => !ui.camStockIndexed.checked}, "zanchor"),
|
||||
camZOffset: newInput(LANG.ou_ztof_s, {title:LANG.ou_ztof_l, convert:toFloat, units}),
|
||||
|
|
|
|||
|
|
@ -792,8 +792,24 @@ export function init() {
|
|||
|
||||
// TAB/TRACE BUTTON HANDLERS
|
||||
api.event.on("button.click", target => {
|
||||
let process = api.conf.get().process;
|
||||
let { process, stock } = api.conf.get();
|
||||
switch (target) {
|
||||
case api.ui.stockPlace:
|
||||
api.uc.prompt("stock x,y,z position", "").then(csv => {
|
||||
if (csv) {
|
||||
let [x,y,z] = csv.split(',').map(v => parseInt(v) || 0);
|
||||
let center = {
|
||||
x: x ?? 0,
|
||||
y: y ?? 0,
|
||||
z: z ?? 0
|
||||
}
|
||||
// move widgets based on postion
|
||||
// more complex than just moving stock
|
||||
// because stock is based on contents, not the other way
|
||||
console.log({ x,y,z });
|
||||
}
|
||||
});
|
||||
return;
|
||||
case api.ui.tabAdd:
|
||||
return tabAdd();
|
||||
case api.ui.tabDun:
|
||||
|
|
|
|||
|
|
@ -241,7 +241,6 @@ export async function cam_slice(settings, widget, onupdate, ondone) {
|
|||
}
|
||||
|
||||
async function computeShadows() {
|
||||
// console.log('(re)compute shadows');
|
||||
await new OPS.shadow(state, { type: "shadow", silent: true }).slice(progress => {
|
||||
// console.log('reshadowing', progress.round(3));
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue