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

Walls lod200 #97

Merged
merged 6 commits into from
Apr 23, 2024
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
9 changes: 9 additions & 0 deletions LayoutFunctions/WallsLOD200/.gitignore
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/
29 changes: 29 additions & 0 deletions LayoutFunctions/WallsLOD200/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": "0.2.0",
"inputs": [
{
"id": "workflowId",
"type": "promptString",
"description": "Enter the workflow id to run."
}
],
"configurations": [
{
"name": "Attach to Hypar Run",
"type": "coreclr",
"request": "attach",
"processName": "WallsLOD200.Server"
},
{
"name": "Launch Hypar Run (Run once only)",
"type": "coreclr",
"request": "launch",
"program": "${workspaceFolder}/server/bin/Debug/net6.0/WallsLOD200.Server.dll",
"args": [
"--workflow-id",
"${input:workflowId}"
],
"preLaunchTask": "server-build"
}
]
}
15 changes: 15 additions & 0 deletions LayoutFunctions/WallsLOD200/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "server-build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/server/WallsLOD200.Server.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
19 changes: 19 additions & 0 deletions LayoutFunctions/WallsLOD200/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@


# Walls LOD 200

The WallsLOD200 function.

|Input Name|Type|Description|
|---|---|---|


<br>

|Output Name|Type|Description|
|---|---|---|


<br>

## Additional Information
34 changes: 34 additions & 0 deletions LayoutFunctions/WallsLOD200/WallsLOD200.sln
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}") = "WallsLOD200", "src\WallsLOD200.csproj", "{0C340FE7-F967-4DEB-BF30-8A8EF00917FB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WallsLOD200.Dependencies", "dependencies\WallsLOD200.Dependencies.csproj", "{F6919E7E-3680-4356-B0BC-01CE5F4124C5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WallsLOD200.Tests", "test\WallsLOD200.Tests.csproj", "{A23EBAE9-531C-4B47-904A-AB0E21B846DC}"
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
{0C340FE7-F967-4DEB-BF30-8A8EF00917FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C340FE7-F967-4DEB-BF30-8A8EF00917FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C340FE7-F967-4DEB-BF30-8A8EF00917FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C340FE7-F967-4DEB-BF30-8A8EF00917FB}.Release|Any CPU.Build.0 = Release|Any CPU
{F6919E7E-3680-4356-B0BC-01CE5F4124C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F6919E7E-3680-4356-B0BC-01CE5F4124C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F6919E7E-3680-4356-B0BC-01CE5F4124C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F6919E7E-3680-4356-B0BC-01CE5F4124C5}.Release|Any CPU.Build.0 = Release|Any CPU
{A23EBAE9-531C-4B47-904A-AB0E21B846DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A23EBAE9-531C-4B47-904A-AB0E21B846DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A23EBAE9-531C-4B47-904A-AB0E21B846DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A23EBAE9-531C-4B47-904A-AB0E21B846DC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
58 changes: 58 additions & 0 deletions LayoutFunctions/WallsLOD200/dependencies/Level.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
//----------------------
// <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>A horizontal datum representing a building level at a specific elevation.</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 Level : Element
{
[JsonConstructor]
public Level(double @elevation, double? @height, System.Guid? @planView, System.Guid @id = default, string @name = null)
: base(id, name)
{
this.Elevation = @elevation;
this.Height = @height;
this.PlanView = @planView;
}


// Empty constructor
public Level()
: base()
{
}

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

/// <summary>The vertical distance from this level to the next. May be null for a top level, like a roof.</summary>
[JsonProperty("Height", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public double? Height { 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; }


}
}
22 changes: 22 additions & 0 deletions LayoutFunctions/WallsLOD200/dependencies/LineEqualityComparer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Elements.Geometry;

namespace WallsLOD200
{

public class LineEqualityComparer : IEqualityComparer<Line>
{
public bool Equals(Line? x, Line? y)
{
if (x != null && y != null)
{
return (x.Start.IsAlmostEqualTo(y.Start) && x.End.IsAlmostEqualTo(y.End)) || (x.Start.IsAlmostEqualTo(y.End) && x.End.IsAlmostEqualTo(y.Start));
}
return false;
}

public int GetHashCode(Line obj)
{
return obj.GetHashCode();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Hypar.Elements" Version="2.1.0" />
<PackageReference Include="Hypar.Functions" Version="1.10.0" />
</ItemGroup>

</Project>
49 changes: 49 additions & 0 deletions LayoutFunctions/WallsLOD200/dependencies/WallsLOD200Inputs.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// This code was generated by Hypar.
// Edits to this code will be overwritten the next time you run 'hypar init'.
// DO NOT EDIT THIS FILE.

using Elements;
using Elements.GeoJSON;
using Elements.Geometry;
using Elements.Geometry.Solids;
using Elements.Validators;
using Elements.Serialization.JSON;
using Hypar.Functions;
using Hypar.Functions.Execution;
using Hypar.Functions.Execution.AWS;
using Hypar.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using Line = Elements.Geometry.Line;
using Polygon = Elements.Geometry.Polygon;

namespace WallsLOD200
{
#pragma warning disable // Disable all warnings

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

public class WallsLOD200Inputs : ArgsBase

{
[Newtonsoft.Json.JsonConstructor]

public WallsLOD200Inputs(Dictionary<string, string> modelInputKeys, string gltfKey, string elementsKey, string ifcKey):
base(modelInputKeys, gltfKey, elementsKey, ifcKey)
{
var validator = Validator.Instance.GetFirstValidatorForType<WallsLOD200Inputs>();
if(validator != null)
{
validator.PreConstruct(new object[]{ });
}


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

}
}
29 changes: 29 additions & 0 deletions LayoutFunctions/WallsLOD200/dependencies/WallsLOD200Outputs.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// This code was generated by Hypar.
// Edits to this code will be overwritten the next time you run 'hypar init'.
// DO NOT EDIT THIS FILE.

using Elements;
using Elements.GeoJSON;
using Elements.Geometry;
using Hypar.Functions;
using Hypar.Functions.Execution;
using Hypar.Functions.Execution.AWS;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Collections.Generic;

namespace WallsLOD200
{
public class WallsLOD200Outputs: SystemResults
{

/// <summary>
/// Construct a WallsLOD200Outputs with default inputs.
/// This should be used for testing only.
/// </summary>
public WallsLOD200Outputs() : base()
{
}

}
}
7 changes: 7 additions & 0 deletions LayoutFunctions/WallsLOD200/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

{
"sdk": {
"version": "6.0.400",
"rollForward": "latestMinor"
}
}
23 changes: 23 additions & 0 deletions LayoutFunctions/WallsLOD200/hypar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://hypar.io/Schemas/Function.json",
"id": "35198423-a74c-4d58-9a9d-c88798dc6bfa",
"name": "Walls LOD 200",
"description": "The WallsLOD200 function.",
"language": "C#",
"model_output": "Walls:LOD200",
"model_dependencies": [
{
"name": "Walls"
},
{
"name": "Levels",
"optional": true
}
],
"element_types": [
"https://schemas.hypar.io/Level.json"
],
"repository_url": "https://github.com/hypar-io/function",
"last_updated": "0001-01-01T00:00:00",
"cli_version": "1.11.0-alpha.18"
}
Loading
Loading