fix op-area rotated vs unrotated area input (auto vs user)
This commit is contained in:
parent
68ff3391ce
commit
1193c3313e
3 changed files with 8 additions and 1 deletions
|
|
@ -76,7 +76,9 @@ class OpArea extends CamOp {
|
||||||
let poly = newPolygon().fromArray(arr);
|
let poly = newPolygon().fromArray(arr);
|
||||||
aminz = Math.min(aminz, poly.minZ());
|
aminz = Math.min(aminz, poly.minZ());
|
||||||
polys.push(poly);
|
polys.push(poly);
|
||||||
if (axisIndex) {
|
// user-selected traces are not rotated
|
||||||
|
// those based on shadow (outline, rough) are
|
||||||
|
if (!op.rotated && axisIndex) {
|
||||||
// traces come from unrotatead widget edges
|
// traces come from unrotatead widget edges
|
||||||
poly.applyRotations(axisIndex);
|
poly.applyRotations(axisIndex);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ class OpOutline extends CamOp {
|
||||||
rate,
|
rate,
|
||||||
rename: rename ?? "outline",
|
rename: rename ?? "outline",
|
||||||
revbones,
|
revbones,
|
||||||
|
rotated: true,
|
||||||
smooth: 0,
|
smooth: 0,
|
||||||
spindle,
|
spindle,
|
||||||
steps: op.wide ? op.steps + 1 : 1,
|
steps: op.wide ? op.steps + 1 : 1,
|
||||||
|
|
@ -66,6 +67,7 @@ class OpOutline extends CamOp {
|
||||||
rate,
|
rate,
|
||||||
rename: rename ?? "outline",
|
rename: rename ?? "outline",
|
||||||
revbones,
|
revbones,
|
||||||
|
rotated: true,
|
||||||
smooth: 0,
|
smooth: 0,
|
||||||
spindle,
|
spindle,
|
||||||
surfaces: {},
|
surfaces: {},
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ class OpRough extends CamOp {
|
||||||
leave_z: op.leavez,
|
leave_z: op.leavez,
|
||||||
ov_botz: op.ov_botz,
|
ov_botz: op.ov_botz,
|
||||||
ov_topz: op.ov_topz,
|
ov_topz: op.ov_topz,
|
||||||
|
rotated: true,
|
||||||
areas: { [widget.id]: areas.map(p => p.toArray()) },
|
areas: { [widget.id]: areas.map(p => p.toArray()) },
|
||||||
surfaces: {}
|
surfaces: {}
|
||||||
}));
|
}));
|
||||||
|
|
@ -72,6 +73,7 @@ class OpRough extends CamOp {
|
||||||
leave_z: op.leavez,
|
leave_z: op.leavez,
|
||||||
ov_botz: op.ov_botz,
|
ov_botz: op.ov_botz,
|
||||||
ov_topz: op.ov_topz,
|
ov_topz: op.ov_topz,
|
||||||
|
rotated: true,
|
||||||
areas: { [widget.id]: areas.map(p => p.toArray()) },
|
areas: { [widget.id]: areas.map(p => p.toArray()) },
|
||||||
surfaces: {},
|
surfaces: {},
|
||||||
flats: Object.keys(slicer.zFlat).map(v => parseFloat(v)).sort((a,b) => b-a),
|
flats: Object.keys(slicer.zFlat).map(v => parseFloat(v)).sort((a,b) => b-a),
|
||||||
|
|
@ -96,6 +98,7 @@ class OpRough extends CamOp {
|
||||||
outline: !op.omitthru,
|
outline: !op.omitthru,
|
||||||
ov_botz: op.ov_botz,
|
ov_botz: op.ov_botz,
|
||||||
ov_topz: op.ov_topz,
|
ov_topz: op.ov_topz,
|
||||||
|
rotated: true,
|
||||||
areas: { [widget.id]: areas.map(p => p.toArray()) },
|
areas: { [widget.id]: areas.map(p => p.toArray()) },
|
||||||
surfaces: {},
|
surfaces: {},
|
||||||
thru: true
|
thru: true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue