예제 #1
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            //Input
            Line line = new Line();

            DA.GetData(0, ref line);

            double eModulus = 0.0;

            DA.GetData(1, ref eModulus);

            double area = 0.0;

            DA.GetData(2, ref area);

            double preStress = 0.0;

            if (this.Params.Input[3].SourceCount != 0)
            {
                DA.GetData(3, ref preStress);
            }


            //Create instance of bar
            GoalObject barElement = new BarGoal(line, eModulus, area, preStress);


            //Output
            DA.SetData(0, barElement);
        }
예제 #2
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            //Input
            Line line = new Line();
            DA.GetData(0, ref line);

            double eModulus = 0.0;
            DA.GetData(1, ref eModulus);

            double area = 0.0;
            DA.GetData(2, ref area);


            //Create instance of bar
            GoalObject barElement = new BarGoal(line, eModulus, area);


            //Output
            DA.SetData(0, barElement);
        }
예제 #3
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            //Input
            Line line = new Line();

            DA.GetData(0, ref line);

            double eModulus = 0.0;

            DA.GetData(1, ref eModulus);

            double area = 0.0;

            DA.GetData(2, ref area);


            //Create instance of bar
            GoalObject barElement = new BarGoal(line, eModulus, area);


            //Output
            DA.SetData(0, barElement);
        }