开发:简化代码

polyine_comp
ChenX 1 year ago
parent 36391b2f02
commit 3eabff35fb

@ -304,11 +304,9 @@ export class OffsetPolyline
let refP = this._Vertexs[curveResNext.index]; let refP = this._Vertexs[curveResNext.index];
if (tPts.length > 0) //ipts = 1 or ipts = 2 if (tPts.length > 0) //ipts = 1 or ipts = 2
tp = SelectNearP(iPts, refP); tp = SelectNearP(iPts, refP);
else //补圆 或者尝试连接 else //补 或者尝试连接
{ {
let arc = this.CreateArc(refP, sp, ep); if (iPts.length > 0 && !this._ToolPath && this.IsSharpCorner(curveResNow, curveResNext, refP))//非加工刀路 并且尖角化时
if (iPts.length > 0 && !this._ToolPath && this.IsSharpCorner(curveResNow, curveResNext, refP))
{ {
//设置新的连接点,并且备份旧点 //设置新的连接点,并且备份旧点
let oldp: Vector3; let oldp: Vector3;
@ -372,10 +370,10 @@ export class OffsetPolyline
if (onPre && onNext) if (onPre && onNext)
tp = p; tp = p;
else else
curveResNow.paddingCurve = [arc]; curveResNow.paddingCurve = [this.CreateArc(refP, sp, ep)];//补圆弧
} }
else else
curveResNow.paddingCurve = [arc]; curveResNow.paddingCurve = [this.CreateArc(refP, sp, ep)];//补圆弧
this._TrimCircleContours.push(this._Circles[curveResNext.index]); this._TrimCircleContours.push(this._Circles[curveResNext.index]);
} }

Loading…
Cancel
Save