!2915 修复: 板件相切切到有放样角度的圆弧板时挖槽的位置错误

pull/2914/MERGE
张子涵 2 months ago committed by ChenX
parent 1022eeb23d
commit 421ece4120

@ -186,8 +186,8 @@ export class BoardCuttingForSweep
// 路径信息
const path = (meat as unknown as Board).GetSweepPathInWCS().ApplyMatrix(meat.OCSInv);
const tempPath = (meat as unknown as Board).GetSweepPathInWCS().ApplyMatrix(knife.OCSInv);
// 不垂直
if (!equalv3(tempPath.Normal, new Vector3(0, 0, 1)) && !equalv3(tempPath.Normal, new Vector3(0, 0, -1)))
// 不垂直(或有放样角度,这里偷懒了,懒得去算了,直接按不垂直处理)
if (!equalv3(tempPath.Normal, new Vector3(0, 0, 1)) && !equalv3(tempPath.Normal, new Vector3(0, 0, -1)) || meat.SweepAngle !== 0)
return CreateContourByOblique();
// CSG
const csg1Clone = geom3.create(meat.CSG.polygons.concat());
@ -253,6 +253,8 @@ export class BoardCuttingForSweep
// 对CSG进行逆映射
this.InverseCSG(interCSG);
const contour = this.CSGToPolyline(interCSG);
// 针对放样角度做出修正
contour.ApplyMatrix(meat.ArcBuild.Rotate2OCSMtx);
contours.push(contour);
}
return contours;
@ -304,6 +306,8 @@ export class BoardCuttingForSweep
// 对CSG进行逆映射
this.InverseCSG(interCSG);
const contour = this.CSGToPolyline(interCSG);
// 针对放样角度做出修正
contour.ApplyMatrix(meat.ArcBuild.Rotate2OCSMtx);
contours.push(contour);
}
return contours;

Loading…
Cancel
Save