!246 修复布尔运算问题和界面resize问题

Merge pull request !246 from ZoeLeeFZ/fixBug3
pull/246/MERGE
ZoeLeeFZ 6 years ago committed by ChenX
parent 87884d2f68
commit bf59b50340

@ -58,7 +58,7 @@ test("包含差集的对象,差一点就可以切断", () =>
regs[0].BooleanOper(regs[1], BoolOpeartionType.Subtract);
expect(regs[0].ShapeManager.ShapeCount).toBe(1);
expect(regs[0].ShapeManager.ShapeList[0].Holes.length).toBe(1);
expect(regs[0].ShapeManager.ShapeList[0].Holes.length).toBe(0);
});
test('矩形只有尖角重合并进行并集', () =>

@ -214,7 +214,7 @@ export function equalCurve(cu1: Curve, cu2: Curve)
equalv3(
Vec2DTo3D(p1).applyMatrix4(cu1.OCS),
Vec2DTo3D(p2).applyMatrix4(cu2.OCS),
1e-6
1e-4
)
);
}

@ -184,7 +184,7 @@ export class Contour
unionList.push(targetOutline);
intersectionList.push(sourceOutline);
}
else if (interPts.length === 0)//分离
else if (interPts.length <= 1)//分离
{
unionList.push(sourceOutline, targetOutline);
}
@ -263,11 +263,11 @@ export class Contour
let sourceContainerTarget = this.CuInOutline(targetOutline);
//包含.相交.分离(三种状态)
if (sourceContainerTarget && interPts.length === 0)//源包含目标
if (sourceContainerTarget && interPts.length <= 1)//源包含目标
{
return [sourceOutline, targetOutline];
}
else if (interPts.length === 0)//分离
else if (interPts.length <= 1)//分离
{
return [sourceOutline];
}
@ -303,7 +303,6 @@ export class Contour
subtractList.push(pl);
}
}
return subtractList;
}
}

@ -21,7 +21,7 @@ export class TopPanelStore extends Singleton
//有前面层视图的时候隐藏绘图区域
[document.getElementById("app"), document.getElementById("TopPanel"), document.getElementById("DownPanel")]
.forEach(el =>
el.style.display = this.isLogin && !this.openMain ? "block" : "none"
el.style.opacity = this.isLogin && !this.openMain ? "1" : "0"
)
})
}

Loading…
Cancel
Save