move step over from outline to contour. fix topo y axis overstep
This commit is contained in:
parent
1d2cdc9a15
commit
343868edb6
3 changed files with 12 additions and 11 deletions
|
|
@ -206,7 +206,7 @@
|
||||||
finishingTool: "camOutlineTool",
|
finishingTool: "camOutlineTool",
|
||||||
finishingSpindle: "camOutlineSpindle",
|
finishingSpindle: "camOutlineSpindle",
|
||||||
finishingDown: "camOutlineDown",
|
finishingDown: "camOutlineDown",
|
||||||
finishingOver: "camOutlineOver",
|
finishingOver: "camContourOver",
|
||||||
finishingSpeed: "camOutlineSpeed",
|
finishingSpeed: "camOutlineSpeed",
|
||||||
finishingPlunge: "camOutlinePlunge",
|
finishingPlunge: "camOutlinePlunge",
|
||||||
finishingOn: "camOutlineOn",
|
finishingOn: "camOutlineOn",
|
||||||
|
|
@ -396,8 +396,6 @@
|
||||||
// process defaults CAM:Process
|
// process defaults CAM:Process
|
||||||
p:{
|
p:{
|
||||||
processName: "default",
|
processName: "default",
|
||||||
camFastFeed: 6000,
|
|
||||||
camFastFeedZ: 300,
|
|
||||||
camRoughTool: 1000, // roughingTool
|
camRoughTool: 1000, // roughingTool
|
||||||
camRoughSpindle: 1000, // camRoughSpindle
|
camRoughSpindle: 1000, // camRoughSpindle
|
||||||
camRoughDown: 2, // roughingDown
|
camRoughDown: 2, // roughingDown
|
||||||
|
|
@ -410,19 +408,20 @@
|
||||||
camOutlineTool: 1000, // finishingTool
|
camOutlineTool: 1000, // finishingTool
|
||||||
camOutlineSpindle: 1000,// finishingSpindle
|
camOutlineSpindle: 1000,// finishingSpindle
|
||||||
camOutlineDown: 3, // finishingDown
|
camOutlineDown: 3, // finishingDown
|
||||||
camOutlineOver: 0.5, // finishingOver
|
|
||||||
camOutlineSpeed: 800, // finishingSpeed
|
camOutlineSpeed: 800, // finishingSpeed
|
||||||
camOutlinePlunge: 250, // finishingPlunge
|
camOutlinePlunge: 250, // finishingPlunge
|
||||||
camOutlineOn: true, // finishingOn
|
camOutlineOn: true, // finishingOn
|
||||||
camContourTool: 1000,
|
camContourTool: 1000,
|
||||||
camContourSpindle: 1000,// (new)
|
camContourSpindle: 1000,// (new)
|
||||||
|
camContourOver: 0.5, // (new)
|
||||||
camContourSpeed: 1000, // (new)
|
camContourSpeed: 1000, // (new)
|
||||||
camContourAngle: 85, // finishingAngle
|
camContourAngle: 85, // finishingAngle
|
||||||
camContourCurves: false,// finishCurvesOnly
|
camContourCurves: false,// finishCurvesOnly
|
||||||
camContourXOn: true, // finishingXOn
|
camContourXOn: true, // finishingXOn
|
||||||
camContourYOn: true, // finishingYOn
|
camContourYOn: true, // finishingYOn
|
||||||
camTraceTool: 1000,
|
camTraceTool: 1000,
|
||||||
camTraceEnable: false,
|
camTraceSpeed: 250,
|
||||||
|
camTraceOn: false,
|
||||||
camDrillTool: 1000, // drillTool
|
camDrillTool: 1000, // drillTool
|
||||||
camDrillSpindle: 1000, // drillSpindle
|
camDrillSpindle: 1000, // drillSpindle
|
||||||
camDrillDownSpeed: 250, // drillDownSpeed
|
camDrillDownSpeed: 250, // drillDownSpeed
|
||||||
|
|
@ -440,10 +439,12 @@
|
||||||
camDepthFirst: true,
|
camDepthFirst: true,
|
||||||
camEaseDown: false,
|
camEaseDown: false,
|
||||||
camOriginTop: true,
|
camOriginTop: true,
|
||||||
camTolerance: 0.15,
|
|
||||||
camZTopOffset: 0,
|
camZTopOffset: 0,
|
||||||
camZBottom: 0,
|
camZBottom: 0,
|
||||||
camZClearance: 1,
|
camZClearance: 1,
|
||||||
|
camFastFeed: 6000,
|
||||||
|
camFastFeedZ: 300,
|
||||||
|
camTolerance: 0.15,
|
||||||
camStockX: 0,
|
camStockX: 0,
|
||||||
camStockY: 0,
|
camStockY: 0,
|
||||||
camStockZ: 0,
|
camStockZ: 0,
|
||||||
|
|
|
||||||
|
|
@ -1373,7 +1373,6 @@
|
||||||
camOutline: UC.newGroup(LANG.co_menu, null, {modes:CAM, marker:true}),
|
camOutline: UC.newGroup(LANG.co_menu, null, {modes:CAM, marker:true}),
|
||||||
camOutlineTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
camOutlineTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||||
camOutlineSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
camOutlineSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
||||||
camOutlineOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.05,1.0), modes:CAM}),
|
|
||||||
camOutlineDown: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, modes:CAM}),
|
camOutlineDown: UC.newInput(LANG.cc_sdwn_s, {title:LANG.cc_sdwn_l, convert:UC.toFloat, modes:CAM}),
|
||||||
camOutlineSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM}),
|
camOutlineSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM}),
|
||||||
camOutlinePlunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, modes:CAM}),
|
camOutlinePlunge: UC.newInput(LANG.cc_plng_s, {title:LANG.cc_plng_l, convert:UC.toInt, modes:CAM}),
|
||||||
|
|
@ -1383,6 +1382,7 @@
|
||||||
camContour: UC.newGroup(LANG.cn_menu, null, {modes:CAM, marker:true}),
|
camContour: UC.newGroup(LANG.cn_menu, null, {modes:CAM, marker:true}),
|
||||||
camContourTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
camContourTool: UC.newSelect(LANG.cc_tool, {modes:CAM}),
|
||||||
camContourSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
camContourSpindle: UC.newInput(LANG.cc_spnd_s, {title:LANG.cc_spnd_l, convert:UC.toInt, modes:CAM, visible:spindleShow}),
|
||||||
|
camContourOver: UC.newInput(LANG.cc_sovr_s, {title:LANG.cc_sovr_l, convert:UC.toFloat, bound:UC.bound(0.05,1.0), modes:CAM}),
|
||||||
camContourSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM}),
|
camContourSpeed: UC.newInput(LANG.cc_feed_s, {title:LANG.cc_feed_l, convert:UC.toInt, modes:CAM}),
|
||||||
camContourAngle: UC.newInput(LANG.cf_angl_s, {title:LANG.cf_angl_l, convert:UC.toFloat, bound:UC.bound(45,90), modes:CAM}),
|
camContourAngle: UC.newInput(LANG.cf_angl_s, {title:LANG.cf_angl_l, convert:UC.toFloat, bound:UC.bound(45,90), modes:CAM}),
|
||||||
camContourCurves: UC.newBoolean(LANG.cf_curv_s, onBooleanClick, {title:LANG.cf_curv_l, modes:CAM}),
|
camContourCurves: UC.newBoolean(LANG.cf_curv_s, onBooleanClick, {title:LANG.cf_curv_l, modes:CAM}),
|
||||||
|
|
|
||||||
|
|
@ -192,14 +192,14 @@
|
||||||
function getMaxTopoToolZ(topo, profile, x, y, floormax) {
|
function getMaxTopoToolZ(topo, profile, x, y, floormax) {
|
||||||
let tv, tx, ty, tz, gv, i = 0, mz = -1;
|
let tv, tx, ty, tz, gv, i = 0, mz = -1;
|
||||||
|
|
||||||
const sx = topo.stepsx, sy = topo.stepsy;
|
const sx = topo.stepsx, sy = topo.stepsy, xl = sx - 1, yl = sy - 1;
|
||||||
|
|
||||||
while (i < profile.length) {
|
while (i < profile.length) {
|
||||||
// tool profile point x, y, and z offsets
|
// tool profile point x, y, and z offsets
|
||||||
let tx = profile[i++] + x;
|
let tx = profile[i++] + x;
|
||||||
let ty = profile[i++] + y;
|
let ty = profile[i++] + y;
|
||||||
let tz = profile[i++];
|
let tz = profile[i++];
|
||||||
if (tx < 0 || tx >= sx || ty < 0 || ty >= sy) {
|
if (tx < 0 || tx > xl || ty < 0 || ty > yl) {
|
||||||
// if outside max topo steps, use 0
|
// if outside max topo steps, use 0
|
||||||
gv = 0;
|
gv = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -390,7 +390,7 @@
|
||||||
resolution = outp.camTolerance * units,
|
resolution = outp.camTolerance * units,
|
||||||
diameter = getToolDiameter(settings, proc.camOutlineTool),
|
diameter = getToolDiameter(settings, proc.camOutlineTool),
|
||||||
tool = getToolById(settings, proc.camOutlineTool),
|
tool = getToolById(settings, proc.camOutlineTool),
|
||||||
toolStep = diameter * proc.camOutlineOver,
|
toolStep = diameter * proc.camContourOver,
|
||||||
traceJoin = diameter / 2,
|
traceJoin = diameter / 2,
|
||||||
pocketOnly = proc.camOutlinePocket,
|
pocketOnly = proc.camOutlinePocket,
|
||||||
bounds = widget.getBoundingBox().clone(),
|
bounds = widget.getBoundingBox().clone(),
|
||||||
|
|
@ -477,7 +477,7 @@
|
||||||
lines = slice.lines;
|
lines = slice.lines;
|
||||||
gridy = 0;
|
gridy = 0;
|
||||||
// slices have x/z swapped
|
// slices have x/z swapped
|
||||||
for (y = minY; y <= maxY; y += resolution) {
|
for (y = minY; y < maxY && gridy < stepsy; y += resolution) {
|
||||||
gridi = gridx * stepsy + gridy;
|
gridi = gridx * stepsy + gridy;
|
||||||
gridv = data[gridi] || 0;
|
gridv = data[gridi] || 0;
|
||||||
// strategy using raw lines (faster slice, but more lines)
|
// strategy using raw lines (faster slice, but more lines)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue