-
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.
update SpaceConfigFromModel for building
- Loading branch information
1 parent
4a75697
commit 3f49638
Showing
5 changed files
with
169 additions
and
2 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
SpaceConfigurationFromModel/dependencies/ProgramRequirement.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 System; | ||
using Newtonsoft.Json; | ||
|
||
namespace Elements | ||
{ | ||
public partial class ProgramRequirement : IProgramRequirement | ||
{ | ||
[JsonProperty("Qualified Program Name")] | ||
public string QualifiedProgramName => String.IsNullOrWhiteSpace(this.ProgramGroup) ? this.ProgramName : $"{this.ProgramGroup} - {this.ProgramName}"; | ||
public int CountPlaced { get; set; } | ||
} | ||
} |
116 changes: 116 additions & 0 deletions
116
SpaceConfigurationFromModel/dependencies/ProgramRequirement.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,116 @@ | ||
//---------------------- | ||
// <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>Fill out your program requirements. Use "Hypar Space Type" to dictate which function should be used to lay out your space.</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 ProgramRequirement : Element | ||
{ | ||
[JsonConstructor] | ||
public ProgramRequirement(string @programGroup, string @programName, Color? @color, double @areaPerSpace, int @spaceCount, double? @width, double? @depth, string @hyparSpaceType, ProgramRequirementCountType @countType, double @totalArea, System.Guid? @spaceConfig, System.Guid? @layoutTypeId, System.Guid? @catalog, System.Guid @id = default, string @name = null) | ||
: base(id, name) | ||
{ | ||
this.ProgramGroup = @programGroup; | ||
this.ProgramName = @programName; | ||
this.Color = @color; | ||
this.AreaPerSpace = @areaPerSpace; | ||
this.SpaceCount = @spaceCount; | ||
this.Width = @width; | ||
this.Depth = @depth; | ||
this.HyparSpaceType = @hyparSpaceType; | ||
this.CountType = @countType; | ||
this.TotalArea = @totalArea; | ||
this.SpaceConfig = @spaceConfig; | ||
this.LayoutTypeId = @layoutTypeId; | ||
this.Catalog = @catalog; | ||
} | ||
|
||
|
||
// Empty constructor | ||
public ProgramRequirement() | ||
: base() | ||
{ | ||
} | ||
|
||
/// <summary>What group does this program belong to?</summary> | ||
[JsonProperty("Program Group", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public string ProgramGroup { get; set; } | ||
|
||
/// <summary>What display name should be used for this program type?</summary> | ||
[JsonProperty("Program Name", Required = Newtonsoft.Json.Required.Always)] | ||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] | ||
public string ProgramName { get; set; } | ||
|
||
/// <summary>What color should be used to display this space type?</summary> | ||
[JsonProperty("Color", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public Color? Color { get; set; } | ||
|
||
/// <summary>How much area should be allocated for this space?</summary> | ||
[JsonProperty("Area per Space", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public double AreaPerSpace { get; set; } | ||
|
||
/// <summary>How many of this space type are required? Leave at 1 for spaces measured in aggregate, like circulation.</summary> | ||
[JsonProperty("Space Count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public int SpaceCount { get; set; } = 1; | ||
|
||
/// <summary>Optional. (Typically the longer dimension — along the side from which the space is accessed, like a corridor.)</summary> | ||
[JsonProperty("Width", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public double? Width { get; set; } | ||
|
||
/// <summary>Optional. (Typically the shorter dimension — perpendicular to the side from which the space is accessed, like a corridor.)</summary> | ||
[JsonProperty("Depth", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public double? Depth { get; set; } | ||
|
||
/// <summary>Which furniture layout function should be used to lay out this space?</summary> | ||
[JsonProperty("Hypar Space Type", Required = Newtonsoft.Json.Required.Always)] | ||
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] | ||
public string HyparSpaceType { get; set; } = "unspecified"; | ||
|
||
/// <summary>How should this requirement be counted? | ||
/// | ||
/// Use "Item" for individual spaces (e.g. 3 conference rooms), | ||
/// "Area Total" for spaces where you only care about the total (e.g. 1000 SF of circulation), and | ||
/// "Unit" where you want total area divided by a "unit" size (e.g. this space supports 400 people at 120 SF / person)</summary> | ||
[JsonProperty("Count Type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] | ||
public ProgramRequirementCountType CountType { get; set; } = Elements.ProgramRequirementCountType.Item; | ||
|
||
/// <summary>The Area per Space times the Space Count</summary> | ||
[JsonProperty("Total Area", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public double TotalArea { get; set; } | ||
|
||
/// <summary>The guid of the space configuration</summary> | ||
[JsonProperty("SpaceConfig", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public System.Guid? SpaceConfig { get; set; } | ||
|
||
/// <summary>The guid of the layout type</summary> | ||
[JsonProperty("Layout Type Id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public System.Guid? LayoutTypeId { get; set; } | ||
|
||
/// <summary>The guid of the catalog</summary> | ||
[JsonProperty("Catalog", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] | ||
public System.Guid? Catalog { get; set; } | ||
|
||
|
||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
SpaceConfigurationFromModel/dependencies/ProgramRequirementCountType.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,34 @@ | ||
//---------------------- | ||
// <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 | ||
|
||
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")] | ||
public enum ProgramRequirementCountType | ||
{ | ||
[System.Runtime.Serialization.EnumMember(Value = @"Item")] | ||
Item = 0, | ||
|
||
[System.Runtime.Serialization.EnumMember(Value = @"Area Total")] | ||
Area_Total = 1, | ||
|
||
} | ||
} |
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
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