数控系统动画仿真软件设计+仿真程序(5)_毕业论文

毕业论文移动版

毕业论文 > 机械论文 >

数控系统动画仿真软件设计+仿真程序(5)


          Exit Sub
       End If
  End If
  If CircleTime = False Then
    CurrentNI = I
    CurrentNJ = J
    PointX(0) = I + CurrentNR
    PointY(0) = J
    PointX(1) = I
    PointY(1) = J + CurrentNR
    PointX(2) = I - CurrentNR
    PointY(2) = J
    PointX(3) = I
    PointY(3) = J - CurrentNR
  Else
    CurrentNI = I
    CurrentNJ = J
    PointX(0) = I + CurrentNR
    PointY(0) = J
    PointX(3) = I
    PointY(3) = J + CurrentNR
    PointX(2) = I - CurrentNR
    PointY(2) = J
    PointX(1) = I
    PointY(1) = J - CurrentNR
  End If
  SPXY = JudgePXY(CurrentNX, CurrentNY, I, J, CircleTime)
  EPXY = JudgePXY(X, Y, I, J, CircleTime)
  If SPXY <> EPXY Then
     If EPXY > SPXY Then
        For CallFOR = SPXY To EPXY
           If CallFOR + 1 < EPXY Then
            Call PXYTOGraphic(PointX(CallFOR + 1), PointY(CallFOR + 1), CallFOR, CallFOR + 1, CircleTime)
           Else
            Call PXYTOGraphic(X, Y, CallFOR, CallFOR + 1, CircleTime)
           End If
           If CallFOR + 1 = EPXY Then
             Exit For
           End If
        Next CallFOR
     ElseIf EPXY < SPXY Then
        If SPXY < 4 Then
            For CallFOR = SPXY To 3
               If CallFOR + 1 <> 4 Then
                Call PXYTOGraphic(PointX(CallFOR + 1), PointY(CallFOR + 1), CallFOR, CallFOR + 1, CircleTime)
               Else
                Call PXYTOGraphic(PointX(0), PointY(0), CallFOR, CallFOR + 1, CircleTime)
               End If
            Next CallFOR
        End If
        If EPXY = 1 Then
         Call PXYTOGraphic(X, Y, 4, 1, CircleTime)
        ElseIf EPXY > 1 Then
         Call PXYTOGraphic(PointX(1), PointY(1), 4, 1, CircleTime)
           For CallFOR = 1 To EPXY - 1
            If CallFOR + 1 = EPXY Then
              Call PXYTOGraphic(X, Y, CallFOR, CallFOR + 1, CircleTime)
              Exit For (责任编辑:qin)