!1355 优化:孔拆单

* 优化排钻拆单解析精度
* 自定义排钻大孔改小孔
pull/1355/MERGE
ZoeLeeFZ 4 years ago committed by ChenX
parent 2ec313d8eb
commit 28e7fd244d

@ -672,7 +672,7 @@ export namespace Production
let angle = angleTo(XAxis, x);
if (d.Type === GangDrillType.Pxl || d.Type === GangDrillType.WoodPXL)
{
if (isParallelTo(d.Normal, brNormal))
if (isParallelTo(d.Normal, brNormal, CanDrawHoleFuzz))
{
if (!IsBetweenA2B(position.x, -d.Radius, br.Width + d.Radius, 1e-6)
|| !IsBetweenA2B(position.y, -d.Radius, br.Height + d.Radius, 1e-6)
@ -686,7 +686,7 @@ export namespace Production
}
else if (d.Type === GangDrillType.Ljg || d.Type === GangDrillType.Wood)
{
if (!isParallelTo(d.Normal, brNormal))
if (!isParallelTo(d.Normal, brNormal, CanDrawHoleFuzz))
{
let z = position.z;
if (!IsBetweenA2B(z, -d.Radius, br.Thickness + d.Radius, 1e-6)) return;
@ -746,9 +746,9 @@ export namespace Production
{
if (isParallelTo(d.Normal, br.Normal, CanDrawHoleFuzz))
{
if (!IsBetweenA2B(position.x, -d.Radius, br.Width + d.Radius, 1e-6)
|| !IsBetweenA2B(position.y, -d.Radius, br.Height + d.Radius, 1e-6)
|| !IsBetweenA2B(position.z, 0, br.Thickness)
if (!IsBetweenA2B(position.x, -d.Radius, br.Width + d.Radius, CanDrawHoleFuzz)
|| !IsBetweenA2B(position.y, -d.Radius, br.Height + d.Radius, CanDrawHoleFuzz)
|| !IsBetweenA2B(position.z, 0, br.Thickness, -CanDrawHoleFuzz)
|| !outline.PtInCurve(position.clone().setZ(0))) return;
position.sub(offsetTanslation);
holes = data.frontBackHoles;
@ -793,7 +793,7 @@ export namespace Production
let depth = z0 < 1e-2 ? z1 : br.Thickness - z0;
if (depth > 1e-2)
data.frontBackHoles.push({
type: d.isThrough ? GangDrillType.TK : GangDrillType.Pxl,
type: d.isThrough ? GangDrillType.TK : GangDrillType.Ymj,
position: z0 < 1e-6 ? p : p.setZ(br.Thickness),
radius: cir.Radius,
depth,

Loading…
Cancel
Save