Skip to content

Commit

Permalink
handle 1 level case
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbradleym committed Nov 18, 2024
1 parent 024d4d0 commit 7d9415b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions LayoutFunctions/WallsLOD200/src/WallsLOD200.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ public static List<StandardWall> SplitWallsByLevels(IEnumerable<StandardWall> wa

foreach (var wall in walls)
{
// If there is only one level, no splitting is required
if (sortedLevels.Count == 1)
{
newWalls.Add(wall);
continue;
}

if (!(wall.AdditionalProperties.TryGetValue("Level", out var levelIdObj) && Guid.TryParse(levelIdObj.ToString(), out var levelId)))
{
// If we can't get the walls level then we can't reasonably split the wall by other levels
Expand Down

0 comments on commit 7d9415b

Please sign in to comment.