Пример #1
0
        public static Reinforcement.BarReinforcement LongitudinalBarByStartEnd(Wire wire, double yPos, double zPos, double startAnchorage, double endAnchorage, double start, double end, bool auxBar)
        {
            // create longitudinal
            var pos     = new FemDesign.Geometry.FdPoint2d(yPos, zPos);
            var longBar = new FemDesign.Reinforcement.LongitudinalBar(pos, startAnchorage, endAnchorage, start, end, auxBar);

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

            return(barReinf);
        }
Пример #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);
        }