修复:V型刀走刀算法对于不封闭线段可能造成最后一段丢失的问题
This commit is contained in:
		@@ -19225,14 +19225,17 @@ function VKnifToolPath(polyline, feedingDepth, knifAngle) {
 | 
			
		||||
        if (c2 instanceof Arc)
 | 
			
		||||
            c2 = new Line(c2.StartPoint, c2.StartPoint.add(c2.GetFistDeriv(0).multiplyScalar(100)));
 | 
			
		||||
        ptsbul.push(d);
 | 
			
		||||
        //圆弧与直线相切,此时不要提刀
 | 
			
		||||
        if (isParallelTo(c1.GetFistDeriv(0), c2.GetFistDeriv(0)))
 | 
			
		||||
            continue;
 | 
			
		||||
 | 
			
		||||
        if (!isClose && i === cus.length - 1) //最后一条
 | 
			
		||||
         {
 | 
			
		||||
            ptsbul.push({ pt: c1.EndPoint, bul: 0 });
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        //圆弧与直线相切,此时不要提刀
 | 
			
		||||
        if (isParallelTo(c1.GetFistDeriv(0), c2.GetFistDeriv(0)))
 | 
			
		||||
            continue;
 | 
			
		||||
 | 
			
		||||
        //提刀
 | 
			
		||||
        for (let x of offsetx) {
 | 
			
		||||
            let co1 = c1.GetOffsetCurves(x)[0];
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user