Skip to content

Commit

Permalink
Merge branch 'master' into nvolyk/add-overrides-for-interior-partitions
Browse files Browse the repository at this point in the history
  • Loading branch information
serenayl committed Jul 12, 2023
2 parents 036ea8f + 6436398 commit 6d0ec2e
Show file tree
Hide file tree
Showing 60 changed files with 964 additions and 494 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build-on-PR.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build on PR

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: repos/HyparSpace
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
6.0.x
- run: dotnet tool install -g hypar.cli --version 1.6.0
- run: echo "${HOME}/.dotnet/tools" >> $GITHUB_PATH
- run:
cd repos/HyparSpace;
bash build-all.sh;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Hypar.Elements" Version="1.5.0" />
<PackageReference Include="Hypar.Elements" Version="2.0.0-alpha.18" />
<PackageReference Include="Hypar.Functions" Version="1.6.0" />
<!-- <PackageReference Include="Hypar.Space.LayoutFunctionCommon" Version="1.4.0" /> -->
</ItemGroup>
Expand Down
58 changes: 0 additions & 58 deletions LayoutFunctions/ClassroomLayout/dependencies/Floor.g.cs

This file was deleted.

4 changes: 4 additions & 0 deletions LayoutFunctions/CustomLayout/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ Create custom space types.
|Output Name|Type|Description|
|---|---|---|


<br>

## Additional Information
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//----------------------
// <auto-generated>
// 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)
// </auto-generated>
//----------------------
using Elements;
Expand All @@ -23,15 +23,14 @@ namespace Elements

/// <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 v12.0.0.0)")]
[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, System.Guid @level, Profile @profile, double @thickness, Transform @transform, Material @material, Representation @representation, bool @isElementDefinition, System.Guid @id, string @name)
: base(profile, thickness, transform, material, representation, isElementDefinition, id, name)
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;
this.Level = @level;
}

