diff --git a/FemDesign.Grasshopper/Deconstruct/ModellingTools/LineConnectionDeconstruct.cs b/FemDesign.Grasshopper/Deconstruct/ModellingTools/LineConnectionDeconstruct.cs index a0da4048..30136b94 100644 --- a/FemDesign.Grasshopper/Deconstruct/ModellingTools/LineConnectionDeconstruct.cs +++ b/FemDesign.Grasshopper/Deconstruct/ModellingTools/LineConnectionDeconstruct.cs @@ -1,4 +1,4 @@ -// https://strusoft.com/ +// https://strusoft.com/ using System; using System.Collections.Generic; using System.Linq; @@ -49,7 +49,7 @@ protected override void SolveInstance(IGH_DataAccess DA) DA.SetData(6, obj.Rigidity.PlasticLimitMoments); DA.SetData(7, obj.LocalX.ToRhino()); DA.SetData(8, obj.LocalY.ToRhino()); - DA.SetData(9, obj.Identifier); + DA.SetData(9, obj.Name); } protected override System.Drawing.Bitmap Icon { @@ -60,7 +60,7 @@ protected override System.Drawing.Bitmap Icon } public override Guid ComponentGuid { - get { return new Guid("{B4480216-0C2E-4B63-AA52-3764992D3886}"); } + get { return new Guid("{0327EABF-6045-439C-AB65-B1E34DB190C6}"); } } public override GH_Exposure Exposure => GH_Exposure.senary; diff --git a/FemDesign.Grasshopper/Deconstruct/ModellingTools/FictitiousBarDeconstruct_OBSOLETE2306.cs b/FemDesign.Grasshopper/Deconstruct/ModellingTools/OBSOLETE/FictitiousBarDeconstruct_OBSOLETE2306.cs similarity index 100% rename from FemDesign.Grasshopper/Deconstruct/ModellingTools/FictitiousBarDeconstruct_OBSOLETE2306.cs rename to FemDesign.Grasshopper/Deconstruct/ModellingTools/OBSOLETE/FictitiousBarDeconstruct_OBSOLETE2306.cs diff --git a/FemDesign.Grasshopper/Deconstruct/ModellingTools/OBSOLETE/LineConnectionDeconstruct_OBSOLETE.cs b/FemDesign.Grasshopper/Deconstruct/ModellingTools/OBSOLETE/LineConnectionDeconstruct_OBSOLETE.cs new file mode 100644 index 00000000..0556e494 --- /dev/null +++ b/FemDesign.Grasshopper/Deconstruct/ModellingTools/OBSOLETE/LineConnectionDeconstruct_OBSOLETE.cs @@ -0,0 +1,69 @@ +// https://strusoft.com/ +using System; +using System.Collections.Generic; +using System.Linq; +using Grasshopper.Kernel; +using Rhino.Geometry; + +namespace FemDesign.Grasshopper +{ + public class LineConnectionDeconstruct_OBSOLETE : FEM_Design_API_Component + { + public LineConnectionDeconstruct_OBSOLETE() : base("LineConnection.Deconstruct", "Deconstruct", "Deconstruct a LineConnection.", CategoryName.Name(), "Deconstruct") + { + + } + protected override void RegisterInputParams(GH_InputParamManager pManager) + { + pManager.AddGenericParameter("LineConnection", "LnConnect", "LineConnection from ModellingTools.", GH_ParamAccess.item); + } + protected override void RegisterOutputParams(GH_OutputParamManager pManager) + { + pManager.AddTextParameter("Guid", "Guid", "Guid.", GH_ParamAccess.item); + pManager.AddGenericParameter("ConnectedElementsReference", "Ref", "GUIDs of connected structural elements (e.g. slabs, surface supports, fictious shells, etc).", GH_ParamAccess.list); + pManager.AddLineParameter("Lines", "Lns", "Master line and slave line.", GH_ParamAccess.list); + pManager.AddGenericParameter("Motion", "Mot", "Motion release.", GH_ParamAccess.item); + pManager.AddGenericParameter("MotionsPlasticLimits", "PlaLimM", "Plastic limits forces for motion springs.", GH_ParamAccess.item); + pManager.AddGenericParameter("Rotation", "Rot", "Rotation release.", GH_ParamAccess.item); + pManager.AddGenericParameter("RotationsPlasticLimits", "PlaLimR", "Plastic limits moments for rotation springs.", GH_ParamAccess.item); + pManager.AddVectorParameter("LocalX", "X", "Local x-axis.", GH_ParamAccess.item); + pManager.AddVectorParameter("LocalY", "Y", "Local y-axis.", GH_ParamAccess.item); + pManager.AddTextParameter("Identifier", "ID", "Identifier.", GH_ParamAccess.item); + } + protected override void SolveInstance(IGH_DataAccess DA) + { + // get input + FemDesign.ModellingTools.ConnectedLines obj = null; + if (!DA.GetData(0, ref obj)) { return; } + if (obj == null) { return; } + + var rhinoLines = obj.Edges.Select(l => l.ToRhino()).ToList(); + + // get output + DA.SetData(0, obj.Guid); + DA.SetDataList(1, obj.References); + DA.SetDataList(2, rhinoLines); + DA.SetData(3, obj.Rigidity.Motions); + DA.SetData(4, obj.Rigidity.PlasticLimitForces); + DA.SetData(5, obj.Rigidity.Rotations); + DA.SetData(6, obj.Rigidity.PlasticLimitMoments); + DA.SetData(7, obj.LocalX.ToRhino()); + DA.SetData(8, obj.LocalY.ToRhino()); + DA.SetData(9, obj.Identifier); + } + protected override System.Drawing.Bitmap Icon + { + get + { + return FemDesign.Properties.Resources.LineConnectionDeconstruct; + } + } + public override Guid ComponentGuid + { + get { return new Guid("{B4480216-0C2E-4B63-AA52-3764992D3886}"); } + } + + public override GH_Exposure Exposure => GH_Exposure.hidden; + + } +} \ No newline at end of file diff --git a/FemDesign.Grasshopper/Deconstruct/ModellingTools/PointConnectionDeconstruct.cs b/FemDesign.Grasshopper/Deconstruct/ModellingTools/PointConnectionDeconstruct.cs index 77f83cc2..764afead 100644 --- a/FemDesign.Grasshopper/Deconstruct/ModellingTools/PointConnectionDeconstruct.cs +++ b/FemDesign.Grasshopper/Deconstruct/ModellingTools/PointConnectionDeconstruct.cs @@ -49,7 +49,7 @@ protected override void SolveInstance(IGH_DataAccess DA) DA.SetData(6, obj.Rigidity.PlasticLimitMoments); DA.SetData(7, obj.LocalX.ToRhino()); DA.SetData(8, obj.LocalY.ToRhino()); - DA.SetData(9, obj.Identifier); + DA.SetData(9, obj.Name); } protected override System.Drawing.Bitmap Icon { diff --git a/FemDesign.Grasshopper/Deconstruct/ModellingTools/SurfaceConnectionDeconstruct.cs b/FemDesign.Grasshopper/Deconstruct/ModellingTools/SurfaceConnectionDeconstruct.cs index 10d30328..7745f513 100644 --- a/FemDesign.Grasshopper/Deconstruct/ModellingTools/SurfaceConnectionDeconstruct.cs +++ b/FemDesign.Grasshopper/Deconstruct/ModellingTools/SurfaceConnectionDeconstruct.cs @@ -45,7 +45,7 @@ protected override void SolveInstance(IGH_DataAccess DA) DA.SetData(5, obj.LocalX.ToRhino()); DA.SetData(6, obj.LocalZ.ToRhino()); DA.SetData(7, obj.Distance); - DA.SetData(8, obj.Identifier); + DA.SetData(8, obj.Name); } protected override System.Drawing.Bitmap Icon { diff --git a/FemDesign.Grasshopper/FemDesign.Grasshopper.csproj b/FemDesign.Grasshopper/FemDesign.Grasshopper.csproj index 95fc2d0c..41fd44a9 100644 --- a/FemDesign.Grasshopper/FemDesign.Grasshopper.csproj +++ b/FemDesign.Grasshopper/FemDesign.Grasshopper.csproj @@ -118,9 +118,10 @@ - - + + +