Friend Shared Function Create_AngularPointArray(ByRef aKnownStructureErrorString As String, ByRef aSortByStationErrorString As String) As Boolean
Dim alEntity As AeccAlignmentEntity, aArc As AeccAlignmentArc, aEntities As AeccAlignmentEntities
Dim aKnownStructureFlag As Boolean, resultSortByStation_AngularPointArray As Boolean
Dim aSCSGroup As AeccAlignmentSCSGroup
Dim aCSGroup As AeccAlignmentCSGroup, aSCGroup As AeccAlignmentSCGroup, aSCSCSGroup As AeccAlignmentSCSCSGroup
Dim aSCSSCSGroup As AeccAlignmentSCSSCSGroup, aSSCGroup As AeccAlignmentSSCGroup, aCSSGroup As AeccAlignmentCSSGroup
Dim aTangent As AeccAlignmentTangent, aTSGroup As AeccAlignmentTSGroup
Dim aSpiral As AeccAlignmentSpiral, aSSGroup As AeccAlignmentSSGroup, aSTGroup As AeccAlignmentSTGroup, aSTSGroup As AeccAlignmentSTSGroup
Try
ReDim AngularPointArray(0) : AngularPointArray(0) = Nothing
aKnownStructureFlag = True
Create_AngularPointArray = True
Dim index As Int32 = 0
aEntities = curAlignment.Entities
dlgMain.pb1.Value = 0 : dlgMain.pb1.Refresh()
For index = 0 To aEntities.Count - 1
alEntity = aEntities.Item(index)
Select Case alEntity.Type
Case AeccAlignmentEntityType.aeccArc
aArc = alEntity
Call AddAngularPointToAngularPointArray(AngularPointArray, aArc, GetEntityAtIdFrom(aArc.EntityBefore), GetEntityAtIdFrom(aArc.EntityAfter), -1, aArc.StartingStation, aArc.Id)
Case AeccAlignmentEntityType.aeccSpiral
aSpiral = alEntity
If (GetEntityTypeAtIdFrom(aSpiral.EntityAfter) = AeccAlignmentEntityType.aeccArc) Or _
(GetEntityTypeAtIdFrom(aSpiral.EntityBefore) = AeccAlignmentEntityType.aeccArc) Then
'Nothing
Else
aKnownStructureFlag = False
aKnownStructureErrorString = aKnownStructureErrorString + "free Spiral" + vbCrLf
End If
Case AeccAlignmentEntityType.aeccSpiralSpiralGroup
aSSGroup = alEntity
aKnownStructureFlag = False
aKnownStructureErrorString = aKnownStructureErrorString + "SpiralSpiralGroup" + vbCrLf
Case AeccAlignmentEntityType.aeccSpiralTangentGroup
aSTGroup = alEntity
If GetEntityTypeAtIdFrom(aSTGroup.EntityBefore) = AeccAlignmentEntityType.aeccArc Then
'Nothing
Else
aKnownStructureFlag = False
aKnownStructureErrorString = aKnownStructureErrorString + "free SpiralTangentGroup" + vbCrLf
End If
Case AeccAlignmentEntityType.aeccSpiralTangentSpiralGroup
aSTSGroup = alEntity
If (GetEntityTypeAtIdFrom(aSTSGroup.EntityAfter) = AeccAlignmentEntityType.aeccArc) Or _
(GetEntityTypeAtIdFrom(aSTSGroup.EntityBefore) = AeccAlignmentEntityType.aeccArc) Then
'Nothing
Else
aKnownStructureFlag = False
aKnownStructureErrorString = aKnownStructureErrorString + "free SpiralTangentSpiralGroup" + vbCrLf
End If
Case AeccAlignmentEntityType.aeccSpiralSpiralCurveGroup
aSSCGroup = alEntity
Call AddAngularPointToAngularPointArray(AngularPointArray, aSSCGroup.Arc, aSSCGroup.Spiral2, Nothing, AeccAlignmentEntityType.aeccSpiralSpiralCurveGroup, aSSCGroup.Arc.StartingStation, aSSCGroup.Arc.Id)
aKnownStructureFlag = False
aKnownStructureErrorString = aKnownStructureErrorString + "SpiralSpiralCurveGroup" + vbCrLf
Case AeccAlignmentEntityType.aeccTangent
aTangent = alEntity
If curAlignment.StartingStation = aTangent.StartingStation Then
If GetEntityTypeAtIdFrom(aTangent.EntityAfter) = AeccAlignmentEntityType.aeccTangent Then
Call AddAngularPointToAngularPointArray(AngularPointArray, Nothing, aTangent, GetEntityAtIdFrom(aTangent.EntityAfter), -1, aTangent.StartingStation, aTangent.Id)
ElseIf GetEntityAtIdFrom(aTangent.EntityAfter) IsNot Nothing AndAlso _
((GetEntityTypeAtIdFrom(GetEntityAtIdFrom(aTangent.EntityAfter).EntityAfter) = AeccAlignmentEntityType.aeccArc) Or _
(GetEntityAtIdFrom(aTangent.EntityAfter).Type = AeccAlignmentEntityType.aeccSpiralCurveSpiralGroup Or _
GetEntityAtIdFrom(aTangent.EntityAfter).Type = AeccAlignmentEntityType.aeccSpiralCurveGroup Or _
GetEntityAtIdFrom(aTangent.EntityAfter).Type = AeccAlignmentEntityType.aeccArc)) Then
'Nothing
Else
aKnownStructureFlag = False
aKnownStructureErrorString = aKnownStructureErrorString + "free Tangent" + vbCrLf
End If
ElseIf curAlignment.EndingStation = aTangent.EndingStation Then
If GetEntityAtIdFrom(aTangent.EntityBefore) IsNot Nothing AndAlso _
((GetEntityTypeAtIdFrom(GetEntityAtIdFrom(aTangent.EntityBefore).EntityBefore) = AeccAlignmentEntityType.aeccArc) Or _
(GetEntityAtIdFrom(aTangent.EntityBefore).Type = AeccAlignmentEntityType.aeccSpiralCurveSpiralGroup Or _
GetEntityAtIdFrom(aTangent.EntityBefore).Type = AeccAlignmentEntityType.aeccCurveSpiralGroup Or _
GetEntityAtIdFrom(aTangent.EntityBefore).Type = AeccAlignmentEntityType.aeccTangent Or _
GetEntityAtIdFrom(aTangent.EntityBefore).Type = AeccAlignmentEntityType.aeccArc)) Then
'Nothing
Else
aKnownStructureFlag = False
aKnownStructureErrorString = aKnownStructureErrorString + "free Tangent" + vbCrLf
End If
Else
If GetEntityAtIdFrom(aTangent.EntityAfter).Type = AeccAlignmentEntityType.aeccTangent Then
Call AddAngularPointToAngularPointArray(AngularPointArray, Nothing, aTangent, GetEntityAtIdFrom(aTangent.EntityAfter), -1, aTangent.StartingStation, aTangent.Id)
ElseIf (GetEntityAtIdFrom(aTangent.EntityAfter) IsNot Nothing AndAlso _
((GetEntityTypeAtIdFrom(GetEntityAtIdFrom(aTangent.EntityAfter).EntityAfter) = AeccAlignmentEntityType.aeccArc) Or _
GetEntityAtIdFrom(aTangent.EntityAfter).Type = AeccAlignmentEntityType.aeccSpiralCurveSpiralGroup Or _
GetEntityAtIdFrom(aTangent.EntityAfter).Type = AeccAlignmentEntityType.aeccSpiralCurveGroup Or _
GetEntityAtIdFrom(aTangent.EntityAfter).Type = AeccAlignmentEntityType.aeccArc)) Or _
(GetEntityAtIdFrom(aTangent.EntityBefore) IsNot Nothing AndAlso _
((GetEntityTypeAtIdFrom(GetEntityAtIdFrom(aTangent.EntityBefore).EntityBefore) = AeccAlignmentEntityType.aeccArc) Or _
GetEntityAtIdFrom(aTangent.EntityBefore).Type = AeccAlignmentEntityType.aeccSpiralCurveSpiralGroup Or _
GetEntityAtIdFrom(aTangent.EntityBefore).Type = AeccAlignmentEntityType.aeccCurveSpiralGroup Or _
GetEntityAtIdFrom(aTangent.EntityBefore).Type = AeccAlignmentEntityType.aeccArc Or _
GetEntityAtIdFrom(aTangent.EntityBefore).Type = AeccAlignmentEntityType.aeccTangent)) Then
'Nothing
Else
aKnownStructureFlag = False
aKnownStructureErrorString = aKnownStructureErrorString + "free Tangent" + vbCrLf
End If
End If
Case AeccAlignmentEntityType.aeccTangentSpiralGroup
aTSGroup = alEntity
If GetEntityTypeAtIdFrom(aTSGroup.EntityAfter) = AeccAlignmentEntityType.aeccArc Then
'Nothing
Else
aKnownStructureFlag = False
aKnownStructureErrorString = aKnownStructureErrorString + "free TangentSpiralGroup" + vbCrLf
End If
Case AeccAlignmentEntityType.aeccSpiralCurveSpiralGroup
aSCSGroup = alEntity
Call AddAngularPointToAngularPointArray(AngularPointArray, aSCSGroup.Arc, aSCSGroup.SpiralIn, aSCSGroup.SpiralOut, AeccAlignmentEntityType.aeccSpiralCurveSpiralGroup, aSCSGroup.Arc.StartingStation, _
aSCSGroup.Arc.Id)
Case AeccAlignmentEntityType.aeccCurveSpiralGroup
aCSGroup = alEntity
Call AddAngularPointToAngularPointArray(AngularPointArray, aCSGroup.ArcIn, Nothing, aCSGroup.SpiralOut, AeccAlignmentEntityType.aeccCurveSpiralGroup, aCSGroup.ArcIn.StartingStation, aCSGroup.ArcIn.Id)
Case AeccAlignmentEntityType.aeccCurveSpiralSpiralGroup
aCSSGroup = alEntity
Call AddAngularPointToAngularPointArray(AngularPointArray, aCSSGroup.Arc, Nothing, aCSSGroup.Spiral1, AeccAlignmentEntityType.aeccCurveSpiralSpiralGroup, aCSSGroup.Arc.StartingStation, aCSSGroup.Arc.Id)
aKnownStructureFlag = False
aKnownStructureErrorString = aKnownStructureErrorString + "CurveSpiralSpiralGroup" + vbCrLf
Case AeccAlignmentEntityType.aeccSpiralCurveGroup
aSCGroup = alEntity
Call AddAngularPointToAngularPointArray(AngularPointArray, aSCGroup.ArcOut, aSCGroup.SpiralIn, Nothing, AeccAlignmentEntityType.aeccSpiralCurveGroup, aSCGroup.ArcOut.StartingStation, aSCGroup.ArcOut.Id)
Case AeccAlignmentEntityType.aeccSpiralCurveSpiralCurveSpiralGroup
aSCSCSGroup = alEntity
Call AddAngularPointToAngularPointArray(AngularPointArray, aSCSCSGroup.Arc1, aSCSCSGroup.Spiral1, aSCSCSGroup.Spiral2, AeccAlignmentEntityType.aeccSpiralCurveSpiralCurveSpiralGroup, _
aSCSCSGroup.Arc1.StartingStation, aSCSCSGroup.Arc1.Id)
Call AddAngularPointToAngularPointArray(AngularPointArray, aSCSCSGroup.Arc2, Nothing, aSCSCSGroup.Spiral3, AeccAlignmentEntityType.aeccSpiralCurveSpiralCurveSpiralGroup, _
aSCSCSGroup.Arc2.StartingStation, aSCSCSGroup.Arc2.Id)
aKnownStructureFlag = False
aKnownStructureErrorString = aKnownStructureErrorString + "SpiralCurveSpiralCurveSpiralGroup" + vbCrLf
Case AeccAlignmentEntityType.aeccSpiralCurveSpiralSpiralCurveSpiralGroup
aSCSSCSGroup = alEntity
Call AddAngularPointToAngularPointArray(AngularPointArray, aSCSSCSGroup.Arc1, aSCSSCSGroup.Spiral1, aSCSSCSGroup.Spiral2, AeccAlignmentEntityType.aeccSpiralCurveSpiralSpiralCurveSpiralGroup, _
aSCSSCSGroup.Arc1.StartingStation, aSCSSCSGroup.Arc1.Id)
Call AddAngularPointToAngularPointArray(AngularPointArray, aSCSSCSGroup.Arc2, aSCSSCSGroup.Spiral3, aSCSSCSGroup.Spiral4, AeccAlignmentEntityType.aeccSpiralCurveSpiralSpiralCurveSpiralGroup, _
aSCSSCSGroup.Arc2.StartingStation, aSCSSCSGroup.Arc2.Id)
aKnownStructureFlag = False
aKnownStructureErrorString = aKnownStructureErrorString + "SpiralCurveSpiralSpiralCurveSpiralGroup" + vbCrLf
End Select
dlgMain.pb1.Value = CInt(((index + 1) / (aEntities.Count)) * 100) : dlgMain.pb1.Refresh()
Next index
If aKnownStructureFlag = False Then '"Трасса содержит неподдерживаемые элементы:"
aKnownStructureErrorString = ResourceManagerMainShadow.GetString("Alignment contains unsupported elements:", curUICulture) & vbCrLf & vbCrLf & aKnownStructureErrorString '
End If
resultSortByStation_AngularPointArray = SortByStation_AngularPointArray(aSortByStationErrorString)
If aKnownStructureFlag = False Or resultSortByStation_AngularPointArray = False Then
Create_AngularPointArray = False
End If
Catch ex As System.Exception
BuildErrorMessage(ex, False)
Create_AngularPointArray = False
End Try
End Function
Friend Shared Function AddAngularPointToAngularPointArray(ByRef aAngularPointArray() As ssAlignmentAngularPoint, ByVal aArc As AeccAlignmentArc, ByVal aBeforeEntity As AeccAlignmentEntity, ByVal aAfterEntity As AeccAlignmentEntity, _
ByVal aAlignmentAngularPointType As AeccAlignmentEntityType, ByVal aStartingStation As Double, ByVal aId As Long) As Boolean
Dim arraySize As Long
Try
If aAngularPointArray Is Nothing OrElse (aAngularPointArray.Length = 1 And aAngularPointArray(0) Is Nothing) Then
arraySize = 0
Else
arraySize = aAngularPointArray.Length ' + 1
End If
ReDim Preserve aAngularPointArray(arraySize)
aAngularPointArray(arraySize) = New ssAlignmentAngularPoint(aArc, aBeforeEntity, aAfterEntity, aAlignmentAngularPointType, aStartingStation, aId)
AddAngularPointToAngularPointArray = True
Catch
AddAngularPointToAngularPointArray = False
End Try
End Function
Friend Shared Function SortByStation_AngularPointArray(ByRef aSortByStationErrorString As String) As Boolean
Dim localSortByStationAngularPointArray() As ssAlignmentAngularPoint = Nothing
Dim currentMinStation As Double, currentMinStationAngularPointIndex As Long, lastCurrentMinStationAngularPointIndex As Long
Dim workMinStation As Double, lastCurrentMinStation As Double
Dim angularPointArrayCount1 As Long, indexIn As Long, indexOut As Long
SortByStation_AngularPointArray = False
Try
lastCurrentMinStation = -1
lastCurrentMinStationAngularPointIndex = -1
If AngularPointArray IsNot Nothing Then
angularPointArrayCount1 = AngularPointArray.Length
End If
If angularPointArrayCount1 <= 1 Then
SortByStation_AngularPointArray = True
Exit Function
End If
dlgMain.pb1.Value = 0 : dlgMain.pb1.Refresh()
For index As Int32 = 0 To angularPointArrayCount1 - 1
For indexOut = 0 To angularPointArrayCount1 - 1
If AngularPointArray(indexOut) IsNot Nothing Then
currentMinStation = AngularPointArray(indexOut).StartingStation
currentMinStationAngularPointIndex = indexOut
If lastCurrentMinStationAngularPointIndex = -1 Then
If currentMinStation >= lastCurrentMinStation Then
Exit For
End If
Else
If currentMinStation >= lastCurrentMinStation And _
AngularPointArray(indexOut).SortedByStation = False Then
Exit For
End If
End If
End If
Next indexOut
For indexIn = 0 To angularPointArrayCount1 - 1
If AngularPointArray(indexIn) IsNot Nothing Then
workMinStation = AngularPointArray(indexIn).StartingStation
If workMinStation < currentMinStation And workMinStation > lastCurrentMinStation And _
AngularPointArray(indexIn).SortedByStation = False Then
currentMinStation = workMinStation
currentMinStationAngularPointIndex = indexIn
End If
End If
Next indexIn
lastCurrentMinStation = currentMinStation
lastCurrentMinStationAngularPointIndex = currentMinStationAngularPointIndex
Call AddAngularPointToAngularPointArray(localSortByStationAngularPointArray, AngularPointArray(currentMinStationAngularPointIndex).Arc, _
AngularPointArray(currentMinStationAngularPointIndex).BeforeEntity, _
AngularPointArray(currentMinStationAngularPointIndex).AfterEntity, _
AngularPointArray(currentMinStationAngularPointIndex).AlignmentAngularPointType, _
AngularPointArray(currentMinStationAngularPointIndex).StartingStation, _
AngularPointArray(currentMinStationAngularPointIndex).Id)
AngularPointArray(currentMinStationAngularPointIndex).SortedByStation = True
dlgMain.pb1.Value = CInt((index / (angularPointArrayCount1 - 1)) * 100) : dlgMain.pb1.Refresh()
Next index
ReDim AngularPointArray(0) : AngularPointArray(0) = Nothing
For index As Int32 = 0 To localSortByStationAngularPointArray.Length - 1
ReDim Preserve AngularPointArray(index)
AngularPointArray(index) = localSortByStationAngularPointArray(index)
AngularPointArray(index).SortedByStation = False
Next index
ReDim localSortByStationAngularPointArray(0) : localSortByStationAngularPointArray(0) = Nothing
dlgMain.pb1.Value = 0 : dlgMain.pb1.Refresh()
SortByStation_AngularPointArray = True
Catch ex As System.Exception
aSortByStationErrorString = ResourceManagerMainShadow.GetString("Error angle points sorting:", curUICulture) & vbCrLf & ex.Message '"Ошибка сортировки вершин углов:"
SortByStation_AngularPointArray = False
End Try
End Function
Friend Shared Function GetIndexById_AngularPointArray(ByRef aAngularPointArray() As ssAlignmentAngularPoint, ByVal id As Int32) As Int32
Try
Dim indexById As Int32
For indexById = 0 To aAngularPointArray.Length - 1
If aAngularPointArray(indexById).Id = id Then
GetIndexById_AngularPointArray = indexById
Exit Function
End If
Next indexById
GetIndexById_AngularPointArray = -1
Catch ex As System.Exception
GetIndexById_AngularPointArray = -1
End Try
End Function
Private Sub DrawTangentRowInRotAngleTanCurSpirParamTableRail(ByRef aTable As AcadTable, ByVal aTangent As AeccAlignmentTangent, ByVal angularPointArrayIndex As Long, ByVal aBetweenPointsLength As Double, _
ByVal aAngularPointIsArc As Double, ByRef aErrStr As String)
Try
If angularPointArrayIndex = 1 Then
aTable.SetText(1 + ((angularPointArrayIndex * 6) - 3), 2, Format(aTangent.StartEasting, "### ### ##0.00")) 'TangentStartEasting
aTable.MergeCells(1 + ((angularPointArrayIndex * 6) - 3), 2 + ((angularPointArrayIndex * 6) - 3), 2, 2)
aTable.SetText(1 + ((angularPointArrayIndex * 6) - 3), 3, Format(aTangent.StartNorthing, "### ### ##0.00")) 'TangentStartNorthing
aTable.MergeCells(1 + ((angularPointArrayIndex * 6) - 3), 2 + ((angularPointArrayIndex * 6) - 3), 3, 3)
End If
aTable.SetText(2 + ((angularPointArrayIndex * 6) - 3), 4, SmartFormat(aBetweenPointsLength)) 'BetweenPointsLength
aTable.MergeCells(2 + ((angularPointArrayIndex * 6) - 3), 3 + ((angularPointArrayIndex * 6) - 3), 4, 4)
For jCol As Long = 5 To 11
aTable.MergeCells(1 + ((angularPointArrayIndex * 6) - 3), 2 + ((angularPointArrayIndex * 6) - 3), jCol, jCol)
Next jCol
If aAngularPointIsArc = True Then
aTable.SetText(2 + ((angularPointArrayIndex * 6) - 3), 12, Format(aTangent.Length, "### ### ##0.00")) 'TangentLength
End If
aTable.MergeCells(2 + ((angularPointArrayIndex * 6) - 3), 3 + ((angularPointArrayIndex * 6) - 3), 12, 12)
aTable.SetRowHeight(1 + ((angularPointArrayIndex * 6) - 3), textHeightWorkingValue * 1.6)
aTable.SetRowHeight(2 + ((angularPointArrayIndex * 6) - 3), textHeightWorkingValue * 1.6)
Catch ex As System.Exception
aErrStr += ex.Message & vbCrLf
End Try
End Sub
Private Sub DrawEndTangentRowInRotAngleTanCurSpirParamTableRail(ByRef aTable As AcadTable, ByVal aTangent As AeccAlignmentTangent, ByVal angularPointArrayIndex As Long, ByVal aBetweenPointsLength As Double, _
ByVal aAngularPointIsArc As Double, ByRef aErrStr As String)
Try
aTable.SetText(9 + ((angularPointArrayIndex * 6) - 3), 2, Format(aTangent.EndEasting, "### ### ##0.00")) 'TangentStartEasting
aTable.MergeCells(9 + ((angularPointArrayIndex * 6) - 3), 10 + ((angularPointArrayIndex * 6) - 3), 2, 2)
aTable.SetText(9 + ((angularPointArrayIndex * 6) - 3), 3, Format(aTangent.EndNorthing, "### ### ##0.00")) 'TangentStartNorthing
aTable.MergeCells(9 + ((angularPointArrayIndex * 6) - 3), 10 + ((angularPointArrayIndex * 6) - 3), 3, 3)
aTable.SetText(8 + ((angularPointArrayIndex * 6) - 3), 4, SmartFormat(aBetweenPointsLength)) 'BetweenPointsLength
aTable.MergeCells(8 + ((angularPointArrayIndex * 6) - 3), 9 + ((angularPointArrayIndex * 6) - 3), 4, 4)
For jCol As Long = 5 To 11
aTable.MergeCells(9 + ((angularPointArrayIndex * 6) - 3), 10 + ((angularPointArrayIndex * 6) - 3), jCol, jCol)
Next jCol
If aAngularPointIsArc = True Then
aTable.SetText(8 + ((angularPointArrayIndex * 6) - 3), 12, Format(aTangent.Length, "### ### ##0.00")) 'TangentLength
End If
aTable.MergeCells(8 + ((angularPointArrayIndex * 6) - 3), 9 + ((angularPointArrayIndex * 6) - 3), 12, 12)
aTable.SetRowHeight(9 + ((angularPointArrayIndex * 6) - 3), textHeightWorkingValue * 1.6)
aTable.SetRowHeight(10 + ((angularPointArrayIndex * 6) - 3), textHeightWorkingValue * 1.6)
Catch ex As System.Exception
aErrStr += ex.Message & vbCrLf
End Try
End Sub
Private Sub DrawSpirCurSpirRowInRotAngleTanCurSpirParamTableRail(ByRef aTable As AcadTable, ByVal aArcPIStation As Double, ByVal aStartFullCurveEasting As Double, ByVal aStartFullCurveNorthing As Double, _
ByVal aAngularPointEasting As Double, ByVal aAngularPointNorthing As Double, _
ByVal aEndFullCurveEasting As Double, ByVal aEndFullCurveNorthing As Double, _
ByVal aFullCurveRotationAngle As Double, ByVal angularPointArrayIndex As Long, _
ByVal aSpiralInLength As Double, ByVal aSpiralInTangent As Double, ByVal aSpiralOutLength As Double, ByVal aSpiralOutTangent As Double, _
ByVal aStartFullCurveStation As Double, ByVal aEndFullCurveStation As Double, _
ByVal aArcStartingStation As Double, ByVal aArcDelta As Double, ByVal aArcRadius As Double, ByVal aArcLength As Double, _
ByVal aArcEndingStation As Double, _
ByVal aAngularPointIsArc As Double, ByRef aErrStr As String)
Try
aTable.SetText(3 + ((angularPointArrayIndex * 6) - 3), 1, ResourceManagerMainShadow.GetString("Curvature Begin", curUICulture) & " " & angularPointArrayIndex)
aTable.MergeCells(3 + ((angularPointArrayIndex * 6) - 3), 4 + ((angularPointArrayIndex * 6) - 3), 1, 1)
aTable.SetText(3 + ((angularPointArrayIndex * 6) - 3), 2, Format(aStartFullCurveEasting, "### ### ##0.00")) 'StartFullCurveEasting
aTable.MergeCells(3 + ((angularPointArrayIndex * 6) - 3), 4 + ((angularPointArrayIndex * 6) - 3), 2, 2)
aTable.SetText(3 + ((angularPointArrayIndex * 6) - 3), 3, Format(aStartFullCurveNorthing, "### ### ##0.00")) 'StartFullCurveNorthing
aTable.MergeCells(3 + ((angularPointArrayIndex * 6) - 3), 4 + ((angularPointArrayIndex * 6) - 3), 3, 3)
aTable.SetText(4 + ((angularPointArrayIndex * 6) - 3), 4, Format(aSpiralInTangent, "### ### ##0.00")) 'LengthFromStartFullCurveToAngularPoint
aTable.MergeCells(4 + ((angularPointArrayIndex * 6) - 3), 5 + ((angularPointArrayIndex * 6) - 3), 4, 4)
For jCol As Long = 5 To 11
aTable.MergeCells(3 + ((angularPointArrayIndex * 6) - 3), 4 + ((angularPointArrayIndex * 6) - 3), jCol, jCol)
Next jCol
aTable.SetText(3 + ((angularPointArrayIndex * 6) - 3), 10, StationToStationFormat(aStartFullCurveStation, False)) 'StartFullCurveStation
aTable.MergeCells(3 + ((angularPointArrayIndex * 6) - 3), 4 + ((angularPointArrayIndex * 6) - 3), 10, 10)
aTable.MergeCells(3 + ((angularPointArrayIndex * 6) - 3), 4 + ((angularPointArrayIndex * 6) - 3), 11, 11)
If aAngularPointIsArc = False Then
aTable.SetText(4 + ((angularPointArrayIndex * 6) - 3), 12, Format(aSpiralInTangent, "### ### ##0.00")) 'LengthFromStartFullCurveToAngularPoint
End If
aTable.MergeCells(4 + ((angularPointArrayIndex * 6) - 3), 5 + ((angularPointArrayIndex * 6) - 3), 12, 12)
aTable.SetText(5 + ((angularPointArrayIndex * 6) - 3), 1, ResourceManagerMainShadow.GetString("PI", curUICulture) & " " & angularPointArrayIndex)
aTable.MergeCells(5 + ((angularPointArrayIndex * 6) - 3), 6 + ((angularPointArrayIndex * 6) - 3), 1, 1)
aTable.SetText(5 + ((angularPointArrayIndex * 6) - 3), 2, Format(aAngularPointEasting, "### ### ##0.00")) 'AngularPointEasting
aTable.MergeCells(5 + ((angularPointArrayIndex * 6) - 3), 6 + ((angularPointArrayIndex * 6) - 3), 2, 2)
aTable.SetText(5 + ((angularPointArrayIndex * 6) - 3), 3, Format(aAngularPointNorthing, "### ### ##0.00")) 'AngularPointNorthing
aTable.MergeCells(5 + ((angularPointArrayIndex * 6) - 3), 6 + ((angularPointArrayIndex * 6) - 3), 3, 3)
aTable.SetText(6 + ((angularPointArrayIndex * 6) - 3), 4, Format(aSpiralOutTangent, "### ### ##0.00")) 'LengthFromAngularPointToEndFullCurve
aTable.MergeCells(6 + ((angularPointArrayIndex * 6) - 3), 7 + ((angularPointArrayIndex * 6) - 3), 4, 4)
aTable.SetText(5 + ((angularPointArrayIndex * 6) - 3), 5, AngleInRadiansToDegreesAndMinutesAndSecundes(aFullCurveRotationAngle)) 'FullCurveRotationAngle
aTable.MergeCells(5 + ((angularPointArrayIndex * 6) - 3), 6 + ((angularPointArrayIndex * 6) - 3), 5, 5)
aTable.SetText(5 + ((angularPointArrayIndex * 6) - 3), 6, Format(aArcRadius, "### ### ##0.00")) 'Arc.radius
aTable.MergeCells(5 + ((angularPointArrayIndex * 6) - 3), 6 + ((angularPointArrayIndex * 6) - 3), 6, 6)
If Abs(aSpiralInTangent - aSpiralOutTangent) < 0.01 Then
aTable.SetText(5 + ((angularPointArrayIndex * 6) - 3), 7, Format(aSpiralInTangent, "### ### ##0.00"))
aTable.MergeCells(5 + ((angularPointArrayIndex * 6) - 3), 6 + ((angularPointArrayIndex * 6) - 3), 7, 7)
aTable.SetText(5 + ((angularPointArrayIndex * 6) - 3), 9, Format(aSpiralInLength, "### ### ##0.00"))
aTable.MergeCells(5 + ((angularPointArrayIndex * 6) - 3), 6 + ((angularPointArrayIndex * 6) - 3), 9, 9)
Else
aTable.SetText(3 + ((angularPointArrayIndex * 6) - 3), 7, Format(aSpiralInTangent, "### ### ##0.00"))
aTable.MergeCells(3 + ((angularPointArrayIndex * 6) - 3), 4 + ((angularPointArrayIndex * 6) - 3), 7, 7)
aTable.SetText(7 + ((angularPointArrayIndex * 6) - 3), 7, Format(aSpiralOutTangent, "### ### ##0.00"))
aTable.MergeCells(7 + ((angularPointArrayIndex * 6) - 3), 8 + ((angularPointArrayIndex * 6) - 3), 7, 7)
aTable.SetText(3 + ((angularPointArrayIndex * 6) - 3), 9, Format(aSpiralInLength, "### ### ##0.00"))
aTable.MergeCells(3 + ((angularPointArrayIndex * 6) - 3), 4 + ((angularPointArrayIndex * 6) - 3), 9, 9)
aTable.SetText(7 + ((angularPointArrayIndex * 6) - 3), 9, Format(aSpiralOutLength, "### ### ##0.00"))
aTable.MergeCells(7 + ((angularPointArrayIndex * 6) - 3), 8 + ((angularPointArrayIndex * 6) - 3), 9, 9)
aTable.MergeCells(5 + ((angularPointArrayIndex * 6) - 3), 6 + ((angularPointArrayIndex * 6) - 3), 7, 7)
aTable.MergeCells(5 + ((angularPointArrayIndex * 6) - 3), 6 + ((angularPointArrayIndex * 6) - 3), 9, 9)
End If
aTable.SetText(5 + ((angularPointArrayIndex * 6) - 3), 8, Format(aSpiralInLength + aSpiralOutLength + aArcLength, "### ### ##0.00")) 'FullCurveLength ?
aTable.MergeCells(5 + ((angularPointArrayIndex * 6) - 3), 6 + ((angularPointArrayIndex * 6) - 3), 8, 8)
aTable.MergeCells(5 + ((angularPointArrayIndex * 6) - 3), 6 + ((angularPointArrayIndex * 6) - 3), 10, 10)
aTable.MergeCells(5 + ((angularPointArrayIndex * 6) - 3), 6 + ((angularPointArrayIndex * 6) - 3), 11, 11)
If aAngularPointIsArc = False Then
aTable.SetText(6 + ((angularPointArrayIndex * 6) - 3), 12, Format(aSpiralOutTangent, "### ### ##0.00")) 'LengthFromAngularPointToEndFullCurve
End If
aTable.MergeCells(6 + ((angularPointArrayIndex * 6) - 3), 7 + ((angularPointArrayIndex * 6) - 3), 12, 12)
aTable.SetText(7 + ((angularPointArrayIndex * 6) - 3), 1, ResourceManagerMainShadow.GetString("Curvature End", curUICulture) & " " & angularPointArrayIndex)
aTable.MergeCells(7 + ((angularPointArrayIndex * 6) - 3), 8 + ((angularPointArrayIndex * 6) - 3), 1, 1)
aTable.SetText(7 + ((angularPointArrayIndex * 6) - 3), 2, Format(aEndFullCurveEasting, "### ### ##0.00")) 'EndFullCurveEasting
aTable.MergeCells(7 + ((angularPointArrayIndex * 6) - 3), 8 + ((angularPointArrayIndex * 6) - 3), 2, 2)
aTable.SetText(7 + ((angularPointArrayIndex * 6) - 3), 3, Format(aEndFullCurveNorthing, "### ### ##0.00")) 'EndFullCurveNorthing
aTable.MergeCells(7 + ((angularPointArrayIndex * 6) - 3), 8 + ((angularPointArrayIndex * 6) - 3), 3, 3)
aTable.MergeCells(8 + ((angularPointArrayIndex * 6) - 3), 9 + ((angularPointArrayIndex * 6) - 3), 4, 4)
For jCol As Long = 5 To 11
aTable.MergeCells(7 + ((angularPointArrayIndex * 6) - 3), 8 + ((angularPointArrayIndex * 6) - 3), jCol, jCol)
Next jCol
aTable.SetText(7 + ((angularPointArrayIndex * 6) - 3), 11, StationToStationFormat(aEndFullCurveStation, False)) 'EndFullCurveStation
aTable.MergeCells(7 + ((angularPointArrayIndex * 6) - 3), 8 + ((angularPointArrayIndex * 6) - 3), 11, 11)
aTable.MergeCells(8 + ((angularPointArrayIndex * 6) - 3), 9 + ((angularPointArrayIndex * 6) - 3), 12, 12)
aTable.SetRowHeight(3 + ((angularPointArrayIndex * 6) - 3), textHeightWorkingValue * 1.6)
aTable.SetRowHeight(4 + ((angularPointArrayIndex * 6) - 3), textHeightWorkingValue * 1.6)
aTable.SetRowHeight(5 + ((angularPointArrayIndex * 6) - 3), textHeightWorkingValue * 1.6)
aTable.SetRowHeight(6 + ((angularPointArrayIndex * 6) - 3), textHeightWorkingValue * 1.6)
aTable.SetRowHeight(7 + ((angularPointArrayIndex * 6) - 3), textHeightWorkingValue * 1.6)
aTable.SetRowHeight(8 + ((angularPointArrayIndex * 6) - 3), textHeightWorkingValue * 1.6)
Catch ex As System.Exception
aErrStr += ex.Message & vbCrLf
End Try
End Sub