diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
deleted file mode 100644
index 2a523a93..00000000
--- a/.github/workflows/codeql-analysis.yml
+++ /dev/null
@@ -1,71 +0,0 @@
-# For most projects, this workflow file will not need changing; you simply need
-# to commit it to your repository.
-#
-# You may wish to alter this file to override the set of languages analyzed,
-# or to provide custom queries or build logic.
-#
-# ******** NOTE ********
-# We have attempted to detect the languages in your repository. Please check
-# the `language` matrix defined below to confirm you have the correct set of
-# supported CodeQL languages.
-#
-name: "CodeQL"
-
-on:
- push:
- branches: [ develop, main ]
- pull_request:
- # The branches below must be a subset of the branches above
- branches: [ develop ]
- schedule:
- - cron: '16 22 * * 3'
-
-jobs:
- analyze:
- name: Analyze
- runs-on: ubuntu-latest
- permissions:
- actions: read
- contents: read
- security-events: write
-
- strategy:
- fail-fast: false
- matrix:
- language: [ 'csharp', 'javascript' ]
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
- # Learn more:
- # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v2
-
- # Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v1
- with:
- languages: ${{ matrix.language }}
- # If you wish to specify custom queries, you can do so here or in a config file.
- # By default, queries listed here will override any specified in a config file.
- # Prefix the list here with "+" to use these queries and those in the config file.
- # queries: ./path/to/local/query, your-org/your-repo/queries@main
-
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
- # If this step fails, then you should remove it and run the build manually (see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@v1
-
- # ℹ️ Command-line programs to run using the OS shell.
- # 📚 https://git.io/JvXDl
-
- # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
- # and modify them (or add more) to build your code if your project
- # uses a compiled language
-
- #- run: |
- # make bootstrap
- # make release
-
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v1
diff --git a/.github/workflows/dotnet-grasshopper.yml b/.github/workflows/dotnet-grasshopper.yml
index 11c28f92..d13fdfa5 100644
--- a/.github/workflows/dotnet-grasshopper.yml
+++ b/.github/workflows/dotnet-grasshopper.yml
@@ -21,8 +21,6 @@ jobs:
env:
Solution_Name: HoaryFox.sln
Plugin_File_Name: HoaryFox
- Debug_File_Path: '.\HoaryFox\bin\'
- Release_File_Path: '.\HoaryFox\release\'
steps:
- name: Checkout
@@ -46,13 +44,12 @@ jobs:
env:
Configuration: ${{ matrix.configuration }}
- - name: Copy karambaConnect and samples to /HoaryFox/bin dir
+ - name: Copy Samples & License to /HoaryFox/bin dir
if: ${{ matrix.configuration == 'Release' }} # Only upload gha from a release build
shell: powershell
run: |
- cp ./KarambaConnect/bin/Release/net48/KarambaConnect.gha ./HoaryFox/bin/Release/net48/KarambaConnect.gha
- cp ./Samples ./HoaryFox/bin/Release/net48/Samples -recurse
- cp ./LICENSE ./HoaryFox/bin/Release/net48/LICENSE
+ cp ./Samples ./Release/Samples -recurse
+ cp ./LICENSE ./Release/LICENSE
- name: Upload release build of plugin as artefact
if: ${{ matrix.configuration == 'Release' }} # Only upload gha from a release build
@@ -60,8 +57,4 @@ jobs:
with:
name: HoaryFox
path: |
- ./HoaryFox/bin/Release/net48/HoaryFox.gha
- ./HoaryFox/bin/Release/net48/KarambaConnect.gha
- ./HoaryFox/bin/Release/net48/STBDotNet.dll
- ./HoaryFox/bin/Release/net48/Samples/
- ./HoaryFox/bin/Release/net48/LICENSE
+ ./Release
diff --git a/HoaryFox.sln b/HoaryFox.sln
index 35de60ed..83739a2d 100644
--- a/HoaryFox.sln
+++ b/HoaryFox.sln
@@ -3,33 +3,83 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30711.63
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HoaryFox", "HoaryFox\HoaryFox.csproj", "{9637855D-D144-4448-9F56-A391A3575DAC}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "karambaConnect", "KarambaConnect\karambaConnect.csproj", "{CD5D3228-2B3E-4112-9B42-C82615673DFE}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A6D8895B-AD85-4160-A082-039DB8766CC9}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HoaryFox", "HoaryFox", "{B4279383-2C6A-4302-BA63-68D496644360}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HoaryFoxCommon", "HoaryFox\Common\HoaryFoxCommon.csproj", "{5BDAF6C4-1471-4C20-B3EF-52E07023D63D}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HoaryFoxRH6", "HoaryFox\RH6\HoaryFoxRH6.csproj", "{A583EA84-5964-4BBA-9DC8-55E620233807}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HoaryFoxRH7", "HoaryFox\RH7\HoaryFoxRH7.csproj", "{6E000875-7563-4983-A64D-F270D3EC2A17}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "KarambaConnect", "KarambaConnect", "{C00C1886-E284-41C6-ACC4-76BC225C9178}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KarambaConnectCommon", "KarambaConnect\Common\KarambaConnectCommon.csproj", "{E6241903-54B8-42A9-BD55-052F1D1B35FD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "karambaConnectRH6K1", "KarambaConnect\RH6K1\karambaConnectRH6K1.csproj", "{D3B3F92E-513B-4C33-82F5-B7F9D3463F16}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "karambaConnectRH6K2", "KarambaConnect\RH6K2\karambaConnectRH6K2.csproj", "{A3A37FBC-B7FC-4F4A-92E7-09F19704E840}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "karambaConnectRH7K1", "KarambaConnect\RH7K1\karambaConnectRH7K1.csproj", "{CE8BFA92-E7F4-48DD-A548-9569ED587A51}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "karambaConnectRH7K2", "KarambaConnect\RH7K2\karambaConnectRH7K2.csproj", "{98FB69EA-C92D-443A-9649-ADF837BC6AB2}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {9637855D-D144-4448-9F56-A391A3575DAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9637855D-D144-4448-9F56-A391A3575DAC}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9637855D-D144-4448-9F56-A391A3575DAC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9637855D-D144-4448-9F56-A391A3575DAC}.Release|Any CPU.Build.0 = Release|Any CPU
- {CD5D3228-2B3E-4112-9B42-C82615673DFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CD5D3228-2B3E-4112-9B42-C82615673DFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CD5D3228-2B3E-4112-9B42-C82615673DFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CD5D3228-2B3E-4112-9B42-C82615673DFE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5BDAF6C4-1471-4C20-B3EF-52E07023D63D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5BDAF6C4-1471-4C20-B3EF-52E07023D63D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5BDAF6C4-1471-4C20-B3EF-52E07023D63D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5BDAF6C4-1471-4C20-B3EF-52E07023D63D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A583EA84-5964-4BBA-9DC8-55E620233807}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A583EA84-5964-4BBA-9DC8-55E620233807}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A583EA84-5964-4BBA-9DC8-55E620233807}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A583EA84-5964-4BBA-9DC8-55E620233807}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6E000875-7563-4983-A64D-F270D3EC2A17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E000875-7563-4983-A64D-F270D3EC2A17}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6E000875-7563-4983-A64D-F270D3EC2A17}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6E000875-7563-4983-A64D-F270D3EC2A17}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E6241903-54B8-42A9-BD55-052F1D1B35FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E6241903-54B8-42A9-BD55-052F1D1B35FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E6241903-54B8-42A9-BD55-052F1D1B35FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E6241903-54B8-42A9-BD55-052F1D1B35FD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CE8BFA92-E7F4-48DD-A548-9569ED587A51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CE8BFA92-E7F4-48DD-A548-9569ED587A51}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CE8BFA92-E7F4-48DD-A548-9569ED587A51}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CE8BFA92-E7F4-48DD-A548-9569ED587A51}.Release|Any CPU.Build.0 = Release|Any CPU
+ {98FB69EA-C92D-443A-9649-ADF837BC6AB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {98FB69EA-C92D-443A-9649-ADF837BC6AB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {98FB69EA-C92D-443A-9649-ADF837BC6AB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {98FB69EA-C92D-443A-9649-ADF837BC6AB2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D3B3F92E-513B-4C33-82F5-B7F9D3463F16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D3B3F92E-513B-4C33-82F5-B7F9D3463F16}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D3B3F92E-513B-4C33-82F5-B7F9D3463F16}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D3B3F92E-513B-4C33-82F5-B7F9D3463F16}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A3A37FBC-B7FC-4F4A-92E7-09F19704E840}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A3A37FBC-B7FC-4F4A-92E7-09F19704E840}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A3A37FBC-B7FC-4F4A-92E7-09F19704E840}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A3A37FBC-B7FC-4F4A-92E7-09F19704E840}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {5BDAF6C4-1471-4C20-B3EF-52E07023D63D} = {B4279383-2C6A-4302-BA63-68D496644360}
+ {A583EA84-5964-4BBA-9DC8-55E620233807} = {B4279383-2C6A-4302-BA63-68D496644360}
+ {6E000875-7563-4983-A64D-F270D3EC2A17} = {B4279383-2C6A-4302-BA63-68D496644360}
+ {E6241903-54B8-42A9-BD55-052F1D1B35FD} = {C00C1886-E284-41C6-ACC4-76BC225C9178}
+ {CE8BFA92-E7F4-48DD-A548-9569ED587A51} = {C00C1886-E284-41C6-ACC4-76BC225C9178}
+ {98FB69EA-C92D-443A-9649-ADF837BC6AB2} = {C00C1886-E284-41C6-ACC4-76BC225C9178}
+ {D3B3F92E-513B-4C33-82F5-B7F9D3463F16} = {C00C1886-E284-41C6-ACC4-76BC225C9178}
+ {A3A37FBC-B7FC-4F4A-92E7-09F19704E840} = {C00C1886-E284-41C6-ACC4-76BC225C9178}
+ EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F686E206-FA27-4450-9506-1707B276FCF0}
EndGlobalSection
diff --git a/HoaryFox/Common/HoaryFoxCommon.csproj b/HoaryFox/Common/HoaryFoxCommon.csproj
new file mode 100644
index 00000000..b6b98f05
--- /dev/null
+++ b/HoaryFox/Common/HoaryFoxCommon.csproj
@@ -0,0 +1,27 @@
+
+
+
+ net48
+
+
+
+
+ True
+ True
+ Resource.resx
+
+
+
+
+
+ PublicResXFileCodeGenerator
+ Resource.Designer.cs
+
+
+
+
+ none
+ false
+
+
+
diff --git a/HoaryFox/Properties/Resource.Designer.cs b/HoaryFox/Common/Properties/Resource.Designer.cs
similarity index 78%
rename from HoaryFox/Properties/Resource.Designer.cs
rename to HoaryFox/Common/Properties/Resource.Designer.cs
index cd44ba29..b0d5a84c 100644
--- a/HoaryFox/Properties/Resource.Designer.cs
+++ b/HoaryFox/Common/Properties/Resource.Designer.cs
@@ -8,7 +8,7 @@
//
//------------------------------------------------------------------------------
-namespace HoaryFox.Properties {
+namespace HoaryFoxCommon.Properties {
using System;
@@ -22,7 +22,7 @@ namespace HoaryFox.Properties {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resource {
+ public class Resource {
private static global::System.Resources.ResourceManager resourceMan;
@@ -36,10 +36,10 @@ internal Resource() {
/// このクラスで使用されているキャッシュされた ResourceManager インスタンスを返します。
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
+ public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HoaryFox.Properties.Resource", typeof(Resource).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HoaryFoxCommon.Properties.Resource", typeof(Resource).Assembly);
resourceMan = temp;
}
return resourceMan;
@@ -51,7 +51,7 @@ internal Resource() {
/// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
+ public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
@@ -63,7 +63,7 @@ internal Resource() {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap Axis {
+ public static System.Drawing.Bitmap Axis {
get {
object obj = ResourceManager.GetObject("Axis", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -73,7 +73,7 @@ internal static System.Drawing.Bitmap Axis {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap BeamName {
+ public static System.Drawing.Bitmap BeamName {
get {
object obj = ResourceManager.GetObject("BeamName", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -83,7 +83,7 @@ internal static System.Drawing.Bitmap BeamName {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap BeamSection {
+ public static System.Drawing.Bitmap BeamSection {
get {
object obj = ResourceManager.GetObject("BeamSection", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -93,7 +93,7 @@ internal static System.Drawing.Bitmap BeamSection {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap BraceName {
+ public static System.Drawing.Bitmap BraceName {
get {
object obj = ResourceManager.GetObject("BraceName", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -103,7 +103,7 @@ internal static System.Drawing.Bitmap BraceName {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap BraceSection {
+ public static System.Drawing.Bitmap BraceSection {
get {
object obj = ResourceManager.GetObject("BraceSection", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -113,7 +113,7 @@ internal static System.Drawing.Bitmap BraceSection {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap Brep {
+ public static System.Drawing.Bitmap Brep {
get {
object obj = ResourceManager.GetObject("Brep", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -123,7 +123,7 @@ internal static System.Drawing.Bitmap Brep {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap ColumnName {
+ public static System.Drawing.Bitmap ColumnName {
get {
object obj = ResourceManager.GetObject("ColumnName", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -133,7 +133,7 @@ internal static System.Drawing.Bitmap ColumnName {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap ColumnSection {
+ public static System.Drawing.Bitmap ColumnSection {
get {
object obj = ResourceManager.GetObject("ColumnSection", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -143,7 +143,17 @@ internal static System.Drawing.Bitmap ColumnSection {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap GirderName {
+ public static System.Drawing.Bitmap FilterByMaterial {
+ get {
+ object obj = ResourceManager.GetObject("FilterByMaterial", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
+ ///
+ public static System.Drawing.Bitmap GirderName {
get {
object obj = ResourceManager.GetObject("GirderName", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -153,7 +163,7 @@ internal static System.Drawing.Bitmap GirderName {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap GirderSection {
+ public static System.Drawing.Bitmap GirderSection {
get {
object obj = ResourceManager.GetObject("GirderSection", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -163,7 +173,7 @@ internal static System.Drawing.Bitmap GirderSection {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap InfoIcon {
+ public static System.Drawing.Bitmap InfoIcon {
get {
object obj = ResourceManager.GetObject("InfoIcon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -173,7 +183,7 @@ internal static System.Drawing.Bitmap InfoIcon {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap Line {
+ public static System.Drawing.Bitmap Line {
get {
object obj = ResourceManager.GetObject("Line", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -183,7 +193,7 @@ internal static System.Drawing.Bitmap Line {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap LoadStb {
+ public static System.Drawing.Bitmap LoadStb {
get {
object obj = ResourceManager.GetObject("LoadStb", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -193,7 +203,17 @@ internal static System.Drawing.Bitmap LoadStb {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap PostName {
+ public static System.Drawing.Bitmap MaterialType {
+ get {
+ object obj = ResourceManager.GetObject("MaterialType", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
+ ///
+ public static System.Drawing.Bitmap PostName {
get {
object obj = ResourceManager.GetObject("PostName", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -203,7 +223,7 @@ internal static System.Drawing.Bitmap PostName {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap PostSection {
+ public static System.Drawing.Bitmap PostSection {
get {
object obj = ResourceManager.GetObject("PostSection", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -213,7 +233,7 @@ internal static System.Drawing.Bitmap PostSection {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap SlabName {
+ public static System.Drawing.Bitmap SlabName {
get {
object obj = ResourceManager.GetObject("SlabName", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -223,7 +243,7 @@ internal static System.Drawing.Bitmap SlabName {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap SlabSection {
+ public static System.Drawing.Bitmap SlabSection {
get {
object obj = ResourceManager.GetObject("SlabSection", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -233,7 +253,17 @@ internal static System.Drawing.Bitmap SlabSection {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap WallName {
+ public static System.Drawing.Bitmap Story {
+ get {
+ object obj = ResourceManager.GetObject("Story", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
+ ///
+ public static System.Drawing.Bitmap WallName {
get {
object obj = ResourceManager.GetObject("WallName", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
@@ -243,7 +273,7 @@ internal static System.Drawing.Bitmap WallName {
///
/// 型 System.Drawing.Bitmap のローカライズされたリソースを検索します。
///
- internal static System.Drawing.Bitmap WallSection {
+ public static System.Drawing.Bitmap WallSection {
get {
object obj = ResourceManager.GetObject("WallSection", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
diff --git a/HoaryFox/Properties/Resource.resx b/HoaryFox/Common/Properties/Resource.resx
similarity index 93%
rename from HoaryFox/Properties/Resource.resx
rename to HoaryFox/Common/Properties/Resource.resx
index 82592480..febd7663 100644
--- a/HoaryFox/Properties/Resource.resx
+++ b/HoaryFox/Common/Properties/Resource.resx
@@ -142,6 +142,9 @@
..\Resources\ColumnSection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\FilterByMaterial.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\Resources\GirderName.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -157,6 +160,9 @@
..\Resources\LoadStb.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\MaterialType.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\Resources\PostName.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -169,6 +175,9 @@
..\Resources\SlabSection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\Story.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\Resources\WallName.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
diff --git a/HoaryFox/Properties/launchSettings.json b/HoaryFox/Common/Properties/launchSettings.json
similarity index 100%
rename from HoaryFox/Properties/launchSettings.json
rename to HoaryFox/Common/Properties/launchSettings.json
diff --git a/HoaryFox/Resources/Axis.png b/HoaryFox/Common/Resources/Axis.png
similarity index 100%
rename from HoaryFox/Resources/Axis.png
rename to HoaryFox/Common/Resources/Axis.png
diff --git a/HoaryFox/Resources/Axis.svg b/HoaryFox/Common/Resources/Axis.svg
similarity index 100%
rename from HoaryFox/Resources/Axis.svg
rename to HoaryFox/Common/Resources/Axis.svg
diff --git a/HoaryFox/Resources/BeamName.png b/HoaryFox/Common/Resources/BeamName.png
similarity index 100%
rename from HoaryFox/Resources/BeamName.png
rename to HoaryFox/Common/Resources/BeamName.png
diff --git a/HoaryFox/Resources/BeamSection.png b/HoaryFox/Common/Resources/BeamSection.png
similarity index 100%
rename from HoaryFox/Resources/BeamSection.png
rename to HoaryFox/Common/Resources/BeamSection.png
diff --git a/HoaryFox/Resources/BraceName.png b/HoaryFox/Common/Resources/BraceName.png
similarity index 100%
rename from HoaryFox/Resources/BraceName.png
rename to HoaryFox/Common/Resources/BraceName.png
diff --git a/HoaryFox/Resources/BraceSection.png b/HoaryFox/Common/Resources/BraceSection.png
similarity index 100%
rename from HoaryFox/Resources/BraceSection.png
rename to HoaryFox/Common/Resources/BraceSection.png
diff --git a/HoaryFox/Resources/Brep.afdesign b/HoaryFox/Common/Resources/Brep.afdesign
similarity index 100%
rename from HoaryFox/Resources/Brep.afdesign
rename to HoaryFox/Common/Resources/Brep.afdesign
diff --git a/HoaryFox/Resources/Brep.png b/HoaryFox/Common/Resources/Brep.png
similarity index 100%
rename from HoaryFox/Resources/Brep.png
rename to HoaryFox/Common/Resources/Brep.png
diff --git a/HoaryFox/Resources/ColumnName.png b/HoaryFox/Common/Resources/ColumnName.png
similarity index 100%
rename from HoaryFox/Resources/ColumnName.png
rename to HoaryFox/Common/Resources/ColumnName.png
diff --git a/HoaryFox/Resources/ColumnSection.png b/HoaryFox/Common/Resources/ColumnSection.png
similarity index 100%
rename from HoaryFox/Resources/ColumnSection.png
rename to HoaryFox/Common/Resources/ColumnSection.png
diff --git a/HoaryFox/Common/Resources/FilterByMaterial.png b/HoaryFox/Common/Resources/FilterByMaterial.png
new file mode 100644
index 00000000..f98925f5
Binary files /dev/null and b/HoaryFox/Common/Resources/FilterByMaterial.png differ
diff --git a/HoaryFox/Common/Resources/FilterByMaterial.svg b/HoaryFox/Common/Resources/FilterByMaterial.svg
new file mode 100644
index 00000000..14f87c0f
--- /dev/null
+++ b/HoaryFox/Common/Resources/FilterByMaterial.svg
@@ -0,0 +1,200 @@
+
+
diff --git a/HoaryFox/Resources/GirderName.png b/HoaryFox/Common/Resources/GirderName.png
similarity index 100%
rename from HoaryFox/Resources/GirderName.png
rename to HoaryFox/Common/Resources/GirderName.png
diff --git a/HoaryFox/Resources/GirderSection.png b/HoaryFox/Common/Resources/GirderSection.png
similarity index 100%
rename from HoaryFox/Resources/GirderSection.png
rename to HoaryFox/Common/Resources/GirderSection.png
diff --git a/HoaryFox/Resources/InfoIcon.afdesign b/HoaryFox/Common/Resources/InfoIcon.afdesign
similarity index 100%
rename from HoaryFox/Resources/InfoIcon.afdesign
rename to HoaryFox/Common/Resources/InfoIcon.afdesign
diff --git a/HoaryFox/Resources/InfoIcon.png b/HoaryFox/Common/Resources/InfoIcon.png
similarity index 100%
rename from HoaryFox/Resources/InfoIcon.png
rename to HoaryFox/Common/Resources/InfoIcon.png
diff --git a/HoaryFox/Resources/InfoIcon_Info.txt b/HoaryFox/Common/Resources/InfoIcon_Info.txt
similarity index 100%
rename from HoaryFox/Resources/InfoIcon_Info.txt
rename to HoaryFox/Common/Resources/InfoIcon_Info.txt
diff --git a/HoaryFox/Resources/Line.afdesign b/HoaryFox/Common/Resources/Line.afdesign
similarity index 100%
rename from HoaryFox/Resources/Line.afdesign
rename to HoaryFox/Common/Resources/Line.afdesign
diff --git a/HoaryFox/Resources/Line.png b/HoaryFox/Common/Resources/Line.png
similarity index 100%
rename from HoaryFox/Resources/Line.png
rename to HoaryFox/Common/Resources/Line.png
diff --git a/HoaryFox/Resources/LoadStb.png b/HoaryFox/Common/Resources/LoadStb.png
similarity index 100%
rename from HoaryFox/Resources/LoadStb.png
rename to HoaryFox/Common/Resources/LoadStb.png
diff --git a/HoaryFox/Resources/LoadStb.xcf b/HoaryFox/Common/Resources/LoadStb.xcf
similarity index 100%
rename from HoaryFox/Resources/LoadStb.xcf
rename to HoaryFox/Common/Resources/LoadStb.xcf
diff --git a/HoaryFox/Common/Resources/MaterialType.png b/HoaryFox/Common/Resources/MaterialType.png
new file mode 100644
index 00000000..683ae6a3
Binary files /dev/null and b/HoaryFox/Common/Resources/MaterialType.png differ
diff --git a/HoaryFox/Common/Resources/MaterialType.svg b/HoaryFox/Common/Resources/MaterialType.svg
new file mode 100644
index 00000000..97bd0da7
--- /dev/null
+++ b/HoaryFox/Common/Resources/MaterialType.svg
@@ -0,0 +1,241 @@
+
+
diff --git a/HoaryFox/Resources/Name.afdesign b/HoaryFox/Common/Resources/Name.afdesign
similarity index 100%
rename from HoaryFox/Resources/Name.afdesign
rename to HoaryFox/Common/Resources/Name.afdesign
diff --git a/HoaryFox/Resources/PostName.png b/HoaryFox/Common/Resources/PostName.png
similarity index 100%
rename from HoaryFox/Resources/PostName.png
rename to HoaryFox/Common/Resources/PostName.png
diff --git a/HoaryFox/Resources/PostSection.png b/HoaryFox/Common/Resources/PostSection.png
similarity index 100%
rename from HoaryFox/Resources/PostSection.png
rename to HoaryFox/Common/Resources/PostSection.png
diff --git a/HoaryFox/Resources/Section.afdesign b/HoaryFox/Common/Resources/Section.afdesign
similarity index 100%
rename from HoaryFox/Resources/Section.afdesign
rename to HoaryFox/Common/Resources/Section.afdesign
diff --git a/HoaryFox/Resources/Slab - Copy.svg b/HoaryFox/Common/Resources/Slab.svg
similarity index 100%
rename from HoaryFox/Resources/Slab - Copy.svg
rename to HoaryFox/Common/Resources/Slab.svg
diff --git a/HoaryFox/Resources/SlabName.png b/HoaryFox/Common/Resources/SlabName.png
similarity index 100%
rename from HoaryFox/Resources/SlabName.png
rename to HoaryFox/Common/Resources/SlabName.png
diff --git a/HoaryFox/Resources/SlabSection.png b/HoaryFox/Common/Resources/SlabSection.png
similarity index 100%
rename from HoaryFox/Resources/SlabSection.png
rename to HoaryFox/Common/Resources/SlabSection.png
diff --git a/HoaryFox/Common/Resources/Story.png b/HoaryFox/Common/Resources/Story.png
new file mode 100644
index 00000000..34fe8047
Binary files /dev/null and b/HoaryFox/Common/Resources/Story.png differ
diff --git a/HoaryFox/Common/Resources/Story.svg b/HoaryFox/Common/Resources/Story.svg
new file mode 100644
index 00000000..dcc3267d
--- /dev/null
+++ b/HoaryFox/Common/Resources/Story.svg
@@ -0,0 +1,224 @@
+
+
diff --git a/HoaryFox/Resources/Wall.svg b/HoaryFox/Common/Resources/Wall.svg
similarity index 100%
rename from HoaryFox/Resources/Wall.svg
rename to HoaryFox/Common/Resources/Wall.svg
diff --git a/HoaryFox/Resources/WallName.png b/HoaryFox/Common/Resources/WallName.png
similarity index 100%
rename from HoaryFox/Resources/WallName.png
rename to HoaryFox/Common/Resources/WallName.png
diff --git a/HoaryFox/Resources/WallSection.png b/HoaryFox/Common/Resources/WallSection.png
similarity index 100%
rename from HoaryFox/Resources/WallSection.png
rename to HoaryFox/Common/Resources/WallSection.png
diff --git a/HoaryFox/HoaryFox.csproj b/HoaryFox/HoaryFox.csproj
deleted file mode 100644
index e123cd2d..00000000
--- a/HoaryFox/HoaryFox.csproj
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
- net48
- 1.0
- HoaryFox
- Description of HoaryFox
- .gha
- hrntsm
- true
- true
- true
-
-
-
-
-
-
-
-
-
-
- True
- True
- Resource.resx
-
-
-
-
-
- ResXFileCodeGenerator
- Resource.Designer.cs
-
-
-
-
- C:\Program Files\Rhino 6\System\Rhino.exe
-
- Program
-
-
-
\ No newline at end of file
diff --git a/HoaryFox/RH6/HoaryFoxRH6.csproj b/HoaryFox/RH6/HoaryFoxRH6.csproj
new file mode 100644
index 00000000..383d571d
--- /dev/null
+++ b/HoaryFox/RH6/HoaryFoxRH6.csproj
@@ -0,0 +1,44 @@
+
+
+ net48
+ 2.0.2
+ HoaryFox
+ This Component read ST-Bridge file(.stb) and display its model data.
+ .gha
+ hrntsm
+ true
+ HoaryFox
+ false
+ HoaryFox
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ C:\Program Files\Rhino 6\System\Rhino.exe
+
+ Program
+
+
+
+ none
+ false
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HoaryFox/HoaryFoxInfo.cs b/HoaryFox/RH6/HoaryFoxRH6Info.cs
similarity index 78%
rename from HoaryFox/HoaryFoxInfo.cs
rename to HoaryFox/RH6/HoaryFoxRH6Info.cs
index e08a08ac..5994fe53 100644
--- a/HoaryFox/HoaryFoxInfo.cs
+++ b/HoaryFox/RH6/HoaryFoxRH6Info.cs
@@ -4,11 +4,11 @@
namespace HoaryFox
{
- public class HoaryFoxInfo : GH_AssemblyInfo
+ public class HoaryFoxRH6Info : GH_AssemblyInfo
{
public override string Name => "HoaryFox";
- public override Bitmap Icon => Properties.Resource.InfoIcon;
+ public override Bitmap Icon => HoaryFoxCommon.Properties.Resource.InfoIcon;
public override string Description => "This Component read ST-Bridge file(.stb) and display its model data.";
diff --git a/HoaryFox/RH7/Component/Check/FilterByMaterials.cs b/HoaryFox/RH7/Component/Check/FilterByMaterials.cs
new file mode 100644
index 00000000..57472c7d
--- /dev/null
+++ b/HoaryFox/RH7/Component/Check/FilterByMaterials.cs
@@ -0,0 +1,106 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using Grasshopper.Kernel;
+using Grasshopper.Kernel.Data;
+using Grasshopper.Kernel.Types;
+using HoaryFoxCommon.Properties;
+
+namespace HoaryFox.Component.Check
+{
+ public class FilterByMaterials : GH_Component
+ {
+ public override GH_Exposure Exposure => GH_Exposure.secondary;
+
+ public FilterByMaterials()
+ : base("Filter by materials", "FilterByMat",
+ "Filter geometry by material",
+ "HoaryFox", "Filter")
+ {
+ }
+
+ protected override void RegisterInputParams(GH_InputParamManager pManager)
+ {
+ pManager.AddBrepParameter("Geometry", "Geo", "Geometry", GH_ParamAccess.tree);
+ pManager.AddTextParameter("Materials", "Mats", "Geometry material info", GH_ParamAccess.tree);
+ pManager.AddIntegerParameter("Stories", "Sts", "Geometry story info", GH_ParamAccess.tree);
+ pManager[2].Optional = true;
+ }
+
+ protected override void RegisterOutputParams(GH_OutputParamManager pManager)
+ {
+ pManager.AddBrepParameter("RC", "RC", "output RC geometry", GH_ParamAccess.tree);
+ pManager.AddBrepParameter("S", "S", "output S geometry", GH_ParamAccess.tree);
+ pManager.AddBrepParameter("SRC", "SRC", "output SRC geometry", GH_ParamAccess.tree);
+ pManager.AddBrepParameter("CFT", "CFT", "output CFT geometry", GH_ParamAccess.tree);
+ }
+
+ protected override void SolveInstance(IGH_DataAccess dataAccess)
+ {
+ if (!dataAccess.GetDataTree(0, out GH_Structure breps)) { return; }
+ if (!dataAccess.GetDataTree(1, out GH_Structure materials)) { return; }
+ if (!dataAccess.GetDataTree(2, out GH_Structure stories)) { return; }
+
+ if (breps.Paths.Count != materials.Paths.Count || (breps.Paths.Count != stories.Paths.Count && !stories.IsEmpty))
+ {
+ AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Geometries, materials and stories must have the same number of items");
+ return;
+ }
+
+ var filteredBreps = new GH_Structure[4];
+ for (var i = 0; i < 4; i++)
+ {
+ filteredBreps[i] = new GH_Structure();
+ }
+
+ FilterValue(breps, stories, materials, filteredBreps);
+
+ for (var i = 0; i < 4; i++)
+ {
+ dataAccess.SetDataTree(i, filteredBreps[i]);
+ }
+ }
+
+ private void FilterValue(GH_Structure breps, GH_Structure stories, GH_Structure materials, IReadOnlyList> filteredBreps)
+ {
+ for (var i = 0; i < breps.PathCount; i++)
+ {
+ GH_Path path = stories.IsEmpty ? breps.Paths[i] : new GH_Path(stories.Branches[i][0].Value, i);
+ GH_Brep brep = breps.Branches[i][0];
+ var materialType = materials.Branches[i][0].ToString();
+
+ SetMaterialFilteredBrep(filteredBreps, brep, materialType, path);
+ }
+ }
+
+ private bool SetMaterialFilteredBrep(IReadOnlyList> results, GH_Brep brep, string materialType, GH_Path path)
+ {
+ if (brep != null)
+ {
+ switch (materialType)
+ {
+ case "RC":
+ results[0].Append(brep.DuplicateBrep(), path);
+ break;
+ case "S":
+ results[1].Append(brep.DuplicateBrep(), path);
+ break;
+ case "SRC":
+ results[2].Append(brep.DuplicateBrep(), path);
+ break;
+ case "CFT":
+ results[3].Append(brep.DuplicateBrep(), path);
+ break;
+ default:
+ AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Unknown material type");
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ protected override Bitmap Icon => Resource.FilterByMaterial;
+ public override Guid ComponentGuid => new Guid("a4bcebdb-2c9c-41e4-8328-e270ea70ed7b");
+ }
+}
diff --git a/HoaryFox/RH7/Component/Check/MaterialType.cs b/HoaryFox/RH7/Component/Check/MaterialType.cs
new file mode 100644
index 00000000..7eadabf2
--- /dev/null
+++ b/HoaryFox/RH7/Component/Check/MaterialType.cs
@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using Grasshopper.Kernel;
+using Grasshopper.Kernel.Data;
+using Grasshopper.Kernel.Types;
+using HoaryFoxCommon.Properties;
+using STBDotNet.v202;
+
+namespace HoaryFox.Component.Check
+{
+ public class MaterialType : GH_Component
+ {
+ private ST_BRIDGE _stBridge;
+ private readonly GH_Structure[] _materialTypeList = new GH_Structure[7];
+
+ public override GH_Exposure Exposure => GH_Exposure.primary;
+
+ public MaterialType()
+ : base("Material Type", "MatType",
+ "Get material type",
+ "HoaryFox", "Filter")
+ {
+ }
+
+ protected override void RegisterInputParams(GH_InputParamManager pManager)
+ {
+ pManager.AddGenericParameter("Data", "D", "input ST-Bridge Data", GH_ParamAccess.item);
+ }
+
+ protected override void RegisterOutputParams(GH_OutputParamManager pManager)
+ {
+ pManager.AddTextParameter("Columns", "Col", "output StbColumn material types", GH_ParamAccess.tree);
+ pManager.AddTextParameter("Girders", "Gird", "output StbGirder material types", GH_ParamAccess.tree);
+ pManager.AddTextParameter("Posts", "Pst", "output StbPost material types", GH_ParamAccess.tree);
+ pManager.AddTextParameter("Beams", "Bm", "output StbBeam material types", GH_ParamAccess.tree);
+ pManager.AddTextParameter("Braces", "Brc", "output StbBrace material types", GH_ParamAccess.tree);
+ pManager.AddTextParameter("Slabs", "Slb", "output StbSlab material types", GH_ParamAccess.tree);
+ pManager.AddTextParameter("Walls", "Wl", "output StbWall material types", GH_ParamAccess.tree);
+ }
+
+ protected override void SolveInstance(IGH_DataAccess dataAccess)
+ {
+ if (!dataAccess.GetData("Data", ref _stBridge)) { return; }
+
+ Dictionary[][] infoArray = Utils.TagUtils.GetAllSectionInfoArray(_stBridge.StbModel.StbMembers, _stBridge.StbModel.StbSections);
+
+ foreach ((Dictionary[] infoDict, int index) in infoArray.Select((dict, index) => (dict, index)))
+ {
+ var materialTypes = new GH_Structure();
+ foreach ((Dictionary info, int itemIndex) in infoDict.Select((dict, itemIndex) => (dict, itemIndex)))
+ {
+ materialTypes.Append(new GH_String(info["kind_structure"]), new GH_Path(0, itemIndex));
+ }
+ _materialTypeList[index] = materialTypes;
+ }
+
+ for (var i = 0; i < 7; i++)
+ {
+ dataAccess.SetDataTree(i, _materialTypeList[i]);
+ }
+ }
+
+ protected override Bitmap Icon => Resource.MaterialType;
+ public override Guid ComponentGuid => new Guid("b6fde031-3532-40bb-a276-f61c36cdee90");
+ }
+}
diff --git a/HoaryFox/RH7/Component/Check/Story.cs b/HoaryFox/RH7/Component/Check/Story.cs
new file mode 100644
index 00000000..456ae000
--- /dev/null
+++ b/HoaryFox/RH7/Component/Check/Story.cs
@@ -0,0 +1,114 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using Grasshopper.Kernel;
+using Grasshopper.Kernel.Data;
+using Grasshopper.Kernel.Types;
+using HoaryFoxCommon.Properties;
+using STBDotNet.v202;
+
+namespace HoaryFox.Component.Check
+{
+ public class Story : GH_Component
+ {
+ private ST_BRIDGE _stBridge;
+ public override GH_Exposure Exposure => GH_Exposure.primary;
+
+ public Story()
+ : base("Story", "St",
+ "Get story info",
+ "HoaryFox", "Filter")
+ {
+ }
+
+ protected override void RegisterInputParams(GH_InputParamManager pManager)
+ {
+ pManager.AddGenericParameter("Data", "D", "input ST-Bridge Data", GH_ParamAccess.item);
+ }
+
+ protected override void RegisterOutputParams(GH_OutputParamManager pManager)
+ {
+ pManager.AddIntegerParameter("Columns", "Col", "Output the story to which the StbColumn belongs", GH_ParamAccess.tree);
+ pManager.AddIntegerParameter("Girders", "Gird", "Output the story to which the StbGirder belongs", GH_ParamAccess.tree);
+ pManager.AddIntegerParameter("Posts", "Pst", "Output the story to which the StbPost belongs", GH_ParamAccess.tree);
+ pManager.AddIntegerParameter("Beams", "Bm", "Output the story to which the StbBeam belongs", GH_ParamAccess.tree);
+ pManager.AddIntegerParameter("Braces", "Brc", "Output the story to which the StbBrace belongs", GH_ParamAccess.tree);
+ pManager.AddIntegerParameter("Slabs", "Slb", "Output the story to which the StbSlab belongs", GH_ParamAccess.tree);
+ pManager.AddIntegerParameter("Walls", "Wl", "Output the story to which the StbWall belongs", GH_ParamAccess.tree);
+ pManager.AddTextParameter("StoryName", "Name", "output each index story name", GH_ParamAccess.list);
+ }
+
+ protected override void SolveInstance(IGH_DataAccess dataAccess)
+ {
+ if (!dataAccess.GetData("Data", ref _stBridge)) { return; }
+
+ var floorList = new GH_Structure[7];
+ Dictionary[][] infoArray = Utils.TagUtils.GetAllSectionInfoArray(_stBridge.StbModel.StbMembers, _stBridge.StbModel.StbSections);
+
+ foreach ((Dictionary[] infoDict, int index) in infoArray.Select((dict, index) => (dict, index)))
+ {
+ var decisionNode = new List();
+ var result = new GH_Structure();
+ GetFloorDecisionNode(infoDict, decisionNode);
+ SetStoryIndex(decisionNode, result);
+
+ floorList[index] = result;
+ }
+
+ List storyName = _stBridge.StbModel.StbStories.Select(story => story.name).ToList();
+
+ for (var i = 0; i < 7; i++)
+ {
+ dataAccess.SetDataTree(i, floorList[i]);
+ }
+ dataAccess.SetDataList("StoryName", storyName);
+ }
+
+ private void SetStoryIndex(IEnumerable decisionNode, GH_Structure result)
+ {
+ foreach ((string node, int itemIndex) in decisionNode.Select((node, itemIndex) => (node, itemIndex)))
+ {
+ foreach ((StbStory story, int storyIndex) in _stBridge.StbModel.StbStories.Select((story, storyIndex) =>
+ (story, storyIndex)))
+ {
+ IEnumerable storyNodes = story.StbNodeIdList.Select(i => i.id);
+ if (storyNodes.Contains(node))
+ {
+ result.Append(new GH_Integer(storyIndex), new GH_Path(0, itemIndex));
+ break;
+ }
+ }
+ }
+ }
+
+ private void GetFloorDecisionNode(IEnumerable> infoDict, ICollection decisionNode)
+ {
+ foreach (Dictionary info in infoDict)
+ {
+ switch (info["stb_element_type"])
+ {
+ case "StbColumn":
+ case "StbPost":
+ decisionNode.Add(info["id_node_top"]);
+ break;
+ case "StbGirder":
+ case "StbBeam":
+ case "StbBrace":
+ decisionNode.Add(info["id_node_end"]);
+ break;
+ case "StbSlab":
+ case "StbWall":
+ decisionNode.Add(info["StbNodeIdOrder"].Split(' ')[2]);
+ break;
+ default:
+ AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Unknown stb element type");
+ break;
+ }
+ }
+ }
+
+ protected override Bitmap Icon => Resource.Story;
+ public override Guid ComponentGuid => new Guid("5cc64205-b80e-48ba-b813-01c70110f02f");
+ }
+}
diff --git a/HoaryFox/Component/Geometry/Axes.cs b/HoaryFox/RH7/Component/Geometry/Axes.cs
similarity index 99%
rename from HoaryFox/Component/Geometry/Axes.cs
rename to HoaryFox/RH7/Component/Geometry/Axes.cs
index d94556c9..9d067b89 100644
--- a/HoaryFox/Component/Geometry/Axes.cs
+++ b/HoaryFox/RH7/Component/Geometry/Axes.cs
@@ -3,7 +3,7 @@
using System.Drawing;
using System.Linq;
using Grasshopper.Kernel;
-using HoaryFox.Properties;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
diff --git a/HoaryFox/Component/Geometry/Stb2Brep.cs b/HoaryFox/RH7/Component/Geometry/Stb2Brep.cs
similarity index 97%
rename from HoaryFox/Component/Geometry/Stb2Brep.cs
rename to HoaryFox/RH7/Component/Geometry/Stb2Brep.cs
index fcdbc6f6..7df079e9 100644
--- a/HoaryFox/Component/Geometry/Stb2Brep.cs
+++ b/HoaryFox/RH7/Component/Geometry/Stb2Brep.cs
@@ -6,7 +6,7 @@
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using HoaryFox.Component.Utils.Geometry;
-using HoaryFox.Properties;
+using HoaryFoxCommon.Properties;
using Rhino;
using Rhino.DocObjects;
using Rhino.Geometry;
@@ -28,11 +28,6 @@ public Stb2Brep()
{
}
- public override void ClearData()
- {
- base.ClearData();
- }
-
protected override void RegisterInputParams(GH_InputParamManager pManager)
{
pManager.AddGenericParameter("Data", "D", "input ST-Bridge Data", GH_ParamAccess.item);
diff --git a/HoaryFox/Component/Geometry/Stb2Line.cs b/HoaryFox/RH7/Component/Geometry/Stb2Line.cs
similarity index 99%
rename from HoaryFox/Component/Geometry/Stb2Line.cs
rename to HoaryFox/RH7/Component/Geometry/Stb2Line.cs
index 37ee7279..eb69c6ed 100644
--- a/HoaryFox/Component/Geometry/Stb2Line.cs
+++ b/HoaryFox/RH7/Component/Geometry/Stb2Line.cs
@@ -6,7 +6,7 @@
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using HoaryFox.Component.Utils.Geometry;
-using HoaryFox.Properties;
+using HoaryFoxCommon.Properties;
using Rhino;
using Rhino.DocObjects;
using Rhino.Geometry;
diff --git a/HoaryFox/Component/IO/StbLoader.cs b/HoaryFox/RH7/Component/IO/StbLoader.cs
similarity index 92%
rename from HoaryFox/Component/IO/StbLoader.cs
rename to HoaryFox/RH7/Component/IO/StbLoader.cs
index aeb0d718..324083ef 100644
--- a/HoaryFox/Component/IO/StbLoader.cs
+++ b/HoaryFox/RH7/Component/IO/StbLoader.cs
@@ -1,5 +1,6 @@
using System;
using Grasshopper.Kernel;
+using HoaryFoxCommon.Properties;
using STBDotNet.v202;
namespace HoaryFox.Component.IO
@@ -35,7 +36,7 @@ protected override void SolveInstance(IGH_DataAccess dataAccess)
dataAccess.SetData(0, stbData);
}
- protected override System.Drawing.Bitmap Icon => Properties.Resource.LoadStb;
+ protected override System.Drawing.Bitmap Icon => Resource.LoadStb;
public override Guid ComponentGuid => new Guid("C1E1CD82-9AC0-479C-A22F-DB7C44F3C77D");
}
}
diff --git a/HoaryFox/Component/Tag/Name/BeamNameTag.cs b/HoaryFox/RH7/Component/Tag/Name/BeamNameTag.cs
similarity index 96%
rename from HoaryFox/Component/Tag/Name/BeamNameTag.cs
rename to HoaryFox/RH7/Component/Tag/Name/BeamNameTag.cs
index b7fdb77b..ccd8435f 100644
--- a/HoaryFox/Component/Tag/Name/BeamNameTag.cs
+++ b/HoaryFox/RH7/Component/Tag/Name/BeamNameTag.cs
@@ -6,6 +6,7 @@
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using HoaryFox.Component.Utils;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
@@ -73,7 +74,7 @@ public override void DrawViewportWires(IGH_PreviewArgs args)
}
}
- protected override Bitmap Icon => Properties.Resource.BeamName;
+ protected override Bitmap Icon => Resource.BeamName;
public override Guid ComponentGuid => new Guid("FDC62C6D-7C03-412D-8FF8-B76439197730");
}
diff --git a/HoaryFox/Component/Tag/Name/BraceNameTag.cs b/HoaryFox/RH7/Component/Tag/Name/BraceNameTag.cs
similarity index 96%
rename from HoaryFox/Component/Tag/Name/BraceNameTag.cs
rename to HoaryFox/RH7/Component/Tag/Name/BraceNameTag.cs
index 483663c5..591e1954 100644
--- a/HoaryFox/Component/Tag/Name/BraceNameTag.cs
+++ b/HoaryFox/RH7/Component/Tag/Name/BraceNameTag.cs
@@ -6,6 +6,7 @@
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using HoaryFox.Component.Utils;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
@@ -73,7 +74,7 @@ public override void DrawViewportWires(IGH_PreviewArgs args)
}
}
- protected override Bitmap Icon => Properties.Resource.BraceName;
+ protected override Bitmap Icon => Resource.BraceName;
public override Guid ComponentGuid => new Guid("21F7885E-6321-4C0D-8974-BC40769AAEAE");
}
diff --git a/HoaryFox/Component/Tag/Name/ColumnNameTag.cs b/HoaryFox/RH7/Component/Tag/Name/ColumnNameTag.cs
similarity index 96%
rename from HoaryFox/Component/Tag/Name/ColumnNameTag.cs
rename to HoaryFox/RH7/Component/Tag/Name/ColumnNameTag.cs
index 6770c20a..c841e6b2 100644
--- a/HoaryFox/Component/Tag/Name/ColumnNameTag.cs
+++ b/HoaryFox/RH7/Component/Tag/Name/ColumnNameTag.cs
@@ -6,6 +6,7 @@
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using HoaryFox.Component.Utils;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
@@ -72,7 +73,7 @@ public override void DrawViewportWires(IGH_PreviewArgs args)
}
}
- protected override Bitmap Icon => Properties.Resource.ColumnName;
+ protected override Bitmap Icon => Resource.ColumnName;
public override Guid ComponentGuid => new Guid("AB439AE1-A56F-4764-BC36-F3752D30461A");
}
diff --git a/HoaryFox/Component/Tag/Name/GirderNameTag.cs b/HoaryFox/RH7/Component/Tag/Name/GirderNameTag.cs
similarity index 96%
rename from HoaryFox/Component/Tag/Name/GirderNameTag.cs
rename to HoaryFox/RH7/Component/Tag/Name/GirderNameTag.cs
index 0d83da4f..94a0dedd 100644
--- a/HoaryFox/Component/Tag/Name/GirderNameTag.cs
+++ b/HoaryFox/RH7/Component/Tag/Name/GirderNameTag.cs
@@ -6,6 +6,7 @@
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using HoaryFox.Component.Utils;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
@@ -73,7 +74,7 @@ public override void DrawViewportWires(IGH_PreviewArgs args)
}
}
- protected override Bitmap Icon => Properties.Resource.GirderName;
+ protected override Bitmap Icon => Resource.GirderName;
public override Guid ComponentGuid => new Guid("31664B98-E1F0-4635-A718-18C8FDE14A14");
}
diff --git a/HoaryFox/Component/Tag/Name/PostNameTag.cs b/HoaryFox/RH7/Component/Tag/Name/PostNameTag.cs
similarity index 96%
rename from HoaryFox/Component/Tag/Name/PostNameTag.cs
rename to HoaryFox/RH7/Component/Tag/Name/PostNameTag.cs
index 45078822..01927e98 100644
--- a/HoaryFox/Component/Tag/Name/PostNameTag.cs
+++ b/HoaryFox/RH7/Component/Tag/Name/PostNameTag.cs
@@ -6,6 +6,7 @@
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using HoaryFox.Component.Utils;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
@@ -73,7 +74,7 @@ public override void DrawViewportWires(IGH_PreviewArgs args)
}
}
- protected override Bitmap Icon => Properties.Resource.PostName;
+ protected override Bitmap Icon => Resource.PostName;
public override Guid ComponentGuid => new Guid("AD517629-4CD1-4109-B071-653D80DC6B70");
}
diff --git a/HoaryFox/Component/Tag/Name/SlabNameTag.cs b/HoaryFox/RH7/Component/Tag/Name/SlabNameTag.cs
similarity index 99%
rename from HoaryFox/Component/Tag/Name/SlabNameTag.cs
rename to HoaryFox/RH7/Component/Tag/Name/SlabNameTag.cs
index cdff54ef..e1fdd296 100644
--- a/HoaryFox/Component/Tag/Name/SlabNameTag.cs
+++ b/HoaryFox/RH7/Component/Tag/Name/SlabNameTag.cs
@@ -5,7 +5,7 @@
using Grasshopper.Kernel;
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
-using HoaryFox.Properties;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
diff --git a/HoaryFox/Component/Tag/Name/WallNameTag.cs b/HoaryFox/RH7/Component/Tag/Name/WallNameTag.cs
similarity index 98%
rename from HoaryFox/Component/Tag/Name/WallNameTag.cs
rename to HoaryFox/RH7/Component/Tag/Name/WallNameTag.cs
index dfecd3b4..8f0f6d99 100644
--- a/HoaryFox/Component/Tag/Name/WallNameTag.cs
+++ b/HoaryFox/RH7/Component/Tag/Name/WallNameTag.cs
@@ -5,7 +5,7 @@
using Grasshopper.Kernel;
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
-using HoaryFox.Properties;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
diff --git a/HoaryFox/Component/Tag/Section/BeamSecTag.cs b/HoaryFox/RH7/Component/Tag/Section/BeamSecTag.cs
similarity index 99%
rename from HoaryFox/Component/Tag/Section/BeamSecTag.cs
rename to HoaryFox/RH7/Component/Tag/Section/BeamSecTag.cs
index 3acd383a..109ab056 100644
--- a/HoaryFox/Component/Tag/Section/BeamSecTag.cs
+++ b/HoaryFox/RH7/Component/Tag/Section/BeamSecTag.cs
@@ -6,7 +6,7 @@
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using HoaryFox.Component.Utils;
-using HoaryFox.Properties;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
diff --git a/HoaryFox/Component/Tag/Section/BraceSecTag.cs b/HoaryFox/RH7/Component/Tag/Section/BraceSecTag.cs
similarity index 99%
rename from HoaryFox/Component/Tag/Section/BraceSecTag.cs
rename to HoaryFox/RH7/Component/Tag/Section/BraceSecTag.cs
index 88333ac1..76a61ae8 100644
--- a/HoaryFox/Component/Tag/Section/BraceSecTag.cs
+++ b/HoaryFox/RH7/Component/Tag/Section/BraceSecTag.cs
@@ -6,7 +6,7 @@
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using HoaryFox.Component.Utils;
-using HoaryFox.Properties;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
diff --git a/HoaryFox/Component/Tag/Section/ColumnSecTag.cs b/HoaryFox/RH7/Component/Tag/Section/ColumnSecTag.cs
similarity index 99%
rename from HoaryFox/Component/Tag/Section/ColumnSecTag.cs
rename to HoaryFox/RH7/Component/Tag/Section/ColumnSecTag.cs
index 7f21153d..215f1464 100644
--- a/HoaryFox/Component/Tag/Section/ColumnSecTag.cs
+++ b/HoaryFox/RH7/Component/Tag/Section/ColumnSecTag.cs
@@ -6,7 +6,7 @@
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using HoaryFox.Component.Utils;
-using HoaryFox.Properties;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
diff --git a/HoaryFox/Component/Tag/Section/GirderSecTag.cs b/HoaryFox/RH7/Component/Tag/Section/GirderSecTag.cs
similarity index 99%
rename from HoaryFox/Component/Tag/Section/GirderSecTag.cs
rename to HoaryFox/RH7/Component/Tag/Section/GirderSecTag.cs
index a77e88ba..1ecadc73 100644
--- a/HoaryFox/Component/Tag/Section/GirderSecTag.cs
+++ b/HoaryFox/RH7/Component/Tag/Section/GirderSecTag.cs
@@ -6,7 +6,7 @@
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using HoaryFox.Component.Utils;
-using HoaryFox.Properties;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
diff --git a/HoaryFox/Component/Tag/Section/PostSecTag.cs b/HoaryFox/RH7/Component/Tag/Section/PostSecTag.cs
similarity index 99%
rename from HoaryFox/Component/Tag/Section/PostSecTag.cs
rename to HoaryFox/RH7/Component/Tag/Section/PostSecTag.cs
index e306e0e1..0dd1a4d6 100644
--- a/HoaryFox/Component/Tag/Section/PostSecTag.cs
+++ b/HoaryFox/RH7/Component/Tag/Section/PostSecTag.cs
@@ -6,7 +6,7 @@
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using HoaryFox.Component.Utils;
-using HoaryFox.Properties;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
diff --git a/HoaryFox/Component/Tag/Section/SlabSecTag.cs b/HoaryFox/RH7/Component/Tag/Section/SlabSecTag.cs
similarity index 99%
rename from HoaryFox/Component/Tag/Section/SlabSecTag.cs
rename to HoaryFox/RH7/Component/Tag/Section/SlabSecTag.cs
index 43827818..ca3d3ec1 100644
--- a/HoaryFox/Component/Tag/Section/SlabSecTag.cs
+++ b/HoaryFox/RH7/Component/Tag/Section/SlabSecTag.cs
@@ -6,7 +6,7 @@
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using HoaryFox.Component.Utils;
-using HoaryFox.Properties;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
diff --git a/HoaryFox/Component/Tag/Section/WallSecTag.cs b/HoaryFox/RH7/Component/Tag/Section/WallSecTag.cs
similarity index 99%
rename from HoaryFox/Component/Tag/Section/WallSecTag.cs
rename to HoaryFox/RH7/Component/Tag/Section/WallSecTag.cs
index 3c22c802..2df4f829 100644
--- a/HoaryFox/Component/Tag/Section/WallSecTag.cs
+++ b/HoaryFox/RH7/Component/Tag/Section/WallSecTag.cs
@@ -6,7 +6,7 @@
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using HoaryFox.Component.Utils;
-using HoaryFox.Properties;
+using HoaryFoxCommon.Properties;
using Rhino.Geometry;
using STBDotNet.v202;
diff --git a/HoaryFox/Component/Utils/Geometry/BrepMaker/Brace.cs b/HoaryFox/RH7/Component/Utils/Geometry/BrepMaker/Brace.cs
similarity index 92%
rename from HoaryFox/Component/Utils/Geometry/BrepMaker/Brace.cs
rename to HoaryFox/RH7/Component/Utils/Geometry/BrepMaker/Brace.cs
index f3637fd6..4e75c7be 100644
--- a/HoaryFox/Component/Utils/Geometry/BrepMaker/Brace.cs
+++ b/HoaryFox/RH7/Component/Utils/Geometry/BrepMaker/Brace.cs
@@ -19,8 +19,14 @@ public Brace(StbSections sections, IReadOnlyList tolerance)
public Brep CreateBraceBrep(string idSection, double rotate, StbBraceKind_structure kind, IReadOnlyList sectionPoints, Vector3d memberAxis)
{
- var curveList = new List();
+ List curveList = CreateFromEachBraceKind(idSection, kind, sectionPoints);
+ Utils.RotateCurveList(memberAxis, curveList, rotate, sectionPoints);
+ return Utils.CreateCapedBrepFromLoft(curveList, _tolerance[0]);
+ }
+ private List CreateFromEachBraceKind(string idSection, StbBraceKind_structure kind, IReadOnlyList sectionPoints)
+ {
+ List curveList;
switch (kind)
{
case StbBraceKind_structure.S:
@@ -35,10 +41,7 @@ public Brep CreateBraceBrep(string idSection, double rotate, StbBraceKind_struct
throw new ArgumentOutOfRangeException();
}
- Utils.RotateCurveList(memberAxis, curveList, rotate, sectionPoints);
- Brep brep = Brep.CreateFromLoft(curveList, Point3d.Unset, Point3d.Unset, LoftType.Straight, false)[0]
- .CapPlanarHoles(_tolerance[0]);
- return brep;
+ return curveList;
}
private List SecSteelBraceToCurves(IReadOnlyList