19/05/2023: A causa di un errore sono stati cancellati, insieme ad account creati da bot, alcuni account legittimi. Si prega di leggere qui: https://www.gambas-it.org/smf/index.php?topic=9733.0
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 IntegerDim HFile As FileDim Sline As StringDim intestazione As StringDim testo As StringDim trap As IntegerDim a As StringDim aa As String[]Dim j As ByteDim esclusivo As IntegerDim escludi As StringDim Resto As Stringalpha = 72HFile = Open "/home/io/Scrivania/cloud_new.ply" For InputWhile 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: Wendintestazione = "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 & TestoFile.Save("/home/io/Scrivania/cloud_rot.ply", TextArea1.text)