allow contour op to disregard z bottom

This commit is contained in:
Stewart Allen 2022-10-05 11:12:40 -04:00
commit a5c53c1ac6
5 changed files with 12 additions and 3 deletions

View file

@ -13,6 +13,10 @@ Full docs @ https://docs.grid.space/projects/kiri-moto
* add configurable flatness for contour clipping
* add faster render mode for FDM slices
* add axis label remapping in FDM
* add new path rendering engine
* add bridging option in CAM contouring
* add option to force z max routing in CAM
* add option to ignore z bottom in CAM contouring
* extend url loading of workspaces to all formats
* alert when healing is enabled and non-manifold geometries are detected
* fix thin output start and end point tracking which broke retraction

View file

@ -1009,6 +1009,7 @@ CAM.init = function(kiri, api) {
tolerance: 'camTolerance',
flatness: 'camFlatness',
bridging: 'camContourBridge',
bottom: 'camContourBottom',
curves: 'camContourCurves',
inside: 'camContourIn',
axis: 'X'
@ -1026,7 +1027,8 @@ CAM.init = function(kiri, api) {
bridging: UC.newInput(LANG.ou_brdg_s, {title:LANG.ou_brdg_l, convert:UC.toFloat, bound:UC.bound(0,1000.0), units:true, round:4, show:(op) => op.inputs.curves.checked}),
sep: UC.newBlank({class:"pop-sep"}),
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.process.camZBottom})
};
createPopOp('trace', {
@ -1173,7 +1175,7 @@ function createPopOp(type, map) {
for (let inp of Object.values(op.inputs)) {
let parent = inp.parentElement;
if (parent.setVisible && parent.__opt.show) {
parent.setVisible(parent.__opt.show(op));
parent.setVisible(parent.__opt.show(op, API.conf.get()));
}
}
},

View file

@ -39,7 +39,7 @@ class Topo {
maxX = bounds.max.x,
minY = bounds.min.y,
maxY = bounds.max.y,
zBottom = proc.camZBottom,
zBottom = contour.bottom ? proc.camZBottom : 0,
zMin = Math.max(bounds.min.z, zBottom) + 0.0001,
boundsX = maxX - minX,
boundsY = maxY - minY,

View file

@ -487,6 +487,7 @@ const conf = exports({
camContourOver: 0.5,
camContourSpeed: 1000,
camContourAngle: 85,
camContourBottom: false,
camContourCurves: false,
camContourIn: false,
camContourXOn: true,

View file

@ -493,6 +493,8 @@ self.kiri.lang['en-us'] = {
cn_menu: "contour",
cf_angl_s: "max angle",
cf_angl_l: ["angles greater than this","are considered vertical"],
cf_botm_s: "z bottom",
cf_botm_l: ["obey z bottom limit"],
cf_curv_s: "curves only",
cf_curv_l: ["limit linear cleanup","to curved surfaces"],
cf_olin_s: "inside only",