-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from hypar-io/nvolyk/function-to-create-spacec…
…onfigurations-from-a-model Function to create SpaceConfigurations from a model
- Loading branch information
Showing
24 changed files
with
929 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
bin/ | ||
obj/ | ||
*.glb | ||
output.json | ||
input.json | ||
.vs/ | ||
server/ | ||
test/Generated/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
|
||
# SpaceConfiguration from Model | ||
|
||
The SpaceConfigurationFromModel function. | ||
|
||
|Input Name|Type|Description| | ||
|---|---|---| | ||
|Program|[ | ||
"string", | ||
"null" | ||
]|| | ||
|Model File|https://prod-api.hypar.io/schemas/InputData|| | ||
|
||
|
||
<br> | ||
|
||
|Output Name|Type|Description| | ||
|---|---|---| | ||
|
||
|
||
<br> | ||
|
||
## Additional Information |
34 changes: 34 additions & 0 deletions
34
SpaceConfigurationFromModel/SpaceConfigurationFromModel.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpaceConfigurationFromModel", "src\SpaceConfigurationFromModel.csproj", "{523F6178-B262-4D00-82EE-64DBC360E91B}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpaceConfigurationFromModel.Dependencies", "dependencies\SpaceConfigurationFromModel.Dependencies.csproj", "{DD190A45-1532-4C7A-9433-F0FB30A53D48}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpaceConfigurationFromModel.Tests", "test\SpaceConfigurationFromModel.Tests.csproj", "{6E7331E9-FA62-498B-BA08-91887C97B3AD}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{523F6178-B262-4D00-82EE-64DBC360E91B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{523F6178-B262-4D00-82EE-64DBC360E91B}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{523F6178-B262-4D00-82EE-64DBC360E91B}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{523F6178-B262-4D00-82EE-64DBC360E91B}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{DD190A45-1532-4C7A-9433-F0FB30A53D48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{DD190A45-1532-4C7A-9433-F0FB30A53D48}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{DD190A45-1532-4C7A-9433-F0FB30A53D48}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{DD190A45-1532-4C7A-9433-F0FB30A53D48}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{6E7331E9-FA62-498B-BA08-91887C97B3AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{6E7331E9-FA62-498B-BA08-91887C97B3AD}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{6E7331E9-FA62-498B-BA08-91887C97B3AD}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{6E7331E9-FA62-498B-BA08-91887C97B3AD}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal |
12 changes: 12 additions & 0 deletions
12
SpaceConfigurationFromModel/dependencies/CirculationSegment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Elements; | ||
using System; | ||
using System.Linq; | ||
using System.Collections.Generic; | ||
using Elements.Geometry; | ||
namespace Elements | ||
{ | ||
public partial class CirculationSegment : ICirculationSegment | ||
{ | ||
|
||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
SpaceConfigurationFromModel/dependencies/CirculationSegment.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
//---------------------- | ||
// <auto-generated> | ||
// Generated using the NJsonSchema v10.1.21.0 (Newtonsoft.Json v13.0.0.0) (http://NJsonSchema.org) | ||
// </auto-generated> | ||
//---------------------- | ||
using Elements; | ||
using Elements.GeoJSON; | ||
using Elements.Geometry; | ||
using Elements.Geometry.Solids; | ||
using Elements.Spatial; | ||
using Elements.Validators; | ||
using Elements.Serialization.JSON; | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Line = Elements.Geometry.Line; | ||
using Polygon = Elements.Geometry.Polygon; | ||
|
||
namespace Elements | ||
{ | ||
#pragma warning disable // Disable all warnings | ||
|
||
/// <summary>Represents a section of a circulation network, such as a corridor.</summary> | ||
[JsonConverter(typeof(Elements.Serialization.JSON.JsonInheritanceConverter), "discriminator")] | ||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] | ||
public partial class CirculationSegment : Floor | ||
{ | ||
[JsonConstructor] | ||
public CirculationSegment(ThickenedPolyline @geometry, Profile @profile, double @thickness, System.Guid? @level, Transform @transform, Material @material, Representation @representation, bool @isElementDefinition, System.Guid @id, string @name) | ||
: base(profile, thickness, level, transform, material, representation, isElementDefinition, id, name) | ||
{ | ||
this.Geometry = @geometry; | ||
} | ||
|
||
// Empty constructor | ||
public CirculationSegment() | ||
: base() | ||
{ | ||
} | ||
|
||
/// <summary>The geometry of this circulation segment</summary> | ||
[JsonProperty("Geometry", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public ThickenedPolyline Geometry { get; set; } | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Elements | ||
{ | ||
public partial class LevelElements : Element, ILevelElements | ||
{ | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
SpaceConfigurationFromModel/dependencies/LevelElements.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
//---------------------- | ||
// <auto-generated> | ||
// Generated using the NJsonSchema v10.1.21.0 (Newtonsoft.Json v13.0.0.0) (http://NJsonSchema.org) | ||
// </auto-generated> | ||
//---------------------- | ||
using Elements; | ||
using Elements.GeoJSON; | ||
using Elements.Geometry; | ||
using Elements.Geometry.Solids; | ||
using Elements.Spatial; | ||
using Elements.Validators; | ||
using Elements.Serialization.JSON; | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Line = Elements.Geometry.Line; | ||
using Polygon = Elements.Geometry.Polygon; | ||
|
||
namespace Elements | ||
{ | ||
#pragma warning disable // Disable all warnings | ||
|
||
/// <summary>An element containing a collection of Elements that belong to one level.</summary> | ||
[JsonConverter(typeof(Elements.Serialization.JSON.JsonInheritanceConverter), "discriminator")] | ||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] | ||
public partial class LevelElements : Element | ||
{ | ||
[JsonConstructor] | ||
public LevelElements(IList<Element> @elements, System.Guid @level, System.Guid @id = default, string @name = null) | ||
: base(id, name) | ||
{ | ||
this.Elements = @elements; | ||
this.Level = @level; | ||
} | ||
|
||
// Empty constructor | ||
public LevelElements() | ||
: base() | ||
{ | ||
} | ||
|
||
/// <summary>The list of elements.</summary> | ||
[JsonProperty("Elements", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public IList<Element> Elements { get; set; } | ||
|
||
/// <summary>The Level element this set of elements is associated with</summary> | ||
[JsonProperty("Level", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public System.Guid Level { get; set; } | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Elements; | ||
using System; | ||
using System.Linq; | ||
using System.Collections.Generic; | ||
using Elements.Geometry; | ||
namespace Elements | ||
{ | ||
public partial class LevelVolume : ILevelVolume | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
//---------------------- | ||
// <auto-generated> | ||
// Generated using the NJsonSchema v10.1.21.0 (Newtonsoft.Json v13.0.0.0) (http://NJsonSchema.org) | ||
// </auto-generated> | ||
//---------------------- | ||
using Elements; | ||
using Elements.GeoJSON; | ||
using Elements.Geometry; | ||
using Elements.Geometry.Solids; | ||
using Elements.Spatial; | ||
using Elements.Validators; | ||
using Elements.Serialization.JSON; | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Line = Elements.Geometry.Line; | ||
using Polygon = Elements.Geometry.Polygon; | ||
|
||
namespace Elements | ||
{ | ||
#pragma warning disable // Disable all warnings | ||
|
||
/// <summary>Describes the volume of occupiable space between a level and the next level above it.</summary> | ||
[JsonConverter(typeof(Elements.Serialization.JSON.JsonInheritanceConverter), "discriminator")] | ||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] | ||
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) | ||
: base(transform, material, representation, isElementDefinition, id, name) | ||
{ | ||
this.Profile = @profile; | ||
this.Height = @height; | ||
this.Area = @area; | ||
this.BuildingName = @buildingName; | ||
this.Level = @level; | ||
this.Mass = @mass; | ||
this.PlanView = @planView; | ||
} | ||
|
||
// Empty constructor | ||
public LevelVolume() | ||
: base() | ||
{ | ||
} | ||
|
||
/// <summary>The profile of the level Volume</summary> | ||
[JsonProperty("Profile", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public Profile Profile { get; set; } | ||
|
||
/// <summary>The floor-to-floor height of this level</summary> | ||
[JsonProperty("Height", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public double Height { get; set; } | ||
|
||
/// <summary>The area of the level's profile.</summary> | ||
[JsonProperty("Area", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public double Area { get; set; } | ||
|
||
/// <summary>The name of the building or mass this level belongs to (optional)</summary> | ||
[JsonProperty("Building Name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public string BuildingName { get; set; } | ||
|
||
/// <summary>The Level this volume was created from.</summary> | ||
[JsonProperty("Level", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public System.Guid? Level { get; set; } | ||
|
||
/// <summary>The Conceptual Mass this volume was created from.</summary> | ||
[JsonProperty("Mass", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public System.Guid? Mass { get; set; } | ||
|
||
/// <summary>The default plan view for this level</summary> | ||
[JsonProperty("Plan View", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public System.Guid? PlanView { get; set; } | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
//---------------------- | ||
// <auto-generated> | ||
// Generated using the NJsonSchema v10.1.21.0 (Newtonsoft.Json v13.0.0.0) (http://NJsonSchema.org) | ||
// </auto-generated> | ||
//---------------------- | ||
using Elements; | ||
using Elements.GeoJSON; | ||
using Elements.Geometry; | ||
using Elements.Geometry.Solids; | ||
using Elements.Spatial; | ||
using Elements.Validators; | ||
using Elements.Serialization.JSON; | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Line = Elements.Geometry.Line; | ||
using Polygon = Elements.Geometry.Polygon; | ||
|
||
namespace Elements | ||
{ | ||
#pragma warning disable // Disable all warnings | ||
|
||
/// <summary>Represents a building service core.</summary> | ||
[JsonConverter(typeof(Elements.Serialization.JSON.JsonInheritanceConverter), "discriminator")] | ||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] | ||
public partial class ServiceCore : GeometricElement | ||
{ | ||
[JsonConstructor] | ||
public ServiceCore(Profile @profile, double @elevation, double @height, Vector3 @centroid, 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; | ||
this.Elevation = @elevation; | ||
this.Height = @height; | ||
this.Centroid = @centroid; | ||
} | ||
|
||
// Empty constructor | ||
public ServiceCore() | ||
: base() | ||
{ | ||
} | ||
|
||
/// <summary>The profile of this Core</summary> | ||
[JsonProperty("Profile", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public Profile Profile { get; set; } | ||
|
||
/// <summary>The elevation of the core.</summary> | ||
[JsonProperty("Elevation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public double Elevation { get; set; } | ||
|
||
/// <summary>The height of the core. </summary> | ||
[JsonProperty("Height", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public double Height { get; set; } | ||
|
||
/// <summary>A reference location for the centroid of the Core's profile.</summary> | ||
[JsonProperty("Centroid", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public Vector3 Centroid { get; set; } | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using Elements.Geometry; | ||
namespace Elements | ||
{ | ||
public partial class SpaceBoundary : GeometricElement, ISpaceBoundary | ||
{ | ||
public Vector3? ParentCentroid { get; set; } | ||
|
||
} | ||
} |
Oops, something went wrong.