/// <summary>
        /// Overriding the RunDesigner method.
        /// This method will be run by the framework to make the design.
        /// </summary>
        public override void RunDesigner()
        {
            // It is important that you run the base designer
            base.RunDesigner();

            // Adding a structure and two beams with the designer
            SOComponent structure = new SOComponent("structure");

            this.CurrentDesignAlternative.AddComponent(structure);
            structure.AddPart(new Beam_HE200A());
            structure.AddPart(new Beam_HE200A());
        }
        /// <summary>
        /// Overriding the RunDesigner method.
        /// This method will be run by the framework to make the design.
        /// </summary>
        public override void RunDesigner()
        {
            // It is important that you run the base designer
            base.RunDesigner();

            SOComponent component = new SOComponent("structure");
            this.CurrentDesignAlternative.AddComponent(component);

            for (int i = 0; i < this.m_NumberOfBeams; i++)
            {
                component.AddPart(new Beam_HE300A());
            }
        }
        public void TestClear()
        {
            SOComponent component = new SOComponent("0001");

            // Components should not be null
            Assert.NotNull(component.Parts);

            // Components should be empty on the start
            Assert.IsEmpty(component.SubComponents);
            Assert.IsEmpty(component.Parts);

            // Add a subcomponent to the component
            SOComponent subcomponent = new SOComponent("0001");
            component.AddSubComponent(subcomponent);

            // Components should no longer be empty
            Assert.IsNotEmpty(component.SubComponents);
            Assert.AreEqual(1, component.SubComponents.Length);
            Assert.IsInstanceOf(typeof(SOComponent), component.SubComponents[0]);
            Assert.AreEqual(subcomponent, component.SubComponents[0]);

            // Add a part to the component
            SOPart part = new SOPart("0001", new SOMaterial("steel"), 1, "kg");
            component.AddPart(part);

            // Parts should no longer be empty
            Assert.IsNotEmpty(component.Parts);
            Assert.AreEqual(1, component.Parts.Length);
            Assert.IsInstanceOf(typeof(SOPart), component.Parts[0]);
            Assert.AreEqual(part, component.Parts[0]);

            // Clear the component
            component.Clear();

            // Components should be empty
            Assert.IsEmpty(component.SubComponents);

            // Parts should be empty
            Assert.IsEmpty(component.Parts);
        }
        /// <summary>
        /// Overriding the RunDesigner method.
        /// This method will be run by the framework to make the design.
        /// </summary>
        public override void RunDesigner()
        {
            // It is important that you run the base designer
            base.RunDesigner();

            // Adding a structure and two beams with the designer
            SOComponent structure = new SOComponent("structure");
            this.CurrentDesignAlternative.AddComponent(structure);

            for (int i = 0; i < this.NumberOfFrames; i++)
            {
                // Set up the points
                SOPoint3d point1 = new SOPoint3d(basePoint.X + ((double)i * Spacing), basePoint.Y, basePoint.Z);
                SOPoint3d point2 = new SOPoint3d(basePoint.X + ((double)i * Spacing), basePoint.Y, basePoint.Z + Height);
                SOPoint3d point3 = new SOPoint3d(basePoint.X + ((double)i * Spacing), basePoint.Y + Span, basePoint.Z);
                SOPoint3d point4 = new SOPoint3d(basePoint.X + ((double)i * Spacing), basePoint.Y + Span, basePoint.Z + Height);

                // Adding a beam layer to the structure
                SOComponent beam = new SOComponent("beams");
                structure.AddSubComponent(beam);

                // Adding a beam to the beam layer
                beam.AddPart(new Beam_HE400A(point2, point4));

                // Adding a set of columns to the structure
                SOComponent columns = new SOComponent("columns");
                structure.AddSubComponent(columns);

                // Adding two columns to the column set
                columns.AddPart(new Beam_HE320A(point1, point2));
                columns.AddPart(new Beam_HE320A(point3, point4));

                this.points1.Add(point1);
                this.points2.Add(point2);
                this.points3.Add(point3);
                this.points4.Add(point4);
            }
        }