Exemplo n.º 1
0
 /// <summary>
 /// Private constructor accessed by static methods.
 /// </summary>
 public Straight(ReinforcementDirection direction, double space, GenericClasses.Face face, double cover)
 {
     this.Direction = direction;
     this.Space     = space;
     this.Face      = face;
     this.Cover     = cover;
 }
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            // get data
            string direction = null;
            double space     = 0;
            string face      = null;
            double cover     = 0;

            if (!DA.GetData(0, ref direction))
            {
                return;
            }
            if (!DA.GetData(1, ref space))
            {
                return;
            }
            if (!DA.GetData(2, ref face))
            {
                return;
            }
            if (!DA.GetData(3, ref cover))
            {
                return;
            }
            if (direction == null || face == null)
            {
                return;
            }

            Face _face = EnumParser.Parse <Face>(face);
            ReinforcementDirection _direction = EnumParser.Parse <ReinforcementDirection>(direction);

            FemDesign.Reinforcement.Straight obj = new FemDesign.Reinforcement.Straight(_direction, space, _face, cover);

            // return
            DA.SetData(0, obj);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Define straight reinforcement layout for surface reinforcement.
 /// </summary>
 /// <remarks>Create</remarks>
 /// <param name="direction">x/y</param>
 /// <param name="space">Spacing between bars.</param>
 /// <param name="face">top/mid/bottom</param>
 /// <param name="cover">Reinforcement concrete cover.</param>
 /// <returns></returns>
 public static Straight ReinforcementLayout(ReinforcementDirection direction, double space, Face face, double cover)
 {
     return(new Straight(direction, space, face, cover));
 }