Hi,
I am trying to get this little VB component to draw a series of curves through the input points, to create a pattern.
the VB component does not work yet, any ideas?
thanks,
Peter
Not sure what you are exactly trying to do but there are quite a few issues you need to sort out. Could you send a screenshot of what you want to achieve?
Here's a VB that takes a list of curves and outputs a point list that you can send a curve through. Would probably be good to read the second edition primer for a VB intro as you seem to be implementing RhinoScript rather than VB.
Sub RunScript(ByVal divNum As Integer, ByVal arrCrv As List(Of OnCurve))
Dim arrPt As New List (Of On3dPoint)
Dim tStep As Double = 1 / divNum
Dim crv As OnCurve
For Each crv In ArrCrv
'Normalise Domain
crv.SetDomain(0, 1)
For i As Double = 0 To 1 Step tStep
arrPt.Add(crv.PointAt(i))
Next
Next
thanks.
actually I was hopeing that I would to embed rhinoscript whithin grasshopper. maybe got that wrong. did a little rhinoscript in the meantime which works ok, but is not ideal ...
I started doing it in grasshopper but ran into problems accessing individual points that where coming out of the "devidecurve" operator and which I am using as control points to feed the curves through ...
any ideas how to do this in grasshopper?!?
thanks,
Peter
your elevation seems difficult to understand with relation to a curve interpolating points. Firstly, how did you divide the curves as your point divisions don't seem to be equal? Where are the 6 curves that you originally were referencing?
You can collect points in a list and then access points using the Logic > List Item component. You could also sort the points within a VB script but it's still very vague as to what you're doing.
Peter, you basically want to transpose a 2d list. You could even just loft the curves as a surface and extract isocurves from it.
Here's a VB that takes the list of curves and makes a datatree for each point across the curve list.
Sub RunScript(ByVal divNum As Integer, ByVal arrCrv As List(Of OnCurve))
Dim ptTree As New DataTree(Of On3dPoint)
For j As Double = 0 To DivNum
Dim path As New EH_Path(j)
For i As Int32 = 0 To arrCrv.Count() - 1
ptTree.Add(arrCrv(i).PointAt(j / DivNum), path)
Next
Next