Beispiel #1
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            double diameter = 0;

            FemDesign.Materials.Material material = null;
            string profile = "ribbed";

            if (!DA.GetData("Diameter", ref diameter))
            {
                return;
            }
            if (!DA.GetData("Material", ref material))
            {
                return;
            }
            DA.GetData("Profile", ref profile);

            if (material == null || profile == null)
            {
                return;
            }

            WireProfileType _profile = EnumParser.Parse <WireProfileType>(profile);

            FemDesign.Reinforcement.Wire obj = new FemDesign.Reinforcement.Wire(diameter, material, _profile);

            DA.SetData(0, obj);
        }
        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);
        }
        public static SurfaceReinforcement BySurface(Surface surface, Straight straight, Wire wire)
        {
            // convert geometry
            Geometry.Region region = Geometry.Region.FromDynamo(surface);

            // return
            return(SurfaceReinforcement.DefineStraightSurfaceReinforcement(region, straight, wire));
        }
Beispiel #4
0
        /// <summary>
        /// Create straight lay-out surface reinforcement.
        /// Internal static method used by GH components and Dynamo nodes.
        /// </summary>
        public static SurfaceReinforcement DefineStraightSurfaceReinforcement(Geometry.Region region, Straight straight, Wire wire)
        {
            // set straight (e.g. centric == null)
            Centric centric = null;

            // new surfaceReinforcement
            SurfaceReinforcement obj = new SurfaceReinforcement(region, straight, centric, wire);

            // return
            return(obj);
        }
Beispiel #5
0
        /// <summary>
        /// Private constructor accessed by static methods.
        /// </summary>
        private SurfaceReinforcement(Geometry.Region region, Straight straight, Centric centric, Wire wire)
        {
            // object information
            this.EntityCreated();

            // other properties
            this.Straight = straight;
            this.Centric  = centric;
            this.Wire     = wire;
            this.Region   = region;
        }
Beispiel #6
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);
        }