diff --git a/__test__/Booloperate/bool2.test.ts b/__test__/Booloperate/bool2.test.ts index 8cb51ed25..360a70a5a 100644 --- a/__test__/Booloperate/bool2.test.ts +++ b/__test__/Booloperate/bool2.test.ts @@ -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('矩形只有尖角重合并进行并集', () => diff --git a/src/Common/CurveUtils.ts b/src/Common/CurveUtils.ts index 1c4051657..3759d0469 100644 --- a/src/Common/CurveUtils.ts +++ b/src/Common/CurveUtils.ts @@ -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 ) ); } diff --git a/src/DatabaseServices/Contour.ts b/src/DatabaseServices/Contour.ts index 768f08fb8..ba557275d 100644 --- a/src/DatabaseServices/Contour.ts +++ b/src/DatabaseServices/Contour.ts @@ -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; } } diff --git a/src/UI/Store/TopPanelStore.ts b/src/UI/Store/TopPanelStore.ts index e7896bb3c..553d205a3 100644 --- a/src/UI/Store/TopPanelStore.ts +++ b/src/UI/Store/TopPanelStore.ts @@ -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" ) }) }