/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { List <Core.Beam> beams = new List <Core.Beam>(); double radius = 0; if (!DA.GetDataList(0, beams)) { return; } if (!DA.GetData(1, ref radius)) { return; } var joints = JointFactory.CreateJoints(beams, radius, out var beamArray).ToArray(); foreach (var joint in joints) { joint.AlignBeamGeometry(); } foreach (var beam in beamArray) { beam.ShortenEnds(); } DA.SetDataList(0, joints); DA.SetDataList(1, beamArray); }