From 877d2d97bc02e835910e10eb55cbfead3ce8e8c4 Mon Sep 17 00:00:00 2001 From: lorinczandrea Date: Thu, 3 Oct 2024 21:54:47 +0200 Subject: [PATCH] :construction: icons and override ToString() #802 --- FemDesign.Core/Bars/Bar.cs | 5 +- FemDesign.Core/Composites/CompositeSection.cs | 35 ++++--- .../FemDesign.Grasshopper.csproj | 9 ++ .../Properties/Resources.Designer.cs | 90 ++++++++++++++++++ .../Properties/Resources.resx | 27 ++++++ .../Resources/icons/DeltaBeamProfile.png | Bin 0 -> 310 bytes .../icons/EffectiveCompositeSlab.png | Bin 0 -> 219 bytes .../icons/FilledCruciformProfile.png | Bin 0 -> 336 bytes .../Resources/icons/FilledIProfile.png | Bin 0 -> 195 bytes .../Resources/icons/FilledSteelTube.png | Bin 0 -> 598 bytes .../Resources/icons/HSQProfile.png | Bin 0 -> 164 bytes .../Resources/icons/RHSProfile.png | Bin 0 -> 303 bytes .../Resources/icons/SteelTubeWithIProfile.png | Bin 0 -> 674 bytes .../icons/SteelTubeWithSteelCore.png | Bin 0 -> 701 bytes .../Composite/CompositeSectionDefine.cs | 11 ++- .../Sections/Composite/DeltaBeamProfile.cs | 10 +- .../Composite/EffectiveCompositeSlab.cs | 17 ++-- .../Composite/FilledCruciformProfile.cs | 6 +- .../Sections/Composite/FilledIProfile.cs | 7 +- .../Sections/Composite/FilledSteelTube.cs | 6 +- .../Sections/Composite/HSQProfile.cs | 6 +- .../Sections/Composite/RHSProfile.cs | 7 +- .../Composite/SteelTubeWithIProfile.cs | 8 +- .../Composite/SteelTubeWithSteelCore.cs | 7 +- 24 files changed, 181 insertions(+), 70 deletions(-) create mode 100644 FemDesign.Grasshopper/Resources/icons/DeltaBeamProfile.png create mode 100644 FemDesign.Grasshopper/Resources/icons/EffectiveCompositeSlab.png create mode 100644 FemDesign.Grasshopper/Resources/icons/FilledCruciformProfile.png create mode 100644 FemDesign.Grasshopper/Resources/icons/FilledIProfile.png create mode 100644 FemDesign.Grasshopper/Resources/icons/FilledSteelTube.png create mode 100644 FemDesign.Grasshopper/Resources/icons/HSQProfile.png create mode 100644 FemDesign.Grasshopper/Resources/icons/RHSProfile.png create mode 100644 FemDesign.Grasshopper/Resources/icons/SteelTubeWithIProfile.png create mode 100644 FemDesign.Grasshopper/Resources/icons/SteelTubeWithSteelCore.png diff --git a/FemDesign.Core/Bars/Bar.cs b/FemDesign.Core/Bars/Bar.cs index 5e54c7df..557f58a2 100644 --- a/FemDesign.Core/Bars/Bar.cs +++ b/FemDesign.Core/Bars/Bar.cs @@ -507,7 +507,10 @@ public override string ToString() { if (this.BarPart.HasComplexCompositeRef) { - return $"{this.Type} Start: {this.BarPart.Edge.Points.First()}, End: {this.BarPart.Edge.Points.Last()}, Length: {this.BarPart.Edge.Length} m, Sections: Composite section type, Material: Composite"; + var compositeSection = this.BarPart.ComplexCompositeObj.CompositeSections[0]; + List compositeMaterials = compositeSection.Materials.Select(m => m.Name).ToList(); + + return $"{this.Type} Start: {this.BarPart.Edge.Points.First()}, End: {this.BarPart.Edge.Points.Last()}, Length: {this.BarPart.Edge.Length} m, Section: Composite - {compositeSection.Type}, Materials: {string.Join(", ", compositeMaterials)}"; } if (this.BarPart.HasDeltaBeamComplexSectionRef) { diff --git a/FemDesign.Core/Composites/CompositeSection.cs b/FemDesign.Core/Composites/CompositeSection.cs index 0b4d2700..ca93989f 100644 --- a/FemDesign.Core/Composites/CompositeSection.cs +++ b/FemDesign.Core/Composites/CompositeSection.cs @@ -147,17 +147,17 @@ internal CompositeSection(CompositeSectionType type, List materials, L } /// - /// Create a EffectiveCompositeSlab type CompositeSection object. + /// Create an EffectiveCompositeSlab type CompositeSection object. /// /// Steel part material. /// Concrete part material. /// Steel section from database. Can be a KKR, VKR or I-profile section type. /// Composite section name. - /// Slab thickness. - /// Concrete slab effective width. - /// Hunch thickness. - /// Hunch width at the top. - /// Hunch width at the bottom. + /// Slab thickness [mm]. + /// Concrete slab effective width [mm]. + /// Hunch thickness [mm]. + /// Hunch width at the top [mm]. + /// Hunch width at the bottom [mm]. /// True if steel section is filled with concrete, false if not. /// public static CompositeSection EffectiveCompositeSlab(string name, Material steel, Material concrete, Section steelProfile, double t, double bEff, double th, double bt, double bb, bool filled = false) @@ -188,11 +188,11 @@ public static CompositeSection EffectiveCompositeSlab(string name, Material stee /// Create a parametric section for EffectiveCompositeSlab type CompositeSection object. /// /// Steel section from database. Can be a KKR, VKR or I-profile section type. - /// Slab thickness. - /// Concrete slab effective width. - /// Hunch thickness. - /// Hunch width at the top. - /// Hunch width at the bottom. + /// Slab thickness [mm]. + /// Concrete slab effective width [mm]. + /// Hunch thickness [mm]. + /// Hunch width at the top [mm]. + /// Hunch width at the bottom [mm]. /// True if steel section is filled with concrete, false if not. /// internal static List CreateEffectiveCompositeSlabSection(Section steelProfile, double t, double bEff, double th, double bt, double bb, bool filled = false) @@ -445,7 +445,6 @@ public static CompositeSection FilledHSQProfile(string name, Material steel, Mat /// public static CompositeSection FilledDeltaBeamProfile(string name, Material steel, Material concrete, Section deltaBeamProfile) { - NotImplemented(); CheckMaterialFamily(new List { steel }, concrete); // check input data @@ -501,7 +500,7 @@ private static List GetDeltaBeamSideEdges(List deltaBeamSteelRegio throw new ArgumentException("Invalid input section! The input section must be a Deltabeam profile and the number of regions must be 4!"); topPtsY = 0; - List sideEdges = null; + List sideEdges = new List(); foreach (var region in deltaBeamSteelRegions) { @@ -515,7 +514,7 @@ private static List GetDeltaBeamSideEdges(List deltaBeamSteelRegio { topPtsY = points.Select(p => p.Y).Min(); } - else if (topPts.Count != points.Count && topPts != null) + else if (topPts.Count != points.Count && topPts.Count != 0) { var edges = region.Contours[0].Edges; var interiorEdg = edges.OrderBy(e => ((Vector3d)e.GetIntermediatePoint(0.5)).Length()).First(); @@ -524,7 +523,7 @@ private static List GetDeltaBeamSideEdges(List deltaBeamSteelRegio } } - if (sideEdges is null || topPtsY == 0) + if (sideEdges?.Count == 0 || topPtsY == 0) throw new Exception("Invalid section geometry! Deltabeam section origin must be (0,0,0)!"); return sideEdges; @@ -1205,5 +1204,11 @@ internal void CheckCompositeSectionPartList(CompositeSectionType type, List parameters = ParameterDictionary.Select(d => d.Key + " = " + d.Value).ToList(); + return $"{Type}, Materials: {string.Join(", ", this.Materials.Select(m => m.Name).ToList())}, Parameters: {string.Join(", ", parameters)}"; + } } } \ No newline at end of file diff --git a/FemDesign.Grasshopper/FemDesign.Grasshopper.csproj b/FemDesign.Grasshopper/FemDesign.Grasshopper.csproj index 00d58c12..e70ee2a9 100644 --- a/FemDesign.Grasshopper/FemDesign.Grasshopper.csproj +++ b/FemDesign.Grasshopper/FemDesign.Grasshopper.csproj @@ -939,16 +939,22 @@ + + + + + + @@ -957,10 +963,13 @@ + + + diff --git a/FemDesign.Grasshopper/Properties/Resources.Designer.cs b/FemDesign.Grasshopper/Properties/Resources.Designer.cs index 779e1152..08d54725 100644 --- a/FemDesign.Grasshopper/Properties/Resources.Designer.cs +++ b/FemDesign.Grasshopper/Properties/Resources.Designer.cs @@ -370,6 +370,16 @@ internal static System.Drawing.Bitmap Deconstruct_icon { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap DeltaBeamProfile { + get { + object obj = ResourceManager.GetObject("DeltaBeamProfile", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -500,6 +510,16 @@ internal static System.Drawing.Bitmap EdgeConnectionRigid { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap EffectiveCompositeSlab { + get { + object obj = ResourceManager.GetObject("EffectiveCompositeSlab", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -730,6 +750,36 @@ internal static System.Drawing.Bitmap FictShellDeconstruct { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap FilledCruciformProfile { + get { + object obj = ResourceManager.GetObject("FilledCruciformProfile", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap FilledIProfile { + get { + object obj = ResourceManager.GetObject("FilledIProfile", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap FilledSteelTube { + get { + object obj = ResourceManager.GetObject("FilledSteelTube", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -870,6 +920,16 @@ internal static System.Drawing.Bitmap Help { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap HSQProfile { + get { + object obj = ResourceManager.GetObject("HSQProfile", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -2080,6 +2140,16 @@ internal static System.Drawing.Bitmap ResultType { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap RHSProfile { + get { + object obj = ResourceManager.GetObject("RHSProfile", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -2400,6 +2470,26 @@ internal static System.Drawing.Bitmap StagesDeconstruct { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SteelTubeWithIProfile { + get { + object obj = ResourceManager.GetObject("SteelTubeWithIProfile", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap SteelTubeWithSteelCore { + get { + object obj = ResourceManager.GetObject("SteelTubeWithSteelCore", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/FemDesign.Grasshopper/Properties/Resources.resx b/FemDesign.Grasshopper/Properties/Resources.resx index b3038895..945cd5b6 100644 --- a/FemDesign.Grasshopper/Properties/Resources.resx +++ b/FemDesign.Grasshopper/Properties/Resources.resx @@ -7389,4 +7389,31 @@ ..\Resources\icons\PeriodicExcitationLoad.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icons\DeltaBeamProfile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons\EffectiveCompositeSlab.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons\FilledCruciformProfile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons\FilledIProfile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons\FilledSteelTube.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons\HSQProfile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons\RHSProfile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons\SteelTubeWithIProfile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons\SteelTubeWithSteelCore.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/FemDesign.Grasshopper/Resources/icons/DeltaBeamProfile.png b/FemDesign.Grasshopper/Resources/icons/DeltaBeamProfile.png new file mode 100644 index 0000000000000000000000000000000000000000..9df662fd92a5d98bf38bc1a73af998beafeecfe1 GIT binary patch literal 310 zcmV-60m=S}P)Px#@JU2LR7gu>WS}u%q_O!7qZSYh;Smr-k=3*IGyMOL-KUHUR?Az{+3)Zfs2czw)KDwzl?$#}Dl!wldgOyp(r2p%<||?{0l!Vj^2uSXk4? zbB7Kc`tanWaNB|f3Trfl@{M9QCLOJ}w6vTvZBOOrwu9%-^RJg=`RthT)o0Gh^2%&0 z$G_|mQQZIl literal 0 HcmV?d00001 diff --git a/FemDesign.Grasshopper/Resources/icons/FilledCruciformProfile.png b/FemDesign.Grasshopper/Resources/icons/FilledCruciformProfile.png new file mode 100644 index 0000000000000000000000000000000000000000..25f1e597beb741a47d1d9ca49fd6e12f1dcb7095 GIT binary patch literal 336 zcmV-W0k8gvP)Px$3Q0skR7gu>WS}u%q_O!718c#IxeNZ^{lbOQlS({47&4RN@H!Hw7 z3-Yj&ZNa-QKNB00001KEU-?j3R#tY$;lLV$JvtSCKT2O*sCw#r>!N8Z6tZILretuh zQeNx1oniJ%1@DWzhnMwf$oE7sa5GN&bTC84KtM~YElfag_T-;CZ%P*Z@mVo>a;L8K tiE}5L?=vOEdURR+x^{BOj-H6E3{spql6DGHDu51Q@O1TaS?83{1OUF}N-zKb literal 0 HcmV?d00001 diff --git a/FemDesign.Grasshopper/Resources/icons/FilledSteelTube.png b/FemDesign.Grasshopper/Resources/icons/FilledSteelTube.png new file mode 100644 index 0000000000000000000000000000000000000000..e7d7faa7850ab3c51f2c6e468595052b81e02dec GIT binary patch literal 598 zcmV-c0;&CpP)Px%5J^NqR7gu>WS}u%q_O!718)I8KfjtAv4p;V-&HxGZ4JY?yRjP()JO$6SShkCPQ=RDJ&Ohhgi< zI}D%Rzqv7~CPR;bf#El@Vr&*LXEsc_sHCW*?P07yR3!apU|`sN{vpHthmUVhuF241 zU|{$IvjoEekD#~)BPZYbNC!=#42Ky6vSj7K8w?MwoSeR7dUqC93j_oN1R}~Oy^C|! zW#r?+9W1!Q>&wqS4D)wh{J)|zPZ$>QC_acx&YPfR?wB8FrAl`8*m&|T!-XTeC$649 zr2u3IiUs-YvmZJbYsslf@sn-Ay_cUEb{)I)Xi9CmJcb34rF~Dbg6*UQc{s?n;N#by z4AVCpd$FWFR}#a5!oC&%!|l`=csNK8f0&ED{`k$X?7$6%i6xQX&_RuZ(!R&p!FDnN z6#8Js#$(SHx8+JC&$DotTY8c`pJ@Gj|F?f?J) literal 0 HcmV?d00001 diff --git a/FemDesign.Grasshopper/Resources/icons/HSQProfile.png b/FemDesign.Grasshopper/Resources/icons/HSQProfile.png new file mode 100644 index 0000000000000000000000000000000000000000..8d9a0e797a6448e845518284edefa2622c227bf1 GIT binary patch literal 164 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|;yhg(Lp;2b zQx+H|EZO*zXR(+7Phyj!NT~5^d&S^sTbDdENq?Zruv6|y_bLu;p8hRsEsiyu|Ej>t zQfrWPFhihsnUcpnsVK?b8HakO9O_?D<8Z>E<`c*i+ga>_3>?cMB?GfPx#=}AOER7gu>WS}u%q_O!717|^aLPiCzibebH-+u^tl9iQ(;p5E{HLDlTXhm0y z(+3&ti~c(rC^BeD3otO^@#p{l3=B7)ePq~k?jFO;syGalIJKrU&;Ot1Wx&A2&Pvb+ zfB!QwOxkdYVQy{Ws0G+VYcz;PQxWzM7|m#~a2eRLDAm(|ft!PHVfW`hBg14;3%i`I zrTPx%TuDShR7gu>WS}u%q_O!718)I8KfjtAv4p;V-&HxGZ4JY?yRjP()JO$6SShkCPQ=RDJ&Ohhgi< zI}D%Rzqv7~CPR;bf#El@Vr&*LXEsc_sHCW*?P07yR3!apU|`sN{vpHthmUVhuF241 zU|{$IvjoEekD#~)BPZYbNC!=@;opD$VffDgG6FkbWME|AWM=`ZSb6XU!-Fd)r!Se_ zorTo`0RaJli1JDA;+%CE`M4m#GG)^lhEHFA!c7MmgzPF_E_Q}oe-p6$m!E$a=I^}t ze?@1WFf8Ixd=QzOH$ltXF+b2s6>i|?@4p!S|A+YC@4x>H%l2Jmh;q_qU}l17Wn^Sz z;N@h4tKWF?F2jW*yC<%mKcxUHkL>aM_Sp{|jJ4!crTB3M$($V*7*ae8aLV6%`I%wY zu}hDp)TYa0SP)s-_arOWPFj$MgKP^ve*MWXeZ#RAOWJcKF)S$TTk${KPMv{=19!3{ zp|IM)V)LoKF zQ&=WL)CVGbj5-RK^}&_Px%cS%G+R7gu>WS}u%q_O!718)I8KfjtAv4p;V-&HxGZ4JY?yRjP()JO$6SShkCPQ=RDJ&Ohhgi< zI}D%Rzqv7~CPR;bf#El@Vr&*LXEsc_sHCW*?P07yR3!apU|`sN{vpHthmUVhuF241 zU|{$IvjoEekD#~)BPZYbNC!=#42Ky6vSj7K8w?MwoSeR7dUqC93j_oN1R}~Oy^C|! zW#r>R4VFKD|1ms#^^xKAhi?ob{9FtQ;`|IO%uFaj_vPmwhWR@${$J6VCk%^t6dyz; z=S|Qucgzp8Qbp1D?(=ts<@>KOeE9kUF3!)*&Jf|C#UR4Rg`#%j$-4{}j_jVedj6CG zkOYba`R%hGIv8uosY>y~HGy0{bK7}_4_^?5!zB5**cmc?j8J@X@8xHPUB@mxno^rC zk6}S%Y2TBqU^{6+9uBw#_nv=XSbpFt&Qug;r^%oyEd-bU`1L2l^bN;eENRb`#IT^S zZ^i#`J9P#g4n+8$y7`P@_qqExEpX72XRy|mfy;mW@ta}Ufg21HOCrIcgBk~=eUGz) z?PLTf^udgc$DS{4%ay{gprC!uLwgfVIaNtY;@}g*?qgRTO|DJD5(l(SMU>_PP_eOK z7oL0o3NxDKWN1>LZCM1hg!t0*`)`J=r|yzen!?gFqCODeW7JW=tPif-f5q^a%=!RP j=FqT4qe^>#=9NAGf(KS8w+*-a00000NkvXXu0mjfm+et> literal 0 HcmV?d00001 diff --git a/FemDesign.Grasshopper/Sections/Composite/CompositeSectionDefine.cs b/FemDesign.Grasshopper/Sections/Composite/CompositeSectionDefine.cs index 9a4efcf6..783a7143 100644 --- a/FemDesign.Grasshopper/Sections/Composite/CompositeSectionDefine.cs +++ b/FemDesign.Grasshopper/Sections/Composite/CompositeSectionDefine.cs @@ -14,21 +14,21 @@ using FemDesign.Grasshopper.Extension.ComponentExtension; using FemDesign.Loads; using Grasshopper.Kernel.Special; +using Eto.Drawing; namespace FemDesign.Grasshopper { public class CompositeSectionDefine : GH_SwitcherComponent { private List _subcomponents = new List(); - public override string UnitMenuName => "CompositeSection.Define"; - protected override string DefaultEvaluationUnit => _subcomponents[2].name(); + public override string UnitMenuName => "Section"; + protected override string DefaultEvaluationUnit => _subcomponents[1].name(); public override Guid ComponentGuid => new Guid("{A6B804EA-F254-4ABE-BEC5-FA69E92069AA}"); public override GH_Exposure Exposure => GH_Exposure.tertiary; - - protected override Bitmap Icon => null; + protected override System.Drawing.Bitmap Icon => Properties.Resources.HSQProfile; public CompositeSectionDefine() - : base("CompositeSection.Define", "Define", + : base("Composite.Define", "Define", "Define a new composite section.", CategoryName.Name(), SubCategoryName.Cat4b()) { @@ -77,6 +77,7 @@ protected override void SolveInstance(IGH_DataAccess DA, EvaluationUnit unit) { return; } + foreach (SubComponent item in _subcomponents) { if (unit.Name.Equals(item.name())) diff --git a/FemDesign.Grasshopper/Sections/Composite/DeltaBeamProfile.cs b/FemDesign.Grasshopper/Sections/Composite/DeltaBeamProfile.cs index 5d6f7cfb..03ba1b37 100644 --- a/FemDesign.Grasshopper/Sections/Composite/DeltaBeamProfile.cs +++ b/FemDesign.Grasshopper/Sections/Composite/DeltaBeamProfile.cs @@ -1,33 +1,31 @@ using System; +using System.Collections.Generic; using Grasshopper.Kernel; using Grasshopper.Kernel.Parameters; using Grasshopper.Kernel.Types; using FemDesign.Grasshopper.Components.UIWidgets; - +using System.Linq; namespace FemDesign.Grasshopper { public class DeltaBeamProfile : SubComponent { + public System.Drawing.Bitmap Icon => Properties.Resources.DeltaBeamProfile; public override string name() => "DeltaBeamProfile"; public override string display_name() => "DeltaBeamProfile"; public override void registerEvaluationUnits(EvaluationUnitManager mngr) { - EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a composite section for Deltabeam sections. For more information, see FEM-Design GUI."); + EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a composite section for Deltabeam sections. For more information, see FEM-Design GUI.", this.Icon); mngr.RegisterUnit(evaluationUnit); evaluationUnit.RegisterInputParam(new Param_String(), "SectionName", "SectionName", "Composite section name.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Steel", "Steel", "Steel material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Concrete", "Concrete", "Concrete material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "DeltaBeamProfile", "DeltaBeamProfile", "Steel DeltaBeam profile. Can be 'D' or 'DR' section family types.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; } public override void SolveInstance(IGH_DataAccess DA, out string msg, out GH_RuntimeMessageLevel level) diff --git a/FemDesign.Grasshopper/Sections/Composite/EffectiveCompositeSlab.cs b/FemDesign.Grasshopper/Sections/Composite/EffectiveCompositeSlab.cs index d2fbeb51..717d5553 100644 --- a/FemDesign.Grasshopper/Sections/Composite/EffectiveCompositeSlab.cs +++ b/FemDesign.Grasshopper/Sections/Composite/EffectiveCompositeSlab.cs @@ -9,39 +9,36 @@ namespace FemDesign.Grasshopper { public class EffectiveCompositeSlab : SubComponent { + public System.Drawing.Bitmap Icon => Properties.Resources.EffectiveCompositeSlab; public override string name() => "EffectiveCompositeSlab"; public override string display_name() => "EffectiveCompositeSlab"; public override void registerEvaluationUnits(EvaluationUnitManager mngr) { - EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a composite section for bars based on the effective width of a composite slab. For more information, see FEM-Design GUI."); + EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a composite section for bars based on the effective width of a composite slab. For more information, see FEM-Design GUI.", this.Icon); mngr.RegisterUnit(evaluationUnit); evaluationUnit.RegisterInputParam(new Param_String(), "SectionName", "SectionName", "Composite section name.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Steel", "Steel", "Steel material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Concrete", "Concrete", "Concrete material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "SteelProfile", "SteelProfile", "Steel profile.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; - evaluationUnit.RegisterInputParam(new Param_Number(), "t", "t", "Slab thickness.", GH_ParamAccess.item, new GH_Number(150)); + evaluationUnit.RegisterInputParam(new Param_Number(), "t", "t", "Slab thickness [mm].", GH_ParamAccess.item, new GH_Number(150)); evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; - evaluationUnit.RegisterInputParam(new Param_Number(), "bEff", "bEff", "Concrete slab effective width.", GH_ParamAccess.item, new GH_Number(800)); + evaluationUnit.RegisterInputParam(new Param_Number(), "bEff", "bEff", "Concrete slab effective width [mm].", GH_ParamAccess.item, new GH_Number(800)); evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; - evaluationUnit.RegisterInputParam(new Param_Number(), "th", "th", "Hunch thickness.", GH_ParamAccess.item, new GH_Number(60)); + evaluationUnit.RegisterInputParam(new Param_Number(), "th", "th", "Hunch thickness [mm].", GH_ParamAccess.item, new GH_Number(60)); evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; - evaluationUnit.RegisterInputParam(new Param_Number(), "bt", "bt", "Hunch width at the top.", GH_ParamAccess.item, new GH_Number(400)); + evaluationUnit.RegisterInputParam(new Param_Number(), "bt", "bt", "Hunch width at the top [mm].", GH_ParamAccess.item, new GH_Number(400)); evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; - evaluationUnit.RegisterInputParam(new Param_Number(), "bb", "bb", "Hunch width at the bottom.", GH_ParamAccess.item, new GH_Number(200)); + evaluationUnit.RegisterInputParam(new Param_Number(), "bb", "bb", "Hunch width at the bottom [mm].", GH_ParamAccess.item, new GH_Number(200)); evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_Boolean(), "Filled", "Filled", "True if the steel section part is filled with concrete, false if not. The quality of the filling material is the same as the concrete of the slab.", GH_ParamAccess.item, new GH_Boolean(false)); diff --git a/FemDesign.Grasshopper/Sections/Composite/FilledCruciformProfile.cs b/FemDesign.Grasshopper/Sections/Composite/FilledCruciformProfile.cs index eae38881..3f2e9af5 100644 --- a/FemDesign.Grasshopper/Sections/Composite/FilledCruciformProfile.cs +++ b/FemDesign.Grasshopper/Sections/Composite/FilledCruciformProfile.cs @@ -9,22 +9,20 @@ namespace FemDesign.Grasshopper { public class FilledCruciformProfile : SubComponent { + public System.Drawing.Bitmap Icon => Properties.Resources.FilledCruciformProfile; public override string name() => "FilledCruciformProfile"; public override string display_name() => "FilledCruciformProfile"; public override void registerEvaluationUnits(EvaluationUnitManager mngr) { - EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a composite section for cruciform profiled cross-sections. For more information, see FEM-Design GUI."); + EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a composite section for cruciform profiled cross-sections. For more information, see FEM-Design GUI.", this.Icon); mngr.RegisterUnit(evaluationUnit); evaluationUnit.RegisterInputParam(new Param_String(), "SectionName", "SectionName", "Composite section name.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Steel", "Steel", "Steel material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Concrete", "Concrete", "Concrete material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_Number(), "bc", "bc", "Cross-section width [mm].", GH_ParamAccess.item, new GH_Number(600)); evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; diff --git a/FemDesign.Grasshopper/Sections/Composite/FilledIProfile.cs b/FemDesign.Grasshopper/Sections/Composite/FilledIProfile.cs index 704c230f..54ac86fd 100644 --- a/FemDesign.Grasshopper/Sections/Composite/FilledIProfile.cs +++ b/FemDesign.Grasshopper/Sections/Composite/FilledIProfile.cs @@ -10,25 +10,22 @@ namespace FemDesign.Grasshopper { public class FilledIProfile : SubComponent { + public System.Drawing.Bitmap Icon => Properties.Resources.FilledIProfile; public override string name() => "FilledIProfile"; public override string display_name() => "FilledIProfile"; public override void registerEvaluationUnits(EvaluationUnitManager mngr) { - EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a composite section for an 'I' profiled steel section with filled with concrete. For more information, see FEM-Design GUI."); + EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a composite section for an 'I' profiled steel section with filled with concrete. For more information, see FEM-Design GUI.", this.Icon); mngr.RegisterUnit(evaluationUnit); evaluationUnit.RegisterInputParam(new Param_String(), "SectionName", "SectionName", "Composite section name.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Steel", "Steel", "Steel profile material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Concrete", "Concrete", "Concrete material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "IProfile", "IProfile", "'I' profile steel section.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_Number(), "cy", "cy", "Concrete cover in Y direction [mm].", GH_ParamAccess.item, new GH_Number(80)); evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; diff --git a/FemDesign.Grasshopper/Sections/Composite/FilledSteelTube.cs b/FemDesign.Grasshopper/Sections/Composite/FilledSteelTube.cs index ee3d7488..d631487d 100644 --- a/FemDesign.Grasshopper/Sections/Composite/FilledSteelTube.cs +++ b/FemDesign.Grasshopper/Sections/Composite/FilledSteelTube.cs @@ -9,22 +9,20 @@ namespace FemDesign.Grasshopper { public class FilledSteelTube : SubComponent { + public System.Drawing.Bitmap Icon => Properties.Resources.FilledSteelTube; public override string name() => "FilledSteelTube"; public override string display_name() => "FilledSteelTube"; public override void registerEvaluationUnits(EvaluationUnitManager mngr) { - EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a filled steel tube composite section. For more information, see FEM-Design GUI."); + EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a filled steel tube composite section. For more information, see FEM-Design GUI.", this.Icon); mngr.RegisterUnit(evaluationUnit); evaluationUnit.RegisterInputParam(new Param_String(), "SectionName", "SectionName", "Composite section name.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Steel", "Steel", "Steel material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Concrete", "Concrete", "Concrete material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_Number(), "d", "d", "Diameter of steel tube [mm].", GH_ParamAccess.item, new GH_Number(400)); evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; diff --git a/FemDesign.Grasshopper/Sections/Composite/HSQProfile.cs b/FemDesign.Grasshopper/Sections/Composite/HSQProfile.cs index dab6eb34..bf6e3e8c 100644 --- a/FemDesign.Grasshopper/Sections/Composite/HSQProfile.cs +++ b/FemDesign.Grasshopper/Sections/Composite/HSQProfile.cs @@ -9,22 +9,20 @@ namespace FemDesign.Grasshopper { public class HSQProfile : SubComponent { + public System.Drawing.Bitmap Icon => Properties.Resources.HSQProfile; public override string name() => "HSQProfile"; public override string display_name() => "HSQProfile"; public override void registerEvaluationUnits(EvaluationUnitManager mngr) { - EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a composite section for HSQ cross-sections. For more information, see FEM-Design GUI."); + EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a composite section for HSQ cross-sections. For more information, see FEM-Design GUI.", this.Icon); mngr.RegisterUnit(evaluationUnit); evaluationUnit.RegisterInputParam(new Param_String(), "SectionName", "SectionName", "Composite section name.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Steel", "Steel", "Steel material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Concrete", "Concrete", "Concrete material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_Number(), "b", "b", "Intermediate width of the bottom flange [mm].", GH_ParamAccess.item, new GH_Number(200)); evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; diff --git a/FemDesign.Grasshopper/Sections/Composite/RHSProfile.cs b/FemDesign.Grasshopper/Sections/Composite/RHSProfile.cs index 0774076d..b7601419 100644 --- a/FemDesign.Grasshopper/Sections/Composite/RHSProfile.cs +++ b/FemDesign.Grasshopper/Sections/Composite/RHSProfile.cs @@ -9,25 +9,22 @@ namespace FemDesign.Grasshopper { public class RHSProfile : SubComponent { + public System.Drawing.Bitmap Icon => Properties.Resources.RHSProfile; public override string name() => "RHSProfile"; public override string display_name() => "RHSProfile"; public override void registerEvaluationUnits(EvaluationUnitManager mngr) { - EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a composite section for rectangular hollow sections. For more information, see FEM-Design GUI."); + EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a composite section for rectangular hollow sections. For more information, see FEM-Design GUI.", this.Icon); mngr.RegisterUnit(evaluationUnit); evaluationUnit.RegisterInputParam(new Param_String(), "SectionName", "SectionName", "Composite section name.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Steel", "Steel", "Steel material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Concrete", "Concrete", "Concrete material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "RHSProfile", "RHSProfile", "Steel RHS profile.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; } public override void SolveInstance(IGH_DataAccess DA, out string msg, out GH_RuntimeMessageLevel level) diff --git a/FemDesign.Grasshopper/Sections/Composite/SteelTubeWithIProfile.cs b/FemDesign.Grasshopper/Sections/Composite/SteelTubeWithIProfile.cs index 8cbed20b..66ccd078 100644 --- a/FemDesign.Grasshopper/Sections/Composite/SteelTubeWithIProfile.cs +++ b/FemDesign.Grasshopper/Sections/Composite/SteelTubeWithIProfile.cs @@ -13,28 +13,24 @@ namespace FemDesign.Grasshopper { public class SteelTubeWithIProfile : SubComponent { + public System.Drawing.Bitmap Icon => Properties.Resources.SteelTubeWithIProfile; public override string name() => "SteelTubeWithIProfile"; public override string display_name() => "SteelTubeWithIProfile"; public override void registerEvaluationUnits(EvaluationUnitManager mngr) { - EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a filled steel tube composite section with I-profile. For more information, see FEM-Design GUI."); + EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a filled steel tube composite section with I-profile. For more information, see FEM-Design GUI.", this.Icon); mngr.RegisterUnit(evaluationUnit); evaluationUnit.RegisterInputParam(new Param_String(), "SectionName", "SectionName", "Composite section name.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "TubeMaterial", "TubeMaterial", "Steel tube material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "IMateral", "IMateral", "I profile material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Concrete", "Concrete", "Concrete material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "IProfile", "IProfile", "Steel section from database. Must be an I-shaped section type.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_Number(), "d", "d", "Diameter of steel tube [mm].", GH_ParamAccess.item, new GH_Number(600)); evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; diff --git a/FemDesign.Grasshopper/Sections/Composite/SteelTubeWithSteelCore.cs b/FemDesign.Grasshopper/Sections/Composite/SteelTubeWithSteelCore.cs index 763649c3..97122969 100644 --- a/FemDesign.Grasshopper/Sections/Composite/SteelTubeWithSteelCore.cs +++ b/FemDesign.Grasshopper/Sections/Composite/SteelTubeWithSteelCore.cs @@ -9,25 +9,22 @@ namespace FemDesign.Grasshopper { public class SteelTubeWithSteelCore : SubComponent { + public System.Drawing.Bitmap Icon => Properties.Resources.SteelTubeWithSteelCore; public override string name() => "SteelTubeWithSteelCore"; public override string display_name() => "SteelTubeWithSteelCore"; public override void registerEvaluationUnits(EvaluationUnitManager mngr) { - EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a filled steel tube composite section with a steel core. For more information, see FEM-Design GUI."); + EvaluationUnit evaluationUnit = new EvaluationUnit(name(), display_name(), "Create a filled steel tube composite section with a steel core. For more information, see FEM-Design GUI.", this.Icon); mngr.RegisterUnit(evaluationUnit); evaluationUnit.RegisterInputParam(new Param_String(), "SectionName", "SectionName", "Composite section name.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "TubeMaterial", "TubeMaterial", "Steel tube material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "CoreMaterial", "CoreMaterial", "Steel core material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_GenericObject(), "Concrete", "Concrete", "Concrete material.", GH_ParamAccess.item); - evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true; evaluationUnit.RegisterInputParam(new Param_Number(), "d1", "d1", "Steel tube exterior diameter [mm].", GH_ParamAccess.item, new GH_Number(300)); evaluationUnit.Inputs[evaluationUnit.Inputs.Count - 1].Parameter.Optional = true;