📄 复曲线.frm
字号:
VERSION 5.00
Begin VB.Form frmfuqx
BorderStyle = 3 'Fixed Dialog
Caption = "复曲线"
ClientHeight = 4140
ClientLeft = 45
ClientTop = 345
ClientWidth = 5325
Icon = "复曲线.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4140
ScaleWidth = 5325
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "关闭"
Height = 375
Left = 4440
TabIndex = 9
Top = 3720
Width = 855
End
Begin VB.CommandButton Command1
Caption = "计算"
Height = 375
Left = 3480
TabIndex = 8
Top = 3720
Width = 855
End
Begin VB.Frame Frame2
Caption = "计算结果"
Height = 1695
Left = 0
TabIndex = 14
Top = 1920
Width = 5295
Begin VB.ListBox List1
Height = 1320
Left = 120
TabIndex = 15
Top = 240
Width = 5055
End
End
Begin VB.Frame Frame1
Caption = "原始数据"
Height = 1815
Left = 0
TabIndex = 0
Top = 40
Width = 5295
Begin VB.TextBox Text6
Height = 270
Left = 3960
TabIndex = 6
Text = "Text6"
Top = 1080
Width = 1215
End
Begin VB.TextBox Text5
Height = 270
Left = 3960
TabIndex = 5
Text = "Text5"
Top = 720
Width = 1215
End
Begin VB.TextBox Text1
Height = 270
Left = 1320
TabIndex = 1
Text = "Text1"
ToolTipText = "如36°15′45″按36.1545输入"
Top = 360
Width = 1215
End
Begin VB.TextBox Text2
Height = 270
Left = 1320
TabIndex = 2
Text = "Text2"
ToolTipText = "如36°15′45″按36.1545输入"
Top = 720
Width = 1215
End
Begin VB.TextBox Text3
Height = 270
Left = 1320
TabIndex = 3
Text = "Text3"
ToolTipText = "单位:m"
Top = 1080
Width = 1215
End
Begin VB.CheckBox Check1
Caption = "前圆曲线半径可否调整吗?"
Height = 255
Left = 2640
TabIndex = 7
Top = 1440
Width = 2535
End
Begin VB.TextBox Text4
Height = 270
Left = 3960
TabIndex = 4
Text = "Text4"
ToolTipText = "单位:m"
Top = 360
Width = 1215
End
Begin VB.Label Label7
Caption = "后缓和曲线LS2="
Height = 255
Left = 2640
TabIndex = 17
Top = 720
Width = 1455
End
Begin VB.Label Label6
Caption = "前缓和曲线LS1="
Height = 255
Left = 2640
TabIndex = 16
Top = 360
Width = 1455
End
Begin VB.Label Label1
Caption = "偏角PJa ="
Height = 255
Left = 120
TabIndex = 13
Top = 360
Width = 1095
End
Begin VB.Label Label2
Caption = "偏角PJb ="
Height = 255
Left = 120
TabIndex = 12
Top = 720
Width = 1335
End
Begin VB.Label Label3
Caption = "前曲线半径RA ="
Height = 255
Left = 2640
TabIndex = 11
Top = 1080
Width = 1455
End
Begin VB.Label Label5
Caption = "基线长度AB="
Height = 255
Left = 120
TabIndex = 10
Top = 1080
Width = 1095
End
End
End
Attribute VB_Name = "frmfuqx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
'计算
On Error GoTo handlerror
List1.Clear
ja = Val(Text1.Text)
sjwjs = ja
Call dfmhhd
pja = hudu
jb = Val(Text2.Text)
sjwjs = jb
Call dfmhhd
pjb = hudu
ab = Val(Text3.Text)
ls1 = Val(Text4.Text)
ls2 = Val(Text5.Text)
RA = Val(Text6.Text)
m2:
t1 = (RA + ls1 * ls1 / 24 / RA - RA * Cos(pja)) / Sin(pja)
A1 = (1 - Cos(pjb)) / Sin(pjb)
b1 = t1 - ab
c1 = ls2 * ls2 / 24 / Sin(pjb)
Call yuecfc
RB = x1
If RB = 0 Then
xianshi = MsgBox("缓和曲线过长,请重新拟定其值", vbInformation, "问题提示")
Exit Sub
End If
If Check1.Value = 1 Then
If RA / RB > 1.5 Then RA = 1.5 * RB: GoTo m2
If RB / RA > 1.5 Then RA = RB / 1.5: GoTo m2
End If
lya = (pja - ls1 / 2 / RA) * RA
lyb = (pjb - ls2 / 2 / RB) * RB
lh = lya + lyb + ls1 + ls2
ta = ls1 / 2 + (RA - (RA + ls1 * ls1 / 24 / RA) * Cos(pja)) / Sin(pja)
tb = ls2 / 2 + (RB - (RB + ls2 * ls2 / 24 / RB) * Cos(pjb)) / Sin(pjb)
List1.AddItem ""
List1.AddItem " 偏角 (°′″)PJa= " + Str(ja)
List1.AddItem " 偏角 (°′″)PJb= " + Str(jb)
List1.AddItem " 基线长度 (m)AB= " + Str(ab)
List1.AddItem " 前圆曲线半径 (m)RA= " + Str(Int(RA * 1000 + 0.5) / 1000)
List1.AddItem " 后圆曲线半径 (m)RB= " + Str(Int(RB * 1000 + 0.5) / 1000)
List1.AddItem " 前缓和曲线长(m)Ls1= " + Str(Int(ls1 * 1000 + 0.5) / 1000)
List1.AddItem " 后缓和曲线长(m)Ls2= " + Str(Int(ls2 * 1000 + 0.5) / 1000)
List1.AddItem " 前切线长度 (m)TA= " + Str(Int(ta * 1000 + 0.5) / 1000)
List1.AddItem " 后切线长度 (m)TB= " + Str(Int(tb * 1000 + 0.5) / 1000)
List1.AddItem " 前圆曲线长 (m)Lya= " + Str(Int(lya * 1000 + 0.5) / 1000)
List1.AddItem " 后圆曲线长 (m)Lyb= " + Str(Int(lyb * 1000 + 0.5) / 1000)
List1.AddItem " 平曲线全长 (m)Lh= " + Str(Int(lh * 1000 + 0.5) / 1000)
Exit Sub
handlerror:
xianshi = MsgBox("请检查输入的数据后再计算。", vbInformation, "问题提示")
End Sub
Private Sub Command2_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 Form_KeyPress(KeyAscii As Integer)
'Esc键退出,VbEscape可以用27代替
On Error GoTo handlerror
If KeyAscii = 27 Then
Unload Me
End If
Exit Sub
handlerror:
End Sub
Private Sub Form_Load()
'启动窗体
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
List1.Clear
List1.AddItem "长度:米,角度:如36°15′45″按36.1545输入"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -