-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
109 lines (88 loc) · 2.43 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#include "node.h"
#include "element.h"
#include "f_profile.h"
#include "profile.h"
#include "base.h"
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<iostream>
using namespace std;
int main()
{
cout<<"Choose from the given sections(all units in mm)"<<endl;
cout<<"1. U100 IPE100 Tube 88.9 x 2.9"<<endl;
cout<<"2. U120 IPE100 Tube 88.9 x 2.9"<<endl;
cout<<"3. U140 IPE100 Tube 88.9 x 2.9"<<endl;
cout<<"4. Enter custom dimensions(all in mm)"<<endl;
int select;
cout<<"Enter your selection(1-4) :";
cin>>select;
char pName[256];
double hu=0.,bu=0.,tu=0.,su=0.; // for U section
double hi=0.,bi=0.,ti=0.; // for I section
double dit=0.,tt=0.; // for tube section
switch(select)
{
case 1:
strcpy(pName,"Profile1");
hu=100;
bu=50;
tu=8.5;
su=6;
hi=100;
bi=55;
ti=5.7;
dit=83.1;
tt=2.9;
break;
case 2:
strcpy(pName,"Profile2");
hu=120;
bu=55;
tu=9;
su=7;
hi=100;
bi=55;
ti=5.7;
dit=83.1;
tt=2.9;
break;
case 3:
strcpy(pName,"Profile3");
hu=140;
bu=60;
tu=10;
su=7;
hi=100;
bi=55;
ti=5.7;
dit=83.1;
tt=2.9;
break;
case 4:
strcpy(pName,"CustomProfile");
cout<<"Enter custom dimensions(all in mm) :"<<endl;
cout<<"U beam :"<<endl;
cout<<"height : ";cin>>hu;
cout<<"breadth : ";cin>>bu;
cout<<"side wall thickness : ";cin>>tu;
cout<<"cross wall thickness : "; cin>>su;
cout<<"I beam :"<<endl;
cout<<"height : ";cin>>hi;
cout<<"breadth : ";cin>>bi;
cout<<"average thickness : ";cin>>ti;
cout<<"Tube :"<<endl;
cout<<"inner diameter : ";cin>>dit;
cout<<"section thickness : ";cin>>tt;
break;
default:
cout<<"Check your selection"<<endl;
return 0;
}
// creating the full profile
f_profile pro = f_profile(pName,hi,bi,ti,hu,bu,tu,su,dit,tt);
pro.Create();
pro.List();
return 0;
}