On3dPointArray is a dynamic array. You can append new points and it will resize itself to accomedate new items. To see all utility function of On3dPointArray you can see the auto-complete:
Dim points as new On3dPointArray
'point."a list of functions will show"
This is a sample of how to append new points:
Dim points as new On3dPointArray
Dim pt as new On3dPoint(0,0,0)
points.Append(pt)
I'm trying to convert an old rhinoscript to .net but I feel like I'm missing something really trivial but still causing problems -see anything funny? I think there's something wrong with the vectors but I can't pinpoint it
yeah, that's really helpful. I was doing much more work in order to do what is actually really simple - and I wouldnt have figured it out without your help...
so, one quick thing, in your example, the cv = cv*vector - should this actually be cv_pt = cv_pt*vector
I think another reply I made got lost in the shuffle. justbriefly - the constructor you just introduced me to for on3dvectors is not working for some reason. Not only does it not show up as an option when I get to the first parentheses but when I write it anyways it trips up the script all together...any idea why?
did you want to either upload your VB component or publish the entire code - it's too difficult to ascertain where your problem may lie from just one line. Not entirely sure of what you're trying to achieve but there is a similar tutorial by Rajaa in the Primer. I may be wrong in suspecting that you are working explicitly with curves but am quite sure that On4dPoint is relevant to OnNurbsSurface.
thanks for the offer, here's the code - basically I'm trying to get curves within some proximity to be drawn towards each other and bundle by modifying the closest cv point
Sub RunScript(ByVal crvArr As List(Of OnCurve), ByVal steps As Integer, ByVal threshold As Double, ByVal ratio As Double)
Dim k, h, count, gripCount As Integer
Dim i, j, closeCrvInd As New int32
Dim gripPos, crvPt As New On3dPoint
Dim crvParam, dist As New Double
Dim arrCrvPts As New On3dPointArray
Dim newPos, vec As New On3dVector
Dim nurbsCrv As New OnNurbsCurve
Dim newCrvs As New List(Of OnCurve)
Dim newPts As New List(Of On3DPoint)
'number of steps
For h = 0 To steps Step 1
For i = 0 To crvArr.Count - 1
nurbsCrv = crvArr(i).NurbsCurve