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

Upgrade Elements and Functions packages to support Design Options #15

Merged
merged 1 commit into from
Feb 20, 2025
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
6 changes: 5 additions & 1 deletion dependencies/ConceptualMass.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ namespace Elements
public partial class ConceptualMass : Envelope
{
[JsonConstructor]
public ConceptualMass(IList<Line> @skeleton, string @primaryUseCategory, System.Guid? @building, IList<System.Guid> @levelIds, Transform @localCoordinateSystem, Profile @profile, double @elevation, double @height, Vector3 @direction, double @rotation, IList<double> @floorToFloorHeights, Transform @transform, Material @material, Representation @representation, bool @isElementDefinition, System.Guid @id, string @name)
public ConceptualMass(IList<Line> @skeleton, string @primaryUseCategory, System.Guid? @building, IList<System.Guid> @levelIds, Transform @localCoordinateSystem, Profile @boundary, Profile @profile, double @elevation, double @height, Vector3 @direction, double @rotation, IList<double> @floorToFloorHeights, Transform @transform, Material @material, Representation @representation, bool @isElementDefinition, System.Guid @id, string @name)
: base(profile, elevation, height, direction, rotation, floorToFloorHeights, transform, material, representation, isElementDefinition, id, name)
{
this.Skeleton = @skeleton;
this.PrimaryUseCategory = @primaryUseCategory;
this.Building = @building;
this.LevelIds = @levelIds;
this.LocalCoordinateSystem = @localCoordinateSystem;
this.Boundary = @boundary;
}


Expand Down Expand Up @@ -64,6 +65,9 @@ public ConceptualMass()
[JsonProperty("Local Coordinate System", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Transform LocalCoordinateSystem { get; set; }

[JsonProperty("Boundary", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Profile Boundary { get; set; }


}
}
57 changes: 57 additions & 0 deletions dependencies/InitialDimensions.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//----------------------
// <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 partial class InitialDimensions
{
[JsonConstructor]
public InitialDimensions(double @width, double @depth)
{
this.Width = @width;
this.Depth = @depth;
}


// Empty constructor
public InitialDimensions()
{
}

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

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

private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();

[JsonExtensionData]
public System.Collections.Generic.IDictionary<string, object> AdditionalProperties
{
get { return _additionalProperties; }
set { _additionalProperties = value; }
}


}
}
6 changes: 5 additions & 1 deletion dependencies/SpaceBoundary.g.cs
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? @programRequirement, System.Guid? @level, System.Guid? @levelLayout, string @hyparSpaceType, string @defaultWallType, 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, Type @type, System.Guid? @programRequirement, System.Guid? @level, System.Guid? @levelLayout, string @hyparSpaceType, string @defaultWallType, 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.Type = @type;
this.ProgramRequirement = @programRequirement;
this.Level = @level;
this.LevelLayout = @levelLayout;
Expand Down Expand Up @@ -84,6 +85,9 @@ public SpaceBoundary()
[JsonProperty("Program Type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ProgramType { get; set; }

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

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

Expand Down
6 changes: 3 additions & 3 deletions dependencies/SpacePlanning.Dependencies.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
ο»Ώ<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Hypar.Elements" Version="2.2.0-alpha.21" />
<PackageReference Include="Hypar.Functions" Version="1.11.0-alpha.13" />
<PackageReference Include="Hypar.Elements" Version="2.3.0-alpha.5" />
<PackageReference Include="Hypar.Functions" Version="1.13.1-alpha.21" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
Expand Down
69 changes: 69 additions & 0 deletions dependencies/Type.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
//----------------------
// <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 partial class Type
{
[JsonConstructor]
public Type(string @configurationSource, string @name, System.Guid @id, bool @profileLinkedToType, InitialDimensions @initialDimensions)
{
this.ConfigurationSource = @configurationSource;
this.Name = @name;
this.Id = @id;
this.ProfileLinkedToType = @profileLinkedToType;
this.InitialDimensions = @initialDimensions;
}


// Empty constructor
public Type()
{
}

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

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

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

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

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

private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();

[JsonExtensionData]
public System.Collections.Generic.IDictionary<string, object> AdditionalProperties
{
get { return _additionalProperties; }
set { _additionalProperties = value; }
}


}
}
12 changes: 11 additions & 1 deletion dependencies/ViewScope.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ namespace Elements
public partial class ViewScope : Element
{
[JsonConstructor]
public ViewScope(BBox3 @boundingBox, Camera @camera, bool? @lockRotation, bool? @clipWithBoundingBox, ViewScopeClippingBehavior? @clippingBehavior, bool? @modal, System.Collections.Generic.IDictionary<string, string> @functionVisibility, IList<object> @actions, System.Guid @id = default, string @name = null)
public ViewScope(BBox3 @boundingBox, Camera @camera, bool? @lockRotation, bool? @lockPosition, bool? @lockZoom, bool? @clipWithBoundingBox, ViewScopeClippingBehavior? @clippingBehavior, bool? @modal, System.Collections.Generic.IDictionary<string, string> @functionVisibility, IList<object> @actions, System.Guid @id = default, string @name = null)
: base(id, name)
{
this.BoundingBox = @boundingBox;
this.Camera = @camera;
this.LockRotation = @lockRotation;
this.LockPosition = @lockPosition;
this.LockZoom = @lockZoom;
this.ClipWithBoundingBox = @clipWithBoundingBox;
this.ClippingBehavior = @clippingBehavior;
this.Modal = @modal;
Expand All @@ -59,6 +61,14 @@ public ViewScope()
[JsonProperty("Lock Rotation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? LockRotation { get; set; }

/// <summary>Whether this scope should lock view position. True to lock, False to unlock, and null to leave unchanged.</summary>
[JsonProperty("Lock Position", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? LockPosition { get; set; }

/// <summary>Whether this scope should lock view zoom. True to lock, False to unlock, and null to leave unchanged.</summary>
[JsonProperty("Lock Zoom", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? LockZoom { get; set; }

/// <summary>Whether this scope should clip to the specified bounding box. If false, it only zooms to the bounding box without clipping.</summary>
[JsonProperty("Clip With Bounding Box", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? ClipWithBoundingBox { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/SpacePlanning.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<ProjectReference Include="..\dependencies\SpacePlanning.Dependencies.csproj" />
</ItemGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
</Project>
3 changes: 2 additions & 1 deletion test/SpacePlanning.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ο»Ώ<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
Expand Down