I've been trying that...I'm having difficulties with the vb syntax
when call the geometry functions...the documentation in the sdk is
confusing
here the definition
http://grasshopper3d.googlegroups.com/web/sweep2.ghx?hl=en&gsc=LLYUmxYAAABZgD3S2mEFeIRktvpsBBvu-vghgYgES8zAzJdW7J9-8w
or code:

Sub RunScript(ByVal r1_List As List(Of OnCurve), ByVal r2_List As List
(Of OnCurve), ByVal s_List As List(Of OnCurve))
    ''' <your code>
    Dim i As Int32
    Dim r1 As New MRhinoPolyEdge
    Dim r2 As New MRhinoPolyEdge
    Dim s As IOnCurve
    Dim surfaces As New List (Of Object)
    ' Dim brep_array(0) As OnBrep
    Dim brep_array() As OnBrep = Nothing

    Dim args As New MArgsRhinoSweep2


    For i = 0 To r1_List.count - 1
      r1.Create(r1_List.Item(i))
      r2.Create(r2_List.Item(i))

      'RhUtil.RhinoMessageBox(r1.ToString, r1.IsValid.toString, 0)
      s = s_List.Item(i)
      Dim s_List2 As New List(Of IOnCurve)
      s_List2.Add(s)

      args.m_shape_curves = s_List2.ToArray()
      args.m_rail_curves(0) = r1
      args.m_rail_curves(1) = r2
      args.m_bClosed = False
      args.m_bSimpleSweep = True

      Dim t As Double = 0
      r1.GetClosestPoint(s.PointAtStart(), t)
      args.m_rail_params(0).Append(t)
      r2.GetClosestPoint(s.PointAtEnd(), t)
      args.m_rail_params(1).Append(t)

      surfaces.Add(r1)

      If(RhUtil.RhinoSweep2(args, brep_array)) Then
        surfaces.Add(brep_array(0))
      End If

    Next

    A = surfaces

Reply via email to