|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|