!499 修复太极偏移问题

pull/499/MERGE
ZoeLeeFZ 5 years ago committed by ChenX
parent b007767e31
commit f2c7f62668

@ -60,3 +60,16 @@ test('补充bug测试#IKWGF', () =>
expect(cus[2].Length).toMatchSnapshot();
});
test("偏移真交点判断错误", () =>
{
let data =
[1, "Polyline", 5, 2, 102, false, 1, 7, 0, [0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 1671.5225704902539, 783.1395680459682, 0, 1], 0, 0, 2, 3, [-75, -2.842170943040401e-14], 0.9999999999999997, [75, 0], -0.9999999999999997, [225, -5.684341886080802e-14], 0.9999999999999923, true]
let pl = loadFile(data)[0];
//situation 1
let cus = pl.GetOffsetCurves(75);
expect(cus.length).toBe(1);
})

@ -314,6 +314,7 @@ export class PolyOffsetUtil
tPts = iPts.filter(p =>
frontLine.PtOnCurve(p)
&& laterLine.PtOnCurve(p)
&& !equalv3(laterLine.EndPoint, p)
);
}
@ -355,6 +356,7 @@ export class PolyOffsetUtil
this._Polyline.GetCurveAtParam(offResList[0].index),
this._RetCurves[0]);
};
cirContours = cirContours.filter(cir => cir !== undefined);
this._Contours.push(...cirContours);
}

Loading…
Cancel
Save