Merge pull request #246 from specklesystems/release-to-main

Release to main
This commit is contained in:
Adam Hathcock
2025-03-07 14:27:19 +00:00
committed by GitHub
684 changed files with 18815 additions and 32242 deletions
+6 -4
View File
@@ -3,16 +3,18 @@
"isRoot": true,
"tools": {
"csharpier": {
"version": "0.28.2",
"version": "0.30.6",
"commands": [
"dotnet-csharpier"
]
],
"rollForward": false
},
"gitversion.tool": {
"version": "5.12.0",
"version": "6.1.0",
"commands": [
"dotnet-gitversion"
]
],
"rollForward": false
}
}
}
+23 -5
View File
@@ -212,6 +212,7 @@ dotnet_diagnostic.ide0058.severity = none # Remove unnecessary expression value:
dotnet_diagnostic.ide0010.severity = none # Add missing cases to switch statement: Too verbose
dotnet_diagnostic.ide0200.severity = none # Remove unnecessary lambda expression: may be performance reasons not to
dotnet_diagnostic.ide0058.severity = none # Remove unnecessary expression value: Subjective
dotnet_diagnostic.ide0305.severity = none # Use collection expression for fluent: Can obfuscate intent
dotnet_diagnostic.ide0001.severity = suggestion # Name can be simplified: Non enforceable in build
dotnet_diagnostic.ide0046.severity = suggestion # Use conditional expression for return: Subjective
dotnet_diagnostic.ide0045.severity = suggestion # Use conditional expression for assignment: Subjective
@@ -233,6 +234,17 @@ dotnet_diagnostic.ide0042.severity = suggestion # Deconstruct variable declarati
dotnet_diagnostic.ide0028.severity = suggestion # Use collection initializers: Subjective
dotnet_diagnostic.ide0072.severity = suggestion # Populate switch statement: Subjective
dotnet_diagnostic.ide0074.severity = suggestion # Use compound assignment: Subjective
dotnet_diagnostic.ide0300.severity = suggestion # Use collection expression for array: Subjective, maybe aspirational
dotnet_diagnostic.ide0290.severity = suggestion # primary constructors: subjective, and readonly properties are not a thing
dotnet_diagnostic.ide0290.severity = suggestion # Use primary constructor: Subjective
dotnet_diagnostic.ide0037.severity = suggestion # Use inferred member names: Sometimes its nice to be explicit
dotnet_diagnostic.ide0301.severity = suggestion # Use collection expression for empty: Subjective, intent
dotnet_diagnostic.ide0021.severity = suggestion # Use expression body for constructors : Subjective
dotnet_diagnostic.ide0090.severity = suggestion # Simplify new expression : Subjective
dotnet_diagnostic.ide0047.severity = suggestion # Parentheses preferences: IDEs don't properly pick it up
dotnet_diagnostic.ide0130.severity = suggestion # Namespace does not match folder structure : Aspirational
dotnet_diagnostic.ide1006.severity = suggestion # Naming rule violation : Aspirational
# Maintainability rules
dotnet_diagnostic.ca1501.severity = warning # Avoid excessive inheritance
@@ -242,11 +254,7 @@ dotnet_diagnostic.ca1506.severity = warning # Avoid excessive class coupling
dotnet_diagnostic.ca1507.severity = warning # Use nameof in place of string
dotnet_diagnostic.ca1508.severity = warning # Avoid dead conditional code
dotnet_diagnostic.ca1509.severity = warning # Invalid entry in code metrics configuration file
dotnet_diagnostic.ca1861.severity = none # Prefer 'static readonly' fields over constant array arguments if the called method is called repeatedly and is not mutating the passed array (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1861)
dotnet_diagnostic.cs8618.severity = suggestion # nullable problem
dotnet_diagnostic.CS0809.severity = suggestion # obsolete errors
dotnet_diagnostic.CS0618.severity = suggestion # obsolete errors
dotnet_diagnostic.ca1861.severity = suggestion # Prefer 'static readonly' fields over constant array arguments if the called method is called repeatedly and is not mutating the passed array (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1861)
# Performance rules
@@ -307,3 +315,13 @@ dotnet_diagnostic.NUnit2039.severity = warning # Consider using Assert.That(actu
indent_style = space
indent_size = 2
tab_width = 2
# Verify
[*.{received,verified}.{json}]
charset = utf-8-bom
end_of_line = lf
indent_size = unset
indent_style = unset
insert_final_newline = false
tab_width = unset
trim_trailing_whitespace = false
+4 -1
View File
@@ -2,4 +2,7 @@
* text=auto
# need original files to be windows
*.txt text eol=crlf
*.txt text eol=crlf
# Verify
*.verified.json text eol=lf working-tree-encoding=UTF-8
@@ -26,7 +26,7 @@ jobs:
run: ./build.sh
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
files: tests/**/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
@@ -3,6 +3,7 @@ name: .NET Build and Publish
on:
push:
branches: ["main", "dev"]
tags: ["3.*"]
jobs:
build:
@@ -27,7 +28,7 @@ jobs:
run: ./build.sh pack
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
files: tests/**/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
+3 -1
View File
@@ -18,4 +18,6 @@ tools
.DS_Store
*.snupkg
coverage.xml
coverage.xml
*.received.*
+4
View File
@@ -0,0 +1,4 @@
CA1502: 25
CA1501: 5
CA1506(Method): 50
CA1506(Type): 95
+61 -29
View File
@@ -1,47 +1,72 @@
<Project>
<PropertyGroup Label="Company Info">
<Authors>Speckle</Authors>
<Company>Speckle</Company>
<Copyright>Copyright (c) AEC Systems Ltd</Copyright>
</PropertyGroup>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<PropertyGroup Label="Compiler Properties">
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AnalysisMode>Recommended</AnalysisMode>
<WarningsAsErrors>true</WarningsAsErrors>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RunAnalyzersDuringLiveAnalysis>False</RunAnalyzersDuringLiveAnalysis>
<RunAnalyzersDuringBuild>False</RunAnalyzersDuringBuild>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Label="Nugetspec Package Properties">
<!-- Defines common Nugetspec properties -->
<!-- Inheriting packable projects should define the rest of the nugetspec properties (PackageId, Description) -->
<!-- and may, if needed, override/extend any of these (e.g. PackageTags) -->
<Authors>Speckle</Authors>
<Copyright>Copyright (c) AEC Systems Ltd</Copyright>
<PackageProjectUrl>https://speckle.systems/</PackageProjectUrl>
<PackageIcon>logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/specklesystems/speckle-sharp-sdk</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>speckle</PackageTags>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
</PropertyGroup>
<PropertyGroup Label="Nuget Package Properties">
<IsPackable>false</IsPackable> <!--Can be set to true in inheriting .props/.csproj files for projects that should be packed-->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<PropertyGroup Label="Analyers">
<EnableNetAnalyzers>true</EnableNetAnalyzers>
<AnalysisLevel>latest-AllEnabledByDefault</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- Ingored warnings, some aspirational but too noisy for now, some by design. -->
<NoWarn>
<!--Disabled by design-->
CA5399;CA1812;
<!--XML comment-->
CS1591;CS1573;
<!-- Globalization rules -->
CA1303;CA1304;CA1305;CA1307;CA1308;CA1309;CA1310;CA1311;
<!-- Logging -->
CA1848;CA1727;
<!-- Others we don't want -->
CA1815;CA1725;
<!-- Naming things is hard enough -->
CA1710;CA1711;CA1720;CA1724;
<!-- Aspirational -->
CA1502;CA1716;NETSDK1206;
$(NoWarn)
</NoWarn>
</PropertyGroup>
<PropertyGroup>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<PackageTags>speckle</PackageTags>
<PackageProjectUrl>https://speckle.systems/</PackageProjectUrl>
<PackageIcon>logo.png</PackageIcon>
<RepositoryUrl>https://github.com/specklesystems/speckle-sharp-sdk</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<!-- Expose the repository root to all projects -->
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591;1573</NoWarn>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
<None
@@ -51,4 +76,11 @@
PackagePath="\"
Visible="false"/>
</ItemGroup>
<ItemGroup>
<!-- This file contains the configuration for some analyzer warnings, such as cyclomatic
complexity threshold -->
<AdditionalFiles Include="$(RepositoryRoot)CodeMetricsConfig.txt"/>
</ItemGroup>
</Project>
+18
View File
@@ -0,0 +1,18 @@
<Project>
<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
<NoWarn>
$(NoWarn);
<!-- Things we need to test -->
CS0618;CA1034;CA2201;CA1051;CA1040;CA1724;
IDE0044;IDE0130;CA1508;
<!-- Analysers that provide no tangeable value to a test project -->
CA5394;CA2007;CA1852;CA1819;CA1711;CA1063;CA1816;CA2234;CS8618;CA1054;CA1810;CA2208;CA1019;CA1831;
</NoWarn>
</PropertyGroup>
<Target Name="DeepClean">
<Message Text="Deep clean of $(MSBuildProjectName).csproj" Importance="high"/>
<RemoveDir Directories="$(BaseIntermediateOutputPath)"/>
<RemoveDir Directories="$(BaseOutputPath)"/>
</Target>
</Project>
+20 -22
View File
@@ -1,39 +1,37 @@
<Project>
<ItemGroup>
<PackageVersion Include="altcover" Version="8.8.74" />
<PackageVersion Include="altcover" Version="9.0.1" />
<PackageVersion Include="AwesomeAssertions" Version="8.0.0" />
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
<PackageVersion Include="Bullseye" Version="5.0.0" />
<PackageVersion Include="GraphQL.Client" Version="6.0.0" />
<PackageVersion Include="Glob" Version="1.1.9" />
<PackageVersion Include="ILRepack.FullAuto" Version="1.6.0" />
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<!-- Keep at 7 for side by side -->
<PackageVersion Include="Microsoft.Data.Sqlite" Version="7.0.7" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="MongoDB.Driver" Version="2.19.2" />
<!-- Keep at exactly 7.0.5 for side by side with V2 -->
<PackageVersion Include="Microsoft.Data.Sqlite" Version="[7.0.5,)" />
<PackageVersion Include="Microsoft.Extensions.ObjectPool" Version="9.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="[2.2.0,)" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[2.2.0,)" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="[2.2.0,)" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="[5.0.0,)" />
<PackageVersion Include="Moq" Version="4.20.70" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="NUnit" Version="4.1.0" />
<PackageVersion Include="NUnit.Analyzers" Version="4.2.0" />
<PackageVersion Include="OpenTelemetry.Exporter.Console" version="1.9.0" />
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.9.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" version="1.9.0" />
<PackageVersion Include="Open.ChannelExtensions" Version="9.0.0" />
<PackageVersion Include="Polly" Version="7.2.3" />
<PackageVersion Include="Polly.Contrib.WaitAndRetry" Version="1.1.1" />
<PackageVersion Include="Polly.Extensions.Http" Version="3.0.0" />
<PackageVersion Include="Serilog" Version="4.0.1" />
<PackageVersion Include="Serilog.Exceptions" Version="8.4.0" />
<PackageVersion Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageVersion Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageVersion Include="Serilog.Sinks.OpenTelemetry" Version="4.0.0" />
<PackageVersion Include="Shouldly" Version="4.2.1" />
<PackageVersion Include="Speckle.Newtonsoft.Json" Version="13.0.2" />
<PackageVersion Include="Speckle.DoubleNumerics" Version="4.0.1" />
<PackageVersion Include="Speckle.DoubleNumerics" Version="4.1.0" />
<PackageVersion Include="SimpleExec" Version="12.0.0" />
<!-- this was the previous version used -->
<PackageVersion Include="System.Text.Json" Version="5.0.2" />
<GlobalPackageReference Include="PolySharp" Version="1.14.1" />
<PackageVersion Include="System.Threading.Channels" Version="9.0.2" />
<PackageVersion Include="Verify.Quibble" Version="2.1.1" />
<PackageVersion Include="Verify.Xunit" Version="28.10.1" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.assert" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2" />
<GlobalPackageReference Include="PolySharp" Version="1.15.0" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<GlobalPackageReference Include="GitVersion.MsBuild" Version="5.12.0" />
<GlobalPackageReference Include="Speckle.InterfaceGenerator" Version="0.9.6" />
</ItemGroup>
</Project>
+3 -8
View File
@@ -1,11 +1,6 @@
workflow: GitFlow/v1
next-version: 3.0.0
mode: ContinuousDeployment
assembly-informational-format: "{Major}.{Minor}.{Patch}-{PreReleaseTag}"
branches:
main:
regex: ^main$
tag: rc
develop:
tag: dev
pull-request:
tag: pr
prevent-increment:
when-current-commit-tagged: true
+37 -14
View File
@@ -1,18 +1,38 @@
# Core
![Speckle Box](/logo.png)
Speckle | Sharp | SDK
=================================================================================================================================
[![Twitter Follow](https://img.shields.io/twitter/follow/SpeckleSystems?style=social)](https://twitter.com/SpeckleSystems) [![Community forum users](https://img.shields.io/discourse/users?server=https%3A%2F%2Fdiscourse.speckle.works&style=flat-square&logo=discourse&logoColor=white)](https://discourse.speckle.works) [![website](https://img.shields.io/badge/https://-speckle.systems-royalblue?style=flat-square)](https://speckle.systems) [![docs](https://img.shields.io/badge/docs-speckle.guide-orange?style=flat-square&logo=read-the-docs&logoColor=white)](https://speckle.guide/dev/)
[![Twitter Follow](https://img.shields.io/twitter/follow/SpeckleSystems?style=social)](https://twitter.com/SpeckleSystems) [![Community forum users](https://img.shields.io/discourse/users?server=https%3A%2F%2Fspeckle.community&style=flat-square&logo=discourse&logoColor=white)](https://speckle.community) [![website](https://img.shields.io/badge/https://-speckle.systems-royalblue?style=flat-square)](https://speckle.systems) [![docs](https://img.shields.io/badge/docs-speckle.guide-orange?style=flat-square&logo=read-the-docs&logoColor=white)](https://speckle.guide/dev/)
[![codecov](https://codecov.io/gh/specklesystems/speckle-sharp-sdk/graph/badge.svg?token=TTM5OGr38m)](https://codecov.io/gh/specklesystems/speckle-sharp-sdk)
> Speckle is the first AEC data hub that connects with your favorite AEC tools. Speckle exists to overcome the challenges of working in a fragmented industry where communication, creative workflows, and the exchange of data are often hindered by siloed software and processes. It is here to make the industry better.
## **Disclaimer**
### .NET SDK, Tests, and Objects
This is an early alpha release, not meant for use in production! We're working to stabilise the 3.0 API, and until then there will be breaking changes. You have been warned!
[![Codecov](https://codecov.io/gh/specklesystems/speckle-sharp-sdk/graph/badge.svg?token=TTM5OGr38m)](https://codecov.io/gh/specklesystems/speckle-sharp-sdk)
## Introduction
> [!WARNING]
> This is an early beta release, not meant for use in production! We're working to stabilise the 3.0 API, and until then there will be breaking changes. You have been warned!
### Core
# Repo structure
Core is the .NET SDK for Speckle 3.0. It uses .NET Standard 2.0 and has been tested on Windows and MacOS.
This repo is the home of our next-generation Speckle .NET SDK. It uses .NET Standard 2.0 and has been tested on Windows and MacOS.
- **SDK**
- [`Speckle.Sdk`](https://github.com/specklesystems/speckle-sharp-sdk/tree/dev/src/Speckle.Sdk): Transports, serialization, API wrappers, and logging.
- [`Speckle.Sdk.Dependencies`](https://github.com/specklesystems/speckle-sharp-sdk/tree/dev/src/Speckle.Sdk.Dependencies): Dependencies and code that shouldn't cause conflicts in Host Apps. This uses [IL Repack](https://github.com/gluck/il-repack) to merge together and interalized only to be used by Speckle.
- **Speckle Objects**
- [`Speckle.Objects`](https://github.com/specklesystems/speckle-sharp-sdk/tree/dev/src/Speckle.Objects): The Speckle Objects classes used for conversions.
- **Tests**
- [`Tests`](https://github.com/specklesystems/speckle-sharp-sdk/tree/dev/tests): Unit, serialization, integration, and performance tests.
### Other repos
Make sure to also check and ⭐️ these other Speckle next generation repositories:
- [`speckle-sharp-connectors`](https://github.com/specklesystems/speckle-sharp-connectors): our csharp repo of next gen connectors
- [`speckle-sketchup`](https://github.com/specklesystems/speckle-sketchup): Sketchup connector
- [`speckle-powerbi`](https://github.com/specklesystems/speckle-powerbi): PowerBi connector
- and more [connectors & tooling](https://github.com/specklesystems/)!
## Documentation
@@ -20,7 +40,7 @@ Comprehensive developer and user documentation can be found in our:
### 📚 [Speckle Docs website](https://speckle.guide/dev/)
## Developing & Debugging
# Developing and Debugging
### Building
@@ -41,13 +61,16 @@ There are two test projects, one for unit tests and one for integration tests. T
Before embarking on submitting a patch, please make sure you read:
- [Contribution Guidelines](CONTRIBUTING.md),
- [Contribution Guidelines](CONTRIBUTING.md)
- [Code of Conduct](CODE_OF_CONDUCT.md)
## Community
# Security and Licensing
### Security
The Speckle Community hangs out on [the forum](https://discourse.speckle.works), do join and introduce yourself & feel free to ask us questions!
For any security vulnerabilities or concerns, please contact us directly at security[at]speckle.systems.
## License
### License
Unless otherwise described, the code in this repository is licensed under the Apache-2.0 License. Please note that some modules, extensions or code herein might be otherwise licensed. This is indicated either in the root of the containing folder under a different license file, or in the respective file's header. If you have any questions, don't hesitate to get in touch with us via [email](mailto:hello@speckle.systems).
Unless otherwise described, the code in this repository is licensed under the Apache-2.0 license.
+34 -15
View File
@@ -1,4 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Sdk", "src\Speckle.Sdk\Speckle.Sdk.csproj", "{A413E196-3696-4F48-B635-04B5F76BF9C9}"
EndProject
@@ -22,6 +22,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{DA2AED
README.md = README.md
GitVersion.yml = GitVersion.yml
docker-compose.yml = docker-compose.yml
CodeMetricsConfig.txt = CodeMetricsConfig.txt
Directory.Build.Targets = Directory.Build.Targets
.config\dotnet-tools.json = .config\dotnet-tools.json
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{58D37DA9-F948-48CA-9A73-F5BBBD533DBF}"
@@ -34,13 +37,19 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Sdk.Tests.Integrati
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{B623BD21-5CAA-43F9-A539-1835276C220E}"
ProjectSection(SolutionItems) = preProject
.github\workflows\main.yml = .github\workflows\main.yml
.github\workflows\ci.yml = .github\workflows\ci.yml
.github\workflows\pr.yml = .github\workflows\pr.yml
.github\workflows\release.yml = .github\workflows\release.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Sdk.Logging", "src\Speckle.Sdk.Logging\Speckle.Sdk.Logging.csproj", "{156313B4-B588-4363-A0ED-5AB3A55AA4E8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Sdk.Tests.Performance", "tests\Speckle.Sdk.Tests.Performance\Speckle.Sdk.Tests.Performance.csproj", "{870E3396-E6F7-43AE-B120-E651FA4F46BD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.LongSendProblem", "tests\Speckle.LongSendProblem\Speckle.LongSendProblem.csproj", "{6B8D2DD8-AD20-4021-975C-6FDE71DC425B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Sdk.Serialization.Testing", "tests\Speckle.Sdk.Serialization.Testing\Speckle.Sdk.Serialization.Testing.csproj", "{FF922B6D-D416-4348-8CB8-0C8B28691070}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Sdk.Dependencies", "src\Speckle.Sdk.Dependencies\Speckle.Sdk.Dependencies.csproj", "{27584AB4-8ACD-4850-8CC2-7E5BC739FB78}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Sdk.Testing", "tests\Speckle.Sdk.Testing\Speckle.Sdk.Testing.csproj", "{7B617C0D-2354-415C-993C-5071D4113E27}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "performance", "performance", "{FFB07238-87E8-463A-AA39-3B38AAAA94C1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -80,14 +89,22 @@ Global
{4FB41A6D-D139-4111-8115-E3F9F6BEAF24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FB41A6D-D139-4111-8115-E3F9F6BEAF24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FB41A6D-D139-4111-8115-E3F9F6BEAF24}.Release|Any CPU.Build.0 = Release|Any CPU
{156313B4-B588-4363-A0ED-5AB3A55AA4E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{156313B4-B588-4363-A0ED-5AB3A55AA4E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{156313B4-B588-4363-A0ED-5AB3A55AA4E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{156313B4-B588-4363-A0ED-5AB3A55AA4E8}.Release|Any CPU.Build.0 = Release|Any CPU
{6B8D2DD8-AD20-4021-975C-6FDE71DC425B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B8D2DD8-AD20-4021-975C-6FDE71DC425B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B8D2DD8-AD20-4021-975C-6FDE71DC425B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B8D2DD8-AD20-4021-975C-6FDE71DC425B}.Release|Any CPU.Build.0 = Release|Any CPU
{870E3396-E6F7-43AE-B120-E651FA4F46BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{870E3396-E6F7-43AE-B120-E651FA4F46BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{870E3396-E6F7-43AE-B120-E651FA4F46BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{870E3396-E6F7-43AE-B120-E651FA4F46BD}.Release|Any CPU.Build.0 = Release|Any CPU
{FF922B6D-D416-4348-8CB8-0C8B28691070}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF922B6D-D416-4348-8CB8-0C8B28691070}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF922B6D-D416-4348-8CB8-0C8B28691070}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF922B6D-D416-4348-8CB8-0C8B28691070}.Release|Any CPU.Build.0 = Release|Any CPU
{27584AB4-8ACD-4850-8CC2-7E5BC739FB78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27584AB4-8ACD-4850-8CC2-7E5BC739FB78}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27584AB4-8ACD-4850-8CC2-7E5BC739FB78}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27584AB4-8ACD-4850-8CC2-7E5BC739FB78}.Release|Any CPU.Build.0 = Release|Any CPU
{7B617C0D-2354-415C-993C-5071D4113E27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B617C0D-2354-415C-993C-5071D4113E27}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B617C0D-2354-415C-993C-5071D4113E27}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B617C0D-2354-415C-993C-5071D4113E27}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{A413E196-3696-4F48-B635-04B5F76BF9C9} = {5CB96C27-FC5B-4A41-86B6-951AF99B8116}
@@ -98,7 +115,9 @@ Global
{AA1E1E51-49AE-4F71-84B1-938E19695BE0} = {35047EE7-AD1D-4741-80A7-8F0E874718E9}
{4FB41A6D-D139-4111-8115-E3F9F6BEAF24} = {35047EE7-AD1D-4741-80A7-8F0E874718E9}
{B623BD21-5CAA-43F9-A539-1835276C220E} = {DA2AED52-58F9-471E-8AD8-102FD36129E3}
{156313B4-B588-4363-A0ED-5AB3A55AA4E8} = {5CB96C27-FC5B-4A41-86B6-951AF99B8116}
{6B8D2DD8-AD20-4021-975C-6FDE71DC425B} = {35047EE7-AD1D-4741-80A7-8F0E874718E9}
{27584AB4-8ACD-4850-8CC2-7E5BC739FB78} = {5CB96C27-FC5B-4A41-86B6-951AF99B8116}
{7B617C0D-2354-415C-993C-5071D4113E27} = {35047EE7-AD1D-4741-80A7-8F0E874718E9}
{FF922B6D-D416-4348-8CB8-0C8B28691070} = {FFB07238-87E8-463A-AA39-3B38AAAA94C1}
{870E3396-E6F7-43AE-B120-E651FA4F46BD} = {FFB07238-87E8-463A-AA39-3B38AAAA94C1}
EndGlobalSection
EndGlobal
+3
View File
@@ -0,0 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=QL/@EntryIndexedValue">QL</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=XYZ/@EntryIndexedValue">XYZ</s:String></wpf:ResourceDictionary>
+82 -12
View File
@@ -1,3 +1,4 @@
using System.Text.Json;
using GlobExpressions;
using static Bullseye.Targets;
using static SimpleExec.Command;
@@ -13,6 +14,18 @@ const string INTEGRATION = "integration";
const string PACK = "pack";
const string PACK_LOCAL = "pack-local";
const string CLEAN_LOCKS = "clean-locks";
const string PERF = "perf";
const string DEEP_CLEAN = "deep-clean";
static async Task<(string, string)> GetVersions()
{
var (output, _) = await ReadAsync("dotnet", "dotnet-gitversion /output json").ConfigureAwait(false);
output = output.Trim();
var jDoc = JsonDocument.Parse(output);
var version = jDoc.RootElement.GetProperty("FullSemVer").GetString() ?? "3.0.0-localBuild";
var fileVersion = jDoc.RootElement.GetProperty("AssemblySemFileVer").GetString() ?? "3.0.0.0";
return (version, fileVersion);
}
Target(
CLEAN_LOCKS,
@@ -65,7 +78,13 @@ Target(
DependsOn(RESTORE),
async () =>
{
await RunAsync("dotnet", $"build Speckle.Sdk.sln -c Release --no-restore");
var (version, fileVersion) = await GetVersions().ConfigureAwait(false);
Console.WriteLine($"Version: {version} & {fileVersion}");
await RunAsync(
"dotnet",
$"build Speckle.Sdk.sln -c Release --no-restore -warnaserror -p:Version={version} -p:FileVersion={fileVersion}"
)
.ConfigureAwait(false);
}
);
@@ -76,9 +95,10 @@ Target(
async file =>
{
await RunAsync(
"dotnet",
$"test {file} -c Release --no-build --no-restore --verbosity=normal /p:AltCover=true /p:AltCoverAttributeFilter=ExcludeFromCodeCoverage /p:AltCoverVerbosity=Warning"
);
"dotnet",
$"test {file} -c Release --no-build --no-restore --verbosity=normal /p:AltCover=true /p:AltCoverAttributeFilter=ExcludeFromCodeCoverage /p:AltCoverVerbosity=Warning"
)
.ConfigureAwait(false);
}
);
@@ -87,22 +107,72 @@ Target(
DependsOn(BUILD),
async () =>
{
await RunAsync("docker", "compose -f docker-compose.yml up --wait");
await RunAsync("docker", "compose -f docker-compose.yml up --wait").ConfigureAwait(false);
foreach (var test in Glob.Files(".", "**/*.Tests.Integration.csproj"))
{
await RunAsync(
"dotnet",
$"test {test} -c Release --no-build --no-restore --verbosity=normal /p:AltCover=true /p:AltCoverAttributeFilter=ExcludeFromCodeCoverage"
);
"dotnet",
$"test {test} -c Release --no-build --no-restore --verbosity=normal /p:AltCover=true /p:AltCoverAttributeFilter=ExcludeFromCodeCoverage"
)
.ConfigureAwait(false);
}
await RunAsync("docker", "compose down");
await RunAsync("docker", "compose down").ConfigureAwait(false);
}
);
static Task RunRestore() => RunAsync("dotnet", "pack Speckle.Sdk.sln -c Release -o output --no-build");
Target(
PERF,
Glob.Files(".", "**/*.Tests.Performance.csproj"),
async file =>
{
void CheckBuildDirectory(string dir, string build)
{
var binDir = Path.Combine(dir, "bin", build);
Console.WriteLine($"Checking: {binDir}");
if (Directory.Exists(binDir))
{
Directory.Delete(binDir, true);
Console.WriteLine($"Deleted: {binDir}");
}
}
var dir = Path.GetDirectoryName(file) ?? throw new InvalidOperationException();
CheckBuildDirectory(dir, "Release");
CheckBuildDirectory(dir, "Debug");
await RunAsync("dotnet", $"run --project {file} -c Release").ConfigureAwait(false);
}
);
Target(PACK, DependsOn(TEST), RunRestore);
Target(PACK_LOCAL, DependsOn(BUILD), RunRestore);
Target(
DEEP_CLEAN,
() =>
{
foreach (var f in Glob.Directories(".", "**/bin"))
{
if (f.StartsWith("build"))
{
continue;
}
Console.WriteLine("Found and will delete: " + f);
Directory.Delete(f, true);
}
foreach (var f in Glob.Directories(".", "**/obj"))
{
if (f.StartsWith("Build"))
{
continue;
}
Console.WriteLine("Found and will delete: " + f);
Directory.Delete(f, true);
}
Console.WriteLine("Running restore now.");
Run("dotnet", "restore .\\Speckle.Sdk.sln --no-cache");
}
);
static Task RunPack() => RunAsync("dotnet", "pack Speckle.Sdk.sln -c Release -o output --no-build");
Target(PACK, DependsOn(BUILD), RunPack);
Target(PACK_LOCAL, DependsOn(BUILD), RunPack);
Target("default", DependsOn(FORMAT, TEST, INTEGRATION), () => Console.WriteLine("Done!"));
+3 -9
View File
@@ -8,12 +8,6 @@
"resolved": "5.0.0",
"contentHash": "bqyt+m17ym+5aN45C5oZRAjuLDt8jKiCm/ys1XfymIXSkrTFwvI/QsbY3ucPSHDz7SF7uON7B57kXFv5H2k1ew=="
},
"GitVersion.MsBuild": {
"type": "Direct",
"requested": "[5.12.0, )",
"resolved": "5.12.0",
"contentHash": "dJuigXycpJNOiLT9or7mkHSkGFHgGW3/p6cNNYEKZBa7Hhp1FdX/cvqYWWYhRLpfoZOedeA7aRbYiOB3vW/dvA=="
},
"Glob": {
"type": "Direct",
"requested": "[1.1.9, )",
@@ -32,9 +26,9 @@
},
"PolySharp": {
"type": "Direct",
"requested": "[1.14.1, )",
"resolved": "1.14.1",
"contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ=="
"requested": "[1.15.0, )",
"resolved": "1.15.0",
"contentHash": "FbU0El+EEjdpuIX4iDbeS7ki1uzpJPx8vbqOzEtqnl1GZeAGJfq+jCbxeJL2y0EPnUNk8dRnnqR2xnYXg9Tf+g=="
},
"SimpleExec": {
"type": "Direct",
+3 -6
View File
@@ -6,7 +6,7 @@ services:
# Speckle Server dependencies
#######
postgres:
image: "postgres:14.5-alpine"
image: "postgres:16.4-alpine3.20@sha256:d898b0b78a2627cb4ee63464a14efc9d296884f1b28c841b0ab7d7c42f1fffdf"
restart: always
environment:
POSTGRES_DB: speckle
@@ -49,10 +49,6 @@ services:
retries: 30
start_period: 10s
####
# Speckle Server
#######
speckle-server:
image: speckle/speckle-server:latest
restart: always
@@ -79,6 +75,7 @@ services:
# TODO: Change this to the URL of the speckle server, as accessed from the network
CANONICAL_URL: "http://127.0.0.1:8080"
SPECKLE_AUTOMATE_URL: "http://127.0.0.1:3030"
FRONTEND_ORIGIN: "http://127.0.0.1:8081"
# TODO: Change thvolumes:
REDIS_URL: "redis://redis"
@@ -111,4 +108,4 @@ networks:
volumes:
postgres-data:
redis-data:
minio-data:
minio-data:
+1 -1
View File
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"version": "8.0.400",
"rollForward": "latestMinor"
}
}
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

-12
View File
@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!-- This is the Objects Kit *.Props file -->
<!-- Find Directory.Build.Props file at the root of the repo and import that first -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))"/>
<PropertyGroup>
<!-- Everything inside Objects is packable unless otherwise specified -->
<IsPackable>true</IsPackable>
</PropertyGroup>
</Project>
@@ -1,35 +0,0 @@
using Speckle.Objects.Structural.Materials;
using Speckle.Objects.Structural.Properties.Profiles;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.AdvanceSteel;
[SpeckleType("Objects.BuiltElements.AdvanceSteel.AsteelBeam")]
public class AsteelBeam : Beam, IHasVolume, IHasArea, IAsteelObject
{
[DetachProperty]
public SectionProfile profile { get; set; }
[DetachProperty]
public StructuralMaterial material { get; set; }
[DetachProperty]
public AsteelSectionProfile asteelProfile { get; set; }
public double volume { get; set; }
public double area { get; set; }
public Base userAttributes { get; set; }
public Base asteelProperties { get; set; }
public AsteelBeam() { }
[SchemaInfo("AsteelBeam", "Creates a Advance Steel beam by curve.", "Advance Steel", "Structure")]
public AsteelBeam([SchemaMainParam] ICurve baseLine, SectionProfile profile, StructuralMaterial material)
{
this.baseLine = baseLine;
this.profile = profile;
this.material = material;
}
}
@@ -1,28 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.AdvanceSteel;
public abstract class AsteelBolt : Base, IAsteelObject
{
[DetachProperty]
public List<Mesh> displayValue { get; set; }
public Base userAttributes { get; set; }
public Base asteelProperties { get; set; }
}
[SpeckleType("Objects.BuiltElements.AdvanceSteel.AsteelCircularBolt")]
public class AsteelCircularBolt : AsteelBolt
{
//[SchemaInfo("AsteelCircularBolt", "Creates a Advance Steel circular bolt.", "Advance Steel", "Structure")]
public AsteelCircularBolt() { }
}
[SpeckleType("Objects.BuiltElements.AdvanceSteel.AsteelRectangularBolt")]
public class AsteelRectangularBolt : AsteelBolt
{
//[SchemaInfo("AsteelRectangularBolt", "Creates a Advance Steel rectangular bolt.", "Advance Steel", "Structure")]
public AsteelRectangularBolt() { }
}
@@ -1,18 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.AdvanceSteel;
[SpeckleType("Objects.BuiltElements.AdvanceSteel.AsteelGrating")]
public class AsteelGrating : Base, IAsteelObject
{
[DetachProperty]
public List<Mesh> displayValue { get; set; }
public Base userAttributes { get; set; }
public Base asteelProperties { get; set; }
//[SchemaInfo("AsteelGrating", "Creates a Advance Steel grating.", "Advance Steel", "Structure")]
public AsteelGrating() { }
}
@@ -1,27 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Objects.Structural.Materials;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.AdvanceSteel;
[SpeckleType("Objects.BuiltElements.AdvanceSteel.AsteelPlate")]
public class AsteelPlate : Area, IDisplayValue<List<Mesh>>, IHasArea, IHasVolume, IAsteelObject
{
[DetachProperty]
public StructuralMaterial? material { get; set; }
public Base userAttributes { get; set; }
public Base asteelProperties { get; set; }
[SchemaInfo("AsteelPlate", "Creates a Advance Steel plate.", "Advance Steel", "Structure")]
public AsteelPlate(Polyline outline, string units, StructuralMaterial? material = null)
{
this.outline = outline;
this.material = material;
this.units = units;
}
public AsteelPlate() { }
}
@@ -1,10 +0,0 @@
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.AdvanceSteel;
[SpeckleType("Objects.BuiltElements.AdvanceSteel.AsteelPolyBeam")]
public class AsteelPolyBeam : AsteelBeam
{
//[SchemaInfo("AsteelPolyBeam", "Creates a Advance Steel polybeam.", "Advance Steel", "Structure")]
public AsteelPolyBeam() { }
}
@@ -1,13 +0,0 @@
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.AdvanceSteel;
[SpeckleType("Objects.BuiltElements.AdvanceSteel.AsteelSectionProfile")]
public class AsteelSectionProfile : Base
{
public string ProfSectionType { get; set; }
public string ProfSectionName { get; set; }
public AsteelSectionProfileDB SectionProfileDB { get; set; }
}
@@ -1,6 +0,0 @@
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.AdvanceSteel;
[SpeckleType("Objects.BuiltElements.AdvanceSteel.AsteelSectionProfileDB")]
public class AsteelSectionProfileDB : Base { }
@@ -1,27 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Objects.Structural.Materials;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.AdvanceSteel;
[SpeckleType("Objects.BuiltElements.AdvanceSteel.AsteelSlab")]
public class AsteelSlab : Area, IDisplayValue<List<Mesh>>, IHasArea, IHasVolume, IAsteelObject
{
[DetachProperty]
public StructuralMaterial? material { get; set; }
public Base userAttributes { get; set; }
public Base asteelProperties { get; set; }
[SchemaInfo("AsteelSlab", "Creates a Advance Steel slab.", "Advance Steel", "Structure")]
public AsteelSlab(Polyline outline, string units, StructuralMaterial? material = null)
{
this.outline = outline;
this.material = material;
this.units = units;
}
public AsteelSlab() { }
}
@@ -1,18 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.AdvanceSteel;
[SpeckleType("Objects.BuiltElements.AdvanceSteel.AsteelSpecialPart")]
public class AsteelSpecialPart : Base, IAsteelObject
{
[DetachProperty]
public List<Mesh> displayValue { get; set; }
public Base userAttributes { get; set; }
public Base asteelProperties { get; set; }
//[SchemaInfo("AsteelSpecialPart", "Creates a Advance Steel special part.", "Advance Steel", "Structure")]
public AsteelSpecialPart() { }
}
@@ -1,10 +0,0 @@
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.AdvanceSteel;
[SpeckleType("Objects.BuiltElements.AdvanceSteel.AsteelStraightBeam")]
public class AsteelStraightBeam : AsteelBeam
{
//[SchemaInfo("AsteelStraightBeam", "Creates a Advance Steel straightBeam.", "Advance Steel", "Structure")]
public AsteelStraightBeam() { }
}
@@ -1 +0,0 @@
namespace Speckle.Objects.BuiltElements.AdvanceSteel;
@@ -1,10 +0,0 @@
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.AdvanceSteel;
public interface IAsteelObject
{
Base userAttributes { get; set; }
Base asteelProperties { get; set; }
}
@@ -1,37 +0,0 @@
using Speckle.Newtonsoft.Json;
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.Alignment")]
public class Alignment : Base, IDisplayValue<Polyline>
{
[JsonIgnore, Obsolete("Use curves property")]
public ICurve baseCurve { get; set; }
public List<ICurve> curves { get; set; }
public string name { get; set; }
public double startStation { get; set; }
public double endStation { get; set; }
public List<Profile> profiles { get; set; }
/// <summary>
/// Station equation list contains doubles indicating raw station back, station back, and station ahead for each station equation
/// </summary>
public List<double> stationEquations { get; set; }
/// <summary>
/// Station equation direction for the corresponding station equation should be true for increasing or false for decreasing
/// </summary>
public List<bool> stationEquationDirections { get; set; }
public string units { get; set; }
[DetachProperty]
public Polyline displayValue { get; set; }
}
@@ -1,134 +0,0 @@
using Speckle.Newtonsoft.Json;
using Speckle.Objects.Geometry;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
/*
For further informations about given the variables, visit:
https://archicadapi.graphisoft.com/documentation/api_beamtype
*/
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadBeam")]
public class ArchicadBeam : Beam
{
[SchemaInfo("ArchicadBeam", "Creates an Archicad beam by curve.", "Archicad", "Structure")]
public ArchicadBeam() { }
// Element base
public string? elementType { get; set; } /*APINullabe*/
public List<Classification>? classifications { get; set; } /*APINullabe*/
public Base? elementProperties { get; set; }
public Base? componentProperties { get; set; }
public override Level? level
{
get => archicadLevel;
internal set
{
if (value is ArchicadLevel or null)
{
archicadLevel = value as ArchicadLevel;
}
else
{
throw new ArgumentException($"Expected object of type {nameof(ArchicadLevel)}");
}
}
}
[JsonIgnore]
public ArchicadLevel? archicadLevel { get; set; } /*APINullabe*/
public string? layer { get; set; } /*APINullabe*/
// Positioning
public Point begC { get; set; }
public Point endC { get; set; }
public bool? isSlanted { get; set; } /*APINullabe*/
public double? slantAngle { get; set; } /*APINullabe*/
public string? beamShape { get; set; } /*APINullabe*/
public int? sequence { get; set; } /*APINullabe*/
public double? curveAngle { get; set; } /*APINullabe*/
public double? verticalCurveHeight { get; set; } /*APINullabe*/
public bool? isFlipped { get; set; } /*APINullabe*/
// End Cuts
public uint? nCuts { get; set; } /*APINullabe*/
public Dictionary<string, AssemblySegmentCut>? Cuts { get; set; }
// Reference Axis
public short? anchorPoint { get; set; } /*APINullabe*/
public double? offset { get; set; }
public double? profileAngle { get; set; }
// Segment
public uint? nSegments { get; set; } /*APINullabe*/
public uint? nProfiles { get; set; } /*APINullabe*/
public Dictionary<string, BeamSegment>? segments { get; set; } /*APINullabe*/
// Scheme
public uint? nSchemes { get; set; }
public Dictionary<string, AssemblySegmentScheme>? Schemes { get; set; }
// Hole
public Dictionary<string, Hole>? Holes { get; set; }
// Floor Plan and Section - Floor Plan Display
public string? showOnStories { get; set; } /*APINullabe*/
public string? displayOptionName { get; set; } /*APINullabe*/
public string? uncutProjectionMode { get; set; } /*APINullabe*/
public string? overheadProjectionMode { get; set; } /*APINullabe*/
public string? showProjectionName { get; set; } /*APINullabe*/
// Floor Plan and Section - Cut Surfaces
public short? cutContourLinePen { get; set; }
public string? cutContourLineType { get; set; }
public short? overrideCutFillPen { get; set; }
public short? overrideCutFillBackgroundPen { get; set; }
// Floor Plan and Section - Outlines
public string? showOutline { get; set; } /*APINullabe*/
public short? uncutLinePen { get; set; } /*APINullabe*/
public string? uncutLinetype { get; set; } /*APINullabe*/
public short? overheadLinePen { get; set; } /*APINullabe*/
public string? overheadLinetype { get; set; } /*APINullabe*/
public short? hiddenLinePen { get; set; } /*APINullabe*/
public string? hiddenLinetype { get; set; } /*APINullabe*/
// Floor Plan and Section - Symbol
public string? showReferenceAxis { get; set; } /*APINullabe*/
public short? referencePen { get; set; } /*APINullabe*/
public string? referenceLinetype { get; set; } /*APINullabe*/
// Floor Plan and Section - Cover Fills
public bool? useCoverFill { get; set; } /*APINullabe*/
public bool? useCoverFillFromSurface { get; set; }
public short? coverFillForegroundPen { get; set; }
public short? coverFillBackgroundPen { get; set; }
public string? coverFillType { get; set; }
public string? coverFillTransformationType { get; set; }
public double? coverFillTransformationOrigoX { get; set; }
public double? coverFillTransformationOrigoY { get; set; }
public double? coverFillTransformationXAxisX { get; set; }
public double? coverFillTransformationXAxisY { get; set; }
public double? coverFillTransformationYAxisX { get; set; }
public double? coverFillTransformationYAxisY { get; set; }
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadBeam+BeamSegment")]
public class BeamSegment : Base
{
// Segment override materials
public string? leftMaterial { get; set; }
public string? topMaterial { get; set; }
public string? rightMaterial { get; set; }
public string? bottomMaterial { get; set; }
public string? endsMaterial { get; set; }
// Segment - The overridden materials are chained
public bool? materialChained { get; set; }
public AssemblySegment assemblySegmentData { get; set; }
}
}
@@ -1,144 +0,0 @@
using Speckle.Newtonsoft.Json;
using Speckle.Objects.Geometry;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
/*
For further informations about given the variables, visit:
https://archicadapi.graphisoft.com/documentation/api_columntype
*/
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadColumn")]
public class ArchicadColumn : Column
{
[SchemaInfo("ArchicadColumn", "Creates an Archicad Column by curve.", "Archicad", "Structure")]
public ArchicadColumn() { }
// Element base
public string? elementType { get; set; } /*APINullabe*/
public List<Classification>? classifications { get; set; } /*APINullabe*/
public Base? elementProperties { get; set; }
public Base? componentProperties { get; set; }
public override Level? level
{
get => archicadLevel;
internal set
{
if (value is ArchicadLevel or null)
{
archicadLevel = value as ArchicadLevel;
}
else
{
throw new ArgumentException($"Expected object of type {nameof(ArchicadLevel)}");
}
}
}
[JsonIgnore]
public ArchicadLevel? archicadLevel { get; set; } /*APINullabe*/
public string? layer { get; set; } /*APINullabe*/
// Wall geometry
public Point origoPos { get; set; }
public double height { get; set; }
// Positioning - story relation
public double? bottomOffset { get; set; } /*APINullabe*/
public double? topOffset { get; set; } /*APINullabe*/
public short? relativeTopStory { get; set; } /*APINullabe*/
// Positioning - slanted column
public bool? isSlanted { get; set; } /*APINullabe*/
public double? slantAngle { get; set; } /*APINullabe*/
public double? slantDirectionAngle { get; set; } /*APINullabe*/
public bool? isFlipped { get; set; } /*APINullabe*/
// Positioning - wrapping
public bool? wrapping { get; set; } /*APINullabe*/
// Positioning - Defines the relation of column to zones (Zone Boundary, Reduce Zone Area Only, No Effect on Zones)
public string? columnRelationToZoneName { get; set; } /*APINullabe*/
// End Cuts
public uint? nCuts { get; set; } /*APINullabe*/
public Dictionary<string, AssemblySegmentCut>? Cuts { get; set; } /*APINullabe*/
// Reference Axis
public short? coreAnchor { get; set; }
public double? axisRotationAngle { get; set; }
// Segment
public uint? nSegments { get; set; } /*APINullabe*/
public uint? nProfiles { get; set; } /*APINullabe*/
public Dictionary<string, ColumnSegment>? segments { get; set; } /*APINullabe*/
// Scheme
public uint? nSchemes { get; set; }
public Dictionary<string, AssemblySegmentScheme>? Schemes { get; set; }
// Floor Plan and Section - Floor Plan Display
public string? showOnStories { get; set; } /*APINullabe*/
public string? displayOptionName { get; set; } /*APINullabe*/
public string? showProjectionName { get; set; } /*APINullabe*/
// Floor Plan and Section - Cut Surfaces
public short? corePen { get; set; }
public string? contLtype { get; set; }
public short? venLinePen { get; set; }
public string? venLineType { get; set; }
public short? overrideCutFillPen { get; set; }
public short? overrideCutFillBackgroundPen { get; set; }
// Floor Plan and Section - Outlines
public short? uncutLinePen { get; set; } /*APINullabe*/
public string? uncutLinetype { get; set; } /*APINullabe*/
public short? overheadLinePen { get; set; } /*APINullabe*/
public string? overheadLinetype { get; set; } /*APINullabe*/
public short? hiddenLinePen { get; set; } /*APINullabe*/
public string? hiddenLinetype { get; set; } /*APINullabe*/
// Floor Plan and Section - Floor Plan Symbol
public string? coreSymbolTypeName { get; set; } /*APINullabe*/
public double? coreSymbolPar1 { get; set; } /*APINullabe*/
public double? coreSymbolPar2 { get; set; } /*APINullabe*/
public short? coreSymbolPen { get; set; } /*APINullabe*/
// Floor Plan and Section - Cover Fills
public bool? useCoverFill { get; set; } /*APINullabe*/
public bool? useCoverFillFromSurface { get; set; }
public short? coverFillForegroundPen { get; set; }
public short? coverFillBackgroundPen { get; set; }
public string? coverFillType { get; set; }
public string? coverFillTransformationType { get; set; }
public double? coverFillTransformationOrigoX { get; set; }
public double? coverFillTransformationOrigoY { get; set; }
public double? coverFillTransformationXAxisX { get; set; }
public double? coverFillTransformationXAxisY { get; set; }
public double? coverFillTransformationYAxisX { get; set; }
public double? coverFillTransformationYAxisY { get; set; }
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadColumn+ColumnSegment")]
public class ColumnSegment : Base
{
// Segment - Veneer attributes
public string? veneerType { get; set; }
public string? veneerBuildingMaterial { get; set; }
public double? veneerThick { get; set; }
// Segment - The extrusion overridden material name
public string? extrusionSurfaceMaterial { get; set; }
// Segment - The ends overridden material name
public string? endsSurfaceMaterial { get; set; }
// Segment - The overridden materials are chained
public bool? materialChained { get; set; }
public AssemblySegment assemblySegmentData { get; set; }
}
}
@@ -1,99 +0,0 @@
using Speckle.Newtonsoft.Json;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
/*
For further informations about given the variables, visit:
https://archicadapi.graphisoft.com/documentation/api_slabtype
*/
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadFloor")]
public sealed class ArchicadFloor : Floor
{
// Element base
public string? elementType { get; set; } /*APINullable*/
public List<Classification>? classifications { get; set; } /*APINullable*/
public Base? elementProperties { get; set; }
public Base? componentProperties { get; set; }
public override Level? level
{
get => archicadLevel;
internal set
{
if (value is ArchicadLevel or null)
{
archicadLevel = value as ArchicadLevel;
}
else
{
throw new ArgumentException($"Expected object of type {nameof(ArchicadLevel)}");
}
}
}
[JsonIgnore]
public ArchicadLevel? archicadLevel { get; set; } /*APINullabe*/
public string? layer { get; set; } /*APINullabe*/
// Geometry and positioning
public double? thickness { get; set; }
public ElementShape shape { get; set; }
public string? structure { get; set; } /*APINullabe*/
public string? compositeName { get; set; }
public string? buildingMaterialName { get; set; }
public string? referencePlaneLocation { get; set; } /*APINullabe*/
// EdgeTrims
public string? edgeAngleType { get; set; }
public double? edgeAngle { get; set; }
// Floor Plan and Section - Floor Plan Display
public string? showOnStories { get; set; } /*APINullabe*/
public Visibility? visibilityCont { get; set; }
public Visibility? visibilityFill { get; set; }
// Floor Plan and Section - Cut Surfaces
public short? sectContPen { get; set; }
public string? sectContLtype { get; set; }
public short? cutFillPen { get; set; }
public short? cutFillBackgroundPen { get; set; }
// Floor Plan and Section - Outlines
public short? contourPen { get; set; }
public string? contourLineType { get; set; }
public short? hiddenContourLinePen { get; set; }
public string? hiddenContourLineType { get; set; }
// Floor Plan and Section - Cover Fills
public bool? useFloorFill { get; set; }
public short? floorFillPen { get; set; }
public short? floorFillBGPen { get; set; }
public string? floorFillName { get; set; }
public bool? use3DHatching { get; set; }
public string? hatchOrientation { get; set; }
public double? hatchOrientationOrigoX { get; set; }
public double? hatchOrientationOrigoY { get; set; }
public double? hatchOrientationXAxisX { get; set; }
public double? hatchOrientationXAxisY { get; set; }
public double? hatchOrientationYAxisX { get; set; }
public double? hatchOrientationYAxisY { get; set; }
// Model
public string? topMat { get; set; }
public string? sideMat { get; set; }
public string? botMat { get; set; }
public bool? materialsChained { get; set; }
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadFloor+Visibility")]
public class Visibility : Base
{
public bool? showOnHome { get; set; }
public bool? showAllAbove { get; set; }
public bool? showAllBelow { get; set; }
public short? showRelAbove { get; set; }
public short? showRelBelow { get; set; }
}
}
@@ -1,27 +0,0 @@
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
/*
For further informations about given the variables, visit:
https://archicadapi.graphisoft.com/documentation/api_storytype
*/
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadLevel")]
public class ArchicadLevel : Level
{
public short index { get; set; }
public ArchicadLevel() { }
public ArchicadLevel(string name, double elevation, short index)
{
this.name = name;
this.elevation = elevation;
this.index = index;
}
public ArchicadLevel(string name)
{
this.name = name;
}
}
@@ -1,83 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadOpening")]
public class ArchicadOpening : Opening
{
[SchemaInfo("ArchicadOpening", "Creates an Archicad opening.", "Archicad", "Structure")]
public ArchicadOpening() { }
public string parentApplicationId { get; set; }
// Element base
public string? elementType { get; set; } /*APINullabe*/
public List<Classification>? classifications { get; set; } /*APINullabe*/
public Base? elementProperties { get; set; }
public Base? componentProperties { get; set; }
// Floor Plan Parameters
public string? floorPlanDisplayMode { get; set; } /*APINullabe*/
public string? connectionMode { get; set; } /*APINullabe*/
// Cut Surfaces Parameters
public bool? cutsurfacesUseLineOfCutElements { get; set; } /*APINullabe*/
public short? cutsurfacesLinePenIndex { get; set; } /*APINullabe*/
public string? cutsurfacesLineIndex { get; set; } /*APINullabe*/
// Outlines Parameters
public string? outlinesStyle { get; set; } /*APINullabe*/
public bool? outlinesUseLineOfCutElements { get; set; } /*APINullabe*/
public string? outlinesUncutLineIndex { get; set; } /*APINullabe*/
public string? outlinesOverheadLineIndex { get; set; } /*APINullabe*/
public short? outlinesUncutLinePenIndex { get; set; } /*APINullabe*/
public short? outlinesOverheadLinePenIndex { get; set; } /*APINullabe*/
// Opening Cover Fills Parameters
public bool? useCoverFills { get; set; } /*APINullabe*/
public bool? useFillsOfCutElements { get; set; } /*APINullabe*/
public string? coverFillIndex { get; set; } /*APINullabe*/
public short? coverFillPenIndex { get; set; } /*APINullabe*/
public short? coverFillBackgroundPenIndex { get; set; } /*APINullabe*/
public string? coverFillOrientation { get; set; } /*APINullabe*/ // Kérdéses..
// Cover Fill Transformation Parameters
public double? coverFillTransformationOrigoX { get; set; }
public double? coverFillTransformationOrigoY { get; set; }
public double? coverFillTransformationOrigoZ { get; set; }
public double? coverFillTransformationXAxisX { get; set; }
public double? coverFillTransformationXAxisY { get; set; }
public double? coverFillTransformationXAxisZ { get; set; }
public double? coverFillTransformationYAxisX { get; set; }
public double? coverFillTransformationYAxisY { get; set; }
public double? coverFillTransformationYAxisZ { get; set; }
// Reference Axis Parameters
public bool? showReferenceAxis { get; set; } /*APINullabe*/
public short? referenceAxisPenIndex { get; set; } /*APINullabe*/
public string? referenceAxisLineTypeIndex { get; set; } /*APINullabe*/
public double? referenceAxisOverhang { get; set; } /*APINullabe*/
// Extrusion Geometry Parameters
// Plane Frame
public Point extrusionGeometryBasePoint { get; set; }
public Vector extrusionGeometryXAxis { get; set; }
public Vector extrusionGeometryYAxis { get; set; }
public Vector extrusionGeometryZAxis { get; set; }
// Opening Extrustion Parameters
public string? basePolygonType { get; set; } /*APINullabe*/
public double? width { get; set; } /*APINullabe*/
public double? height { get; set; } /*APINullabe*/
public string? constraint { get; set; } /*APINullabe*/
public string? anchor { get; set; } /*APINullabe */
public int? anchorIndex { get; set; } /*APINullabe*/
public double? anchorAltitude { get; set; } /*APINullabe*/
public string? limitType { get; set; } /*APINullabe*/
public double? extrusionStartOffSet { get; set; } /*APINullabe*/
public double? finiteBodyLength { get; set; } /*APINullabe*/
public string? linkedStatus { get; set; } /*APINullabe*/
}
@@ -1,293 +0,0 @@
using Speckle.Newtonsoft.Json;
using Speckle.Objects.Geometry;
using Speckle.Objects.Other;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
/*
For further informations about given the variables, visit:
https://archicadapi.graphisoft.com/documentation/api_shellbasetype
*/
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadShellBase")]
public class ArchicadShellBase : BuiltElements.Roof
{
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadShellBase+Visibility")]
public class Visibility : Base
{
public bool? showOnHome { get; set; }
public bool? showAllAbove { get; set; }
public bool? showAllBelow { get; set; }
public short? showRelAbove { get; set; }
public short? showRelBelow { get; set; }
}
// Element base
public string? elementType { get; set; } /*APINullabe*/
public List<Classification>? classifications { get; set; } /*APINullabe*/
public Base? elementProperties { get; set; }
public Base? componentProperties { get; set; }
public override Level? level
{
get => archicadLevel;
internal set
{
if (value is ArchicadLevel or null)
{
archicadLevel = value as ArchicadLevel;
}
else
{
throw new ArgumentException($"Expected object of type {nameof(ArchicadLevel)}");
}
}
}
[JsonIgnore]
public ArchicadLevel? archicadLevel { get; set; } /*APINullabe*/
public string? layer { get; set; } /*APINullabe*/
// Geometry and positioning
public double? thickness { get; set; }
public string? structure { get; set; } /*APINullabe*/
public string? compositeName { get; set; }
public string? buildingMaterialName { get; set; }
// EdgeTrims
public string? edgeAngleType { get; set; }
public double? edgeAngle { get; set; }
// Floor Plan and Section - Floor Plan Display
public string? showOnStories { get; set; } /*APINullabe*/
public Visibility? visibilityCont { get; set; }
public Visibility? visibilityFill { get; set; }
public string? displayOptionName { get; set; } /*APINullabe*/
public string? showProjectionName { get; set; } /*APINullabe*/
// Floor Plan and Section - Cut Surfaces
public short? sectContPen { get; set; } /*APINullabe*/
public string? sectContLtype { get; set; } /*APINullabe*/
public short? cutFillPen { get; set; }
public short? cutFillBackgroundPen { get; set; }
// Floor Plan and Section - Outlines
public short? contourPen { get; set; } /*APINullabe*/
public string? contourLineType { get; set; } /*APINullabe*/
public short? overheadLinePen { get; set; } /*APINullabe*/
public string? overheadLinetype { get; set; } /*APINullabe*/
// Floor Plan and Section - Cover Fills
public bool? useFloorFill { get; set; } /*APINullabe*/
public short? floorFillPen { get; set; }
public short? floorFillBGPen { get; set; }
public string? floorFillName { get; set; }
public bool? use3DHatching { get; set; }
public bool? useFillLocBaseLine { get; set; }
public bool? useSlantedFill { get; set; }
public string? hatchOrientation { get; set; }
public double? hatchOrientationOrigoX { get; set; }
public double? hatchOrientationOrigoY { get; set; }
public double? hatchOrientationXAxisX { get; set; }
public double? hatchOrientationXAxisY { get; set; }
public double? hatchOrientationYAxisX { get; set; }
public double? hatchOrientationYAxisY { get; set; }
// Model
public string? topMat { get; set; }
public string? sideMat { get; set; }
public string? botMat { get; set; }
public bool? materialsChained { get; set; }
public string? trimmingBodyName { get; set; } /*APINullabe*/
}
/*
For further informations about given the variables, visit:
https://archicadapi.graphisoft.com/documentation/api_rooftype
*/
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadRoof")]
public sealed class ArchicadRoof : ArchicadShellBase
{
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadRoof+BaseLine")]
public class BaseLine : Base
{
public Point begC { get; set; }
public Point endC { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadRoof+RoofLevel")]
public class RoofLevel : Base
{
public double? levelHeight { get; set; }
public double? levelAngle { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadRoof+LevelEdge")]
public class LevelEdge : Base
{
public double? edgeLevelAngle { get; set; }
public double? eavesOverhang { get; set; }
public string? topMaterial { get; set; }
public string? bottomMaterial { get; set; }
public string? coverFillType { get; set; }
public string? angleType { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadRoof+PivotPolyEdge")]
public class PivotPolyEdge : Base
{
public int? nLevelEdgeData { get; set; }
public Dictionary<string, LevelEdge>? roofLevels { get; set; }
}
// Geometry and positioning
public string roofClassName { get; set; }
public double? planeRoofAngle { get; set; }
public ElementShape shape { get; set; }
public BaseLine? baseLine { get; set; }
public bool? posSign { get; set; }
public ElementShape? pivotPolygon { get; set; } /*APINullabe*/
public short? levelNum { get; set; }
public Dictionary<string, RoofLevel>? levels { get; set; } /*APINullabe*/
public Dictionary<string, PivotPolyEdge>? roofPivotPolyEdges { get; set; }
}
/*
For further informations about given the variables, visit:
https://archicadapi.graphisoft.com/documentation/api_shelltype
*/
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadShell")]
public sealed class ArchicadShell : ArchicadShellBase
{
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadShell+ShellContourEdgeData")]
public class ShellContourEdgeData : Base
{
public string? sideTypeName { get; set; }
public double? sideAngle { get; set; }
public string? edgeTypeName { get; set; }
public string? edgeSideMaterial { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadShell+ShellContourData")]
public class ShellContourData : Base
{
public ElementShape? shellContourPoly { get; set; }
public Transform shellContourPlane { get; set; }
public double? shellContourHeight { get; set; }
public int? shellContourID { get; set; }
public Dictionary<string, ShellContourEdgeData>? shellContourEdges { get; set; }
}
// Geometry and positioning
public string? shellClassName { get; set; } /*APINullabe*/
public Transform? basePlane { get; set; } /*APINullabe*/
public bool? flipped { get; set; } /*APINullabe*/
public bool? hasContour { get; set; } /*APINullabe*/
public int? numHoles { get; set; } /*APINullabe*/
public Dictionary<string, ShellContourData>? shellContours { get; set; }
public string? defaultEdgeType { get; set; } /*APINullabe*/
public double? slantAngle { get; set; }
public double? revolutionAngle { get; set; }
public double? distortionAngle { get; set; }
public bool? segmentedSurfaces { get; set; }
public double? shapePlaneTilt { get; set; }
public double? begPlaneTilt { get; set; }
public double? endPlaneTilt { get; set; }
public ElementShape shape { get; set; }
public ElementShape? shape1 { get; set; } /*APINullabe*/
public ElementShape? shape2 { get; set; } /*APINullabe*/
public Transform? axisBase { get; set; } /*APINullabe*/
public Transform? plane1 { get; set; } /*APINullabe*/
public Transform? plane2 { get; set; } /*APINullabe*/
public Point? begC { get; set; }
public double? begAngle { get; set; }
public Vector? extrusionVector { get; set; }
public Vector? shapeDirection { get; set; }
public Vector? distortionVector { get; set; }
public string? morphingRuleName { get; set; }
// Model
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadShell+BegShapeEdge")]
public class BegShapeEdge : Base
{
public string? begShapeEdgeTrimSideType { get; set; }
public double? begShapeEdgeTrimSideAngle { get; set; }
public string? begShapeEdgeSideMaterial { get; set; }
public string? begShapeEdgeType { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadShell+EndShapeEdge")]
public class EndShapeEdge : Base
{
public string? endShapeEdgeTrimSideType { get; set; }
public double? endShapeEdgeTrimSideAngle { get; set; }
public string? endShapeEdgeSideMaterial { get; set; }
public string? endShapeEdgeType { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadShell+ExtrudedEdge1")]
public class ExtrudedEdge1 : Base
{
public string? extrudedEdgeTrimSideType1 { get; set; }
public double? extrudedEdgeTrimSideAngle1 { get; set; }
public string? extrudedEdgeSideMaterial1 { get; set; }
public string? extrudedEdgeType1 { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadShell+ExtrudedEdge2")]
public class ExtrudedEdge2 : Base
{
public string? extrudedEdgeTrimSideType2 { get; set; }
public double? extrudedEdgeTrimSideAngle2 { get; set; }
public string? extrudedEdgeSideMaterial2 { get; set; }
public string? extrudedEdgeType2 { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadShell+RevolvedEdge1")]
public class RevolvedEdge1 : Base
{
public string? revolvedEdgeTrimSideType1 { get; set; }
public double? revolvedEdgeTrimSideAngle1 { get; set; }
public string? revolvedEdgeSideMaterial1 { get; set; }
public string? revolvedEdgeType1 { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadShell+RevolvedEdge2")]
public class RevolvedEdge2 : Base
{
public string? revolvedEdgeTrimSideType2 { get; set; }
public double? revolvedEdgeTrimSideAngle2 { get; set; }
public string? revolvedEdgeSideMaterial2 { get; set; }
public string? revolvedEdgeType2 { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadShell+RuledEdge1")]
public class RuledEdge1 : Base
{
public string? ruledEdgeTrimSideType1 { get; set; }
public double? ruledEdgeTrimSideAngle1 { get; set; }
public string? ruledEdgeSideMaterial1 { get; set; }
public string? ruledEdgeType1 { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadShell+RuledEdge2")]
public class RuledEdge2 : Base
{
public string? ruledEdgeTrimSideType2 { get; set; }
public double? ruledEdgeTrimSideAngle2 { get; set; }
public string? ruledEdgeSideMaterial2 { get; set; }
public string? ruledEdgeType2 { get; set; }
}
public BegShapeEdge? begShapeEdge { get; set; }
public EndShapeEdge? endShapeEdge { get; set; }
public ExtrudedEdge1? extrudedEdge1 { get; set; }
public ExtrudedEdge2? extrudedEdge2 { get; set; }
public RevolvedEdge1? revolvedEdge1 { get; set; }
public RevolvedEdge2? revolvedEdge2 { get; set; }
public RuledEdge1? ruledEdge1 { get; set; }
public RuledEdge2? ruledEdge2 { get; set; }
}
@@ -1,32 +0,0 @@
using Speckle.Newtonsoft.Json;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
/*
For further informations about given the variables, visit:
https://archicadapi.graphisoft.com/documentation/api_zonetype
*/
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadRoom")]
public class ArchicadRoom : Room
{
// Element base
public string elementType { get; set; }
public List<Classification> classifications { get; set; }
public Base? elementProperties { get; set; }
public Base? componentProperties { get; set; }
public override Level? level
{
get => archicadLevel;
set => archicadLevel = value as ArchicadLevel ?? null;
}
[JsonIgnore]
public ArchicadLevel? archicadLevel { get; set; }
public string? layer { get; set; } /*APINullabe*/
public ElementShape shape { get; set; }
}
@@ -1,122 +0,0 @@
using Speckle.Newtonsoft.Json;
using Speckle.Objects.Geometry;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
/*
For further informations about given the variables, visit:
https://archicadapi.graphisoft.com/documentation/api_walltype
*/
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadWall")]
public class ArchicadWall : Wall
{
[SchemaInfo("ArchicadWall", "Creates an Archicad wall.", "Archicad", "Structure")]
public ArchicadWall() { }
// Element base
public string? elementType { get; set; } /*APINullabe*/
public List<Classification>? classifications { get; set; } /*APINullabe*/
public Base? elementProperties { get; set; }
public Base? componentProperties { get; set; }
public override Level? level
{
get => archicadLevel;
internal set
{
if (value is ArchicadLevel or null)
{
archicadLevel = value as ArchicadLevel;
}
else
{
throw new ArgumentException($"Expected object of type {nameof(ArchicadLevel)}");
}
}
}
[JsonIgnore]
public ArchicadLevel? archicadLevel { get; set; } /*APINullabe*/
public string? layer { get; set; } /*APINullabe*/
// Wall geometry
public double? baseOffset { get; set; } /*APINullabe*/
public Point startPoint { get; set; }
public Point endPoint { get; set; }
public string? structure { get; set; } /*APINullabe*/
public string? geometryMethod { get; set; } /*APINullabe*/
public string? wallComplexity { get; set; } /*APINullabe*/
public string? buildingMaterialName { get; set; }
public string? compositeName { get; set; }
public string? profileName { get; set; }
public double? arcAngle { get; set; }
public ElementShape? shape { get; set; }
public double? thickness { get; set; } /*APINullabe*/
public double? outsideSlantAngle { get; set; }
public double? insideSlantAngle { get; set; }
public bool? polyWalllCornersCanChange { get; set; }
// Wall and stories relation
public double? topOffset { get; set; } /*APINullabe*/
public short? relativeTopStory { get; set; } /*APINullabe*/
public string? referenceLineLocation { get; set; } /*APINullabe*/
public double? referenceLineOffset { get; set; }
public double? offsetFromOutside { get; set; } /*APINullabe*/
public int? referenceLineStartIndex { get; set; } /*APINullabe*/
public int? referenceLineEndIndex { get; set; } /*APINullabe*/
public bool flipped { get; set; }
// Floor Plan and Section - Floor Plan Display
public string? showOnStories { get; set; } /*APINullabe*/
public string? displayOptionName { get; set; } /*APINullabe*/
public string? showProjectionName { get; set; } /*APINullabe*/
// Floor Plan and Section - Cut Surfaces parameters
public short? cutLinePen { get; set; }
public string? cutLinetype { get; set; }
public short? overrideCutFillPen { get; set; }
public short? overrideCutFillBackgroundPen { get; set; }
// Floor Plan and Section - Outlines parameters
public short? uncutLinePen { get; set; } /*APINullabe*/
public string? uncutLinetype { get; set; } /*APINullabe*/
public short? overheadLinePen { get; set; } /*APINullabe*/
public string? overheadLinetype { get; set; } /*APINullabe*/
// Model - Override Surfaces
public string? referenceMaterialName { get; set; }
public int? referenceMaterialStartIndex { get; set; }
public int? referenceMaterialEndIndex { get; set; }
public string? oppositeMaterialName { get; set; }
public int? oppositeMaterialStartIndex { get; set; }
public int? oppositeMaterialEndIndex { get; set; }
public string? sideMaterialName { get; set; }
public bool? materialsChained { get; set; } /*APINullabe*/
public bool? inheritEndSurface { get; set; } /*APINullabe*/
public bool? alignTexture { get; set; } /*APINullabe*/
public int? sequence { get; set; } /*APINullabe*/
// Model - Log Details (log height, start with half log, surface of horizontal edges, log shape)
public double? logHeight { get; set; }
public bool? startWithHalfLog { get; set; }
public string? surfaceOfHorizontalEdges { get; set; }
public string? logShape { get; set; }
// Model - Defines the relation of wall to zones (Zone Boundary, Reduce Zone Area Only, No Effect on Zones)
public string? wallRelationToZoneName { get; set; } /*APINullabe*/
// Does it have any embedded object?
public bool? hasDoor { get; set; } /*APINullabe*/
public bool? hasWindow { get; set; } /*APINullabe*/
}
@@ -1,65 +0,0 @@
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
[SpeckleType("Objects.BuiltElements.Archicad.AssemblySegment")]
public class AssemblySegment : Base
{
public bool circleBased { get; set; }
public string modelElemStructureType { get; set; }
public double nominalHeight { get; set; }
public double nominalWidth { get; set; }
public bool isHomogeneous { get; set; }
public double endWidth { get; set; }
public double endHeight { get; set; }
public bool isEndWidthAndHeightLinked { get; set; }
public bool isWidthAndHeightLinked { get; set; }
public string profileAttrName { get; set; }
public string buildingMaterial { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.AssemblySegmentScheme")]
public class AssemblySegmentScheme : Base
{
public string lengthType { get; set; }
public double fixedLength { get; set; }
public double lengthProportion { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.AssemblySegmentCut")]
public class AssemblySegmentCut : Base
{
public string cutType { get; set; }
public double customAngle { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.Hole")]
public class Hole : Base
{
public string holeType { get; set; }
public bool holeContourOn { get; set; }
public int holeId { get; set; }
public double centerx { get; set; }
public double centerz { get; set; }
public double width { get; set; }
public double height { get; set; }
}
@@ -1,22 +0,0 @@
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
[SpeckleType("Objects.BuiltElements.Archicad.Classification")]
public class Classification : Base
{
public Classification() { }
[SchemaInfo("Classification", "A classification to set on an element", "BIM", "All")]
public Classification(string system, string? code = null, string? name = null)
{
this.system = system;
this.code = code;
this.name = name;
}
public string system { get; set; }
public string? code { get; set; }
public string? name { get; set; }
}
@@ -1,50 +0,0 @@
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
[SpeckleType("Objects.BuiltElements.Archicad.ComponentProperties")]
public class ComponentProperties : Base
{
public ComponentProperties() { }
[SchemaInfo("ComponentProperties", "An Archicad element component properties", "Archicad", "Elements")]
public ComponentProperties(
string name,
List<PropertyGroup> propertyGroups,
[SchemaParamInfo("(Optional) Speckle units.")] string units = ""
)
{
this.name = name;
this.propertyGroups = propertyGroups;
this.units = units;
}
public string name { get; set; }
public List<PropertyGroup>? propertyGroups { get; set; }
public string units { get; set; }
/// <summary>
/// Turns a List of ComponentProperties into a Base so that it can be used with the Speckle properties prop
/// </summary>
/// <param name="componentPropertiesList"></param>
/// <returns></returns>
public static Base? ToBase(List<ComponentProperties>? componentPropertiesList)
{
if (componentPropertiesList == null || componentPropertiesList.Count == 0)
{
return null;
}
var @base = new Base();
foreach (ComponentProperties componentProperties in componentPropertiesList)
{
@base[RemoveDisallowedPropNameChars(componentProperties.name)] = PropertyGroup.ToBase(
componentProperties.propertyGroups
);
}
return @base;
}
}
@@ -1,30 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
[SpeckleType("Objects.BuiltElements.Archicad.DirectShape")]
public class DirectShape : Base
{
public DirectShape() { }
public DirectShape(string applicationId, List<Mesh> displayValue)
{
this.applicationId = applicationId;
this.displayValue = displayValue;
}
// Element base
public string elementType { get; set; }
public List<Classification> classifications { get; set; }
public Base? elementProperties { get; set; }
public Base? componentProperties { get; set; }
public ArchicadLevel level { get; set; }
public string units { get; set; }
[DetachProperty]
public List<Mesh> displayValue { get; set; }
}
@@ -1,71 +0,0 @@
using Speckle.Newtonsoft.Json;
using Speckle.Objects.Geometry;
using Speckle.Objects.Primitive;
using Speckle.Sdk.Common;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
[SpeckleType("Objects.BuiltElements.Archicad.ElementShape")]
public sealed class ElementShape : Base
{
public ElementShape() { }
public ElementShape(Polyline contourPolyline, List<Polyline>? holePolylines = null)
{
this.contourPolyline = contourPolyline;
this.holePolylines = holePolylines;
}
public Polyline contourPolyline { get; set; }
public List<Polyline>? holePolylines { get; set; }
/// <remarks>
/// This class is only used for Archicad interop
/// </remarks>
[SpeckleType("Objects.BuiltElements.Archicad.ElementShape+PolylineSegment")]
public sealed class PolylineSegment : Base, ICurve
{
public PolylineSegment() { }
public PolylineSegment(Point startPoint, Point endPoint, double? arcAngle = null, bool? bodyFlag = null)
{
this.startPoint = startPoint;
this.endPoint = endPoint;
this.arcAngle = arcAngle ?? 0;
this.bodyFlag = bodyFlag;
}
public Point startPoint { get; set; }
public Point endPoint { get; set; }
[JsonIgnore]
public string units => Units.Meters;
public double arcAngle { get; set; }
public bool? bodyFlag { get; set; }
public double length { get; set; }
public Interval domain { get; set; } = Interval.UnitInterval;
}
/// <remarks>
/// This class is only used for Archicad interop
/// </remarks>>
[SpeckleType("Objects.BuiltElements.Archicad.ElementShape+Polyline")]
public sealed class Polyline : Base, ICurve
{
public Polyline() { }
public Polyline(List<PolylineSegment> segments)
{
this.polylineSegments = segments;
}
[JsonIgnore]
public string units => Units.Meters;
public List<PolylineSegment> polylineSegments { get; set; } = new();
public double length { get; set; }
public Interval domain { get; set; } = Interval.UnitInterval;
}
}
@@ -1,81 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadFenestration")]
public class ArchicadFenestration : Base, IDisplayValue<List<Mesh>>
{
public string parentApplicationId { get; set; }
// Element base
public string? elementType { get; set; } /*APINullabe*/
public List<Classification>? classifications { get; set; } /*APINullabe*/
public Base? elementProperties { get; set; }
public Base? componentProperties { get; set; }
public double? width { get; set; } /*APINullabe*/
public double? height { get; set; } /*APINullabe*/
public double? subFloorThickness { get; set; } /*APINullabe*/
public bool? reflected { get; set; } /*APINullabe*/
public bool? oSide { get; set; } /*APINullabe*/
public bool? refSide { get; set; } /*APINullabe*/
public string? verticalLinkTypeName { get; set; }
public short? verticalLinkStoryIndex { get; set; }
public bool? wallCutUsing { get; set; }
public short? pen { get; set; } /*APINullabe*/
public string? lineTypeName { get; set; } /*APINullabe*/
public string? buildingMaterial { get; set; } /*APINullabe*/
public string? sectFill { get; set; } /*APINullabe*/
public short? sectFillPen { get; set; } /*APINullabe*/
public short? sectBackgroundPen { get; set; } /*APINullabe*/
public short? sectContPen { get; set; } /*APINullabe*/
public string? cutLineType { get; set; } /*APINullabe*/
public string? aboveViewLineType { get; set; } /*APINullabe*/
public short? aboveViewLinePen { get; set; } /*APINullabe*/
public short? belowViewLinePen { get; set; } /*APINullabe*/
public string? belowViewLineType { get; set; } /*APINullabe*/
public bool? useObjectPens { get; set; } /*APINullabe*/
public bool? useObjLinetypes { get; set; } /*APINullabe*/
public bool? useObjMaterials { get; set; } /*APINullabe*/
public bool? useObjSectAttrs { get; set; } /*APINullabe*/
public string? libraryPart { get; set; } /*APINullabe*/
public string? displayOptionName { get; set; } /*APINullabe*/
[DetachProperty]
public List<Mesh> displayValue { get; set; }
}
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadDoorWindowBase")]
public class ArchicadDoorWindowBase : ArchicadFenestration
{
public double? revealDepthFromSide { get; set; } /*APINullabe*/
public double? jambDepthHead { get; set; } /*APINullabe*/
public double? jambDepth { get; set; } /*APINullabe*/
public double? jambDepth2 { get; set; } /*APINullabe*/
public double? objLoc { get; set; } /*APINullabe*/
public double? lower { get; set; } /*APINullabe*/
public string? directionType { get; set; } /*APINullabe*/
public Point? startPoint { get; set; } /*APINullabe*/
public Point? dirVector { get; set; } /*APINullabe*/
}
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadDoor")]
public sealed class ArchicadDoor : ArchicadDoorWindowBase { }
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadWindow")]
public sealed class ArchicadWindow : ArchicadDoorWindowBase { }
[SpeckleType("Objects.BuiltElements.Archicad.ArchicadSkylight")]
public sealed class ArchicadSkylight : ArchicadFenestration
{
public uint? vertexID { get; set; } /*APINullabe*/
public string? skylightFixMode { get; set; } /*APINullabe*/
public string? skylightAnchor { get; set; } /*APINullabe*/
public Point? anchorPosition { get; set; } /*APINullabe*/
public double? anchorLevel { get; set; } /*APINullabe*/
public double? azimuthAngle { get; set; } /*APINullabe*/
public double? elevationAngle { get; set; } /*APINullabe*/
}
@@ -1,54 +0,0 @@
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
[SpeckleType("Objects.BuiltElements.Archicad.Property")]
public class Property : Base
{
public Property() { }
[SchemaInfo("Property", "An Archicad element property", "Archicad", "Elements")]
public Property(string name, object value, [SchemaParamInfo("(Optional) Speckle units.")] string units = "")
{
this.name = name;
this.value = value;
this.units = units;
}
public string name { get; set; }
public object? value { get; set; }
public List<object>? values { get; set; }
public string units { get; set; }
/// <summary>
/// Turns a List of Property into a Base so that it can be used with the Speckle properties prop
/// </summary>
/// <param name="properties"></param>
/// <returns></returns>
public static Base? ToBase(List<Property>? properties)
{
if (properties == null || properties.Count == 0)
{
return null;
}
var @base = new Base();
foreach (Property property in properties)
{
var key = RemoveDisallowedPropNameChars(property.name);
if (string.IsNullOrEmpty(key) || @base[key] != null)
{
continue;
}
@base[key] = property.value;
// todo
//property.values;
}
return @base;
}
}
@@ -1,48 +0,0 @@
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Archicad;
[SpeckleType("Objects.BuiltElements.Archicad.PropertyGroup")]
public class PropertyGroup : Base
{
public PropertyGroup() { }
[SchemaInfo("PropertyGroup", "An Archicad element property group", "Archicad", "Elements")]
public PropertyGroup(
string name,
List<Property> propertyList,
[SchemaParamInfo("(Optional) Speckle units.")] string units = ""
)
{
this.name = name;
this.propertyList = propertyList;
this.units = units;
}
public string name { get; set; }
public List<Property>? propertyList { get; set; }
public string units { get; set; }
/// <summary>
/// Turns a List of PropertyGroup into a Base so that it can be used with the Speckle properties prop
/// </summary>
/// <param name="propertyGroups"></param>
/// <returns></returns>
public static Base? ToBase(List<PropertyGroup>? propertyGroups)
{
if (propertyGroups == null || propertyGroups.Count == 0)
{
return null;
}
var @base = new Base();
foreach (PropertyGroup propertyGroup in propertyGroups)
{
@base[RemoveDisallowedPropNameChars(propertyGroup.name)] = Property.ToBase(propertyGroup.propertyList);
}
return @base;
}
}
-38
View File
@@ -1,38 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.Area")]
public class Area : Base, IHasArea, IHasVolume, IDisplayValue<List<Mesh>>
{
public Area() { }
/// <summary>
/// SchemaBuilder constructor for an Area
/// </summary>
[SchemaInfo("Area", "Creates a Speckle area", "BIM", "Other")]
public Area(string name, string number, Level level, [SchemaMainParam] Point center)
{
this.name = name;
this.number = number;
this.level = level;
this.center = center;
}
public string name { get; set; }
public string number { get; set; }
public Level level { get; set; }
public Point center { get; set; }
public List<ICurve> voids { get; set; } = new();
public ICurve outline { get; set; }
public string units { get; set; }
[DetachProperty]
public List<Mesh> displayValue { get; set; }
public double area { get; set; }
public double volume { get; set; }
}
@@ -1,88 +0,0 @@
using Speckle.Newtonsoft.Json;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
public abstract class Baseline : Base
{
protected Baseline() { }
protected Baseline(string name, bool isFeaturelineBased)
{
this.name = name;
this.isFeaturelineBased = isFeaturelineBased;
}
/// <summary>
/// The name of this baseline
/// </summary>
public string name { get; set; }
/// <summary>
/// The horizontal component of this baseline
/// </summary>
public abstract Alignment? alignment { get; internal set; }
/// <summary>
/// The vertical component of this baseline
/// </summary>
public abstract Profile? profile { get; internal set; }
[DetachProperty]
public Featureline? featureline { get; internal set; }
public bool isFeaturelineBased { get; set; }
}
/// <summary>
/// Generic instance class
/// </summary>
public abstract class Baseline<TA, TP> : Baseline
where TA : Alignment
where TP : Profile
{
protected Baseline(string name, TA alignment, TP profile, Featureline? featureline, bool isFeaturelineBased)
: base(name, isFeaturelineBased)
{
this.name = name;
typedAlignment = alignment;
typedProfile = profile;
this.featureline = featureline;
this.isFeaturelineBased = isFeaturelineBased;
}
protected Baseline()
: base(string.Empty, false) { }
[JsonIgnore]
public TA typedAlignment { get; set; }
[JsonIgnore]
public TP typedProfile { get; set; }
[DetachProperty]
public override Alignment? alignment
{
get => typedAlignment;
internal set
{
if (value is TA typeA)
{
typedAlignment = typeA;
}
}
}
[DetachProperty]
public override Profile? profile
{
get => typedProfile;
internal set
{
if (value is TP typeP)
{
typedProfile = typeP;
}
}
}
}
-35
View File
@@ -1,35 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.Beam")]
public class Beam : Base, IDisplayValue<IReadOnlyList<Base>>
{
public Beam() { }
public Beam(ICurve baseLine, Level? level, string? units, IReadOnlyList<Mesh>? displayValue = null)
{
this.baseLine = baseLine;
this.level = level;
this.units = units;
this.displayValue = ((IReadOnlyList<Base>?)displayValue) ?? new[] { (Base)baseLine };
}
public ICurve baseLine { get; set; }
public virtual Level? level { get; internal set; }
public string? units { get; set; }
[DetachProperty]
public IReadOnlyList<Base> displayValue { get; set; }
#region Schema Info Constructors
[SchemaInfo("Beam", "Creates a Speckle beam", "BIM", "Structure")]
public Beam([SchemaMainParam] ICurve baseLine)
: this(baseLine, null, null) { }
#endregion
}
@@ -1,29 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.Brace")]
public class Brace : Base, IDisplayValue<IReadOnlyList<Base>>
{
public Brace() { }
public Brace(ICurve baseLine, string? units, IReadOnlyList<Mesh>? displayValue = null)
{
this.baseLine = baseLine;
this.units = units;
this.displayValue = ((IReadOnlyList<Base>?)displayValue) ?? new[] { (Base)baseLine };
}
public ICurve baseLine { get; set; }
public string? units { get; set; }
[DetachProperty]
public IReadOnlyList<Base> displayValue { get; set; }
[SchemaInfo("Brace", "Creates a Speckle brace", "BIM", "Structure")]
public Brace([SchemaMainParam] ICurve baseLine)
: this(baseLine, null) { }
}
@@ -1,18 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.CableTray")]
public class CableTray : Base, IDisplayValue<List<Mesh>>
{
public ICurve baseCurve { get; set; }
public double width { get; set; }
public double height { get; set; }
public double length { get; set; }
public string units { get; set; }
[DetachProperty]
public List<Mesh> displayValue { get; set; }
}
@@ -1,34 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.Ceiling")]
public class Ceiling : Base, IDisplayValue<List<Mesh>>
{
public Ceiling() { }
[SchemaInfo("Ceiling", "Creates a Speckle ceiling", "BIM", "Architecture")]
public Ceiling(
[SchemaMainParam] ICurve outline,
List<ICurve>? voids = null,
[SchemaParamInfo("Any nested elements that this ceiling might have")] List<Base>? elements = null
)
{
this.outline = outline;
this.voids = voids ?? new();
this.elements = elements;
}
public ICurve outline { get; set; }
public List<ICurve> voids { get; set; } = new();
[DetachProperty]
public List<Base>? elements { get; set; }
public string units { get; set; }
[DetachProperty]
public List<Mesh> displayValue { get; set; }
}
@@ -1,20 +0,0 @@
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Civil;
[SpeckleType("Objects.BuiltElements.Civil.CivilAlignment")]
public class CivilAlignment : Alignment
{
public string type { get; set; }
public string site { get; set; }
public string style { get; set; }
public double offset { get; set; }
/// <summary>
/// Name of parent alignment if this is an offset alignment
/// </summary>
public string parent { get; set; }
}
@@ -1,26 +0,0 @@
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Civil;
[SpeckleType("Objects.BuiltElements.Civil.CivilAppliedAssembly")]
public class CivilAppliedAssembly : Base
{
public CivilAppliedAssembly() { }
public CivilAppliedAssembly(
List<CivilAppliedSubassembly> appliedSubassemblies,
double adjustedElevation,
string units
)
{
this.appliedSubassemblies = appliedSubassemblies;
this.adjustedElevation = adjustedElevation;
this.units = units;
}
public List<CivilAppliedSubassembly> appliedSubassemblies { get; set; }
public double adjustedElevation { get; set; }
public string units { get; set; }
}
@@ -1,37 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Objects.Other.Civil;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Civil;
[SpeckleType("Objects.BuiltElements.Civil.CivilAppliedSubassembly")]
public class CivilAppliedSubassembly : Base
{
public CivilAppliedSubassembly() { }
public CivilAppliedSubassembly(
string subassemblyId,
string subassemblyName,
List<CivilCalculatedShape> shapes,
Point stationOffsetElevationToBaseline,
List<CivilDataField> parameters
)
{
this.subassemblyId = subassemblyId;
this.subassemblyName = subassemblyName;
this.shapes = shapes;
this.stationOffsetElevationToBaseline = stationOffsetElevationToBaseline;
this.parameters = parameters;
}
public string subassemblyId { get; set; }
public string subassemblyName { get; set; }
public List<CivilCalculatedShape> shapes { get; set; }
public Point stationOffsetElevationToBaseline { get; set; }
[DetachProperty]
public List<CivilDataField> parameters { get; set; }
}
@@ -1,55 +0,0 @@
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Civil;
[SpeckleType("Objects.BuiltElements.Civil.CivilBaseline")]
public class CivilBaseline : Baseline<CivilAlignment, CivilProfile>
{
public CivilBaseline() { }
public CivilBaseline(
string name,
List<CivilBaselineRegion> regions,
List<double> stations,
double startStation,
double endStation,
CivilAlignment alignment,
CivilProfile profile
)
{
this.name = name;
this.regions = regions;
this.stations = stations;
this.startStation = startStation;
this.endStation = endStation;
this.alignment = alignment;
this.profile = profile;
isFeaturelineBased = false;
}
public CivilBaseline(
string name,
List<CivilBaselineRegion> regions,
List<double> stations,
double startStation,
double endStation,
Featureline featureline
)
{
this.name = name;
this.regions = regions;
this.stations = stations;
this.startStation = startStation;
this.endStation = endStation;
this.featureline = featureline;
isFeaturelineBased = true;
}
public List<CivilBaselineRegion> regions { get; set; }
public List<double> stations { get; set; }
public double startStation { get; set; }
public double endStation { get; set; }
}
@@ -1,45 +0,0 @@
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Civil;
[SpeckleType("Objects.BuiltElements.Civil.CivilBaselineRegion")]
public class CivilBaselineRegion : Base
{
public CivilBaselineRegion() { }
public CivilBaselineRegion(
string name,
double startStation,
double endStation,
string assemblyId,
string? assemblyName,
List<CivilAppliedAssembly> appliedAssemblies
)
{
this.name = name;
this.startStation = startStation;
this.endStation = endStation;
this.assemblyId = assemblyId;
this.assemblyName = assemblyName;
this.appliedAssemblies = appliedAssemblies;
}
/// <summary>
/// The name of the region
/// </summary>
public string name { get; set; }
/// <summary>
/// The id of the assembly of the region
/// </summary>
public string assemblyId { get; set; }
public string? assemblyName { get; set; }
public double startStation { get; set; }
public double endStation { get; set; }
[DetachProperty]
public List<CivilAppliedAssembly> appliedAssemblies { get; set; }
}
@@ -1,20 +0,0 @@
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Civil;
[SpeckleType("Objects.BuiltElements.Civil.CivilCalculatedLink")]
public class CivilCalculatedLink : Base, ICivilCalculatedObject
{
public CivilCalculatedLink() { }
public CivilCalculatedLink(List<string> codes, List<CivilCalculatedPoint> points)
{
this.codes = codes;
this.points = points;
}
public List<string> codes { get; set; }
[DetachProperty]
public List<CivilCalculatedPoint> points { get; set; }
}
@@ -1,35 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Civil;
[SpeckleType("Objects.BuiltElements.Civil.CivilCalculatedPoint")]
public class CivilCalculatedPoint : Base, ICivilCalculatedObject
{
public CivilCalculatedPoint() { }
public CivilCalculatedPoint(
Point point,
List<string> codes,
Vector normalToBaseline,
Vector normalToSubassembly,
Point stationOffsetElevationToBaseline
)
{
this.point = point;
this.codes = codes;
this.normalToBaseline = normalToBaseline;
this.normalToSubassembly = normalToSubassembly;
this.stationOffsetElevationToBaseline = stationOffsetElevationToBaseline;
}
public Point point { get; set; }
public List<string> codes { get; set; }
public Vector normalToBaseline { get; set; }
public Vector normalToSubassembly { get; set; }
public Point stationOffsetElevationToBaseline { get; set; }
}
@@ -1,26 +0,0 @@
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Civil;
[SpeckleType("Objects.BuiltElements.Civil.CivilCalculatedShape")]
public class CivilCalculatedShape : Base, ICivilCalculatedObject
{
public CivilCalculatedShape() { }
public CivilCalculatedShape(List<string> codes, List<CivilCalculatedLink> links, double area, string units)
{
this.codes = codes;
this.links = links;
this.area = area;
this.units = units;
}
public List<string> codes { get; set; }
[DetachProperty]
public List<CivilCalculatedLink> links { get; set; }
public double area { get; set; }
public string units { get; set; }
}
@@ -1,24 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Civil;
[SpeckleType("Objects.BuiltElements.Civil.CivilProfile")]
public class CivilProfile : Profile
{
public string type { get; set; }
public string style { get; set; }
public double offset { get; set; }
/// <summary>
/// Points of vertical intersection
/// </summary>
public List<Point> pvis { get; set; }
/// <summary>
/// Name of parent profile if this is an offset profile
/// </summary>
public string parent { get; set; }
}
@@ -1,36 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.Column")]
public class Column : Base, IDisplayValue<IReadOnlyList<Base>>
{
public Column() { }
public Column(ICurve baseLine, string? units, Level? level = null, IReadOnlyList<Mesh>? displayValue = null)
{
this.baseLine = baseLine;
this.units = units;
this.level = level;
this.displayValue = ((IReadOnlyList<Base>?)displayValue) ?? new[] { (Base)baseLine };
}
public ICurve baseLine { get; set; }
public virtual Level? level { get; internal set; }
public string? units { get; set; }
[DetachProperty]
public IReadOnlyList<Base> displayValue { get; set; }
#region Schema Info Constructors
[SchemaInfo("Column", "Creates a Speckle column", "BIM", "Structure")]
[SchemaDeprecated, Obsolete("Use other constructor")]
public Column([SchemaMainParam] ICurve baseLine)
: this(baseLine, null) { }
#endregion
}
@@ -1,17 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.Conduit")]
public class Conduit : Base, IDisplayValue<List<Mesh>>
{
public ICurve baseCurve { get; set; }
public double diameter { get; set; }
public double length { get; set; }
public string units { get; set; }
[DetachProperty]
public List<Mesh> displayValue { get; set; }
}
-77
View File
@@ -1,77 +0,0 @@
using Speckle.Newtonsoft.Json;
using Speckle.Objects.Geometry;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.Duct")]
public class Duct : Base, IDisplayValue<IReadOnlyList<Base>>
{
public Duct() { }
public Duct(
ICurve baseCurve,
double width,
double height,
double diameter,
double length,
string? units,
double velocity = 0,
IReadOnlyList<Mesh>? displayValue = null
)
{
this.baseCurve = baseCurve;
this.width = width;
this.height = height;
this.diameter = diameter;
this.length = length;
this.units = units;
this.velocity = velocity;
this.displayValue = ((IReadOnlyList<Base>?)displayValue) ?? new[] { (Base)baseCurve };
}
[JsonIgnore, Obsolete("Replaced with baseCurve property")]
public Line? baseLine { get; set; }
public ICurve baseCurve { get; set; }
public double width { get; set; }
public double height { get; set; }
public double diameter { get; set; }
public double length { get; set; }
public double velocity { get; set; }
public string? units { get; set; }
[DetachProperty]
public IReadOnlyList<Base> displayValue { get; set; }
#region Schema Info Constructors
/// <summary>
/// SchemaBuilder constructor for a Speckle duct
/// </summary>
/// <param name="baseLine"></param>
/// <param name="width"></param>
/// <param name="height"></param>
/// <param name="diameter"></param>
/// <param name="velocity"></param>
/// <remarks>Assign units when using this constructor due to <paramref name="width"/>, <paramref name="height"/>, and <paramref name="diameter"/> params</remarks>
[SchemaInfo("Duct", "Creates a Speckle duct", "BIM", "MEP"), SchemaDeprecated]
public Duct([SchemaMainParam] Line baseLine, double width, double height, double diameter, double velocity = 0)
: this(baseLine, width, height, diameter, default, null, velocity) //TODO: what to do with length???
{ }
/// <summary>
/// SchemaBuilder constructor for a Speckle duct
/// </summary>
/// <param name="baseCurve"></param>
/// <param name="width"></param>
/// <param name="height"></param>
/// <param name="diameter"></param>
/// <param name="velocity"></param>
/// <remarks>Assign units when using this constructor due to <paramref name="width"/>, <paramref name="height"/>, and <paramref name="diameter"/> params</remarks>
[SchemaInfo("Duct", "Creates a Speckle duct", "BIM", "MEP")]
public Duct([SchemaMainParam] ICurve baseCurve, double width, double height, double diameter, double velocity = 0)
: this(baseCurve, width, height, diameter, default, null, velocity) { } //TODO: what to do with length???
#endregion
}
@@ -1,31 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.Featureline")]
public class Featureline : Base, IDisplayValue<List<Polyline>>
{
/// <summary>
/// The base curve of the featureline
/// </summary>
public ICurve curve { get; set; }
/// <summary>
/// The points constructing the Featureline
/// </summary>
/// <remarks>
/// Can include both intersection and elevation points
/// </remarks>
public List<Point> points { get; set; }
public string name { get; set; }
public string units { get; set; }
/// <summary>
/// The 3D curves generated from the curve and points of the featureline
/// </summary>
[DetachProperty]
public List<Polyline> displayValue { get; set; }
}
@@ -1,36 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.Floor")]
public class Floor : Base, IDisplayValue<List<Mesh>>
{
public Floor() { }
[SchemaInfo("Floor", "Creates a Speckle floor", "BIM", "Architecture")]
public Floor(
[SchemaMainParam] ICurve outline,
List<ICurve>? voids = null,
[SchemaParamInfo("Any nested elements that this floor might have")] List<Base>? elements = null
)
{
this.outline = outline;
this.voids = voids ?? new();
this.elements = elements;
}
public ICurve outline { get; set; }
public List<ICurve> voids { get; set; } = new();
[DetachProperty]
public List<Base>? elements { get; set; }
public virtual Level? level { get; internal set; }
public string units { get; set; }
[DetachProperty]
public List<Mesh> displayValue { get; set; }
}
@@ -1,36 +0,0 @@
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.GridLine")]
public class GridLine : Base, IDisplayValue<List<Base>>
{
public GridLine() { }
[SchemaInfo("GridLine", "Creates a Speckle grid line", "BIM", "Other"), SchemaDeprecated]
public GridLine(
[SchemaParamInfo("NOTE: only Line and Arc curves are supported in Revit"), SchemaMainParam] ICurve baseLine
)
{
this.baseLine = baseLine;
}
[SchemaInfo("GridLine", "Creates a Speckle grid line with a label", "BIM", "Other")]
public GridLine(
[SchemaParamInfo("NOTE: only Line and Arc curves are supported in Revit"), SchemaMainParam] ICurve baseLine,
string label = ""
)
{
this.baseLine = baseLine;
this.label = label;
}
public ICurve baseLine { get; set; }
public string label { get; set; }
public string units { get; set; }
[DetachProperty]
public List<Base> displayValue { get; set; }
}
@@ -1,30 +0,0 @@
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.Level")]
public class Level : Base
{
//public List<Base> elements { get; set; }
public Level() { }
/// <summary>
/// SchemaBuilder constructor for a Speckle level
/// </summary>
/// <param name="name"></param>
/// <param name="elevation"></param>
/// <remarks>Assign units when using this constructor due to <paramref name="elevation"/> param</remarks>
[SchemaInfo("Level", "Creates a Speckle level", "BIM", "Architecture")]
public Level(string name, double elevation)
{
this.name = name;
this.elevation = elevation;
}
public string name { get; set; }
public double elevation { get; set; }
public string units { get; set; }
}
@@ -1,88 +0,0 @@
using Speckle.Newtonsoft.Json;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
/// <summary>
/// Represents graph connections between built elements objects
/// </summary>
/// <remarks>
/// Network <see cref="elements"/> may need to be created first in native applications before they are linked.
/// </remarks>
[Obsolete("Networks are no longer used in any connector to assemble MEP systems.")]
[SpeckleType("Objects.BuiltElements.Network")]
public class Network : Base
{
public Network() { }
public string name { get; set; }
/// <summary>
/// The elements contained in the network
/// </summary>
public List<NetworkElement> elements { get; set; }
/// <summary>
/// The connections between <see cref="elements"/>
/// </summary>
public List<NetworkLink> links { get; set; }
}
[Obsolete("Networks are no longer used in any connector to assemble MEP systems.")]
[SpeckleType("Objects.BuiltElements.NetworkElement")]
public class NetworkElement : Base
{
public NetworkElement() { }
public string name { get; set; }
/// <summary>
/// The Base object representing the element in the network (eg Pipe, Duct, etc)
/// </summary>
/// <remarks>
/// Currently named "elements" to assist with receiving in connector flatten method.
/// </remarks>
[DetachProperty]
public Base elements { get; set; }
/// <summary>
/// The index of the links in <see cref="network"/> that are connected to this element
/// </summary>
public List<int> linkIndices { get; set; }
[JsonIgnore]
public Network network { get; set; }
/// <summary>
/// Retrieves the links for this element
/// </summary>
[JsonIgnore]
#pragma warning disable CS8619 // Nullability of reference types in value doesn't match target type. Reason: obsolete.
public List<NetworkLink> links => linkIndices.Select(i => network?.links[i]).ToList();
#pragma warning restore CS8619 // Nullability of reference types in value doesn't match target type. Reason: obsolete.
}
[Obsolete("Networks are no longer used in any connector to assemble MEP systems.")]
[SpeckleType("Objects.BuiltElements.NetworkLink")]
public class NetworkLink : Base
{
public NetworkLink() { }
public string name { get; set; }
/// <summary>
/// The index of the elements in <see cref="network"/> that are connected by this link
/// </summary>
public List<int> elementIndices { get; set; }
[JsonIgnore]
public Network network { get; set; }
/// <summary>
/// Retrieves the elements for this link
/// </summary>
[JsonIgnore]
#pragma warning disable CS8619 // Nullability of reference types in value doesn't match target type. Reason: obsolete.
public List<NetworkElement> elements => elementIndices.Select(i => network?.elements[i]).ToList();
#pragma warning restore CS8619 // Nullability of reference types in value doesn't match target type. Reason: obsolete.
}
@@ -1,20 +0,0 @@
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.Opening")]
public class Opening : Base
{
public Opening() { }
[SchemaInfo("Arch Opening", "Creates a Speckle opening", "BIM", "Architecture")]
public Opening(ICurve outline)
{
this.outline = outline;
}
public ICurve outline { get; set; }
public string units { get; set; }
}
-36
View File
@@ -1,36 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.Pipe")]
public class Pipe : Base, IDisplayValue<List<Mesh>>
{
public Pipe() { }
[SchemaInfo("Pipe", "Creates a Speckle pipe", "BIM", "MEP")]
public Pipe(
[SchemaMainParam] ICurve baseCurve,
double length,
double diameter,
double flowrate = 0,
double relativeRoughness = 0
)
{
this.baseCurve = baseCurve;
this.length = length;
this.diameter = diameter;
this["flowRate"] = flowrate;
this["relativeRoughness"] = relativeRoughness;
}
public ICurve baseCurve { get; set; }
public double length { get; set; }
public double diameter { get; set; }
public string units { get; set; }
[DetachProperty]
public List<Mesh> displayValue { get; set; }
}
@@ -1,21 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
[SpeckleType("Objects.BuiltElements.Profile")]
public class Profile : Base, IDisplayValue<Polyline>
{
public List<ICurve> curves { get; set; }
public string name { get; set; }
public double startStation { get; set; }
public double endStation { get; set; }
public string units { get; set; }
[DetachProperty]
public Polyline displayValue { get; set; }
}
-159
View File
@@ -1,159 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements;
/// <summary>
/// A reinforcement bar group comprised of reinforcing bars of the same type and shape.
/// </summary>
/// <remarks>
/// This class is not suitable for freeform rebar, which can have multiple shapes.
/// </remarks>
public abstract class RebarGroup<T> : Base, IHasVolume, IDisplayValue<List<ICurve>>
where T : RebarShape
{
public RebarGroup() { }
/// <summary>
/// The shape of the rebar group
/// </summary>
[DetachProperty]
public RebarShape shape { get; set; }
/// <summary>
/// The number of rebars in the rebar group
/// </summary>
/// <remarks>
/// Excluded end bars are not included in the count
/// </remarks>
public int number { get; set; }
/// <summary>
/// Indicates if rebar set includes the first bar
/// </summary>
/// <remarks>
/// Only applicable to stirrup (transverse) rebar
/// </remarks>
public bool hasFirstBar { get; set; }
/// <summary>
/// Indicates if rebar set includes the last bar
/// </summary>
/// <remarks>
/// Only applicable to stirrup (transverse) rebar
/// </remarks>
public bool hasLastBar { get; set; }
/// <summary>
/// The start hook of bars in the rebar group
/// </summary>
/// <remarks>
/// Null indicates no start hook
/// </remarks>
[DetachProperty]
public virtual RebarHook? startHook { get; set; }
/// <summary>
/// The end hook of bars in the rebar group
/// </summary>
/// <remarks>
/// Null indicates no end hook
/// </remarks>
[DetachProperty]
public virtual RebarHook? endHook { get; set; }
/// <summary>
/// The display representation of the rebar group as centerline curves
/// </summary>
[DetachProperty]
public List<ICurve> displayValue { get; set; }
/// <summary>
/// The total volume of the rebar group.
/// </summary>
public double volume { get; set; }
public string units { get; set; }
}
/// <summary>
/// The shape describing the geometry and geometry parameters of a reinforcing bar
/// </summary>
[SpeckleType("Objects.BuiltElements.RebarShape")]
public class RebarShape : Base
{
public RebarShape() { }
/// <summary>
/// The name of the rebar shape
/// </summary>
public string name { get; set; }
/// <summary>
/// The type of the rebar shape
/// </summary>
public RebarType rebarType { get; set; }
/// <summary>
/// The curves of the rebar shape
/// </summary>
/// <remarks>
/// Typically suppresses hooks and bend radius
/// </remarks>
public List<ICurve> curves { get; set; } = new();
/// <summary>
/// The diameter of the rebar bar
/// </summary>
public double barDiameter { get; set; }
public string units { get; set; }
}
[SpeckleType("Objects.BuiltElements.RebarHook")]
public class RebarHook : Base
{
public RebarHook() { }
/// <summary>
/// The angle of the hook in radians.
/// </summary>
public double angle { get; set; }
/// <summary>
/// The length of the hook.
/// </summary>
public double length { get; set; }
/// <summary>
/// The radius of the bend of the hook.
/// </summary>
public double radius { get; set; }
public string units { get; set; }
}
public enum RebarType
{
Unknown = 0,
Standard = 10,
StirrupPolygonal = 20,
StirrupSpiral = 30,
StirrupTapered = 40
}
#region Obsolete
[Obsolete("Deprecated in 2.17: Use the RebarGroup class instead")]
[SpeckleType("Objects.BuiltElements.Rebar")]
public class Rebar : Base, IHasVolume, IDisplayValue<List<Mesh>>
{
public List<ICurve> curves { get; set; } = new();
public string units { get; set; }
[DetachProperty]
public List<Mesh> displayValue { get; set; }
public double volume { get; set; }
}
#endregion
@@ -1,40 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Objects.Utils;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.AdaptiveComponent")]
public class AdaptiveComponent : Base, IDisplayValue<List<Mesh>>
{
public AdaptiveComponent() { }
[SchemaInfo("AdaptiveComponent", "Creates a Revit adaptive component by points", "Revit", "Families")]
public AdaptiveComponent(
string type,
string family,
List<Point> basePoints,
bool flipped = false,
List<Parameter>? parameters = null
)
{
this.type = type;
this.family = family;
this.basePoints = basePoints;
this.flipped = flipped;
this.parameters = parameters?.ToBase();
}
public string type { get; set; }
public string family { get; set; }
public List<Point> basePoints { get; set; }
public bool flipped { get; set; }
public string elementId { get; set; }
public Base? parameters { get; set; }
public string units { get; set; }
[DetachProperty]
public List<Mesh> displayValue { get; set; }
}
@@ -1,25 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.BuildingPad")]
public class BuildingPad : Base, IDisplayValue<List<Mesh>>
{
public ICurve outline { get; set; }
public List<ICurve> voids { get; set; } = new();
public string type { get; set; }
public Level level { get; set; }
public Base parameters { get; set; }
public string elementId { get; set; }
public string units { get; set; }
[DetachProperty]
public List<Mesh> displayValue { get; set; }
}
@@ -1,84 +0,0 @@
using Speckle.Objects.Utils;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit.Curve;
[SpeckleType("Objects.BuiltElements.Revit.Curve.ModelCurve")]
public class ModelCurve : Base
{
public ModelCurve() { }
[SchemaInfo("ModelCurve", "Creates a Revit model curve", "Revit", "Curves")]
public ModelCurve([SchemaMainParam] ICurve baseCurve, string lineStyle, List<Parameter>? parameters = null)
{
this.baseCurve = baseCurve;
this.lineStyle = lineStyle;
this.parameters = parameters?.ToBase();
}
public ICurve baseCurve { get; set; }
public string lineStyle { get; set; }
public Base? parameters { get; set; }
public string elementId { get; set; }
public string units { get; set; }
}
[SpeckleType("Objects.BuiltElements.Revit.Curve.DetailCurve")]
public class DetailCurve : Base
{
public DetailCurve() { }
[SchemaInfo("DetailCurve", "Creates a Revit detail curve", "Revit", "Curves")]
public DetailCurve([SchemaMainParam] ICurve baseCurve, string lineStyle, List<Parameter>? parameters = null)
{
this.baseCurve = baseCurve;
this.lineStyle = lineStyle;
this.parameters = parameters?.ToBase();
}
public ICurve baseCurve { get; set; }
public string lineStyle { get; set; }
public Base? parameters { get; set; }
public string elementId { get; set; }
public string units { get; set; }
}
[SpeckleType("Objects.BuiltElements.Revit.Curve.RoomBoundaryLine")]
public class RoomBoundaryLine : Base
{
public RoomBoundaryLine() { }
[SchemaInfo("RoomBoundaryLine", "Creates a Revit room boundary line", "Revit", "Curves")]
public RoomBoundaryLine([SchemaMainParam] ICurve baseCurve, List<Parameter>? parameters = null)
{
this.baseCurve = baseCurve;
this.parameters = parameters?.ToBase();
}
public ICurve baseCurve { get; set; }
public Base? parameters { get; set; }
public string elementId { get; set; }
public Level level { get; set; }
public string units { get; set; }
}
[SpeckleType("Objects.BuiltElements.Revit.Curve.SpaceSeparationLine")]
public class SpaceSeparationLine : Base
{
public SpaceSeparationLine() { }
[SchemaInfo("SpaceSeparationLine", "Creates a Revit space separation line", "Revit", "Curves")]
public SpaceSeparationLine([SchemaMainParam] ICurve baseCurve, List<Parameter>? parameters = null)
{
this.baseCurve = baseCurve;
this.parameters = parameters?.ToBase();
}
public ICurve baseCurve { get; set; }
public Base? parameters { get; set; }
public string elementId { get; set; }
public string units { get; set; }
}
@@ -1,61 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Objects.Utils;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.DirectShape")]
public class DirectShape : Base, IDisplayValue<List<Base>>
{
public DirectShape() { }
/// <summary>
/// Constructs a new <see cref="DirectShape"/> instance given a list of <see cref="Base"/> objects.
/// </summary>
/// <param name="name">The name of the <see cref="DirectShape"/></param>
/// <param name="category">The <see cref="RevitCategory"/> of this instance.</param>
/// <param name="baseGeometries">A list of base classes to represent the direct shape (only mesh and brep are allowed, anything else will be ignored.)</param>
/// <param name="parameters">Optional Parameters for this instance.</param>
[SchemaInfo(
"DirectShape by base geometries",
"Creates a Revit DirectShape using a list of base geometry objects.",
"Revit",
"Families"
)]
public DirectShape(string name, RevitCategory category, List<Base> baseGeometries, List<Parameter>? parameters = null)
{
this.name = name;
this.category = category;
this.baseGeometries = baseGeometries.FindAll(IsValidObject);
this.parameters = parameters?.ToBase();
}
// moving away from using the RevitCategory Enum
public DirectShape(string name, string builtInCategory, List<Base> baseGeometries, List<Parameter>? parameters = null)
{
this.name = name;
this.baseGeometries = baseGeometries.FindAll(IsValidObject);
this.parameters = parameters?.ToBase();
//TODO: move to typed property alongside all other revit elements
this["builtInCategory"] = builtInCategory;
}
public string name { get; set; }
public RevitCategory category { get; set; }
public Base? parameters { get; set; }
public string elementId { get; set; }
[DetachProperty]
public List<Base> baseGeometries { get; set; } = new();
public string units { get; set; }
[DetachProperty]
public List<Base> displayValue { get; set; }
public bool IsValidObject(Base @base)
{
return @base is Point || @base is ICurve || @base is Mesh || @base is Brep;
}
}
@@ -1,180 +0,0 @@
namespace Speckle.Objects.BuiltElements.Revit;
//This is an enum so that we can easily create a dropdown in GH for schema builder
//NOTE: if edited the list in Objects.Converter.Revit.Categories should be updated too
public enum RevitCategory
{
AbutmentFoundations = 0,
AbutmentPiles = 1,
AbutmentWalls = 2,
DuctTerminal = 4,
BridgeAbutments = 3,
Alignments = 5,
StructConnectionAnchors = 6,
ApproachSlabs = 7,
BridgeArches = 8,
AudioVisualDevices = 9,
StairsRailingBaluster = 10,
BridgeBearings = 11,
StructConnectionBolts = 12,
BridgeCables = 13,
BridgeDecks = 14,
BridgeFraming = 15,
CableTrayFitting = 16,
CableTrayRun = 17,
CableTray = 18,
Casework = 19,
Ceilings = 20,
Columns = 21,
CommunicationDevices = 22,
ConduitFitting = 23,
Conduit = 24,
Coordination_Model = 25,
BridgeFramingCrossBracing = 26,
CurtainWallPanels = 27,
CurtaSystem = 28,
CurtainWallMullions = 29,
DataDevices = 30,
BridgeFramingDiaphragms = 31,
Doors = 32,
DuctAccessory = 33,
DuctFitting = 34,
PlaceHolderDucts = 35,
DuctSystem = 36,
DuctCurves = 37,
ElectricalEquipment = 38,
ElectricalFixtures = 39,
Entourage = 40,
ExpansionJoints = 41,
FireAlarmDevices = 42,
FireProtection = 43,
Floors = 44,
FoodServiceEquipment = 45,
Furniture = 46,
FurnitureSystems = 47,
GenericAnnotation = 48,
GenericModel = 49,
BridgeGirders = 50,
Hardscape = 51,
LightingDevices = 52,
LightingFixtures = 53,
Lines = 54,
Mass = 55,
MechanicalEquipment = 56,
MedicalEquipment = 57,
NurseCallDevices = 58,
Parking = 59,
Parts = 60,
PierCaps = 61,
PierColumns = 62,
BridgeFoundations = 63,
PierPiles = 64,
BridgeTowers = 65,
PierWalls = 66,
BridgePiers = 67,
PipeAccessory = 68,
PipeFitting = 69,
PlaceHolderPipes = 70,
PipeSegments = 71,
PipeCurves = 72,
PipingSystem = 73,
Planting = 74,
StructConnectionPlates = 75,
PlumbingFixtures = 76,
StructConnectionProfiles = 77,
StairsRailing = 78,
Ramps = 79,
Roads = 80,
Roofs = 81,
SecurityDevices = 82,
StructConnectionShearStuds = 83,
Signage = 84,
Site = 85,
SpecialityEquipment = 86,
Sprinklers = 87,
Stairs = 88,
StructuralFramingSystem = 89,
StructuralColumns = 90,
StructConnections = 91,
FabricAreas = 92,
StructuralFoundation = 93,
StructuralFraming = 94,
Rebar = 95,
Coupler = 96,
StructuralStiffener = 97,
StructuralTendons = 98,
StructuralTruss = 99,
TemporaryStructure = 100,
Topography = 101,
BridgeFramingTrusses = 102,
VerticalCirculation = 103,
VibrationDampers = 104,
VibrationIsolators = 105,
VibrationManagement = 106,
Walls = 107,
StructConnectionWelds = 108,
Windows = 109,
Railings = 110
}
/// <summary>
/// FamilyDocuments can only be assigned these categories
/// This is a subset of the list above which was manually retrieved from Revit's UI
/// </summary>
public enum RevitFamilyCategory
{
AudioVisualDevices = 9,
CableTrayFitting = 16,
Casework = 19,
Columns = 21,
CommunicationDevices = 22,
ConduitFitting = 23,
DataDevices = 30,
Doors = 32,
DuctAccessory = 33,
DuctFitting = 34,
ElectricalEquipment = 38,
ElectricalFixtures = 39,
Entourage = 40,
FireAlarmDevices = 42,
FireProtection = 43,
FoodServiceEquipment = 45,
Furniture = 46,
FurnitureSystems = 47,
GenericModel = 49,
Hardscape = 51,
LightingDevices = 52,
LightingFixtures = 53,
Mass = 55,
MechanicalEquipment = 56,
MedicalEquipment = 57,
NurseCallDevices = 58,
Parking = 59,
PipeAccessory = 68,
PipeFitting = 69,
Planting = 74,
PlumbingFixtures = 76,
Roads = 80,
SecurityDevices = 82,
Signage = 84,
Site = 85,
SpecialityEquipment = 86,
Sprinklers = 87,
StructuralFramingSystem = 89,
StructuralColumns = 90,
StructConnections = 91,
StructuralFoundation = 93,
StructuralFraming = 94,
StructuralStiffener = 97,
TemporaryStructure = 100,
VerticalCirculation = 103,
Windows = 109,
Railings = 110
}
public enum LocationLine
{
Centerline,
Exterior,
Interior
}
@@ -1,55 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Objects.Utils;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.FamilyInstance")]
public class FamilyInstance : Base, IDisplayValue<List<Mesh>>
{
public FamilyInstance() { }
[SchemaInfo("FamilyInstance", "Creates a Revit family instance", "Revit", "Families")]
public FamilyInstance(
Point basePoint,
string family,
string type,
Level level,
double rotation = 0,
bool facingFlipped = false,
bool handFlipped = false,
List<Parameter>? parameters = null
)
{
this.basePoint = basePoint;
this.family = family;
this.type = type;
this.level = level;
this.rotation = rotation;
this.facingFlipped = facingFlipped;
this.handFlipped = handFlipped;
mirrored = false;
this.parameters = parameters?.ToBase();
}
public Point basePoint { get; set; }
public string family { get; set; }
public string type { get; set; }
public string category { get; set; }
public Level level { get; set; }
public double rotation { get; set; }
public bool facingFlipped { get; set; }
public bool handFlipped { get; set; }
public bool mirrored { get; set; }
public Base? parameters { get; set; }
public string elementId { get; set; }
[DetachProperty]
public List<Base> elements { get; set; }
public string units { get; set; }
[DetachProperty]
public List<Mesh> displayValue { get; set; }
}
@@ -1,140 +0,0 @@
using Speckle.Newtonsoft.Json;
using Speckle.Objects.Geometry;
using Speckle.Objects.Utils;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.FreeformElement")]
public class FreeformElement : Base, IDisplayValue<List<Base>>
{
public FreeformElement() { }
[SchemaInfo(
"Freeform element",
"Creates a Revit Freeform element using a list of Brep or Meshes. Category defaults to Generic Models",
"Revit",
"Families"
)]
public FreeformElement(List<Base> baseGeometries, string subcategory = "", List<Parameter>? parameters = null)
{
this.baseGeometries = baseGeometries;
//this.category = category;
this.subcategory = subcategory;
if (!IsValid())
{
throw new Exception("Freeform elements can only be created from BREPs or Meshes");
}
this.parameters = parameters?.ToBase();
}
public Base? parameters { get; set; }
public string subcategory { get; set; }
public string elementId { get; set; }
/// <summary>
/// DEPRECATED. Sets the geometry contained in the FreeformElement. This field has been deprecated in favor of `baseGeometries`
/// to align with Revit's API. It remains as a setter-only property for backwards compatibility.
/// It will set the first item on the baseGeometries list, and instantiate a list if necessary.
/// </summary>
[JsonIgnore, SchemaIgnore, Obsolete("Use 'baseGeometries' instead", true)]
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Design",
"CA1044:Properties should not be write only",
Justification = "Obsolete"
)]
public Base baseGeometry
{
set
{
if (baseGeometries == null)
{
baseGeometries = new List<Base> { value };
}
else if (baseGeometries.Count == 0)
{
baseGeometries.Add(value);
}
else
{
baseGeometries[0] = value;
}
}
}
[DetachProperty, Chunkable]
public List<Base> baseGeometries { get; set; }
public string units { get; set; }
[DetachProperty]
public List<Base> displayValue { get; set; }
public bool IsValid()
{
return baseGeometries.All(IsValidObject);
}
public bool IsValidObject(Base @base)
{
return @base is Mesh || @base is Brep || @base is Geometry.Curve;
}
#region Deprecated Constructors
[
SchemaDeprecated,
SchemaInfo(
"Freeform element",
"Creates a Revit Freeform element using a list of Brep or Meshes.",
"Revit",
"Families"
)
]
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Usage",
"CA2201:Do not raise reserved exception types",
Justification = "Obsolete"
)]
public FreeformElement(Base baseGeometry, List<Parameter>? parameters = null)
{
if (!IsValidObject(baseGeometry))
{
throw new Exception("Freeform elements can only be created from BREPs or Meshes");
}
baseGeometries = new List<Base> { baseGeometry };
this.parameters = parameters?.ToBase();
}
[
SchemaDeprecated,
SchemaInfo(
"Freeform element",
"Creates a Revit Freeform element using a list of Brep or Meshes.",
"Revit",
"Families"
)
]
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Usage",
"CA2201:Do not raise reserved exception types",
Justification = "Obsolete"
)]
public FreeformElement(List<Base> baseGeometries, List<Parameter>? parameters = null)
{
this.baseGeometries = baseGeometries;
if (!IsValid())
{
throw new Exception("Freeform elements can only be created from BREPs or Meshes");
}
this.parameters = parameters?.ToBase();
}
#endregion
}
@@ -1,6 +0,0 @@
namespace Speckle.Objects.BuiltElements.Revit.Interfaces;
public interface IHasMEPConnectors
{
List<RevitMEPConnector> Connectors { get; set; }
}
@@ -1,15 +0,0 @@
using Speckle.Objects.BuiltElements.Revit.Interfaces;
using Speckle.Objects.Other.Revit;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.RevitMEPFamilyInstance")]
public class RevitMEPFamilyInstance : RevitInstance, IHasMEPConnectors
{
public string RevitPartType { get; set; }
[DetachProperty]
public List<RevitMEPConnector> Connectors { get; set; } = new();
public List<ICurve> Curves { get; set; } = new();
}
@@ -1,47 +0,0 @@
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.Parameter")]
public class Parameter : Base
{
public Parameter() { }
[SchemaInfo("Parameter", "A Revit instance parameter to set on an element", "Revit", "Families")]
public Parameter(
[SchemaParamInfo("The Revit display name, BuiltInParameter name or GUID (for shared parameters)")] string name,
object value,
[SchemaParamInfo(
"(Optional) Speckle units. If not set it's retrieved from the current document. For non lenght based parameters (eg. Air Flow) it should be set to 'none' so that the Revit display unit will be used instead."
)]
string units = ""
)
{
this.name = name;
this.value = value;
this.units = units;
applicationInternalName = name;
}
public string name { get; set; }
public object? value { get; set; }
public string applicationUnitType { get; set; } //eg UnitType UT_Length
public string applicationUnit { get; set; } //DisplayUnitType eg DUT_MILLIMITERS
public string applicationInternalName { get; set; } //BuiltInParameterName or GUID for shared parameter
/// <summary>
/// If True it's a Shared Parameter, in which case the ApplicationId field will contain this parameter GUID,
/// otherwise it will store its BuiltInParameter name
/// </summary>
public bool isShared { get; set; }
public bool isReadOnly { get; set; }
/// <summary>
/// True = Type Parameter, False = Instance Parameter
/// </summary>
public bool isTypeParameter { get; set; }
public string units { get; set; }
}
@@ -1,21 +0,0 @@
using Speckle.Objects.Utils;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.ParameterUpdater")]
public class ParameterUpdater : Base
{
[SchemaInfo("ParameterUpdater", "Updates parameters on a Revit element by id", "Revit", "Families")]
public ParameterUpdater([SchemaParamInfo("A Revit ElementId or UniqueId")] string id, List<Parameter> parameters)
{
elementId = id;
this.parameters = parameters.ToBase();
}
public ParameterUpdater() { }
public string elementId { get; set; }
public Base? parameters { get; set; }
}
@@ -1,13 +0,0 @@
using Speckle.Objects.Organization;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.ProjectInfo")]
public class ProjectInfo : BIMModelInfo
{
public string author { get; set; }
public string issueDate { get; set; }
public string organizationDescription { get; set; }
public string organizationName { get; set; }
}
@@ -1,53 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Objects.Utils;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.RevitBeam")]
public class RevitBeam : Beam
{
public RevitBeam() { }
public RevitBeam(
string family,
string type,
ICurve baseLine,
Level? level,
string? units,
List<Mesh>? displayValue = null,
List<Parameter>? parameters = null
)
: base(baseLine, level, units, displayValue)
{
this.family = family;
this.type = type;
this.parameters = parameters?.ToBase();
}
public string family { get; set; }
public string type { get; set; }
public Base? parameters { get; set; }
public string elementId { get; set; }
public new Level? level
{
get => base.level;
set => base.level = value;
}
#region Schema Info Constructors
[SchemaInfo("RevitBeam", "Creates a Revit beam by curve and base level.", "Revit", "Structure")]
public RevitBeam(
string family,
string type,
[SchemaMainParam] ICurve baseLine,
Level level,
List<Parameter>? parameters = null
)
: this(family, type, baseLine, level, null, parameters: parameters) { }
#endregion
}
@@ -1,51 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Objects.Utils;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.RevitBrace")]
public class RevitBrace : Brace
{
public RevitBrace() { }
public RevitBrace(
string family,
string type,
ICurve baseLine,
Level? level,
string? units,
string? elementId,
IReadOnlyList<Mesh>? displayValue = null,
List<Parameter>? parameters = null
)
: base(baseLine, units, displayValue)
{
this.family = family;
this.type = type;
this.level = level;
this.elementId = elementId;
this.parameters = parameters?.ToBase();
}
public string family { get; set; }
public string type { get; set; }
public Base? parameters { get; set; }
public string? elementId { get; set; }
public Level? level { get; set; }
#region Schema Info Constructor
[SchemaInfo("RevitBrace", "Creates a Revit brace by curve and base level.", "Revit", "Structure")]
public RevitBrace(
string family,
string type,
[SchemaMainParam] ICurve baseLine,
Level? level,
List<Parameter>? parameters = null
)
: this(family, type, baseLine, level, null, null, parameters: parameters) { }
#endregion
}
@@ -1,15 +0,0 @@
using Speckle.Objects.BuiltElements.Revit.Interfaces;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.RevitCableTray")]
public class RevitCableTray : CableTray, IHasMEPConnectors
{
public string family { get; set; }
public string type { get; set; }
public Level level { get; set; }
public Base parameters { get; set; }
public string elementId { get; set; }
public List<RevitMEPConnector> Connectors { get; set; } = new();
}
@@ -1,73 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.RevitCeiling")]
public class RevitCeiling : Ceiling
{
public RevitCeiling() { }
[SchemaDeprecated, SchemaInfo("RevitCeiling", "Creates a Revit ceiling", "Revit", "Architecture")]
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Style",
"IDE0060:Remove unused parameter",
Justification = "Obsolete"
)]
public RevitCeiling(
[SchemaMainParam, SchemaParamInfo("Planar boundary curve")] ICurve outline,
string family,
string type,
Level level,
double slope = 0,
[SchemaParamInfo("Planar line indicating slope direction")] Line? slopeDirection = null,
double offset = 0,
List<ICurve>? voids = null,
[SchemaParamInfo("Any nested elements that this ceiling might have")] List<Base>? elements = null
)
{
this.outline = outline;
this.family = family;
this.type = type;
this.level = level;
this.slope = slope;
this.slopeDirection = slopeDirection;
this.voids = voids ?? new();
this.elements = elements;
}
[SchemaInfo("RevitCeiling", "Creates a Revit ceiling", "Revit", "Architecture")]
public RevitCeiling(
[SchemaMainParam, SchemaParamInfo("Planar boundary curve")] ICurve outline,
string family,
string type,
Level level,
double slope = 0,
[SchemaParamInfo("Planar line indicating slope direction")] Line? slopeDirection = null,
List<ICurve>? voids = null,
[SchemaParamInfo("Any nested elements that this ceiling might have")] List<Base>? elements = null
)
{
this.outline = outline;
this.family = family;
this.type = type;
this.level = level;
this.slope = slope;
this.slopeDirection = slopeDirection;
this.voids = voids ?? new();
this.elements = elements;
}
public string family { get; set; }
public string type { get; set; }
public Level level { get; set; }
public double slope { get; set; }
public Line? slopeDirection { get; set; }
[Obsolete("Offset property is now captured in parameters to match the behavior of other Revit objects", true)]
public double offset { get; set; }
public Base parameters { get; set; }
public string elementId { get; set; }
}
@@ -1,130 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Objects.Utils;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.RevitColumn")]
public class RevitColumn : Column
{
public RevitColumn() { }
public RevitColumn(
string family,
string type,
ICurve baseLine,
Level? level,
Level? topLevel,
string? units,
string? elementId,
double baseOffset = 0,
double topOffset = 0,
bool facingFlipped = false,
bool handFlipped = false,
bool isSlanted = false,
double rotation = 0,
IReadOnlyList<Mesh>? displayValue = null,
List<Parameter>? parameters = null
)
: base(baseLine, units, level, displayValue)
{
this.family = family;
this.type = type;
this.topLevel = topLevel;
this.elementId = elementId;
this.baseOffset = baseOffset;
this.topOffset = topOffset;
this.facingFlipped = facingFlipped;
this.handFlipped = handFlipped;
this.isSlanted = isSlanted;
this.rotation = rotation;
this.parameters = parameters?.ToBase();
}
public Level? topLevel { get; set; }
public double baseOffset { get; set; }
public double topOffset { get; set; }
public bool facingFlipped { get; set; }
public bool handFlipped { get; set; }
public double rotation { get; set; }
public bool isSlanted { get; set; }
public string family { get; set; }
public string type { get; set; }
public Base? parameters { get; set; }
public string? elementId { get; set; }
public new Level? level
{
get => base.level;
set => base.level = value;
}
#region Schema Info Constructors
[SchemaInfo("RevitColumn Vertical", "Creates a vertical Revit Column by point and levels.", "Revit", "Architecture")]
public RevitColumn(
string family,
string type,
[SchemaParamInfo("Only the lower point of this line will be used as base point."), SchemaMainParam] ICurve baseLine,
Level level,
Level topLevel,
double baseOffset = 0,
double topOffset = 0,
bool structural = false,
[SchemaParamInfo("Rotation angle in radians")] double rotation = 0,
List<Parameter>? parameters = null
)
: this(
family,
type,
baseLine,
level,
topLevel,
null,
null,
baseOffset,
topOffset,
rotation: rotation,
parameters: parameters
) { }
[Obsolete("Use other constructors")]
[SchemaDeprecated]
[SchemaInfo("RevitColumn Slanted (old)", "Creates a slanted Revit Column by curve.", "Revit", "Structure")]
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"Style",
"IDE0060:Remove unused parameter",
Justification = "Obsolete"
)]
public RevitColumn(
string family,
string type,
[SchemaMainParam] ICurve baseLine,
Level level,
bool structural = false,
List<Parameter>? parameters = null
)
{
this.family = family;
this.type = type;
this.baseLine = baseLine;
this.level = level;
isSlanted = true;
this.parameters = parameters?.ToBase();
}
[SchemaInfo("RevitColumn Slanted", "Creates a slanted Revit Column by curve.", "Revit", "Structure")]
public RevitColumn(
string family,
string type,
[SchemaMainParam] ICurve baseLine,
Level level,
Level? topLevel = null,
bool structural = false,
List<Parameter>? parameters = null
)
: this(family, type, baseLine, level, topLevel, null, null, displayValue: null, parameters: parameters) { }
#endregion
}
@@ -1,19 +0,0 @@
using Speckle.Objects.BuiltElements.Revit.Interfaces;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.RevitConduit")]
public class RevitConduit : Conduit, IHasMEPConnectors
{
public string family { get; set; }
public string type { get; set; }
public Level level { get; set; }
public Base parameters { get; set; }
public string elementId { get; set; }
public List<RevitMEPConnector> Connectors { get; set; } = new();
}
@@ -1,6 +0,0 @@
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.RevitCurtainWallPanel")]
public class RevitCurtainWallPanel : RevitElement { }
@@ -1,204 +0,0 @@
using Speckle.Objects.BuiltElements.Revit.Interfaces;
using Speckle.Objects.Geometry;
using Speckle.Objects.Utils;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.RevitDuct")]
public class RevitDuct : Duct, IHasMEPConnectors
{
public RevitDuct() { }
public RevitDuct(
string family,
string type,
ICurve baseCurve,
string systemName,
string systemType,
Level level,
double width,
double height,
double diameter,
double length,
string? units,
string? elementId,
double velocity = 0,
IReadOnlyList<Mesh>? displayValue = null,
List<Parameter>? parameters = null
)
: base(baseCurve, width, height, diameter, length, units, velocity, displayValue)
{
this.family = family;
this.type = type;
this.systemName = systemName;
this.systemType = systemType;
this.level = level;
this.parameters = parameters?.ToBase();
this.elementId = elementId;
}
public string family { get; set; }
public string type { get; set; }
public string systemName { get; set; }
public string systemType { get; set; }
public Level level { get; set; }
public Base? parameters { get; set; }
public string? elementId { get; set; }
public List<RevitMEPConnector> Connectors { get; set; } = new();
#region Schema Info Constructors
[SchemaInfo("RevitDuct (DEPRECATED)", "Creates a Revit duct", "Revit", "MEP")]
[SchemaDeprecated]
[Obsolete("Use other Constructor")]
public RevitDuct(
string family,
string type,
[SchemaMainParam] Line baseLine,
string systemName,
string systemType,
Level level,
double width,
double height,
double diameter,
double velocity = 0,
List<Parameter>? parameters = null
)
{
baseCurve = baseLine;
this.family = family;
this.type = type;
this.width = width;
this.height = height;
this.diameter = diameter;
this.velocity = velocity;
this.systemName = systemName;
this.systemType = systemType;
this.parameters = parameters?.ToBase();
this.level = level;
}
[SchemaInfo("RevitDuct", "Creates a Revit duct", "Revit", "MEP")]
public RevitDuct(
string family,
string type,
[SchemaMainParam] ICurve baseCurve,
string systemName,
string systemType,
Level level,
double width,
double height,
double diameter,
double velocity = 0,
List<Parameter>? parameters = null
)
: this(
family,
type,
baseCurve,
systemName,
systemType,
level,
width,
height,
diameter,
default, //TODO: what to do with length?
null,
null,
velocity,
parameters: parameters
) { }
#endregion
}
[SpeckleType("Objects.BuiltElements.Revit.RevitFlexDuct")]
public class RevitFlexDuct : RevitDuct
{
public RevitFlexDuct() { }
public RevitFlexDuct(
string family,
string type,
[SchemaMainParam] ICurve baseCurve,
string systemName,
string systemType,
Level level,
double width,
double height,
double diameter,
double length,
Vector startTangent,
Vector endTangent,
string? units,
string? elementId,
double velocity = 0,
IReadOnlyList<Mesh>? displayValue = null,
List<Parameter>? parameters = null
)
: base(
family,
type,
baseCurve,
systemName,
systemType,
level,
width,
height,
diameter,
length,
units,
elementId,
velocity,
displayValue,
parameters
)
{
this.startTangent = startTangent;
this.endTangent = endTangent;
}
public Vector startTangent { get; set; }
public Vector endTangent { get; set; }
#region Schema Info Constructor
[SchemaInfo("RevitFlexDuct", "Creates a Revit flex duct", "Revit", "MEP")]
public RevitFlexDuct(
string family,
string type,
[SchemaMainParam] ICurve baseCurve,
string systemName,
string systemType,
Level level,
double width,
double height,
double diameter,
Vector startTangent,
Vector endTangent,
double velocity = 0,
List<Parameter>? parameters = null
)
: this(
family,
type,
baseCurve,
systemName,
systemType,
level,
width,
height,
diameter,
0,
startTangent,
endTangent,
null,
null,
velocity,
parameters: parameters
) { }
#endregion
}
@@ -1,20 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
/// <summary>
/// A generic Revit element for which we don't have direct conversions
/// </summary>
[SpeckleType("Objects.BuiltElements.Revit.RevitElement")]
public class RevitElement : Base, IDisplayValue<List<Mesh>>
{
public string family { get; set; }
public string type { get; set; }
public string category { get; set; }
public Base parameters { get; set; }
public string elementId { get; set; }
[DetachProperty]
public List<Mesh> displayValue { get; set; }
}
@@ -1,42 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.RevitElementType")]
public class RevitElementType : Base
{
public string family { get; set; }
public string type { get; set; }
public string category { get; set; }
}
[SpeckleType("Objects.BuiltElements.Revit.RevitMepElementType")]
public class RevitMepElementType : RevitElementType
{
public string shape { get; set; }
}
/// <summary>
/// Represents the FamilySymbol subclass of ElementType in Revit
/// </summary>
[SpeckleType("Objects.BuiltElements.Revit.RevitSymbolElementType")]
public class RevitSymbolElementType : RevitElementType, IDisplayValue<List<Mesh>>
{
/// <summary>
/// The type of placement for this family symbol
/// </summary>
/// <remarks> See https://www.revitapidocs.com/2023/2abb8627-1da3-4069-05c9-19e4be5e02ad.htm </remarks>
public string placementType { get; set; }
/// <summary>
/// Subcomponents found in this family symbol
/// </summary>
[DetachProperty]
public List<Base> elements { get; set; }
[DetachProperty]
public List<Mesh> displayValue { get; set; }
}
@@ -1,53 +0,0 @@
using Speckle.Objects.Geometry;
using Speckle.Objects.Utils;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.RevitFloor")]
public class RevitFloor : Floor
{
public RevitFloor() { }
[SchemaInfo("RevitFloor", "Creates a Revit floor by outline and level", "Revit", "Architecture")]
public RevitFloor(
string family,
string type,
[SchemaMainParam] ICurve outline,
Level level,
bool structural = false,
double slope = 0,
Line? slopeDirection = null,
List<ICurve>? voids = null,
[SchemaParamInfo("Any nested elements that this floor might have")] List<Base>? elements = null,
List<Parameter>? parameters = null
)
{
this.family = family;
this.type = type;
this.level = level;
this.structural = structural;
this.slope = slope;
this.slopeDirection = slopeDirection;
this.parameters = parameters?.ToBase();
this.outline = outline;
this.voids = voids ?? new();
this.elements = elements;
}
public string family { get; set; }
public string type { get; set; }
public new Level? level
{
get => base.level;
set => base.level = value;
}
public bool structural { get; set; }
public double slope { get; set; }
public Line? slopeDirection { get; set; }
public Base? parameters { get; set; }
public string elementId { get; set; }
}
@@ -1,57 +0,0 @@
using Speckle.Objects.Utils;
using Speckle.Sdk.Host;
using Speckle.Sdk.Models;
namespace Speckle.Objects.BuiltElements.Revit;
[SpeckleType("Objects.BuiltElements.Revit.RevitLevel")]
public class RevitLevel : Level
{
public RevitLevel() { }
/// <summary>
/// SchemaBuilder constructor for a Revit level
/// </summary>
/// <param name="name"></param>
/// <param name="elevation"></param>
/// <param name="createView"></param>
/// <param name="parameters"></param>
/// <remarks>Assign units when using this constructor due to <paramref name="elevation"/> param</remarks>
[SchemaInfo(
"RevitLevel",
"Creates a new Revit level unless one with the same elevation already exists",
"Revit",
"Architecture"
)]
public RevitLevel(
[SchemaParamInfo("Level name. NOTE: updating level name is not supported")] string name,
[SchemaParamInfo(
"Level elevation. NOTE: updating level elevation is not supported, a new one will be created unless another level at the new elevation already exists."
)]
double elevation,
[SchemaParamInfo(
"If true, it creates an associated view in Revit. NOTE: only used when creating a level for the first time"
)]
bool createView,
List<Parameter>? parameters = null
)
{
this.name = name;
this.elevation = elevation;
this.createView = createView;
this.parameters = parameters?.ToBase();
referenceOnly = false;
}
[SchemaInfo("RevitLevel by name", "Gets an existing Revit level by name", "Revit", "Architecture")]
public RevitLevel(string name)
{
this.name = name;
referenceOnly = true;
}
public bool createView { get; set; }
public Base? parameters { get; set; }
public string elementId { get; set; }
public bool referenceOnly { get; set; }
}

Some files were not shown because too many files have changed in this diff Show More