Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove SpaceMetrics overrides #64

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions WorkplaceStrategy/WorkplaceMetrics/dependencies/CoreArea.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ namespace Elements
public partial class CoreArea : SpaceBoundary
{
[JsonConstructor]
public CoreArea(System.Guid @core, Profile @boundary, IList<Polygon> @cells, double @area, double? @length, double? @depth, double @height, string @programGroup, string @programType, System.Guid? @level, System.Guid? @levelLayout, string @hyparSpaceType, Transform @transform, Material @material, Representation @representation, bool @isElementDefinition, System.Guid @id, string @name)
: base(boundary, cells, area, length, depth, height, programGroup, programType, level, levelLayout, hyparSpaceType, transform, material, representation, isElementDefinition, id, name)
public CoreArea(System.Guid @core, Profile @boundary, IList<Polygon> @cells, double @area, double? @length, double? @depth, double @height, string @programGroup, string @programType, System.Guid? @programRequirement, System.Guid? @level, System.Guid? @levelLayout, string @hyparSpaceType, Transform @transform, Material @material, Representation @representation, bool @isElementDefinition, System.Guid @id, string @name)
: base(boundary, cells, area, length, depth, height, programGroup, programType, programRequirement, level, levelLayout, hyparSpaceType, transform, material, representation, isElementDefinition, id, name)
{
this.Core = @core;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Elements
public partial class SpaceBoundary : GeometricElement
{
[JsonConstructor]
public SpaceBoundary(Profile @boundary, IList<Polygon> @cells, double @area, double? @length, double? @depth, double @height, string @programGroup, string @programType, System.Guid? @level, System.Guid? @levelLayout, string @hyparSpaceType, Transform @transform = null, Material @material = null, Representation @representation = null, bool @isElementDefinition = false, System.Guid @id = default, string @name = null)
public SpaceBoundary(Profile @boundary, IList<Polygon> @cells, double @area, double? @length, double? @depth, double @height, string @programGroup, string @programType, System.Guid? @programRequirement, System.Guid? @level, System.Guid? @levelLayout, string @hyparSpaceType, 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.Boundary = @boundary;
Expand All @@ -38,6 +38,7 @@ public SpaceBoundary(Profile @boundary, IList<Polygon> @cells, double @area, dou
this.Height = @height;
this.ProgramGroup = @programGroup;
this.ProgramType = @programType;
this.ProgramRequirement = @programRequirement;
this.Level = @level;
this.LevelLayout = @levelLayout;
this.HyparSpaceType = @hyparSpaceType;
Expand Down Expand Up @@ -78,9 +79,12 @@ public SpaceBoundary()
public string ProgramGroup { get; set; }

/// <summary>The name of the program type assigned to this space (like "Open Office" or "Meeting Room")</summary>
[JsonProperty("Program Type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
[JsonProperty("Program Type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ProgramType { get; set; }

[JsonProperty("Program Requirement", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Guid? ProgramRequirement { get; set; }

[JsonProperty("Level", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Guid? Level { get; set; }

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,15 @@ public partial class Overrides
public Overrides() { }

[Newtonsoft.Json.JsonConstructor]
public Overrides(IList<SettingsOverride> @settings, IList<SpaceMetricsOverride> @spaceMetrics)
public Overrides(IList<SettingsOverride> @settings)
{
var validator = Validator.Instance.GetFirstValidatorForType<Overrides>();
if(validator != null)
{
validator.PreConstruct(new object[]{ @settings, @spaceMetrics});
validator.PreConstruct(new object[]{ @settings});
}

this.Settings = @settings ?? this.Settings;
this.SpaceMetrics = @spaceMetrics ?? this.SpaceMetrics;

if(validator != null)
{
Expand All @@ -118,9 +117,6 @@ public Overrides(IList<SettingsOverride> @settings, IList<SpaceMetricsOverride>
[Newtonsoft.Json.JsonProperty("Settings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public IList<SettingsOverride> Settings { get; set; } = new List<SettingsOverride>();

[Newtonsoft.Json.JsonProperty("Space Metrics", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public IList<SpaceMetricsOverride> SpaceMetrics { get; set; } = new List<SpaceMetricsOverride>();

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")]
Expand Down Expand Up @@ -160,41 +156,6 @@ public SettingsOverride(string @id, SettingsIdentity @identity, SettingsValue @v

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")]

public partial class SpaceMetricsOverride

{
[Newtonsoft.Json.JsonConstructor]
public SpaceMetricsOverride(string @id, SpaceMetricsIdentity @identity, SpaceMetricsValue @value)
{
var validator = Validator.Instance.GetFirstValidatorForType<SpaceMetricsOverride>();
if(validator != null)
{
validator.PreConstruct(new object[]{ @id, @identity, @value});
}

this.Id = @id;
this.Identity = @identity;
this.Value = @value;

if(validator != null)
{
validator.PostConstruct(this);
}
}

[Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Id { get; set; }

[Newtonsoft.Json.JsonProperty("Identity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public SpaceMetricsIdentity Identity { get; set; }

[Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public SpaceMetricsValue Value { get; set; }

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")]

public partial class SettingsIdentity

{
Expand Down Expand Up @@ -247,70 +208,4 @@ public SettingsValue(double @usableArea)
public double UsableArea { get; set; }

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")]

public partial class SpaceMetricsIdentity

{
[Newtonsoft.Json.JsonConstructor]
public SpaceMetricsIdentity(Vector3 @parentCentroid)
{
var validator = Validator.Instance.GetFirstValidatorForType<SpaceMetricsIdentity>();
if(validator != null)
{
validator.PreConstruct(new object[]{ @parentCentroid});
}

this.ParentCentroid = @parentCentroid;

if(validator != null)
{
validator.PostConstruct(this);
}
}

[Newtonsoft.Json.JsonProperty("ParentCentroid", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Vector3 ParentCentroid { get; set; }

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")]

public partial class SpaceMetricsValue

{
[Newtonsoft.Json.JsonConstructor]
public SpaceMetricsValue(double @seats, double @headcount, double @desks, double @collaborationSeats)
{
var validator = Validator.Instance.GetFirstValidatorForType<SpaceMetricsValue>();
if(validator != null)
{
validator.PreConstruct(new object[]{ @seats, @headcount, @desks, @collaborationSeats});
}

this.Seats = @seats;
this.Headcount = @headcount;
this.Desks = @desks;
this.CollaborationSeats = @collaborationSeats;

if(validator != null)
{
validator.PostConstruct(this);
}
}

[Newtonsoft.Json.JsonProperty("Seats", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public double Seats { get; set; }

[Newtonsoft.Json.JsonProperty("Headcount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public double Headcount { get; set; }

[Newtonsoft.Json.JsonProperty("Desks", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public double Desks { get; set; }

[Newtonsoft.Json.JsonProperty("Collaboration Seats", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public double CollaborationSeats { get; set; }

}
}
25 changes: 0 additions & 25 deletions WorkplaceStrategy/WorkplaceMetrics/hypar.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,31 +222,6 @@
"$hyparUnitType": "area"
}
}
},
"Space Metrics": {
"$hyparOrder": 1,
"dependency": "Space Planning Zones",
"context": "[*discriminator=Elements.SpaceBoundary]",
"identity": {
"ParentCentroid": {
"$ref": "https://hypar.io/Schemas/Geometry/Vector3.json"
}
},
"paradigm": "edit",
"schema": {
"Seats": {
"type": "number"
},
"Headcount": {
"type": "number"
},
"Desks": {
"type": "number"
},
"Collaboration Seats": {
"type": "number"
}
}
}
},
"outputs": [
Expand Down
Loading
Loading