/// <summary> /// Constructor /// Note the name of the part you will need to pass to the base class. /// Also note the material quantity of the beam of 1 m3 of the material steel. /// </summary> public Beam_HE( string name, double quantity, string unit, SOPoint3d beginpoint, SOPoint3d endpoint ) : base(name, new SOMaterial("steel"), quantity, unit) { this.m_Beginpoint = beginpoint; this.m_Endpoint = endpoint; }
/// <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); } }
/// <summary> /// Constructor /// Note the name of the part you will need to pass to the base class. /// Also note the material quantity of the beam of 1 m3 of the material steel. /// </summary> public Beam_HE400A(SOPoint3d beginpoint, SOPoint3d endpoint) : base("HE400A", 1.5, "m3", beginpoint, endpoint) { }
/// <summary> /// Constructor /// Note the name of the part you will need to pass to the base class. /// Also note the material quantity of the beam of 1 m3 of the material steel. /// </summary> public Beam_HE320A(SOPoint3d beginpoint, SOPoint3d endpoint) : base("HE320A", 1.0, "m3", beginpoint, endpoint) { }