From 953b9c06d9b9a7956f8addcb8b57eb5daf049681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E8=AF=97=E6=B4=A5?= <2723065175@qq.com> Date: Tue, 23 Apr 2024 06:57:44 +0000 Subject: [PATCH] =?UTF-8?q?!2707=20=E5=BC=80=E5=8F=91:=E5=9C=86=E5=BC=A7?= =?UTF-8?q?=E6=9D=BF=E5=B9=B2=E6=B6=89=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __test__/ArcBoard/arcBoardInterfere.test.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 __test__/ArcBoard/arcBoardInterfere.test.ts diff --git a/__test__/ArcBoard/arcBoardInterfere.test.ts b/__test__/ArcBoard/arcBoardInterfere.test.ts new file mode 100644 index 000000000..851d9b2f7 --- /dev/null +++ b/__test__/ArcBoard/arcBoardInterfere.test.ts @@ -0,0 +1,14 @@ +import { ColorMaterial } from "../../src/Common/ColorPalette"; +import { CheckInterfereTool } from "../../src/Common/InterfereUtil"; +import { LoadBoardsFromFileData } from "../Utils/LoadEntity.util"; + +test('圆弧板干涉', () => +{ + let board = { "file": [1, "Board", 10, 2, 250, 0, 1, 11, 71, [0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 10263.062529021525, 1517.2877253174086, 0, 1], 0, 0, 1, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 7671.062529021539, 1517.2877253174086, 0, 1], 0, 0, 1, 3, 202.00000000006554, 580, 18, true, "Polyline", 10, 2, 0, 0, 0, 7, 71, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 381.99999999999983, 0, 1], 0, 0, 1, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], 0, 0, 1, 2, 4, [580, -381.99999999999983], 0, [580, -179.99999999993435], 0, [0, -179.9999999999343], 0, [0, -381.99999999999983], 0, true, 0, 3, 3, 0, 0, 0, 0, 19, 1, "右侧板", "15-3", "电视柜", "", "", "", 0, 1, "三合一", 2, 0, "1", "1", "1", "1", "", "", "", 4, "三合一", "三合一", "三合一", "三合一", false, true, 0, 0, 0, 0, 0, 0, 0, 0, true, 0, 0, null, 0, 0, "", "", "", "", 0, false, 0, ""], "basePt": { "x": 10263.062529021525, "y": 1517.2877253174086, "z": 0 }, "ucs": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] }; + let arcBoard = { "file": [1, "Board", 10, 2, 251, 0, 1, 11, 71, [0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 10281.06252902154, 1517.2877253174083, 6.548361852765083e-11, 1], 0, 0, 1, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 7689.062529021554, 1517.2877253174083, -17.999999999934516, 1], 0, 0, 1, 3, 201.9999999999491, 673.9380400258997, 18, true, "Polyline", 10, 2, 0, 0, 0, 7, 71, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 579.9999999999999, 0, 0, 1], 0, 0, 1, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, -18, 0, 1], 0, 0, 1, 2, 4, [93.9380400258998, 0], 0, [93.9380400258998, 201.99999999994907], 0, [-579.9999999999999, 201.9999999999491], 0, [-579.9999999999999, 0], 0, true, 0, 3, 3, 0, 0, 0, 0, 19, 1, "右侧板", "15-3", "电视柜", "", "", "", 1, 1, "三合一", 2, 0, "1", "1", "1", "1", "", "", "", 4, "三合一", "三合一", "三合一", "三合一", false, true, 0, 0, 0, 0, 0, 0, 0, 0, true, 0, 0, null, 0, 0, "", "", "", "", 0, false, 0, "Polyline", 10, 2, 0, 0, 0, 7, 71, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], 0, 0, 1, [0, 1, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, -85.03272804053516, -14214.685325217642, 0, 1], 0, 0, 1, 2, 4, [0, 0], 0, [0, 20], -0.41421356237309503, [79.99999999999999, 100], 0, [579.9999999999999, 100], 0, false, 0, 0, true, 2, -1, 0, 6, 6, 2, 0, 0, 0, 3, 0, 1, 153.93804, 6, 6, 2, 0, 0, 0, 3, 0], "basePt": { "x": 10281.06252902154, "y": 1499.2877253174083, "z": 6.548361852765083e-11 }, "ucs": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] }; + + let br = LoadBoardsFromFileData(board)[0]; + let abr = LoadBoardsFromFileData(arcBoard)[0]; + + new CheckInterfereTool(ColorMaterial.GetConceptualMaterial(1)).Check([br, abr]); +});