!2502 修复:铰链模块内的实体名称包含"铰链",参与门铰名称赋值

pull/2503/head
林三 10 months ago committed by ChenX
parent d1d1891f09
commit 01a1c727ee

@ -1020,6 +1020,7 @@ export class DrawDoorTool
*/
export function SetTypeHigneName(relativeDoors: Set<Entity>, allSpaceEnts: Entity[], isLROpen: boolean): void
{
let hingeTemp = new Set<TemplateRecord>();
for (let door of relativeDoors)
{
let openDir = BoardOpenDir.Left;
@ -1031,7 +1032,18 @@ export function SetTypeHigneName(relativeDoors: Set<Entity>, allSpaceEnts: Entit
{
let hinge = obj.Object as HardwareCompositeEntity;
if (IsHinge(hinge))
hinge.HardwareOption.name = hingeName;
{
let temp = hinge.Template?.Object as TemplateRecord;
if (temp && !hingeTemp.has(temp))
{
hingeTemp.add(temp);
for (let ent of temp.AllEntitys)
{
if (ent instanceof HardwareCompositeEntity && ent.HardwareOption.name.includes("铰链"))
ent.HardwareOption.name = hingeName;
}
}
}
}
}
else if (door instanceof HardwareCompositeEntity)
@ -1063,7 +1075,18 @@ export function SetTypeHigneName(relativeDoors: Set<Entity>, allSpaceEnts: Entit
{
let hinge = obj.Object as HardwareCompositeEntity;
if (IsHinge(hinge))
hinge.HardwareOption.name = hingeName;
{
let temp = hinge.Template?.Object as TemplateRecord;
if (temp && !hingeTemp.has(temp))
{
hingeTemp.add(temp);
for (let ent of temp.AllEntitys)
{
if (ent instanceof HardwareCompositeEntity && ent.HardwareOption.name.includes("铰链"))
ent.HardwareOption.name = hingeName;
}
}
}
}
}
}

@ -185,6 +185,7 @@ export class TemplateDrawHingeTool
hinge.HardwareOption[EBoardKeyList.RoomName] = rName;
hinge.HardwareOption[EBoardKeyList.BrMat] = bName;
hinge.HardwareOption[EBoardKeyList.CabinetName] = cName;
if (hinge.HardwareOption.name.includes("铰链"))
hinge.HardwareOption.name = hingeType;
this.hingeSet.add(objId);
}

Loading…
Cancel
Save