Grasshopper

algorithmic modeling for Rhino

Hello...

 

I want to use array data ( , ) in VB.component.

But, it is not so easy for me.

Below is my code,,..

would you help me?

 

input Tvec can be millions data

and in fact I want to split the data into 6 parts and calculate using multithread, but I do not know how to multi thread in GH.

and Array data exchange in VB.component and GH.

 

Private Sub RunScript(ByVal Tvec As Vector3d, ByRef DATA As Object)
    'your code goes here…
    Dim angX, angY As Double
    Dim TData(100, 100) As Double
    Dim i,j As Integer
  
    If tvec.z <> 0 Then
     
      temp = math.Tan(angx) / 0.025 + 50
    
      i = CInt(Math.Tan(angX) / 0.025) + 50
      temp = math.Tan(angy) / 0.025 + 50
    
      CInt(Math.Tan(angY) / 0.025) + 50

      If (i >= 0 And i <= 100) And (j >= 0 And j <= 100) Then
        tdata(i, j) = tdata(i, j) + 1
      End If
      data = tdata

    End If

Views: 208

Replies to This Discussion

Well, I'm not sure how TData is getting filled here, but I do see that you're passing a multidimensional array out of the component. This is not allowed, so that's probably where the issue your having is.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service