Ejemplo n.º 1
0
        protected override void SolveInstance(IGH_DataAccess dataAccess)
        {
            var name = new string[8];

            for (var i = 0; i < name.Length; i++)
            {
                if (!dataAccess.GetData(i, ref name[i]))
                {
                    return;
                }
            }

            var familyName = new CroSecFamilyName
            {
                Box    = name[0],
                H      = name[1],
                Circle = name[2],
                Pipe   = name[3],
                FB     = name[4],
                L      = name[5],
                T      = name[6],
                Other  = name[7]
            };

            dataAccess.SetData(0, familyName);
        }
Ejemplo n.º 2
0
        protected override void SolveInstance(IGH_DataAccess dataAccess)
        {
            var familyName = new CroSecFamilyName();
            var k3dElemSh  = new List <GH_Element>();

            if (!dataAccess.GetData(0, ref _stBridge))
            {
                return;
            }
            if (!dataAccess.GetData(1, ref familyName))
            {
                familyName = CroSecFamilyName.Default();
            }


            List <string>[]    k3dIds        = CrossSection.GetIndex(_stBridge);
            List <CroSec>      k3dCroSec     = CrossSection.GetCroSec(_stBridge.StbModel.StbSections, familyName);
            List <BuilderBeam> k3dBeamElems  = ElementBuilder.BuilderBeams(_stBridge.StbModel, k3dIds);
            List <GH_Element>  ghK3dElements = k3dBeamElems.Select(e => new GH_Element(e)).ToList();

            dataAccess.SetDataList(0, ghK3dElements);
            dataAccess.SetDataList(1, k3dCroSec);
        }