Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into sketch-grids
Browse files Browse the repository at this point in the history
  • Loading branch information
ikeough committed Nov 28, 2023
2 parents 9546112 + 66954ab commit f15ebe8
Show file tree
Hide file tree
Showing 380 changed files with 7,880 additions and 1,611 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/BuildingBlocks
- 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/BuildingBlocks;
bash build-all.sh;
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ input.json
*.nupkg
nupkg
server
/test/Generated/*
19 changes: 0 additions & 19 deletions .vscode/launch.json

This file was deleted.

45 changes: 40 additions & 5 deletions BuildingBlocks.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31729.503
# Visual Studio Version 17
VisualStudioVersion = 17.5.33424.131
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Columns", "Columns", "{037E922C-9117-4D14-AF83-F2F8B9C56127}"
EndProject
Expand Down Expand Up @@ -181,13 +181,21 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Walls", "Walls", "{E05386D8
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Walls", "Walls\Walls\src\Walls.csproj", "{D1AD5E24-D35D-4BB0-A497-E14A6600F144}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Walls.Tests", "Walls\Walls\test\Walls.Tests.csproj", "{AE1D189A-1A63-4434-9DB0-B20A5351CD8F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Walls.Tests", "Walls\Walls\test\Walls.Tests.csproj", "{AE1D189A-1A63-4434-9DB0-B20A5351CD8F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "People", "People", "{C2B7E2AB-CC72-4984-AE21-FE36D811867F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "People", "People\src\People.csproj", "{2B25CB4A-BD82-4605-8C5A-956E311D7D33}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "People", "People\src\People.csproj", "{2B25CB4A-BD82-4605-8C5A-956E311D7D33}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EntourageScatterer.Tests", "People\test\EntourageScatterer.Tests.csproj", "{D9A72AF7-215C-4FD9-8973-0EE74594F163}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntourageScatterer.Tests", "People\test\EntourageScatterer.Tests.csproj", "{D9A72AF7-215C-4FD9-8973-0EE74594F163}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Grids", "Grids", "{2D92E862-FBD1-458F-A455-026431F4C0F7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Grid", "Grid", "{5B1C5765-D89E-488B-8646-A768B85B8E0E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grid", "Grids\Grid\src\Grid.csproj", "{A0C5D710-5EC0-49C4-8F52-ADF7510F2AD5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Grid.Tests", "Grids\Grid\test\Grid.Tests.csproj", "{7B9F5991-E699-4A7A-9473-54AC9B7486E5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -847,6 +855,30 @@ Global
{D9A72AF7-215C-4FD9-8973-0EE74594F163}.Release|x64.Build.0 = Release|Any CPU
{D9A72AF7-215C-4FD9-8973-0EE74594F163}.Release|x86.ActiveCfg = Release|Any CPU
{D9A72AF7-215C-4FD9-8973-0EE74594F163}.Release|x86.Build.0 = Release|Any CPU
{A0C5D710-5EC0-49C4-8F52-ADF7510F2AD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0C5D710-5EC0-49C4-8F52-ADF7510F2AD5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0C5D710-5EC0-49C4-8F52-ADF7510F2AD5}.Debug|x64.ActiveCfg = Debug|Any CPU
{A0C5D710-5EC0-49C4-8F52-ADF7510F2AD5}.Debug|x64.Build.0 = Debug|Any CPU
{A0C5D710-5EC0-49C4-8F52-ADF7510F2AD5}.Debug|x86.ActiveCfg = Debug|Any CPU
{A0C5D710-5EC0-49C4-8F52-ADF7510F2AD5}.Debug|x86.Build.0 = Debug|Any CPU
{A0C5D710-5EC0-49C4-8F52-ADF7510F2AD5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A0C5D710-5EC0-49C4-8F52-ADF7510F2AD5}.Release|Any CPU.Build.0 = Release|Any CPU
{A0C5D710-5EC0-49C4-8F52-ADF7510F2AD5}.Release|x64.ActiveCfg = Release|Any CPU
{A0C5D710-5EC0-49C4-8F52-ADF7510F2AD5}.Release|x64.Build.0 = Release|Any CPU
{A0C5D710-5EC0-49C4-8F52-ADF7510F2AD5}.Release|x86.ActiveCfg = Release|Any CPU
{A0C5D710-5EC0-49C4-8F52-ADF7510F2AD5}.Release|x86.Build.0 = Release|Any CPU
{7B9F5991-E699-4A7A-9473-54AC9B7486E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B9F5991-E699-4A7A-9473-54AC9B7486E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B9F5991-E699-4A7A-9473-54AC9B7486E5}.Debug|x64.ActiveCfg = Debug|Any CPU
{7B9F5991-E699-4A7A-9473-54AC9B7486E5}.Debug|x64.Build.0 = Debug|Any CPU
{7B9F5991-E699-4A7A-9473-54AC9B7486E5}.Debug|x86.ActiveCfg = Debug|Any CPU
{7B9F5991-E699-4A7A-9473-54AC9B7486E5}.Debug|x86.Build.0 = Debug|Any CPU
{7B9F5991-E699-4A7A-9473-54AC9B7486E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B9F5991-E699-4A7A-9473-54AC9B7486E5}.Release|Any CPU.Build.0 = Release|Any CPU
{7B9F5991-E699-4A7A-9473-54AC9B7486E5}.Release|x64.ActiveCfg = Release|Any CPU
{7B9F5991-E699-4A7A-9473-54AC9B7486E5}.Release|x64.Build.0 = Release|Any CPU
{7B9F5991-E699-4A7A-9473-54AC9B7486E5}.Release|x86.ActiveCfg = Release|Any CPU
{7B9F5991-E699-4A7A-9473-54AC9B7486E5}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -931,6 +963,9 @@ Global
{AE1D189A-1A63-4434-9DB0-B20A5351CD8F} = {E05386D8-EEA3-466E-AC44-FDF706AD93A5}
{2B25CB4A-BD82-4605-8C5A-956E311D7D33} = {C2B7E2AB-CC72-4984-AE21-FE36D811867F}
{D9A72AF7-215C-4FD9-8973-0EE74594F163} = {C2B7E2AB-CC72-4984-AE21-FE36D811867F}
{5B1C5765-D89E-488B-8646-A768B85B8E0E} = {2D92E862-FBD1-458F-A455-026431F4C0F7}
{A0C5D710-5EC0-49C4-8F52-ADF7510F2AD5} = {5B1C5765-D89E-488B-8646-A768B85B8E0E}
{7B9F5991-E699-4A7A-9473-54AC9B7486E5} = {5B1C5765-D89E-488B-8646-A768B85B8E0E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2A6BDE75-6AB8-4471-82D0-D7B9220453B7}
Expand Down
7 changes: 7 additions & 0 deletions Columns/ColumnsByFloors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@ Creates a grid of columns on each floor with the central intervals spanning the
<br>

## Additional Information







3 changes: 2 additions & 1 deletion Columns/ColumnsByFloors/global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

{
"sdk": {
"version": "3.1.100",
"version": "6.0.400",
"rollForward": "latestMinor"
}
}
4 changes: 1 addition & 3 deletions Columns/ColumnsByFloors/hypar.json

Large diffs are not rendered by default.

29 changes: 16 additions & 13 deletions Columns/ColumnsByFloors/src/ColumnsByFloors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@ public static class ColumnsByFloors
/// <returns>A ColumnsByFloorsOutputs instance containing computed results and the model with any new elements.</returns>
public static ColumnsByFloorsOutputs Execute(Dictionary<string, Model> inputModels, ColumnsByFloorsInputs input)
{
var output = new ColumnsByFloorsOutputs();
var allFloors = new List<Floor>();
inputModels.TryGetValue("Floors", out var flrModel);
if (flrModel == null || flrModel.AllElementsOfType<Floor>().Count() == 0)
if (flrModel == null)
{
throw new ArgumentException("No Floors found.");
output.Errors.Add("The model output named 'Floors' could not be found. Check the upstream functions for errors.");
return output;
}
else if (flrModel.AllElementsOfType<Floor>().Count() == 0)
{
output.Errors.Add($"No Floors found in the model 'Floors'. Check the output from the function upstream that has a model output 'Floors'.");
return output;
}
allFloors.AddRange(flrModel.AllElementsOfType<Floor>());
var floorGroups = new List<List<Floor>>();
Expand Down Expand Up @@ -67,20 +74,16 @@ public static ColumnsByFloorsOutputs Execute(Dictionary<string, Model> inputMode
{
continue;
}
columns.Add(new Column()
{
Location = point,
Height = height,
Profile = Polygon.Rectangle(input.ColumnDiameter, input.ColumnDiameter),
Material = BuiltInMaterials.Concrete,
Transform = new Transform(0, 0, floor.Elevation + floor.Thickness),
Rotation = input.GridRotation
});

columns.Add(new Column(point, height, new Line(point, point + Vector3.ZAxis * height),
Polygon.Rectangle(input.ColumnDiameter, input.ColumnDiameter), 0, 0, input.GridRotation, new Transform(0, 0, floor.Elevation + floor.Thickness),
BuiltInMaterials.Concrete, null, false, Guid.NewGuid(), "ColumnsByFloors"));
}
}
}
var output = new ColumnsByFloorsOutputs(columns.Count());
columns.ForEach(c => output.Model.AddElement(c));

output.ColumnQuantity = columns.Count;
output.Model.AddElements(columns);
return output;
}
}
Expand Down
6 changes: 5 additions & 1 deletion Columns/ColumnsByFloors/src/ColumnsByFloors.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
<ItemGroup>
<PackageReference Include="GeometryEx" Version="6.10.0" />
<PackageReference Include="Hypar.Elements" Version="1.4.0" />
<PackageReference Include="Hypar.Functions" Version="1.3.0" />
<PackageReference Include="Hypar.Functions" Version="1.4.0" />
</ItemGroup>

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

</Project>
2 changes: 1 addition & 1 deletion Columns/ColumnsByFloors/src/ColumnsByFloorsInputs.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace ColumnsByFloors
{
#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 ColumnsByFloorsInputs : S3Args

Expand Down
3 changes: 3 additions & 0 deletions Columns/ColumnsByFloors/test/ColumnsByFloors.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@
<ProjectReference Include="..\src\ColumnsByFloors.csproj" />
</ItemGroup>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
</Project>
2 changes: 0 additions & 2 deletions Columns/ColumnsFromGrid/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ obj/
output.json
input.json
.vs/**/*.*
*.g.cs

**/test/results/
**/Generated/
4 changes: 3 additions & 1 deletion Columns/ColumnsFromGrid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

# Columns from Grid

Create Columns from a grid.
Create Columns.

|Input Name|Type|Description|
|---|---|---|
|Height|number|Default height for columns, if it can't be inferred from context.|
|Width|number|Default width for columns.|
|Depth|number|Default depth for columns.|
|Finish Thickness|number|Default finish thickness for structural columns.|
|Create All Columns|boolean|Should create columns at all grid intersections by default|
|Perimeter Columns|boolean|Should create all perimeter columns by default|

Expand All @@ -22,3 +23,4 @@ Create Columns from a grid.
<br>

## Additional Information

Loading

0 comments on commit f15ebe8

Please sign in to comment.