// Empty constructor
Expand All @@ -44,10 +43,6 @@ public CirculationSegment()
[JsonProperty("Geometry", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public ThickenedPolyline Geometry { get; set; }

/// <summary>The level this circulation segment belongs to</summary>
[JsonProperty("Level", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Guid Level { get; set; }


}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\LayoutFunctionCommon\LayoutFunctionCommon.csproj" />
<!-- <PackageReference Include="Hypar.Elements" Version="0.9.2-alpha.3" /> -->
</ItemGroup>

<ItemGroup>
<PackageReference Include="Hypar.Elements" Version="1.5.0" />
<PackageReference Include="Hypar.Elements" Version="2.0.0-alpha.18" />
<PackageReference Include="Hypar.Functions" Version="1.6.0" />
<PackageReference Include="Hypar.Elements.Components" Version="1.5.0" />
<PackageReference Include="Hypar.Elements.Components" Version="2.0.0-alpha.18" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace CustomSpaceType
{
#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 CustomSpaceTypeInputs : S3Args

Expand Down Expand Up @@ -55,7 +55,7 @@ public CustomSpaceTypeInputs(IList<Layouts> @layouts, Overrides @overrides, stri

}

[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 Layouts

Expand Down Expand Up @@ -107,7 +107,7 @@ public System.Collections.Generic.IDictionary<string, object> AdditionalProperti
}
}

[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

Expand Down Expand Up @@ -136,7 +136,7 @@ public Overrides(IList<TransformOverride> @transform)

}

[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 TransformOverride

Expand Down Expand Up @@ -171,7 +171,7 @@ public TransformOverride(string @id, TransformIdentity @identity, TransformValue

}

[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 TransformIdentity

Expand Down Expand Up @@ -202,7 +202,7 @@ public TransformIdentity(string @name, TransformIdentityBaseDefinition @baseDefi

}

[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 TransformValue

Expand All @@ -229,7 +229,7 @@ public TransformValue(Transform @transform)

}

[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 TransformIdentityBaseDefinition

Expand Down
4 changes: 2 additions & 2 deletions LayoutFunctions/CustomLayout/dependencies/LevelElements.g.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//----------------------
// <auto-generated>
// 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)
// </auto-generated>
//----------------------
using Elements;
Expand All @@ -23,7 +23,7 @@ namespace Elements

/// <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 v12.0.0.0)")]
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.21.0 (Newtonsoft.Json v13.0.0.0)")]
public partial class LevelElements : Element
{
[JsonConstructor]
Expand Down
21 changes: 18 additions & 3 deletions LayoutFunctions/CustomLayout/dependencies/LevelVolume.g.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//----------------------
// <auto-generated>
// 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)
// </auto-generated>
//----------------------
using Elements;
Expand All @@ -23,17 +23,20 @@ namespace Elements

/// <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 v12.0.0.0)")]
[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, Transform @transform = null, Material @material = null, Representation @representation = null, bool @isElementDefinition = false, System.Guid @id = default, string @name = null)
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
Expand All @@ -58,6 +61,18 @@ public LevelVolume()
[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; }


}
}
20 changes: 17 additions & 3 deletions LayoutFunctions/CustomLayout/dependencies/SpaceBoundary.g.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//----------------------
// <auto-generated>
// 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)
// </auto-generated>
//----------------------
using Elements;
Expand All @@ -23,11 +23,11 @@ namespace Elements

/// <summary>A profile with a program assigned to it, and optional internal cell geometry. </summary>
[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 SpaceBoundary : GeometricElement
{
[JsonConstructor]
public SpaceBoundary(Profile @boundary, IList<Polygon> @cells, double @area, double? @length, double? @depth, double @height, string @programGroup, string @programType, 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? @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,9 @@ public SpaceBoundary(Profile @boundary, IList<Polygon> @cells, double @area, dou
this.Height = @height;
this.ProgramGroup = @programGroup;
this.ProgramType = @programType;
this.Level = @level;
this.LevelLayout = @levelLayout;
this.HyparSpaceType = @hyparSpaceType;
}

// Empty constructor
Expand Down Expand Up @@ -78,6 +81,17 @@ public SpaceBoundary()
[JsonProperty("Program Type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string ProgramType { get; set; }

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

/// <summary>The layout, if any, which generated this space boundary.</summary>
[JsonProperty("Level Layout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Guid? LevelLayout { get; set; }

/// <summary>The hypar-recognized space type name which will be used to determine which layout function to apply. In older space boundaries, this may not be set — fall back to the Name property for this purpose if not provided.</summary>
[JsonProperty("Hypar Space Type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string HyparSpaceType { get; set; }


}
}
14 changes: 7 additions & 7 deletions LayoutFunctions/CustomLayout/dependencies/ThickenedPolyline.g.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//----------------------
// <auto-generated>
// 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)
// </auto-generated>
//----------------------
using Elements;
Expand All @@ -23,11 +23,11 @@ namespace Elements

/// <summary>A polyline that has been thickened into a polygon.</summary>
[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 ThickenedPolyline
{
[JsonConstructor]
public ThickenedPolyline(Polyline @polyline, double @width, bool @flip, double @leftWidth, double @rightWidth)
public ThickenedPolyline(Polyline @polyline, double? @width, bool? @flip, double @leftWidth, double @rightWidth)
{
this.Polyline = @polyline;
this.Width = @width;
Expand All @@ -44,11 +44,11 @@ public ThickenedPolyline()
[JsonProperty("polyline", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public Polyline Polyline { get; set; }

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

[JsonProperty("flip", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool Flip { get; set; }
[JsonProperty("flip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public bool? Flip { get; set; }

/// <summary>The amount to thicken the polyline on its "left" side, imagining that the polyline is extending away from you. That is, if the polyline starts at (0,0,0) and follows the +Z axis, the left side extends into the -X quadrant.</summary>
[JsonProperty("leftWidth", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
Expand Down
2 changes: 1 addition & 1 deletion LayoutFunctions/CustomLayout/global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{
"sdk": {
"version": "3.1.100",
"version": "6.0.400",
"rollForward": "latestMinor"
}
}
Loading

0 comments on commit 6d0ec2e

Please sign in to comment.