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