Grasshopper

algorithmic modeling for Rhino

I am trying to create 10 evenly spaced cross sections of a complex polysurface using a VB.net component in Grasshopper. My issue is that when the code runs, I don't get any errors, but the sections are inconsistent or incomplete. The polysurface being sectioned is a single polysurface and has no bad objects or incomplete areas. My code is below.

 

Dim StationIntCurves As Curve()    

Dim StationIntPoints As Point3d()    

Dim StationJoinCurves As Curve()    

Dim StationsCurves As New List(Of Curve)

Dim StationBeamList As New List(Of Double)    

Dim StationBaseList As New List(Of Double)

    For Station As Integer = 0 To 10

      Dim SectionPlaneOrigin As New Point3d(Station * (ChineLength / 10), 0, 0)      

Dim SectionPlane As New Plane(SectionPlaneOrigin, Vector3d.YAxis, Vector3d.ZAxis)       Rhino.Geometry.Intersect.Intersection.BrepPlane(Hull, SectionPlane, 0.001, StationIntCurves, StationIntPoints)      

StationJoinCurves = Rhino.Geometry.Curve.JoinCurves(StationIntCurves)

      StationsCurves.Add(StationJoinCurves(0))

 

When I try to create the sections using existing GH components, I have no problem. I do, however, need it to work with my code.

Attached are two screenshots: what the sections should be, and what the output of the code is.

Any help would be greatly appreciated. Thanks!

Views: 6484

Attachments:

Replies to This Discussion

Can you upload the geometry and GH definition?

I've attached a definition that achieves the desired result using GH components. What I need is to be able to create a custom component that will do this. The geometry is proprietary so I am unable to attach it.

Attachments:

Intersect.Intersection.BrepPlane is working fine here. I wanted to see if it was something specific about the geometry.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service