Autore Topic: [Risolto] che strano..Type mismatch: wanted Integer got Null instead  (Letto 1177 volte)

Offline biggsman

  • Gamberetto
  • *
  • Post: 43
    • Mostra profilo
Re: che strano..Type mismatch: wanted Integer got Null instead
« Risposta #15 il: 29 Luglio 2014, 17:25:37 »
ecco adesso funziona con queste modifiche:
Codice: [Seleziona]
   Dim alpha As Integer       'angolo
   Dim pointx As Float      'x point da spostare
   Dim pointy As Float     'y point da spostare
   Dim pointz As Float     'z point da spostare
   Dim Newpointx As Float
   Dim Newpointy As Float
   Dim Sinalpha As Float
   Dim Cosalpha As Float
   
   Dim NewpointStX As String
   Dim NewpointStY As String
   
   Dim X As Integer
   Dim Y As Integer
 
Dim i As Integer
Dim HFile As File
Dim Sline As String
Dim intestazione As String
Dim testo As String
Dim trap As Integer
Dim a As String
Dim aa As String[]
Dim j As Byte
Dim esclusivo As Integer
Dim escludi As String
Dim Resto As String

alpha = 72
HFile = Open "/home/io/Scrivania/cloud_new.ply" For Input

While Not Eof(hFile)


  Line Input #hFile, Sline
 
    trap = trap + 1
    If Trap < 13 Then Goto loop1
 
     a = Replace(Sline, "\n", " ")
     a = Replace(Sline, ".", ",")
     aa = Split(a, " ", "", True)

       escludi = aa[1]
       esclusivo = Val(escludi)
       
     
       If esclusivo > 20 Then 'Goto loop1
       SLine = ""
       Else
         '''''''''''''''''''''''''''''''''''''''''''''''
 
  pointx = Val(aa[0])
  pointy = Val(aa[1])
 
  X = InStr(Sline, " ")
  Y = InStr(Sline, " ", X + 1)
 
Resto = Mid$(Sline, (y + 1))
Resto = Replace(resto, ".", ",")
Sinalpha = Sin(alpha * (Pi / 180))
Cosalpha = Cos(alpha * (Pi / 180))

newpointx = (pointx * Cosalpha) - (pointy * Sinalpha)
newpointy = (pointx * Sinalpha) + (pointy * Cosalpha)
 

 NewpointStX = Left$(Str$(newpointx), 7)
 NewpointStY = Left$(Str$(newpointy), 7)
 
 Sline = Str$(newpointStX) & " " & Str$(newpointSTY) & " " & Resto

         
       Testo = Testo & Sline & gb.NewLine
       i = i + 1
       Print escludi
   End If
 loop1: 
   
Wend


intestazione = "ply\nformat ascii 1.0\nelement vertex " & Str$(i - 22)
intestazione = intestazione & "\nproperty float x\nproperty float y\nproperty float z\nproperty uchar diffuse_red\nproperty uchar diffuse_green\nproperty uchar diffuse_blue\nelement face 0\nproperty list uchar int vertex_indices\nend_header\n"
TextArea1.Text = intestazione & Testo
File.Save("/home/io/Scrivania/cloud_rot.ply", TextArea1.text)
:D

Offline biggsman

  • Gamberetto
  • *
  • Post: 43
    • Mostra profilo
Re: che strano..Type mismatch: wanted Integer got Null instead
« Risposta #16 il: 29 Luglio 2014, 17:28:21 »
il valore incriminato è -  ,0642 che meshlab non accetta
adesso forse è bene che aggiunga il codice per la traslazione e poi un po' di ordine non guasta vero?

Offline Top Fuel

  • Gran Maestro dei Gamberi
  • *****
  • Post: 960
    • Mostra profilo
Re: che strano..Type mismatch: wanted Integer got Null instead
« Risposta #17 il: 29 Luglio 2014, 21:58:10 »
Diciamo che quel Goto non si può vedere... :)
Dear youtube administrators, your search bar is broken. When I type the letter "J" it appears justin bieber when it should appear Jimi Hendrix. Fix this, please.

Offline biggsman

  • Gamberetto
  • *
  • Post: 43
    • Mostra profilo
Re: che strano..Type mismatch: wanted Integer got Null instead
« Risposta #18 il: 30 Luglio 2014, 08:09:56 »
Si ma è commentato!  ;)