(file attached)
So I have a grid of lines and a sphere. I need to find out lines intersect the sphere. I know its just true/false stuff but I can't get around this error: "variable <name> is passed by reference before it has been assigned a value" and therefore all of the results are "true" (which I'm sure you can imagine is quite useless)
Private Sub RunScript(ByVal gPts As List(Of Point3d), ByVal iLns As List(Of Curve), ByVal sp As Brep, ByRef A As Object)
Dim ptBL As New List (Of Boolean)
Dim lAr() As curve = iLns.ToArray
Dim i As New Int32
For i = 0 To iLns.Count - 1
Dim iLn() As Curve
Dim iPt() As Point3d
Dim tf As Boolean = rhino.Geometry.Intersect.Intersection.CurveBrep(lAr(i), sp, 0, iLn, iPt)
ptBL.Add(tf)
Next
a = ptBL
All I'm looking for is a simple true or false
An alternative solution would be to add data to an empty branch of a data tree. After the brepCurveIntersect battery I have a list with plenty of empties. If I can add data to those empty trees that would also solve my problem.
I am ultimately going to make a surface which is influenced by a few breps from lofting interpolated curves together. However, in order for the interpolated curves to render correctly I need the data trees intact and in order. Can anyone help?
Tags:
- Attachments:
-