Grasshopper

algorithmic modeling for Rhino

i have a field of points and for each points a list of lines, wich represent the sun direction of a certain time.
The aim is to intersect those lines with a trimmed surface. For each intersection with this surface the related sunhours of this points grows by one...

My Problem is that I don't know how to intersect a trimmed surface with a line in vb?
How can i solve that? Thanks a lot


Dim sunhours As New List(Of Integer)
Dim sunline As New OnLine

Dim i As Integer
For i = 0 To srfPts.Count - 1
sunhours.Add(0)
Dim j As Integer
For j = 0 To sunvecs.Count - 1
sunline.Create(srfPts(i), srfPts(i) + sunvecs(j))
'OnUtil.ON_Intersect(sunline,) 'no intersection operation for trimmed surfaces????
If ' intersection with trimmed surface results in a point then
sunhours(i) += 1
End If
Next
Next
A = sunhours

Views: 525

Replies to This Discussion

I think there's no need for scripting to achieve this. Try something like this:

Thanks for your fast answer.
I tried what you propose, but it doesn't take the 30 paths from the points but the 12 paths from the vectors. see (picture, and file)
Attachments:
Remove the simplify tree component and set the 'Lf' input of the intersect component to 'true'.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service