GenieRules.Compatibility.version = "V8.5-04"; /* Parametric model of a corrugated plate The plate is created in the XZ-plane with datum point at origin */ ////////////////////////////////////////////// // Inputs - Plate Dimensions, Material & thickness ////////////////////////////////////////////// // Dimensions of corrugated plates Hp = 6.23 m; //Hp = Height of plate Wp = 12.32 m; //Wp = Total width of plate L1 = 700 mm; //L1 = Length of sub panel ___ L2 = 300 mm; //L2 = Length of corrugation ___ / \ D1 D1 = 400 mm; //D1 = Depth of corrugation PanelName = "Bulkhead_1"; //PanelName = Name of set comprising corrugated plate // Material and thickness Mild = Material(235 MPa, 7850 kg/m3, 210 GPa, 0.3, 1.2E-5, 0.03); Th_10 = Thickness(10 mm); Mild.setDefault(); Th_10.setDefault(); ////////////////////////////////////////////// // Script ////////////////////////////////////////////// // Step 01 - Initialization of intermediate parameters, array var Total_Length = 0.0 m; // Total length of the plate we have created to now var i = 0; // Counter for sub panels ___ var j = 0; // Counter for corrugations = 4 sub panels ___/ \ var PartNo = 1; // Sub panel part 1,2,3,4 var array_Curves = new Array(); // Guide curves at the base of the plate // Step2 - Create curves for sub panels until they are beyond Wp do { var StartP = (L1+L2)*2*j; // Start (reference) point for the next corrugation if ( PartNo == 1) // Create curve for 1st subpanel { array_Curves[i] = CreateLineTwoPoints(Point(StartP,0,0), Point((StartP+L1),0,0)); rename(array_Curves[i], "Line_"+i); Total_Length = Total_Length + L1; PartNo = 2; } else if ( PartNo == 2) // Create curve for 1st corrugation subpanel { array_Curves[i] = CreateLineTwoPoints(Point(StartP+L1,0,0), Point((StartP+L1+L2),D1,0)); rename(array_Curves[i], "Line_"+i); Total_Length = Total_Length + L2; PartNo = 3; } else if ( PartNo == 3) // Create curve for 2nd subpanel { array_Curves[i] = CreateLineTwoPoints(Point(StartP+L1+L2,D1,0), Point((StartP+2*L1+L2),D1,0)); rename(array_Curves[i], "Line_"+i); Total_Length = Total_Length + L1; PartNo = 4; } else if ( PartNo == 4) // Create curve for 2nd corrugation subpanel { array_Curves[i] = CreateLineTwoPoints(Point(StartP+2*L1+L2,D1,0), Point(StartP+2*(L1+L2),0,0)); rename(array_Curves[i], "Line_"+i); Total_Length = Total_Length + L2; PartNo = 1; j++; // New corrugation } i++; // Next sub panel } while (Total_Length < Wp); // Step3 - Make a curve to sweep along var SweepCurve1 = CreateLineTwoPoints(Point(0,0,0), Point(0,0,Hp)); // Step4 - Make plates by sweeping lines and put them in a set NewSet = Set(); i = 0; for ( i =0; i < array_Curves.length(); i++) { temp_Panel = SweepCurve(array_Curves[i], SweepCurve1); NewSet.add(temp_Panel); rename(temp_Panel, "Panel_" + i); } // Step5 - Divide the last panel at Wp and delete the rest Print("Final numer of curugate plate = " + (i - 1)); var Rest = GetNamedObject("Panel_"+(i-1)).divide(XPlane3d(Wp)); Delete(Rest); // Step6 - May use "Move-Rotate" to move the plate to where it belongs // (can also be expressed by parameters) NewSet.moveRotate(Point(0, 0, 0),Vector3d(0, 0, 1),90,geUNCONNECTED); NewSet.name = PanelName; // Step7 - Generate Mesh Mesh_Default = MeshDensity(L1/2.0); Mesh_Default.setDefault(); Analysis1 = Analysis(true); Analysis1.add(MeshActivity()); Analysis1.add(LoadResultsActivity()); Analysis1.setActive(); Analysis1.execute();