algorithmic modeling for Rhino
Hi everyone,
I have this issue while scripting in vb.net when creating a line with two points.
I am creating a k-d tree (not kraft dinner) script and am outputting the representation of the tree as a list of lines.
My issue is sometimes I try to create a line between two points, and I get a line between the last parent node and 0,0,0. ( I have attached an image of the output to show the error. Nodes, 2, 10, and 9 connect to 0,0,0 but they shouldn't.
I am assuming that if the line constructor doesn't receive a valid point, it assumes the world origin as a point?
If so, what is the syntax for checking to see whether a point3d variable is not valid?
Below was my attempt at checking it but I recieved this error.
Error: 'IsNot' requires operands that have reference types, but this operand has the value type 'Rhino.Geometry.Point3d'. (line 139)
------------------------------------
If ptChildBelow IsNot Nothing Then ' this what I wan't done
Dim lineA As New Line(ptParent, ptChildBelow)
listLines.Add(lineA)
End If
-------------------------------------
Thanks in advance for the help, and I uploaded my definition in case it's useful for anyone.
Tags:
Thanks Brian, that's what I was looking for!
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by