/// <summary>
 /// Construct stirrup bar reinforcement
 /// </summary>
 public BarReinforcement(Bars.Bar bar, Wire wire, Stirrups stirrups)
 {
     this.EntityCreated();
     this.BaseBar  = new GuidListType(bar.BarPart.Guid);
     this.Wire     = wire;
     this.Stirrups = stirrups;
 }
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            FemDesign.Reinforcement.Wire wire = null;
            if (!DA.GetData("Wire", ref wire))
            {
                return;
            }

            Rhino.Geometry.Brep profile = null;
            if (!DA.GetData("Profile", ref profile))
            {
                return;
            }

            double startParam = 0;

            if (!DA.GetData("Start", ref startParam))
            {
                return;
            }

            double endParam = 0;

            if (!DA.GetData("End", ref endParam))
            {
                return;
            }

            double spacing = 0;

            if (!DA.GetData("Spacing", ref spacing))
            {
                return;
            }

            // transform profile to region
            var region = profile.FromRhino();

            // create stirrups
            var stirrups = new FemDesign.Reinforcement.Stirrups(region, startParam, endParam, spacing);

            // create bar reinforcement
            var barReinf = new FemDesign.Reinforcement.BarReinforcement(Guid.Empty, wire, stirrups);

            //
            DA.SetData("BarReinforcement", barReinf);
        }