Your Products have been synced, click here to refresh
[...] ' Dim Something Dim iPointCount As Integer Dim iCount As Integer Dim dVectorX, dVectorY, dVectorZ As Double Dim dRadius As Double Dim dMax, dMin, dRound As Double ' Center from Cirle CirCenterX = PCDCommand.GetText(MEAS_X, 0) CirCenterY = PCDCommand.GetText(MEAS_Y, 0) CirCenterZ = PCDCommand.GetText(MEAS_Z, 0) iPointCount = PCDCommand.GetText(N_HITS, 0) ' each Point For iCount = 1 To iPointCount ' Vector "CIR1.HIT[1..CIR1.NUMHITS].XYZ-CIR1.XYZ" dVectorX = PCDCommand.GetText(MEAS_X, iCount) - CirCenterX dVectorY = PCDCommand.GetText(MEAS_Y, iCount) - CirCenterY dVectorZ = PCDCommand.GetText(MEAS_Z, iCount) - CirCenterZ ' Radius from each point "SQRT(DOT())" dRadius = Sqr((dVectorX * dVectorX) + (dVectorY * dVectorY) + (dVectorZ * dVectorZ)) ' remember max min "MAX(V1)" If iCount = 1 Then dMax = dRadius dMin = dRadius End If If dMax < dRadius Then dMax = dRadius If dMin > dRadius Then dMin = dRadius Next iCount ' result "ROUNDNESS=MAX(V1)-MIN(V1)" dRound = dMax - dMin [...]
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |