?? 曲線反算.frm
字號:
VERSION 5.00
Begin VB.Form frmqxfsu
BorderStyle = 3 'Fixed Dialog
Caption = "緩和曲線反算"
ClientHeight = 5145
ClientLeft = 45
ClientTop = 345
ClientWidth = 6540
Icon = "曲線反算.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5145
ScaleWidth = 6540
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame4
Caption = "加樁間距"
Height = 615
Left = 2640
TabIndex = 28
Top = 4480
Width = 1935
Begin VB.TextBox Text9
Height = 270
Left = 840
TabIndex = 13
Text = "Text9"
Top = 240
Width = 975
End
Begin VB.Label Label9
Caption = "間距Lj="
Height = 255
Left = 120
TabIndex = 29
Top = 280
Width = 855
End
End
Begin VB.Frame Frame2
Caption = "計算結果"
Height = 4400
Left = 2640
TabIndex = 25
Top = 40
Width = 3855
Begin VB.ListBox List1
Height = 4020
Left = 120
TabIndex = 26
Top = 240
Width = 3615
End
End
Begin VB.Frame Frame1
Caption = "基礎資料"
Height = 5055
Left = 0
TabIndex = 16
Top = 40
Width = 2535
Begin VB.Frame Frame3
Caption = "選擇"
Height = 1695
Left = 120
TabIndex = 27
Top = 1000
Width = 2295
Begin VB.OptionButton Option5
Caption = "Ls、Eh控制求R"
Height = 255
Left = 240
TabIndex = 6
Top = 1400
Width = 1575
End
Begin VB.OptionButton Option4
Caption = "Ls、Th控制求R"
Height = 255
Left = 240
TabIndex = 5
Top = 1089
Width = 1575
End
Begin VB.OptionButton Option3
Caption = "R、Th控制求Ls"
Height = 255
Left = 240
TabIndex = 4
Top = 781
Width = 1575
End
Begin VB.OptionButton Option2
Caption = "凸型非對稱緩和曲線"
Height = 180
Left = 240
TabIndex = 3
Top = 548
Width = 1935
End
Begin VB.OptionButton Option1
Caption = "凸型對稱緩和曲線"
Height = 255
Left = 240
TabIndex = 2
Top = 240
Width = 1815
End
End
Begin VB.TextBox Text8
Height = 270
Left = 1440
TabIndex = 12
Text = "Text8"
Top = 4680
Width = 975
End
Begin VB.TextBox Text7
Height = 270
Left = 1440
TabIndex = 11
Text = "Text7"
Top = 4320
Width = 975
End
Begin VB.TextBox Text6
Height = 270
Left = 1440
TabIndex = 10
Text = "Text6"
Top = 3960
Width = 975
End
Begin VB.TextBox Text5
Height = 270
Left = 1440
TabIndex = 9
Text = "Text5"
Top = 3600
Width = 975
End
Begin VB.TextBox Text4
Height = 270
Left = 1440
TabIndex = 8
Text = "Text4"
Top = 3240
Width = 975
End
Begin VB.TextBox Text3
Height = 270
Left = 1440
TabIndex = 7
Text = "Text3"
Top = 2880
Width = 975
End
Begin VB.TextBox Text2
Height = 270
Left = 1440
TabIndex = 1
Text = "Text2"
Top = 720
Width = 975
End
Begin VB.TextBox Text1
Height = 270
Left = 1440
TabIndex = 0
Text = "Text1"
Top = 360
Width = 975
End
Begin VB.Label Label8
Caption = "外距長度 Eh="
Height = 255
Left = 120
TabIndex = 24
Top = 4680
Width = 1455
End
Begin VB.Label Label3
Caption = "曲線半徑 R="
Height = 255
Left = 120
TabIndex = 23
Top = 2880
Width = 1455
End
Begin VB.Label Label7
Caption = "切線長度 Th2="
Height = 255
Left = 120
TabIndex = 22
Top = 4320
Width = 1335
End
Begin VB.Label Label6
Caption = "切線長度 Th1= "
Height = 255
Left = 120
TabIndex = 21
Top = 3960
Width = 1335
End
Begin VB.Label Label5
Caption = "緩和曲線 Ls2="
Height = 255
Left = 120
TabIndex = 20
Top = 3600
Width = 1455
End
Begin VB.Label Label4
Caption = "緩和曲線 Ls1="
Height = 255
Left = 120
TabIndex = 19
Top = 3240
Width = 1335
End
Begin VB.Label Label2
Caption = "路線偏角 PJ="
Height = 255
Left = 120
TabIndex = 18
Top = 720
Width = 1335
End
Begin VB.Label Label1
Caption = "交點樁號 JD="
Height = 255
Left = 120
TabIndex = 17
Top = 360
Width = 1335
End
End
Begin VB.CommandButton Command2
Caption = "計算"
Height = 375
Left = 4680
TabIndex = 14
Top = 4720
Width = 855
End
Begin VB.CommandButton Command1
Caption = "關閉"
Height = 375
Left = 5640
TabIndex = 15
Top = 4720
Width = 855
End
End
Attribute VB_Name = "frmqxfsu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim zh, hy, qz, yh, hz, jz As Double
Dim r, ls, p, q, bt As Double
Dim x, y As Double
Dim p1, p2, q1, q2, ls1, ls2, bt1, bt2 As Double
Const pi = 3.1415926536
Private Sub Command1_Click()
'關閉
On Error GoTo handlerror
If List1.ListCount > 1 And rjsfzc = 88 Then
frmMain.Text1 = frmMain.Text1 & vbCrLf & ""
frmMain.Text1 = frmMain.Text1 & vbCrLf & " 《曲線反算計算結果》:"
For i = 0 To List1.ListCount - 1
frmMain.Text1 = frmMain.Text1 & vbCrLf & List1.List(i)
Next i
frmMain.Text1 = frmMain.Text1 & vbCrLf & " --------------------------------------"
End If
Unload Me
Exit Sub
handlerror:
End Sub
Private Sub Command2_Click()
'計算
On Error GoTo handlerror
jd = Val(Text1.Text)
alp = Val(Text2.Text)
LJ = Val(Text9.Text)
du = Int(alp)
fen = Int((alp - du) * 100)
miao = alp * 10000 - du * 10000 - fen * 100
hud = (du + fen / 60 + miao / 3600) * pi / 180
If Option1.Value = True Then '凸型對稱
r = Val(Text3.Text)
ls = Val(Text4.Text)
bt = hud / 2
ls = hud * r
p = ls * ls / 24 / r - ls * ls * ls * ls / 2688 / r / r / r
q = ls / 2 - ls * ls * ls / 240 / r / r
th = (r + p) * Tan(hud / 2) + q
eh = (r + p) / Cos(hud / 2) - r
lh = 2 * ls
zh = jd - th
hy = zh + ls
qz = zh + lh / 2
yh = qz
hz = zh + lh
List1.Clear
List1.AddItem " 交點樁號JD=" + Str(jd)
List1.AddItem " 曲線偏角PJ=" + Str(alp)
List1.AddItem " 曲線半徑 R=" + Str(r)
List1.AddItem " 緩和曲線Ls=" + Str(Int(ls * 1000 + 0.5) / 1000)
List1.AddItem " 切線長度Th=" + Str(Int(th * 1000 + 0.5) / 1000)
List1.AddItem " 外距長度Eh=" + Str(Int(eh * 1000 + 0.5) / 1000)
List1.AddItem " 曲線長度Lh=" + Str(Int(lh * 1000 + 0.5) / 1000)
List1.AddItem " ZH=" + Str(Int(zh * 1000 + 0.5) / 1000)
List1.AddItem " HY=" + Str(Int(hy * 1000 + 0.5) / 1000)
List1.AddItem " QZ=" + Str(Int(qz * 1000 + 0.5) / 1000)
List1.AddItem " YH=" + Str(Int(yh * 1000 + 0.5) / 1000)
List1.AddItem " HZ=" + Str(Int(hz * 1000 + 0.5) / 1000)
End If
If Option2.Value = True Then '凸型非對稱
r = Val(Text3.Text)
ls1 = Val(Text4.Text)
bt1 = ls1 / 2 / r
ls2 = (hud - bt1) * 2 * r
bt2 = ls2 / 2 / r
p1 = ls1 * ls1 / 24 / r - ls1 * ls1 * ls1 * ls1 / 2688 / r / r / r
p2 = ls2 * ls2 / 24 / r - ls2 * ls2 * ls2 * ls2 / 2688 / r / r / r
q1 = ls1 / 2 - ls1 * ls1 * ls1 / 240 / r / r
q2 = ls2 / 2 - ls2 * ls2 * ls2 / 240 / r / r
th1 = (r + p2) * Tan(hud / 2) + q1 + (p2 - p1) / Tan(hud)
th2 = (r + p1) * Tan(hud / 2) + q2 + (p1 - p2) / Tan(hud)
' eh = (r + p) / Cos(hud / 2) - r
lh = ls1 + ls2
zh = jd - th1
hy = zh + ls1
qz = hy
yh = qz
hz = zh + lh
List1.Clear
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -