diff --git a/LayoutFunctions/ClassroomLayout/src/ClassroomLayout.cs b/LayoutFunctions/ClassroomLayout/src/ClassroomLayout.cs index e5d23451..b00733b2 100644 --- a/LayoutFunctions/ClassroomLayout/src/ClassroomLayout.cs +++ b/LayoutFunctions/ClassroomLayout/src/ClassroomLayout.cs @@ -154,7 +154,7 @@ public static ClassroomLayoutOutputs Execute(Dictionary inputMode output.Model.AddElement(new SpaceMetric(room.Id, seatsCount, 0, 0, 0)); } var height = meetingRmBoundaries.FirstOrDefault()?.Height ?? 3; - if (input.CreateWalls) + if (input.CreateWalls && wallCandidateLines.Any()) { output.Model.AddElement(new InteriorPartitionCandidate(Guid.NewGuid()) { diff --git a/LayoutFunctions/LayoutFunctionCommon/LayoutGeneration.cs b/LayoutFunctions/LayoutFunctionCommon/LayoutGeneration.cs index 04fad27a..0a90f3e6 100644 --- a/LayoutFunctions/LayoutFunctionCommon/LayoutGeneration.cs +++ b/LayoutFunctions/LayoutFunctionCommon/LayoutGeneration.cs @@ -104,7 +104,7 @@ public virtual LayoutGenerationResult StandardLayoutOnAllLevels(string programTy double height = levelVolume?.Height ?? 3; Transform xform = levelVolume?.Transform ?? new Transform(); - if (createWalls) + if (createWalls && wallCandidateLines.Count > 0) { outputModel.AddElement(new InteriorPartitionCandidate(Guid.NewGuid()) { diff --git a/LayoutFunctions/LayoutFunctionCommon/LayoutStrategies.cs b/LayoutFunctions/LayoutFunctionCommon/LayoutStrategies.cs index 6c3262b8..42193d9e 100644 --- a/LayoutFunctions/LayoutFunctionCommon/LayoutStrategies.cs +++ b/LayoutFunctions/LayoutFunctionCommon/LayoutStrategies.cs @@ -328,12 +328,15 @@ Model outputModel double height = room.Height == 0 ? 3 : room.Height; Transform xform = levelVolume?.Transform ?? new Transform(); - outputModel.AddElement(new InteriorPartitionCandidate(Guid.NewGuid()) + if (wallCandidateLines.Count > 0) { - WallCandidateLines = wallCandidateLines, - Height = height, - LevelTransform = xform, - }); + outputModel.AddElement(new InteriorPartitionCandidate(Guid.NewGuid()) + { + WallCandidateLines = wallCandidateLines, + Height = height, + LevelTransform = xform, + }); + } } } foreach (var room in allSpaceBoundaries) diff --git a/LayoutFunctions/PhoneBoothLayout/src/PhoneBoothLayout.cs b/LayoutFunctions/PhoneBoothLayout/src/PhoneBoothLayout.cs index 6b068249..fabef408 100644 --- a/LayoutFunctions/PhoneBoothLayout/src/PhoneBoothLayout.cs +++ b/LayoutFunctions/PhoneBoothLayout/src/PhoneBoothLayout.cs @@ -127,7 +127,7 @@ public static PhoneBoothLayoutOutputs Execute(Dictionary inputMod output.Model.AddElement(new SpaceMetric(room.Id, seatsCount, 0, 0, 0)); } var height = meetingRmBoundaries.FirstOrDefault()?.Height ?? 3; - if (input.CreateWalls) + if (input.CreateWalls && wallCandidateLines.Count > 0) { output.Model.AddElement(new InteriorPartitionCandidate(Guid.NewGuid()) { diff --git a/LayoutFunctions/PrivateOfficeLayout/src/PrivateOfficeLayout.cs b/LayoutFunctions/PrivateOfficeLayout/src/PrivateOfficeLayout.cs index 69886b8d..d9245260 100644 --- a/LayoutFunctions/PrivateOfficeLayout/src/PrivateOfficeLayout.cs +++ b/LayoutFunctions/PrivateOfficeLayout/src/PrivateOfficeLayout.cs @@ -155,12 +155,15 @@ public static PrivateOfficeLayoutOutputs Execute(Dictionary input } var height = privateOfficeBoundaries.FirstOrDefault()?.Height ?? 3; - output.Model.AddElement(new InteriorPartitionCandidate(Guid.NewGuid()) + if (wallCandidateLines.Count > 0) { - WallCandidateLines = wallCandidateLines, - Height = height, - LevelTransform = levelVolume?.Transform ?? new Transform() - }); + output.Model.AddElement(new InteriorPartitionCandidate(Guid.NewGuid()) + { + WallCandidateLines = wallCandidateLines, + Height = height, + LevelTransform = levelVolume?.Transform ?? new Transform() + }); + } } output.PrivateOfficeCount = totalPrivateOfficeCount; OverrideUtilities.InstancePositionOverrides(input.Overrides, output.Model);