Hi,,, I am a newbee in this vb coding, and I have a hard time putting
it together.
What I want:
I want to take the x,y of points from a number of polylines, and
change those to U and V on a surface. Finally I want to make a curve
form the uv-points, in sets similar to the original polylines.
I can not work out what don't work in my code. But I get a stream from
"out", which says:
"Warning: Variable 'pline' is used before it has been assigned a
value. A null reference exception could result at runtime.
Script exception: Object reference not set to an instance of an
object."
I have a input whit list of polylines (polyline), and a list of uv
points(srf_pt)
Sub RunScript(ByVal polyline As List(Of OnCurve), ByVal srf_pt As List
(Of On3dPoint))
Dim pline As OnPolyline
Dim new_point As New on3dpoint
Dim new_pt As New on3dpoint
Dim nurb As New onNurbsCurve
Dim nurblist As New List(Of onNurbscurve)
Dim arrpts As New list( Of on3Dpoint)
Dim x_x As New Integer
Dim x_y As New Integer
Dim bb As New Integer
Dim i As Integer
Dim ii As Integer
For ii = 0 To polyline.count() - 1
If polyline(ii).ispolyline(pline) Then
For i = 0 To pline.Count() - 2
new_point = pline(i)
x_x = new_point.x
x_y = new_point.y
bb = x_y + (100 * (x_x))
new_pt = srf_pt(bb)
arrpts.add(new_pt)
Next
End If
nurb.CreatePeriodicUniformNurbs(3, 4, arrpts.toarray())
nurblist.Add(nurb)
Next
A = nurblist
End Sub
I can make it work whit a single set of points when my input polylines
is not a "list".
Hopefully someone can help me out,,
tnx Stig