I've got a problem. The error of my VB component shows "Value of type '1-dimensional array of Rhino.Geometry.Curve' cannot be converted to 'Rhino.Geometry.Curve'."
My code is here: (I tried to get all the edge curves of a list of planar breps, and then join them as closed curves )
Private Sub RunScript(ByVal x As List(Of Brep), ByRef A As Object)
Dim cl As New List(Of Curve)
For i As int16=0 To x.Count() - 1
Dim br As Brep : br = x(i)
Dim enve As curve
Dim ev As IEnumerable()
For j As int16=0 To br.Edges.Count() - 1
Dim l As curve
l = br.Edges.Item(j)
'enve = curve.JoinCurves(l)
ReDim ev(j):ev(j) = l
Next
enve = curve.JoinCurves(ev)
cl.Add(enve)
Next
A = cl
End Sub
In Rhinocommon file, I found the "joincurve" method is like this:
What is IEnumerable? How to convert it to curve? Help me!
Tags: