|
|
|
@ -364,35 +364,47 @@ export class CommandFillet implements Command
|
|
|
|
|
if (res && res.arc)
|
|
|
|
|
{
|
|
|
|
|
let pln = pl.Clone();
|
|
|
|
|
//修正凸度
|
|
|
|
|
if (res.cu1 instanceof Arc)
|
|
|
|
|
pln.SetBulgeAt(parF1, res.cu1.Bul);
|
|
|
|
|
if (res.cu2 instanceof Arc)
|
|
|
|
|
pln.SetBulgeAt(parF2, res.cu2.Bul);
|
|
|
|
|
|
|
|
|
|
let sp = res.arc.StartPoint.applyMatrix4(pln.OCSInv);
|
|
|
|
|
let ep = res.arc.EndPoint.applyMatrix4(pln.OCSInv);
|
|
|
|
|
if (rem === 1)
|
|
|
|
|
let sp2d = Vec3DTo2D(res.arc.StartPoint.applyMatrix4(pln.OCSInv));
|
|
|
|
|
let ep2d = Vec3DTo2D(res.arc.EndPoint.applyMatrix4(pln.OCSInv));
|
|
|
|
|
|
|
|
|
|
let isNeighbor = rem === 1;
|
|
|
|
|
|
|
|
|
|
//#IOX26
|
|
|
|
|
if (isNeighbor && res.cu1 instanceof Arc && res.cu2 instanceof Arc)
|
|
|
|
|
{
|
|
|
|
|
pln.SetPointAt(parF2, Vec3DTo2D(ep));
|
|
|
|
|
pln.AddVertexAt(parF2, Vec3DTo2D(sp));
|
|
|
|
|
let ins = res.cu1.IntersectWith(res.cu2, IntersectOption.OnBothOperands);
|
|
|
|
|
if (ins.length === 1 && !equalv3(pln.StartPoint, ins[0]))
|
|
|
|
|
isNeighbor = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isNeighbor)
|
|
|
|
|
{
|
|
|
|
|
pln.SetPointAt(parF2, ep2d);
|
|
|
|
|
pln.AddVertexAt(parF2, sp2d);
|
|
|
|
|
pln.SetBulgeAt(parF2, res.arc.Bul);
|
|
|
|
|
}
|
|
|
|
|
else//首尾
|
|
|
|
|
{
|
|
|
|
|
let oldBul = pln.GetBuilgeAt(0);
|
|
|
|
|
pln.StartPoint = sp;
|
|
|
|
|
pln.SetBulgeAt(0, oldBul);
|
|
|
|
|
pln.SetPointAt(0, sp2d);
|
|
|
|
|
|
|
|
|
|
let plPtCount = pln.NumberOfVertices;
|
|
|
|
|
if (pln.EndParam === plPtCount)//CloseMark
|
|
|
|
|
{
|
|
|
|
|
pln.AddVertexAt(plPtCount, Vec3DTo2D(ep));
|
|
|
|
|
pln.AddVertexAt(plPtCount, ep2d);
|
|
|
|
|
pln.SetBulgeAt(plPtCount, -res.arc.Bul);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pln.EndPoint = ep;
|
|
|
|
|
pln.SetPointAt(plPtCount - 1, ep2d);
|
|
|
|
|
|
|
|
|
|
pln.SetBulgeAt(plPtCount - 1, -res.arc.Bul);
|
|
|
|
|
pln.AddVertexAt(plPtCount, Vec3DTo2D(sp));
|
|
|
|
|
pln.AddVertexAt(plPtCount, sp2d);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|