Skip to content

Commit

Permalink
Merge commit '853b29344a40391cb802a3da2130c3c2bba5ae3e' into going-back
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonie-kramer committed Dec 14, 2023
2 parents 6c37b70 + 853b293 commit f75654a
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LayoutFunctions/LayoutFunctionCommon/WallGeneration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public static List<RoomEdge> SplitOverlappingWallCandidates(IEnumerable<RoomEdge
resultCandidates.Add(candidate);
continue;
}
var linesOrderedByLength = collinearLinesGroup.Value.OrderByDescending(v => v.Line.Length());
var linesOrderedByLength = collinearLinesGroup.Value.Where(x => !x.Item2.Contains("Partition")).OrderByDescending(v => v.Line.Length());

var dominantLineForGroup = linesOrderedByLength.FirstOrDefault(x => x.PrimaryEntryEdge == true);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<ItemGroup>
<ProjectReference Include="..\src\PrivateOfficeLayout.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Hypar.Server" Version="1.11.0-alpha.13" />
</ItemGroup>

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

</Project>
26 changes: 26 additions & 0 deletions LayoutFunctions/PrivateOfficeLayout/server/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

using System;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;
using System.Linq;

namespace Hypar.Server
{
public class Program
{
public static async Task Main(string[] args)
{
await HyparServer.StartAsync(
args,
Path.GetFullPath(Path.Combine(Assembly.GetExecutingAssembly().Location, "../../../../..")),
async (executionRequest) =>
{
var input = executionRequest.Args.ToObject<PrivateOfficeLayout.PrivateOfficeLayoutInputs>();
var function = new PrivateOfficeLayout.Function();
Directory.SetCurrentDirectory(Path.GetDirectoryName(typeof(PrivateOfficeLayout.Function).Assembly.Location)!);
return await function.Handler(input);
});
}
}
}

0 comments on commit f75654a

Please sign in to comment.