Skip to content

Commit

Permalink
variable renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheumann committed Jan 7, 2024
1 parent 97f1600 commit 01d4885
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions LayoutFunctions/LayoutFunctionCommon/LayoutStrategies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public static bool IsNearlyARectangle(IEnumerable<Polygon> polygons)
/// <summary>
/// Pringle-specific behavior to pick a specific config and orientation. This code only executes if the room has a `ConfigId` property, which is only set on pringle.
/// </summary>
public static SpaceConfiguration LimitConfigsToId<TSpaceBoundary>(SpaceConfiguration configs, TSpaceBoundary room, List<(RoomEdge OrientationGuideEdge, List<RoomEdge> WallCandidates)> wallCandidateOptions = null) where TSpaceBoundary : Element, ISpaceBoundary
public static SpaceConfiguration LimitConfigsToId<TSpaceBoundary>(SpaceConfiguration originalConfigs, TSpaceBoundary room, List<(RoomEdge OrientationGuideEdge, List<RoomEdge> WallCandidates)> wallCandidateOptions = null) where TSpaceBoundary : Element, ISpaceBoundary
{
// If a set of wall candidate options are provided, limit to the one that aligns with the boundary's first edge.
// In the future, as room shapes become more editable, we might want to pass in an explicit "orientation edge" instead of just using the first edge.
Expand All @@ -266,16 +266,16 @@ public static bool IsNearlyARectangle(IEnumerable<Polygon> polygons)
}
}

// Limit the possible configs to the one specified by the room's ConfigId property.
// Limit the possible configs to the one specified by the room's ConfigId property, if it's found in the set.
var configId = room.ConfigId;
var config = new SpaceConfiguration();
if (configs.ContainsKey(configId))
var newConfigs = new SpaceConfiguration();
if (originalConfigs.ContainsKey(configId))
{
config.Add(configId, configs[configId]);
return config;
newConfigs.Add(configId, originalConfigs[configId]);
return newConfigs;
}

return configs;
return originalConfigs;
}


Expand Down

0 comments on commit 01d4885

Please sign in to comment.