diff --git a/Grids/SketchGrids/README.md b/Grids/SketchGrids/README.md index e0092113..4338cc1f 100644 --- a/Grids/SketchGrids/README.md +++ b/Grids/SketchGrids/README.md @@ -15,3 +15,7 @@ Generate grids automatically from conceptual masses or sketch grid lines. |Output Name|Type|Description| |---|---|---| + +
+ +## Additional Information \ No newline at end of file diff --git a/Grids/SketchGrids/dependencies/ConceptualMass.g.cs b/Grids/SketchGrids/dependencies/ConceptualMass.g.cs index 4f20ef1d..fa933a87 100644 --- a/Grids/SketchGrids/dependencies/ConceptualMass.g.cs +++ b/Grids/SketchGrids/dependencies/ConceptualMass.g.cs @@ -1,6 +1,6 @@ //---------------------- // -// Generated using the NJsonSchema v10.1.21.0 (Newtonsoft.Json v12.0.0.0) (http://NJsonSchema.org) +// Generated using the NJsonSchema v10.1.21.0 (Newtonsoft.Json v13.0.0.0) (http://NJsonSchema.org) // //---------------------- using Elements; @@ -23,7 +23,7 @@ namespace Elements /// Represents an early stage building massing volume. Its boundary typically represents the nominal edge of slab, and may be articulated further by subsequent functions. [JsonConverter(typeof(Elements.Serialization.JSON.JsonInheritanceConverter), "discriminator")] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v12.0.0.0)")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] public partial class ConceptualMass : Envelope { [JsonConstructor] @@ -37,6 +37,7 @@ public ConceptualMass(IList @skeleton, string @primaryUseCategory, System. this.LocalCoordinateSystem = @localCoordinateSystem; } + // Empty constructor public ConceptualMass() : base() diff --git a/Grids/SketchGrids/dependencies/Envelope.g.cs b/Grids/SketchGrids/dependencies/Envelope.g.cs index c2546d41..a5a575de 100644 --- a/Grids/SketchGrids/dependencies/Envelope.g.cs +++ b/Grids/SketchGrids/dependencies/Envelope.g.cs @@ -1,6 +1,6 @@ //---------------------- // -// Generated using the NJsonSchema v10.1.21.0 (Newtonsoft.Json v12.0.0.0) (http://NJsonSchema.org) +// Generated using the NJsonSchema v10.1.21.0 (Newtonsoft.Json v13.0.0.0) (http://NJsonSchema.org) // //---------------------- using Elements; @@ -23,7 +23,7 @@ namespace Elements /// Represents one part of a building enclosure. [JsonConverter(typeof(Elements.Serialization.JSON.JsonInheritanceConverter), "discriminator")] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v12.0.0.0)")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] public partial class Envelope : GeometricElement { [JsonConstructor] @@ -38,6 +38,7 @@ public Envelope(Profile @profile, double @elevation, double @height, Vector3 @di this.FloorToFloorHeights = @floorToFloorHeights; } + // Empty constructor public Envelope() : base() diff --git a/Grids/SketchGrids/dependencies/GridLinesOverride.g.cs b/Grids/SketchGrids/dependencies/GridLinesOverride.g.cs index 02d341fc..2a8fa601 100644 --- a/Grids/SketchGrids/dependencies/GridLinesOverride.g.cs +++ b/Grids/SketchGrids/dependencies/GridLinesOverride.g.cs @@ -138,8 +138,9 @@ public static List CreateElements( if (elementToEdit != null) { resultElements.Remove(elementToEdit); - resultElements.Add(modifyElement(elementToEdit, editedElement)); - Identity.AddOverrideIdentity(elementToEdit, editedElement); + var newElement = modifyElement(elementToEdit, editedElement); + resultElements.Add(newElement); + Identity.AddOverrideIdentity(newElement, editedElement); } } } diff --git a/Grids/SketchGrids/dependencies/SketchGrids.Dependencies.csproj b/Grids/SketchGrids/dependencies/SketchGrids.Dependencies.csproj index 9b55480d..91caf5c0 100644 --- a/Grids/SketchGrids/dependencies/SketchGrids.Dependencies.csproj +++ b/Grids/SketchGrids/dependencies/SketchGrids.Dependencies.csproj @@ -1,12 +1,10 @@ + - - - - - - - netcoreapp3.1 + net6.0 - - + + + + + \ No newline at end of file diff --git a/Grids/SketchGrids/dependencies/SketchGridsInputs.g.cs b/Grids/SketchGrids/dependencies/SketchGridsInputs.g.cs index 3a046184..a46b742b 100644 --- a/Grids/SketchGrids/dependencies/SketchGridsInputs.g.cs +++ b/Grids/SketchGrids/dependencies/SketchGridsInputs.g.cs @@ -22,15 +22,15 @@ namespace SketchGrids { #pragma warning disable // Disable all warnings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v12.0.0.0)")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] - public class SketchGridsInputs : S3Args + public class SketchGridsInputs : ArgsBase { [Newtonsoft.Json.JsonConstructor] - public SketchGridsInputs(double @offsetDistanceFromConceptualMass, bool @addSkeletonGrids, Overrides @overrides, string bucketName, string uploadsBucket, Dictionary modelInputKeys, string gltfKey, string elementsKey, string ifcKey): - base(bucketName, uploadsBucket, modelInputKeys, gltfKey, elementsKey, ifcKey) + public SketchGridsInputs(double @offsetDistanceFromConceptualMass, bool @addSkeletonGrids, Overrides @overrides, Dictionary modelInputKeys, string gltfKey, string elementsKey, string ifcKey): + base(modelInputKeys, gltfKey, elementsKey, ifcKey) { var validator = Validator.Instance.GetFirstValidatorForType(); if(validator != null) @@ -61,7 +61,7 @@ public SketchGridsInputs(double @offsetDistanceFromConceptualMass, bool @addSkel } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v12.0.0.0)")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] public partial class Overrides @@ -98,7 +98,7 @@ public Overrides(OverrideAdditions @additions, OverrideRemovals @removals, IList } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v12.0.0.0)")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] public partial class OverrideAdditions @@ -127,7 +127,7 @@ public OverrideAdditions(IList @gridLines) } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v12.0.0.0)")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] public partial class OverrideRemovals @@ -156,7 +156,7 @@ public OverrideRemovals(IList @gridLines) } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v12.0.0.0)")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] public partial class GridLinesOverride @@ -191,7 +191,7 @@ public GridLinesOverride(string @id, GridLinesIdentity @identity, GridLinesValue } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v12.0.0.0)")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] public partial class GridLinesOverrideAddition @@ -226,7 +226,7 @@ public GridLinesOverrideAddition(string @id, GridLinesIdentity @identity, GridLi } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v12.0.0.0)")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] public partial class GridLinesOverrideRemoval @@ -257,7 +257,7 @@ public GridLinesOverrideRemoval(string @id, GridLinesIdentity @identity) } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v12.0.0.0)")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] public partial class GridLinesIdentity @@ -284,7 +284,7 @@ public GridLinesIdentity(System.Guid @creationId) } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v12.0.0.0)")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] public partial class GridLinesValue @@ -311,7 +311,7 @@ public GridLinesValue(Line @curve) } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v12.0.0.0)")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] public partial class GridLinesOverrideAdditionValue diff --git a/Grids/SketchGrids/dependencies/SketchGridsOutputs.g.cs b/Grids/SketchGrids/dependencies/SketchGridsOutputs.g.cs index a25a4bed..159d236e 100644 --- a/Grids/SketchGrids/dependencies/SketchGridsOutputs.g.cs +++ b/Grids/SketchGrids/dependencies/SketchGridsOutputs.g.cs @@ -17,16 +17,13 @@ namespace SketchGrids public class SketchGridsOutputs: SystemResults { - /// /// Construct a SketchGridsOutputs with default inputs. /// This should be used for testing only. /// public SketchGridsOutputs() : base() { - } - } } \ No newline at end of file diff --git a/Grids/SketchGrids/hypar.json b/Grids/SketchGrids/hypar.json index c2c5a988..8a6cb9bd 100644 --- a/Grids/SketchGrids/hypar.json +++ b/Grids/SketchGrids/hypar.json @@ -68,7 +68,7 @@ } ], "element_types": [ - "https://prod-api.hypar.io/schemas/ConceptualMass" + "https://schemas.hypar.io/ConceptualMass.json" ], "model_output": "Grids", "repository_url": "https://github.com/hypar-io/function", diff --git a/Grids/SketchGrids/src/Function.g.cs b/Grids/SketchGrids/src/Function.g.cs index 0ec28b62..3d88030c 100644 --- a/Grids/SketchGrids/src/Function.g.cs +++ b/Grids/SketchGrids/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(SketchGridsInputs args, ILambdaContext context) + public async Task Handler(SketchGridsInputs args) { // Preload dependencies (if they exist), // so that they are available during model deserialization. @@ -62,10 +61,11 @@ public async Task Handler(SketchGridsInputs args, ILambdaCon if(this.store == null) { - this.store = new S3ModelStore(RegionEndpoint.USWest1); + this.store = new UrlModelStore(); } + - var l = new InvocationWrapper(store, SketchGrids.Execute); + var l = new InvocationWrapper (store, SketchGrids.Execute); var output = await l.InvokeAsync(args); return output; } diff --git a/Grids/SketchGrids/src/SketchGrids.csproj b/Grids/SketchGrids/src/SketchGrids.csproj index f7b90840..4c86d152 100644 --- a/Grids/SketchGrids/src/SketchGrids.csproj +++ b/Grids/SketchGrids/src/SketchGrids.csproj @@ -1,11 +1,9 @@ + - - - netcoreapp3.1 + net6.0 - - + \ No newline at end of file diff --git a/Grids/SketchGrids/test/SketchGrids.Tests.csproj b/Grids/SketchGrids/test/SketchGrids.Tests.csproj index 69bce0f4..f2953633 100644 --- a/Grids/SketchGrids/test/SketchGrids.Tests.csproj +++ b/Grids/SketchGrids/test/SketchGrids.Tests.csproj @@ -1,20 +1,16 @@ + - - netcoreapp3.1 - + net6.0 false - - - - + \ No newline at end of file