www.pudn.com > DataCollectionSystem.rar > modQuZhi.bas, change:2003-05-21,size:2286b


Attribute VB_Name = "modQuZhi" 
Public DelNumber(100) As Integer 
Public NotDelNumber(100) As Double 
 
 
Public Sub ModifyPt(h() As Double, v() As Double, s() As Double, x() As Double, y() As Double, z() As Double, Explain() As Integer) 
Dim k As Integer 
Dim DelSum As Integer 
Dim i As Integer, j As Integer 
Dim DelFlag As Boolean 
Dim j1 As Integer 
Dim xtemp(100) As Double, ytemp(100) As Double, ztemp(100) As Double 
Dim htemp(100) As Double, vtemp(100) As Double, stemp(100) As Double 
 
M = MOrigin: N = NOrigin: j = 0 
 
    For k = 1 To MOrigin + NOrigin 
        htemp(k) = h(k) 
        vtemp(k) = v(k) 
        stemp(k) = s(k) 
        xtemp(k) = x(k) 
        ytemp(k) = y(k) 
        ztemp(k) = z(k) 
    Next k 
 
 
For i = 1 To MOrigin 
    If Explain(i) = 4 Then 
        j = j + 1 
        DelNumber(j) = i 
        M = M - 1 
    End If 
Next i 
 
For i = MOrigin + 1 To MOrigin + NOrigin 
    If Explain(i) = 4 Then 
        j = j + 1 
        DelNumber(j) = i 
        N = N - 1 
    End If 
Next i 
 
 
For i = 1 To MOrigin + NOrigin 
    DelFlag = False 
     
    For k = 1 To j 
        If i = DelNumber(k) Then 
            DelFlag = True 
            Exit For 
        End If 
    Next k 
    If DelFlag = False Then 
        j1 = j1 + 1 
        NotDelNumber(j1) = i 
    End If 
Next i 
 
 
'ȫֱ Position() as integer,DelNumber() as integer,m3,n3 
    For k = 1 To M + N 
        h(k) = htemp(NotDelNumber(k)) 
        v(k) = vtemp(NotDelNumber(k)) 
        s(k) = stemp(NotDelNumber(k)) 
        x(k) = xtemp(NotDelNumber(k)) 
        y(k) = ytemp(NotDelNumber(k)) 
        z(k) = ztemp(NotDelNumber(k)) 
    Next k 
         
 
End Sub 
 
Public Sub RecoverPt(x() As Double, y() As Double, z() As Double) 
 
Dim i As Integer, k As Integer 
Dim xtemp(100) As Double, ytemp(100) As Double, ztemp(100) As Double 
    For k = 1 To M + N 
        xtemp(k) = x(k) 
        ytemp(k) = y(k) 
        ztemp(k) = z(k) 
    Next k 
        
    For k = 1 To M + N 
        x(NotDelNumber(k)) = xtemp(k) 
        y(NotDelNumber(k)) = ytemp(k) 
        z(NotDelNumber(k)) = ztemp(k) 
    Next k 
     
    For k = 1 To MOrigin + NOrigin - M - N 
        x(DelNumber(k)) = 0 
        y(DelNumber(k)) = 0 
        z(DelNumber(k)) = 0 
    Next k 
 
 
 
End Sub