-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStrFrameForce.cls
261 lines (212 loc) · 6.3 KB
/
StrFrameForce.cls
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "StrFrameForce"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'@Folder "Structural Model"
'********************************************************
'This module represent the Structural Joint/Node Object
'Arthor: Lucas LEUNG
'Update Log
'09 Jun 2023 - Initial
'*******************************************************
Option Explicit
'this is the variable for the sub frame
Private pFrm As StrFrame, mSubFrameName As String
Private pStation As Double
Private pLoadComb As String
Private pStepType As String
Private pForces(5) As Double
Private pDesc_ExtremeCaseType As String
Private pDesc_MaxMinEnvPerm As String
Public Sub Init(frm As StrFrame, station As Double, loadComb As String, _
stepType As String, forces() As Double, Optional isSaveToFrmColl As Boolean = True, _
Optional subFrameName As String)
Set pFrm = frm
pStation = station
pLoadComb = loadComb
pStepType = stepType
Dim i As Integer
For i = 0 To 5
pForces(i) = forces(i)
Next i
If subFrameName = vbNullString Then
mSubFrameName = frm.Name
Else
mSubFrameName = subFrameName
End If
End Sub
Public Sub Init2(frm As StrFrame, station As Double, loadComb As String, _
stepType As String, p As Double, V2 As Double, V3 As Double, _
t As Double, M2 As Double, M3 As Double, Optional subFrameName As String)
Set pFrm = frm
pStation = station
pLoadComb = loadComb
pStepType = stepType
pForces(0) = p
pForces(1) = V2
pForces(2) = V3
pForces(3) = t
pForces(4) = M2
pForces(5) = M3
If subFrameName = vbNullString Then
mSubFrameName = frm.Name
Else
mSubFrameName = subFrameName
End If
End Sub
Public Property Get frame() As StrFrame
Set frame = pFrm
End Property
Public Property Get frameName() As String
frameName = pFrm.Name
End Property
Public Property Get subFrameName() As String
subFrameName = mSubFrameName
End Property
Public Property Get frameSection() As String
frameSection = pFrm.section
End Property
Public Property Get frameLength() As Double
frameLength = pFrm.Length
End Property
Public Property Get frameJtIName() As String
frameJtIName = pFrm.jtI.Name
End Property
Public Property Get frameJtJName() As String
frameJtJName = pFrm.jtJ.Name
End Property
Public Property Get memberName() As String
memberName = pFrm.member.Name
End Property
Public Property Get memberIFrameName() As String
memberIFrameName = pFrm.member.iFrameName
End Property
Public Property Get memberJFrameName() As String
memberJFrameName = pFrm.member.jFrameName
End Property
Public Property Get sectionName() As String
sectionName = pFrm.section
End Property
Public Property Get preFrameName() As String
Dim frm As StrFrame
Set frm = pFrm.member.preFrame(pFrm.Name)
If frm Is Nothing Then
preFrameName = "N/A"
Else
preFrameName = frm.Name
End If
End Property
Public Property Get nextFrameName() As String
Dim frm As StrFrame
Set frm = pFrm.member.nextFrame(pFrm.Name)
If frm Is Nothing Then
nextFrameName = "N/A"
Else
nextFrameName = frm.Name
End If
End Property
Public Property Get memberTotalLength() As Double
memberTotalLength = pFrm.member.TotalLength
End Property
Public Property Get pos_fromMemJtI_percent() As Double
pos_fromMemJtI_percent = (pFrm.member.RelativeLength(pFrm.Name, True) + pStation) / memberTotalLength
End Property
Public Property Get pos_fromMemJtJ_percent() As Double
pos_fromMemJtJ_percent = 1 - Me.pos_fromMemJtI_percent
End Property
Public Property Get pos_fromMemJtI() As Double
pos_fromMemJtI = pFrm.member.RelativeLength(pFrm.Name, True) + pStation
End Property
Public Property Get pos_fromMemJtJ() As Double
pos_fromMemJtJ = Me.memberTotalLength - Me.pos_fromMemJtI
End Property
Public Property Get pos_fromEleJtI() As Double
pos_fromEleJtI = pStation
End Property
Public Property Get pos_fromEleJtJ() As Double
pos_fromEleJtJ = pFrm.Length - pStation
End Property
Public Property Get pos_fromEleJtI_percent() As Double
pos_fromEleJtI_percent = (Me.pos_fromEleJtI / pFrm.Length)
End Property
Public Property Get pos_fromEleJtJ_percent() As Double
pos_fromEleJtJ_percent = (Me.pos_fromEleJtJ / pFrm.Length)
End Property
Public Property Get station() As Double
station = pStation
End Property
Public Property Get loadComb() As String
loadComb = pLoadComb
End Property
Public Property Get stepType() As String
stepType = pStepType
End Property
Public Property Get forces() As Double()
forces = pForces
End Property
Public Property Get force(index As Integer) As Double
force = pForces(index)
End Property
Public Property Get p() As Double
p = pForces(0)
End Property
Public Property Get V2() As Double
V2 = pForces(1)
End Property
Public Property Get V3() As Double
V3 = pForces(2)
End Property
Public Property Get t() As Double
t = pForces(3)
End Property
Public Property Get M2() As Double
M2 = pForces(4)
End Property
Public Property Get M3() As Double
M3 = pForces(5)
End Property
'Public Property Get description() As String
' description = pDesc
'End Property
'
'Public Property Let description(text As String)
' pDesc = text
'End Property
Public Property Get extremeCaseType() As String
extremeCaseType = pDesc_ExtremeCaseType
End Property
Public Property Let extremeCaseType(Text As String)
pDesc_ExtremeCaseType = Text
End Property
Public Property Get maxMinEnvPerm() As String
maxMinEnvPerm = pDesc_MaxMinEnvPerm
End Property
Public Property Let maxMinEnvPerm(Text As String)
pDesc_MaxMinEnvPerm = Text
End Property
Public Property Get isMemberEndI() As Boolean
If Me.pos_fromMemJtI_percent = 0 Then
isMemberEndI = True
Else
isMemberEndI = False
End If
End Property
Public Property Get isMemberEndJ() As Boolean
If Me.pos_fromMemJtI_percent = 1 Then
isMemberEndJ = True
Else
isMemberEndJ = False
End If
End Property
Public Property Get isMemberEnd() As Boolean
If isMemberEndI Or isMemberEndJ Then
isMemberEnd = True
Else
isMemberEnd = False
End If
End Property