Grasshopper

algorithmic modeling for Rhino

Hi guys
With this code all I obtained is a series of null plane. How can I fix this problem inside VB?
Thanks

  Private Sub RunScript(ByVal LineList As List(Of Line), ByRef A As Object)
    Dim RadiusPlanes As New List (Of Plane)
    Dim Line1 As Line
    Dim Line2 As Line
    Dim Line1SP As Point3d
    Dim Line1EP As Point3d
    Dim Line2EP As Point3d
    Dim i As Int32

    For i = 0 To LineList.Count - 2
      Line1 = LineList(i)
      Line2 = LineList(i + 1)
      Line1SP = Line1.PointAt(0.0)
      Line1EP = Line1.PointAt(1.0)
      Line2EP = Line1.PointAt(1.0)
      ' create plane
      Dim RadiusPlane As New Plane(Line1SP, Line1EP, Line2EP)
      ' add to list
      RadiusPlanes.Add(RadiusPlane)
    Next

    A = RadiusPlanes

Views: 345

Replies to This Discussion

try
Line2EP = Line2.PointAt(1.0)
not
Line2EP = Line1.PointAt(1.0)
Thanks
I'm blind!!! And you're my light.
P

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service