ANYstructure 5.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- anystruct/ANYstructure_documentation.pdf +0 -0
- anystruct/SN_curve_parameters.py +35 -0
- anystruct/__init__.py +0 -0
- anystruct/__main__.py +24 -0
- anystruct/api.py +772 -0
- anystruct/buckling_calc_external.py +120 -0
- anystruct/bulb_anglebar_tbar_flatbar.csv +677 -0
- anystruct/calc_loads.py +526 -0
- anystruct/calc_structure.py +4838 -0
- anystruct/compartment_window.py +176 -0
- anystruct/example_data.py +532 -0
- anystruct/example_data_puls.py +46 -0
- anystruct/excel_inteface.py +244 -0
- anystruct/fatigue_window.py +352 -0
- anystruct/grid_window.py +307 -0
- anystruct/gui.py +24 -0
- anystruct/helper.py +623 -0
- anystruct/images/ANYstructure_logo.jpg +0 -0
- anystruct/images/Buckling_Strength_of_Shells.png +0 -0
- anystruct/images/Panel_geometry_definitions.png +0 -0
- anystruct/images/current_comps_NONE.png +0 -0
- anystruct/images/fls_button.gif +0 -0
- anystruct/images/img_T_L_FB.gif +0 -0
- anystruct/images/img_axial_stresses.gif +0 -0
- anystruct/images/img_ext_pressure_button.gif +0 -0
- anystruct/images/img_ext_pressure_button_def.gif +0 -0
- anystruct/images/img_fixation_parameters.gif +0 -0
- anystruct/images/img_generate_report.gif +0 -0
- anystruct/images/img_int_pressure_button.gif +0 -0
- anystruct/images/img_int_pressure_button_search.gif +0 -0
- anystruct/images/img_multi_opt.gif +0 -0
- anystruct/images/img_optimize.gif +0 -0
- anystruct/images/img_plate_and_stiffener.gif +0 -0
- anystruct/images/img_stf_button.gif +0 -0
- anystruct/images/img_stiffener.gif +0 -0
- anystruct/images/img_stress_button.gif +0 -0
- anystruct/images/img_title.gif +0 -0
- anystruct/images/img_transverse_stress.gif +0 -0
- anystruct/load_factor_window.py +166 -0
- anystruct/load_window.py +721 -0
- anystruct/main_application.py +7918 -0
- anystruct/make_grid_numpy.py +506 -0
- anystruct/make_queue.py +52 -0
- anystruct/make_stack.py +52 -0
- anystruct/ml_files/CL_CSR-Tank_req_cl_predictor.pickle +0 -0
- anystruct/ml_files/CL_CSR-Tank_req_cl_scaler.pickle +0 -0
- anystruct/ml_files/CL_CSR_plate_cl,_CSR_web_cl,_CSR_web_flange_cl,_CSR_flange_cl_predictor.pickle +0 -0
- anystruct/ml_files/CL_CSR_plate_cl,_CSR_web_cl,_CSR_web_flange_cl,_CSR_flange_cl_scaler.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_predictor_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_predictor_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_predictor_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_predictor_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_scaler_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_scaler_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_scaler_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_scaler_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_predictor_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_predictor_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_predictor_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_predictor_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_scaler_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_scaler_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_scaler_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_scaler_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_predictor_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_predictor_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_predictor_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_predictor_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_scaler_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_scaler_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_scaler_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_scaler_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_predictor_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_predictor_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_predictor_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_predictor_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_scaler_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_scaler_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_scaler_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_scaler_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/opt_problem.py +31 -0
- anystruct/optimize.py +1680 -0
- anystruct/optimize_cylinder.py +898 -0
- anystruct/optimize_geometry.py +1708 -0
- anystruct/optimize_multiple_window.py +1507 -0
- anystruct/optimize_window.py +1117 -0
- anystruct/pl_stf_window.py +572 -0
- anystruct/report_generator.py +912 -0
- anystruct/sections.csv +202 -0
- anystruct/sesam_interface.py +115 -0
- anystruct/ship_section_example.txt +1 -0
- anystruct/stresses_window.py +269 -0
- anystruct/testCalc.py +118 -0
- anystructure-5.2.0.dist-info/METADATA +86 -0
- anystructure-5.2.0.dist-info/RECORD +99 -0
- anystructure-5.2.0.dist-info/WHEEL +5 -0
- anystructure-5.2.0.dist-info/entry_points.txt +2 -0
- anystructure-5.2.0.dist-info/licenses/LICENSE +21 -0
- anystructure-5.2.0.dist-info/top_level.txt +1 -0
anystruct/sections.csv
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
0.41600000000000004,0.01,0.13,0.016,T
|
|
2
|
+
0.425,0.01,0.13,0.025,T
|
|
3
|
+
0.426,0.012,0.15,0.026000000000000002,T
|
|
4
|
+
0.425,0.015,0.18,0.025,T
|
|
5
|
+
0.43,0.015,0.18,0.03,T
|
|
6
|
+
0.435,0.015,0.21,0.035,T
|
|
7
|
+
0.33,0.012,0.1,0.015,T
|
|
8
|
+
0.355,0.012,0.12,0.015,T
|
|
9
|
+
0.39,0.012,0.12,0.02,T
|
|
10
|
+
0.41500000000000004,0.012,0.12,0.02,T
|
|
11
|
+
0.45,0.012,0.12,0.025,T
|
|
12
|
+
0.47500000000000003,0.012,0.12,0.025,T
|
|
13
|
+
0.485,0.012,0.12,0.03,T
|
|
14
|
+
0.495,0.012,0.12,0.035,T
|
|
15
|
+
0.5,0.012,0.12,0.025,T
|
|
16
|
+
0.55,0.012,0.12,0.025,T
|
|
17
|
+
0.55,0.012,0.15,0.025,T
|
|
18
|
+
0.56,0.012,0.15,0.03,T
|
|
19
|
+
0.5700000000000001,0.012,0.15,0.035,T
|
|
20
|
+
0.6,0.012,0.15,0.025,T
|
|
21
|
+
0.62,0.012,0.15,0.035,T
|
|
22
|
+
0.65,0.012,0.15,0.025,T
|
|
23
|
+
0.66,0.012,0.15,0.03,T
|
|
24
|
+
0.67,0.012,0.15,0.035,T
|
|
25
|
+
0.65,0.012,0.2,0.025,T
|
|
26
|
+
0.66,0.012,0.2,0.03,T
|
|
27
|
+
0.67,0.012,0.2,0.035,T
|
|
28
|
+
0.7000000000000001,0.012,0.2,0.025,T
|
|
29
|
+
0.72,0.012,0.2,0.035,T
|
|
30
|
+
0.75,0.012,0.2,0.025,T
|
|
31
|
+
0.77,0.012,0.2,0.035,T
|
|
32
|
+
0.8,0.012,0.2,0.025,T
|
|
33
|
+
0.81,0.012,0.2,0.03,T
|
|
34
|
+
0.8200000000000001,0.012,0.2,0.035,T
|
|
35
|
+
0.86,0.014,0.2,0.03,T
|
|
36
|
+
0.87,0.014,0.2,0.035,T
|
|
37
|
+
0.91,0.014,0.2,0.03,T
|
|
38
|
+
0.92,0.014,0.2,0.035,T
|
|
39
|
+
0.33,0.012,0.1,0.015,T
|
|
40
|
+
0.355,0.012,0.12,0.015,T
|
|
41
|
+
0.39,0.012,0.12,0.02,T
|
|
42
|
+
0.41500000000000004,0.012,0.12,0.02,T
|
|
43
|
+
0.45,0.012,0.12,0.025,T
|
|
44
|
+
0.47500000000000003,0.012,0.12,0.025,T
|
|
45
|
+
0.485,0.012,0.12,0.03,T
|
|
46
|
+
0.495,0.012,0.12,0.035,T
|
|
47
|
+
0.5,0.012,0.12,0.025,T
|
|
48
|
+
0.55,0.012,0.12,0.025,T
|
|
49
|
+
0.55,0.012,0.15,0.025,T
|
|
50
|
+
0.56,0.012,0.15,0.03,T
|
|
51
|
+
0.5700000000000001,0.012,0.15,0.035,T
|
|
52
|
+
0.6,0.012,0.15,0.025,T
|
|
53
|
+
0.62,0.012,0.15,0.035,T
|
|
54
|
+
0.65,0.012,0.15,0.025,T
|
|
55
|
+
0.66,0.012,0.15,0.03,T
|
|
56
|
+
0.67,0.012,0.15,0.035,T
|
|
57
|
+
0.65,0.012,0.2,0.025,T
|
|
58
|
+
0.66,0.012,0.2,0.03,T
|
|
59
|
+
0.67,0.012,0.2,0.035,T
|
|
60
|
+
0.7000000000000001,0.012,0.2,0.025,T
|
|
61
|
+
0.72,0.012,0.2,0.035,T
|
|
62
|
+
0.75,0.012,0.2,0.025,T
|
|
63
|
+
0.77,0.012,0.2,0.035,T
|
|
64
|
+
0.8,0.012,0.2,0.025,T
|
|
65
|
+
0.81,0.012,0.2,0.03,T
|
|
66
|
+
0.8200000000000001,0.012,0.2,0.035,T
|
|
67
|
+
0.86,0.014,0.2,0.03,T
|
|
68
|
+
0.87,0.014,0.2,0.035,T
|
|
69
|
+
0.91,0.014,0.2,0.03,T
|
|
70
|
+
0.92,0.014,0.2,0.035,T
|
|
71
|
+
0.44,0.012,0.125,0.04,T
|
|
72
|
+
0.44,0.014,0.125,0.04,T
|
|
73
|
+
0.465,0.012,0.125,0.04,T
|
|
74
|
+
0.465,0.014,0.125,0.04,T
|
|
75
|
+
0.49,0.012,0.125,0.04,T
|
|
76
|
+
0.49,0.014,0.125,0.04,T
|
|
77
|
+
0.515,0.012,0.125,0.04,T
|
|
78
|
+
0.515,0.014,0.125,0.04,T
|
|
79
|
+
0.54,0.012,0.125,0.04,T
|
|
80
|
+
0.54,0.014,0.125,0.04,T
|
|
81
|
+
0.5650000000000001,0.012,0.125,0.04,T
|
|
82
|
+
0.5650000000000001,0.014,0.125,0.04,T
|
|
83
|
+
0.59,0.012,0.125,0.04,T
|
|
84
|
+
0.59,0.014,0.125,0.04,T
|
|
85
|
+
0.615,0.012,0.125,0.04,T
|
|
86
|
+
0.615,0.014,0.125,0.04,T
|
|
87
|
+
0.64,0.012,0.125,0.04,T
|
|
88
|
+
0.64,0.014,0.125,0.04,T
|
|
89
|
+
0.665,0.012,0.125,0.04,T
|
|
90
|
+
0.665,0.014,0.125,0.04,T
|
|
91
|
+
0.6900000000000001,0.012,0.125,0.04,T
|
|
92
|
+
0.6900000000000001,0.014,0.125,0.04,T
|
|
93
|
+
0.445,0.012,0.125,0.045,T
|
|
94
|
+
0.445,0.014,0.125,0.045,T
|
|
95
|
+
0.47000000000000003,0.012,0.125,0.045,T
|
|
96
|
+
0.47000000000000003,0.014,0.125,0.045,T
|
|
97
|
+
0.495,0.012,0.125,0.045,T
|
|
98
|
+
0.495,0.014,0.125,0.045,T
|
|
99
|
+
0.52,0.012,0.125,0.045,T
|
|
100
|
+
0.52,0.014,0.125,0.045,T
|
|
101
|
+
0.545,0.012,0.125,0.045,T
|
|
102
|
+
0.545,0.014,0.125,0.045,T
|
|
103
|
+
0.5700000000000001,0.012,0.125,0.045,T
|
|
104
|
+
0.5700000000000001,0.014,0.125,0.045,T
|
|
105
|
+
0.595,0.012,0.125,0.045,T
|
|
106
|
+
0.595,0.014,0.125,0.045,T
|
|
107
|
+
0.62,0.012,0.125,0.045,T
|
|
108
|
+
0.62,0.014,0.125,0.045,T
|
|
109
|
+
0.645,0.012,0.125,0.045,T
|
|
110
|
+
0.645,0.014,0.125,0.045,T
|
|
111
|
+
0.67,0.012,0.125,0.045,T
|
|
112
|
+
0.67,0.014,0.125,0.045,T
|
|
113
|
+
0.6950000000000001,0.012,0.125,0.045,T
|
|
114
|
+
0.6950000000000001,0.014,0.125,0.045,T
|
|
115
|
+
0.44,0.012,0.16,0.04,T
|
|
116
|
+
0.44,0.014,0.16,0.04,T
|
|
117
|
+
0.465,0.012,0.16,0.04,T
|
|
118
|
+
0.465,0.014,0.16,0.04,T
|
|
119
|
+
0.49,0.012,0.16,0.04,T
|
|
120
|
+
0.49,0.014,0.16,0.04,T
|
|
121
|
+
0.515,0.012,0.16,0.04,T
|
|
122
|
+
0.515,0.014,0.16,0.04,T
|
|
123
|
+
0.54,0.012,0.16,0.04,T
|
|
124
|
+
0.54,0.014,0.16,0.04,T
|
|
125
|
+
0.5650000000000001,0.012,0.16,0.04,T
|
|
126
|
+
0.5650000000000001,0.014,0.16,0.04,T
|
|
127
|
+
0.59,0.012,0.16,0.04,T
|
|
128
|
+
0.59,0.014,0.16,0.04,T
|
|
129
|
+
0.615,0.012,0.16,0.04,T
|
|
130
|
+
0.615,0.014,0.16,0.04,T
|
|
131
|
+
0.64,0.012,0.16,0.04,T
|
|
132
|
+
0.64,0.014,0.16,0.04,T
|
|
133
|
+
0.665,0.012,0.16,0.04,T
|
|
134
|
+
0.665,0.014,0.16,0.04,T
|
|
135
|
+
0.6900000000000001,0.012,0.16,0.04,T
|
|
136
|
+
0.6900000000000001,0.014,0.16,0.04,T
|
|
137
|
+
0.445,0.012,0.16,0.045,T
|
|
138
|
+
0.445,0.014,0.16,0.045,T
|
|
139
|
+
0.47000000000000003,0.012,0.16,0.045,T
|
|
140
|
+
0.47000000000000003,0.014,0.16,0.045,T
|
|
141
|
+
0.495,0.012,0.16,0.045,T
|
|
142
|
+
0.495,0.014,0.16,0.045,T
|
|
143
|
+
0.52,0.012,0.16,0.045,T
|
|
144
|
+
0.52,0.014,0.16,0.045,T
|
|
145
|
+
0.545,0.012,0.16,0.045,T
|
|
146
|
+
0.545,0.014,0.16,0.045,T
|
|
147
|
+
0.5700000000000001,0.012,0.16,0.045,T
|
|
148
|
+
0.5700000000000001,0.014,0.16,0.045,T
|
|
149
|
+
0.595,0.012,0.16,0.045,T
|
|
150
|
+
0.595,0.014,0.16,0.045,T
|
|
151
|
+
0.62,0.012,0.16,0.045,T
|
|
152
|
+
0.62,0.014,0.16,0.045,T
|
|
153
|
+
0.645,0.012,0.16,0.045,T
|
|
154
|
+
0.645,0.014,0.16,0.045,T
|
|
155
|
+
0.67,0.012,0.16,0.045,T
|
|
156
|
+
0.67,0.014,0.16,0.045,T
|
|
157
|
+
0.6950000000000001,0.012,0.16,0.045,T
|
|
158
|
+
0.6950000000000001,0.014,0.16,0.045,T
|
|
159
|
+
0.445,0.012,0.2,0.045,T
|
|
160
|
+
0.445,0.014,0.2,0.045,T
|
|
161
|
+
0.47000000000000003,0.012,0.2,0.045,T
|
|
162
|
+
0.47000000000000003,0.014,0.2,0.045,T
|
|
163
|
+
0.495,0.012,0.2,0.045,T
|
|
164
|
+
0.495,0.014,0.2,0.045,T
|
|
165
|
+
0.52,0.012,0.2,0.045,T
|
|
166
|
+
0.52,0.014,0.2,0.045,T
|
|
167
|
+
0.545,0.012,0.2,0.045,T
|
|
168
|
+
0.545,0.014,0.2,0.045,T
|
|
169
|
+
0.5700000000000001,0.012,0.2,0.045,T
|
|
170
|
+
0.5700000000000001,0.014,0.2,0.045,T
|
|
171
|
+
0.595,0.012,0.2,0.045,T
|
|
172
|
+
0.595,0.014,0.2,0.045,T
|
|
173
|
+
0.62,0.012,0.2,0.045,T
|
|
174
|
+
0.62,0.014,0.2,0.045,T
|
|
175
|
+
0.645,0.012,0.2,0.045,T
|
|
176
|
+
0.645,0.014,0.2,0.045,T
|
|
177
|
+
0.67,0.012,0.2,0.045,T
|
|
178
|
+
0.67,0.014,0.2,0.045,T
|
|
179
|
+
0.6950000000000001,0.012,0.2,0.045,T
|
|
180
|
+
0.6950000000000001,0.014,0.2,0.045,T
|
|
181
|
+
0.45,0.012,0.2,0.05,T
|
|
182
|
+
0.45,0.014,0.2,0.05,T
|
|
183
|
+
0.47500000000000003,0.012,0.2,0.05,T
|
|
184
|
+
0.47500000000000003,0.014,0.2,0.05,T
|
|
185
|
+
0.5,0.012,0.2,0.05,T
|
|
186
|
+
0.5,0.014,0.2,0.05,T
|
|
187
|
+
0.525,0.012,0.2,0.05,T
|
|
188
|
+
0.525,0.014,0.2,0.05,T
|
|
189
|
+
0.55,0.012,0.2,0.05,T
|
|
190
|
+
0.55,0.014,0.2,0.05,T
|
|
191
|
+
0.5750000000000001,0.012,0.2,0.05,T
|
|
192
|
+
0.5750000000000001,0.014,0.2,0.05,T
|
|
193
|
+
0.6,0.012,0.2,0.05,T
|
|
194
|
+
0.6,0.014,0.2,0.05,T
|
|
195
|
+
0.625,0.012,0.2,0.05,T
|
|
196
|
+
0.625,0.014,0.2,0.05,T
|
|
197
|
+
0.65,0.012,0.2,0.05,T
|
|
198
|
+
0.65,0.014,0.2,0.05,T
|
|
199
|
+
0.675,0.012,0.2,0.05,T
|
|
200
|
+
0.675,0.014,0.2,0.05,T
|
|
201
|
+
0.7000000000000001,0.012,0.2,0.05,T
|
|
202
|
+
0.7000000000000001,0.014,0.2,0.05,T
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'''
|
|
2
|
+
Main file for handeling interface toward DNVGL software.
|
|
3
|
+
Consist mainly of helper functions.
|
|
4
|
+
'''
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
try:
|
|
8
|
+
import anystruct.pl_stf_window as plstf
|
|
9
|
+
import anystruct.helper as hlp
|
|
10
|
+
except ModuleNotFoundError:
|
|
11
|
+
import ANYstructure.anystruct.pl_stf_window as plstf
|
|
12
|
+
import ANYstructure.anystruct.helper as hlp
|
|
13
|
+
def point_to_js_command(point_coord, point_name):
|
|
14
|
+
'''
|
|
15
|
+
Returning a js script.
|
|
16
|
+
:param point_coord:
|
|
17
|
+
:param point_name:
|
|
18
|
+
:return:
|
|
19
|
+
'''
|
|
20
|
+
return point_name + ' = Point('+str(point_coord[0])+', 0, '+str(point_coord[1]) + ');\n'
|
|
21
|
+
|
|
22
|
+
def line_to_js_command_reference(from_point, to_point, curve_name):
|
|
23
|
+
'''
|
|
24
|
+
Returning a js script based on reference modelling.
|
|
25
|
+
:param from_point:
|
|
26
|
+
:param to_point:
|
|
27
|
+
:param curve_name:
|
|
28
|
+
:return:
|
|
29
|
+
'''
|
|
30
|
+
return curve_name +' = CreateLineTwoPoints(' + 'point'+str(from_point)+','+ ' point' + \
|
|
31
|
+
str(to_point) + ');\n'
|
|
32
|
+
|
|
33
|
+
def section_property_to_js(section: plstf.Section = None):
|
|
34
|
+
'''
|
|
35
|
+
Sct3 = BarSection(0.25, 0.015);
|
|
36
|
+
Sct1 = UnsymISection(0.35, 0.02, 0, 0, 0, 0.15, 0.075, 0.02);
|
|
37
|
+
Sct2 = LSection(0.3, 0.012, 0.1, 0.02);
|
|
38
|
+
'''
|
|
39
|
+
|
|
40
|
+
if section.stf_type == 'T':
|
|
41
|
+
js_def = 'UnsymISection('+str(section.stf_web_height)+', '+str(section.stf_web_thk)+', 0, 0, 0, '+ \
|
|
42
|
+
str(section.stf_flange_width)+', '+str(section.stf_flange_width/2)+', '+\
|
|
43
|
+
str(section.stf_flange_thk)+');\n'
|
|
44
|
+
|
|
45
|
+
elif section.stf_type in ['L', 'L-bulb']:
|
|
46
|
+
js_def = 'LSection('+str(section.stf_web_height)+', '+str(section.stf_web_thk)+', '+ \
|
|
47
|
+
str(section.stf_flange_width)+', '+ str(section.stf_flange_thk)+');\n'
|
|
48
|
+
else:
|
|
49
|
+
js_def = 'BarSection('+str(section.stf_web_height)+', '+str(section.stf_web_thk)+');\n'
|
|
50
|
+
ret_str = section.__str__() + ' = ' + js_def
|
|
51
|
+
ret_str.replace('-', '_')
|
|
52
|
+
return ret_str
|
|
53
|
+
|
|
54
|
+
class JSfile:
|
|
55
|
+
'''
|
|
56
|
+
An object representation of the js file.
|
|
57
|
+
'''
|
|
58
|
+
def __init__(self, points, lines, sections: plstf.Section = None, line_to_struc = None):
|
|
59
|
+
super(JSfile, self).__init__()
|
|
60
|
+
self._output_lines = list()
|
|
61
|
+
self._points = points
|
|
62
|
+
self._lines = lines
|
|
63
|
+
self._sections = sections
|
|
64
|
+
self._line_to_struc = line_to_struc
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def output_lines(self):
|
|
68
|
+
return self._output_lines
|
|
69
|
+
|
|
70
|
+
def write_points(self):
|
|
71
|
+
''' Writing point in the point list. '''
|
|
72
|
+
for point_name, point_coord in self._points.items():
|
|
73
|
+
self._output_lines.append(point_to_js_command(point_coord, point_name))
|
|
74
|
+
|
|
75
|
+
def write_lines(self):
|
|
76
|
+
''' Writing the line list. '''
|
|
77
|
+
for line_name, point_to_point in self._lines.items():
|
|
78
|
+
self._output_lines.append(line_to_js_command_reference(point_to_point[0], point_to_point[1], line_name))
|
|
79
|
+
|
|
80
|
+
def write_sections(self):
|
|
81
|
+
''' Exporting all sections. '''
|
|
82
|
+
for section in self._sections:
|
|
83
|
+
self._output_lines.append(section_property_to_js(section))
|
|
84
|
+
|
|
85
|
+
def write_beams(self):
|
|
86
|
+
'''
|
|
87
|
+
Making beams and assining properties.
|
|
88
|
+
Bm1 = Beam(line3);
|
|
89
|
+
Bm1.section = T_400_0x12_0__250_0x14_0;
|
|
90
|
+
'''
|
|
91
|
+
for line_name, line_prop in self._line_to_struc.items():
|
|
92
|
+
if line_prop[0].Stiffener is not None:
|
|
93
|
+
beam_name = 'ANYbm'+str(hlp.get_num(line_name))
|
|
94
|
+
self.output_lines.append(beam_name+' = Beam('+line_name+');\n')
|
|
95
|
+
section = plstf.Section(line_prop[0].Stiffener.get_structure_prop())
|
|
96
|
+
self.output_lines.append(beam_name + '.section = '+section.__str__()+';\n')
|
|
97
|
+
|
|
98
|
+
if __name__ == '__main__':
|
|
99
|
+
import example_data as test
|
|
100
|
+
from tkinter import filedialog
|
|
101
|
+
|
|
102
|
+
imp_file = open('test_js.js', 'w')
|
|
103
|
+
|
|
104
|
+
JS = JSfile(test.get_point_dict(), test.get_line_dict(), test.get_section_list(),
|
|
105
|
+
line_to_struc=test.get_line_to_struc())
|
|
106
|
+
JS.write_points()
|
|
107
|
+
JS.write_lines()
|
|
108
|
+
JS.write_sections()
|
|
109
|
+
JS.write_beams()
|
|
110
|
+
|
|
111
|
+
imp_file.writelines(JS.output_lines)
|
|
112
|
+
imp_file.close()
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|