Пример #1
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Plane           insertPlane   = Plane.Unset;
            double          height        = 0.0;
            double          width         = 0.0;
            int             hooksType     = 0;
            double          hookLength    = 0.0;
            RebarProperties properties    = null;
            BendingRoller   bendingRoller = null;

            DA.GetData(0, ref insertPlane);
            DA.GetData(1, ref height);
            DA.GetData(2, ref width);
            DA.GetData(3, ref hooksType);
            DA.GetData(4, ref hookLength);
            DA.GetData(5, ref properties);
            DA.GetData(6, ref bendingRoller);

            RebarShape rebarShape = new RebarShape(properties);

            rebarShape.BuildStirrupShape(insertPlane, height, width, bendingRoller, hooksType, hookLength);

            DA.SetData(0, rebarShape);
            DA.SetData(1, rebarShape.RebarMesh);
        }
Пример #2
0
        public void CorrectData(double diameter, double tolerance, double angleTolerance)
        {
            BendingRoller testObject = new BendingRoller(diameter, tolerance, angleTolerance);

            Assert.Equal(diameter, testObject.Diameter);
            Assert.Equal(tolerance, testObject.Tolerance);
            Assert.Equal(angleTolerance, testObject.AngleTolerance);
        }
Пример #3
0
        public void TestToString()
        {
            BendingRoller testObject = new BendingRoller(60.8, 0.001, 0.01);

            string expectedToString = "Bending Roller" + Environment.NewLine +
                                      "Diameter: 60,8" + Environment.NewLine +
                                      "Tolerance: 0,001" + Environment.NewLine +
                                      "Angle Tolerance: 0,01";

            Assert.Equal(expectedToString, testObject.ToString());
        }
Пример #4
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            double diameter       = 0.0;
            double tolerance      = 0.0001;
            double angleTolerance = 0.0175;

            DA.GetData(0, ref diameter);
            DA.GetData(1, ref tolerance);
            DA.GetData(2, ref angleTolerance);

            BendingRoller bendingRoller = new BendingRoller(diameter, tolerance, angleTolerance);

            DA.SetData(0, bendingRoller);
        }
Пример #5
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Curve           rebarCurve    = null;
            RebarProperties props         = null;
            BendingRoller   bendingRoller = null;

            DA.GetData(0, ref rebarCurve);
            DA.GetData(1, ref props);
            DA.GetData(2, ref bendingRoller);

            RebarShape rebarShape = new RebarShape(props);

            rebarShape.PolylineToRebarShape(rebarCurve, bendingRoller);

            DA.SetData(0, rebarShape);
            DA.SetData(1, rebarShape.RebarMesh);
        }
Пример #6
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Rectangle3d     rectangle       = Rectangle3d.Unset;
            RebarProperties properties      = null;
            BendingRoller   bendingRoller   = null;
            int             hooksType       = 0;
            CoverDimensions coverDimensions = null;
            double          hookLength      = 0.0;

            DA.GetData(0, ref rectangle);
            DA.GetData(1, ref properties);
            DA.GetData(2, ref bendingRoller);
            DA.GetData(3, ref hooksType);
            DA.GetData(4, ref hookLength);
            DA.GetData(5, ref coverDimensions);

            RebarShape rebarShape = new RebarShape(properties);

            rebarShape.BuildRectangleToStirrupShape(rectangle, bendingRoller, hooksType, coverDimensions, hookLength);

            DA.SetData(0, rebarShape);
            DA.SetData(1, rebarShape.RebarMesh);
        }