|
|
|
@ -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;
|
|
|
|
|