Пример #1
0
 /// <summary>
 /// Construct longitudinal bar reinforcement
 /// </summary>
 public BarReinforcement(Bars.Bar bar, Wire wire, LongitudinalBar longBar)
 {
     this.EntityCreated();
     this.BaseBar         = new GuidListType(bar.BarPart.Guid);
     this.Wire            = wire;
     this.LongitudinalBar = longBar;
 }
Пример #2
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            FemDesign.Reinforcement.Wire wire = null;
            if (!DA.GetData("Wire", ref wire))
            {
                return;
            }

            double yPos = 0;

            if (!DA.GetData("YPos", ref yPos))
            {
                return;
            }

            double zPos = 0;

            if (!DA.GetData("ZPos", ref zPos))
            {
                return;
            }

            double startAnchorage = 0;

            if (!DA.GetData("StartAnchorage", ref startAnchorage))
            {
                return;
            }

            double endAnchorage = 0;

            if (!DA.GetData("EndAnchorage", ref endAnchorage))
            {
                return;
            }

            double start = 0;

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

            double end = 0;

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

            bool auxiliary = false;

            if (!DA.GetData("AuxiliaryBar", ref auxiliary))
            {
            }

            // create Longitudinal
            var pos     = new FemDesign.Geometry.FdPoint2d(yPos, zPos);
            var longBar = new FemDesign.Reinforcement.LongitudinalBar(pos, startAnchorage, endAnchorage, start, end, auxiliary);

            // create bar reinforcement without base bar reference
            var barReinf = new FemDesign.Reinforcement.BarReinforcement(Guid.Empty, wire, longBar);

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