From afea2b423ce3d479a337055017be53892cada812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E8=8B=A5=E5=AF=92?= <13470150+qian-ruohan@user.noreply.gitee.com> Date: Tue, 9 Jul 2024 02:56:32 +0000 Subject: [PATCH] =?UTF-8?q?!2867=20=E4=BC=98=E5=8C=96:=E9=93=B0=E9=93=BE?= =?UTF-8?q?=E5=A4=87=E6=B3=A8=E4=BF=9D=E7=95=991=E4=BD=8D=E5=B0=8F?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Add-on/DrawBoard/ParseHinge.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Add-on/DrawBoard/ParseHinge.ts b/src/Add-on/DrawBoard/ParseHinge.ts index 0497d1345..69a4e7a8f 100644 --- a/src/Add-on/DrawBoard/ParseHinge.ts +++ b/src/Add-on/DrawBoard/ParseHinge.ts @@ -196,15 +196,15 @@ function ParseHingeToDoor(door: Entity, hingObjId: ObjectId[], hingeM newDetailedInformation += ParseExpr(hw.HardwareOption[key], accuracy, { L: size.x, W: size.y, H: size.z }) + " "; } - const newPosion = new Vector2(fuzz.lookupOrCreate([pos.x], Math.round(pos.x)), Math.round(pos.z)); //获取位置信息 + const newPosion = new Vector2(fuzz.lookupOrCreate([pos.x], parseFloat(pos.x.toFixed(1))), parseFloat(pos.z.toFixed(1)));//获取位置信息 const hingeRemarkInformations = hingeMap.get(key) || [] as HingeRemarkInformation[]; const hingeRemarkInformation = hingeRemarkInformations.find(info => info.detailedInformation === newDetailedInformation); if (hingeRemarkInformation) //如果存在铰链详细信息且是相同的,将位置写入到一起 { - let x = fuzz.lookupOrCreate([pos.x], Math.round(pos.x)); - let y = Math.round(pos.z); + let x = fuzz.lookupOrCreate([pos.x], parseFloat(pos.x.toFixed(1))); + let y = parseFloat(pos.z.toFixed(1)); //过滤重复点 let v2 = hingeRemarkInformation.postion.find((v) => equaln(v.x, x) && equaln(v.y, y)); if (!v2)