diff --git a/Facade/FacadeGrid/FacadeGridByLevels/dependencies/FacadeGridByLevelsOutputs.g.cs b/Facade/FacadeGrid/FacadeGridByLevels/dependencies/FacadeGridByLevelsOutputs.g.cs
index 9a91d106..b5455a0c 100644
--- a/Facade/FacadeGrid/FacadeGridByLevels/dependencies/FacadeGridByLevelsOutputs.g.cs
+++ b/Facade/FacadeGrid/FacadeGridByLevels/dependencies/FacadeGridByLevelsOutputs.g.cs
@@ -20,15 +20,13 @@ public class FacadeGridByLevelsOutputs: SystemResults
/// The number of unique facade panels.
///
[JsonProperty("Unique Panel Count")]
- public double UniquePanelCount {get; set;}
+ public double UniquePanelCount { get; set; }
///
/// The total number of facade panels.
///
[JsonProperty("Total Panel Count")]
- public double TotalPanelCount {get; set;}
-
-
+ public double TotalPanelCount { get; set; }
///
/// Construct a FacadeGridByLevelsOutputs with default inputs.
@@ -36,16 +34,14 @@ public class FacadeGridByLevelsOutputs: SystemResults
///
public FacadeGridByLevelsOutputs() : base()
{
-
}
-
///
/// Construct a FacadeGridByLevelsOutputs specifying all inputs.
///
///
[JsonConstructor]
- public FacadeGridByLevelsOutputs(double uniquePanelCount, double totalPanelCount): base()
+ public FacadeGridByLevelsOutputs(double uniquePanelCount, double totalPanelCount) : base()
{
this.UniquePanelCount = uniquePanelCount;
this.TotalPanelCount = totalPanelCount;
diff --git a/Facade/FacadeGrid/FacadeGridByLevels/dependencies/LevelVolume.g.cs b/Facade/FacadeGrid/FacadeGridByLevels/dependencies/LevelVolume.g.cs
index a57f0d3e..d437122c 100644
--- a/Facade/FacadeGrid/FacadeGridByLevels/dependencies/LevelVolume.g.cs
+++ b/Facade/FacadeGrid/FacadeGridByLevels/dependencies/LevelVolume.g.cs
@@ -27,7 +27,7 @@ namespace Elements
public partial class LevelVolume : GeometricElement
{
[JsonConstructor]
- public LevelVolume(Profile @profile, double @height, double @area, string @buildingName, System.Guid? @level, System.Guid? @mass, System.Guid? @planView, Transform @transform = null, Material @material = null, Representation @representation = null, bool @isElementDefinition = false, System.Guid @id = default, string @name = null)
+ public LevelVolume(Profile @profile, double @height, double @area, string @buildingName, System.Guid? @level, System.Guid? @mass, System.Guid? @planView, IList @profiles, Transform @transform = null, Material @material = null, Representation @representation = null, bool @isElementDefinition = false, System.Guid @id = default, string @name = null)
: base(transform, material, representation, isElementDefinition, id, name)
{
this.Profile = @profile;
@@ -37,6 +37,7 @@ public LevelVolume(Profile @profile, double @height, double @area, string @build
this.Level = @level;
this.Mass = @mass;
this.PlanView = @planView;
+ this.Profiles = @profiles;
}
@@ -74,6 +75,10 @@ public LevelVolume()
[JsonProperty("Plan View", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Guid? PlanView { get; set; }
+ /// Multiple profiles used for a collection of volumes
+ [JsonProperty("Profiles", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public IList Profiles { get; set; }
+
}
}
\ No newline at end of file
diff --git a/Facade/FacadeGrid/FacadeGridByLevels/hypar.json b/Facade/FacadeGrid/FacadeGridByLevels/hypar.json
index 4ecd8fcb..8dc1a503 100644
--- a/Facade/FacadeGrid/FacadeGridByLevels/hypar.json
+++ b/Facade/FacadeGrid/FacadeGridByLevels/hypar.json
@@ -148,7 +148,9 @@
"type": "number",
"$hyparUnitType": "length",
"$hyparStyle": "number",
- "minimum": 0.1
+ "minimum": 0.1,
+ "multipleOf": 0.01,
+ "default": 0.5
}
},
"Pattern Mode": {
diff --git a/Facade/FacadeGrid/FacadeGridByLevels/src/FacadeGridByLevels.cs b/Facade/FacadeGrid/FacadeGridByLevels/src/FacadeGridByLevels.cs
index 7672395e..afeb5cc6 100644
--- a/Facade/FacadeGrid/FacadeGridByLevels/src/FacadeGridByLevels.cs
+++ b/Facade/FacadeGrid/FacadeGridByLevels/src/FacadeGridByLevels.cs
@@ -70,7 +70,7 @@ public static FacadeGridByLevelsOutputs Execute(Dictionary inputM
}
break;
case FacadeGridByLevelsInputsMode.Pattern:
- uGrid.DivideByPattern(input.PatternSettings.PanelWidthPattern, PatternMode(input.PatternSettings.PatternMode), DivisionMode(input.RemainderPosition));
+ uGrid.DivideByPattern(input.PatternSettings.PanelWidthPattern.Select(wp => Math.Max(wp, 0.1)).ToArray(), PatternMode(input.PatternSettings.PatternMode), DivisionMode(input.RemainderPosition));
break;
}
foreach (var cell in uGrid.Cells)
@@ -125,6 +125,11 @@ public static FacadeGridByLevelsOutputs Execute(Dictionary inputM
var output = new FacadeGridByLevelsOutputs(basePanels.Count, outputModel.AllElementsOfType().Count());
output.Model = outputModel;
+
+ if (input.PatternSettings.PanelWidthPattern.Any(wp => wp < 0.1))
+ {
+ output.Warnings.Add("Panel Width Pattern values less than 0.1 m will be replaced by the minimum possible value of 0.1 m.");
+ }
return output;
}
diff --git a/Facade/FacadeGrid/FacadeGridByLevels/src/Function.g.cs b/Facade/FacadeGrid/FacadeGridByLevels/src/Function.g.cs
index 1c79fec2..2bdc0451 100644
--- a/Facade/FacadeGrid/FacadeGridByLevels/src/Function.g.cs
+++ b/Facade/FacadeGrid/FacadeGridByLevels/src/Function.g.cs
@@ -2,7 +2,6 @@
// Edits to this code will be overwritten the next time you run 'hypar init'.
// DO NOT EDIT THIS FILE.
-using Amazon;
using Amazon.Lambda.Core;
using Hypar.Functions.Execution;
using Hypar.Functions.Execution.AWS;
@@ -19,9 +18,9 @@ public class Function
{
// Cache the model store for use by subsequent
// executions of this lambda.
- private IModelStore store;
+ private UrlModelStore store;
- public async Task Handler(FacadeGridByLevelsInputs args, ILambdaContext context)
+ public async Task Handler(FacadeGridByLevelsInputs args)
{
// Preload dependencies (if they exist),
// so that they are available during model deserialization.
@@ -61,9 +60,10 @@ public async Task Handler(FacadeGridByLevelsInputs ar
Console.WriteLine($"Time to load assemblies: {sw.Elapsed.TotalSeconds})");
if(this.store == null)
- {
- this.store = new UrlModelStore();
+ {
+ this.store = new UrlModelStore();
}
+
var l = new InvocationWrapper (store, FacadeGridByLevels.Execute);
var output = await l.InvokeAsync(args);