@catalin wrote:
Hello, I try to get some curves from BrepBrep intersection. When I create a box and I try the code everything works fine, but when I try it with a pyramid I get this error: “Index was outside the bounds of the array”. Does anyone know how to fix it? My code is:
Dim s As Surface = bbrep.Faces.Item(5)
ot.Add(s)
Dim sb As Brep = Brep.CreateFromSurface(s)
ot.Add(sb)
Dim supr As Boolean = Intersect.Intersection.BrepBrep(sb, brep, 0.001, crv, pts)
If crv(0) Is Nothing Then ----- here I get the error for crv(0)
RhinoApp.WriteLine(“INVALID crv”)
Return Rhino.Commands.Result.Failure
End If
cd.AddCurve(crv(0))Thanks.
Posts: 5
Participants: 2