Projecting Curves to Breps - Grasshopper2024-03-28T14:07:30Zhttps://www.grasshopper3d.com/forum/topics/projecting-curves-to-breps?feed=yes&xn_auth=noThanks Vincent - I didn't kno…tag:www.grasshopper3d.com,2009-05-27:2985220:Comment:66892009-05-27T22:52:29.437ZDirk Andersonhttps://www.grasshopper3d.com/profile/DirkAnderson
Thanks Vincent - I didn't know about this code at all - works perfectly. I do need to write this up in VB as it's a recursive function. The only other question I have is how to create a bounding box for a list of curves (not separate BB's but one for the entire list)?<br />
<br />
Damien - 'Generic List of Curves' does not work as it needs an Array - same goes for projected points - thanks for looking anyway.<br />
<br />
D
Thanks Vincent - I didn't know about this code at all - works perfectly. I do need to write this up in VB as it's a recursive function. The only other question I have is how to create a bounding box for a list of curves (not separate BB's but one for the entire list)?<br />
<br />
Damien - 'Generic List of Curves' does not work as it needs an Array - same goes for projected points - thanks for looking anyway.<br />
<br />
D Substitute the line:
Dim arrC…tag:www.grasshopper3d.com,2009-05-27:2985220:Comment:65622009-05-27T16:44:44.659ZVicente Solerhttps://www.grasshopper3d.com/profile/VicenteSoler
Substitute the line:<br />
<i>Dim arrCrv As New OnCurveArray()</i><br />
with:<br />
<i>Dim arrcrv(0) As oncurve</i><br />
<br />
You can also have different vb.net components connected together, and not everything has to be in one component (depending on what you are doing). Also, there's a component that does just this, are you sure you can't connect the result of this component to a vb.net component to avoid writing the code?
Substitute the line:<br />
<i>Dim arrCrv As New OnCurveArray()</i><br />
with:<br />
<i>Dim arrcrv(0) As oncurve</i><br />
<br />
You can also have different vb.net components connected together, and not everything has to be in one component (depending on what you are doing). Also, there's a component that does just this, are you sure you can't connect the result of this component to a vb.net component to avoid writing the code? From just that error (I haven…tag:www.grasshopper3d.com,2009-05-27:2985220:Comment:65422009-05-27T15:09:49.900ZDamien Alomarhttps://www.grasshopper3d.com/profile/DamienAlomar
From just that error (I haven't taken an actual look yet), it would seam that you can not simply pass an OnCurveArray out of a scripting component. That means that you will have to manually step through the OnCurveArray and put all the items into a normal array of OnCurves or a generic List of OnCurves. Just a few lines, so no big worry<br />
<br />
Dim FinalCrvs as new List(OnCurve)<br />
For i=0 to OnCrvArr.Count -1<br />
FinalCrvs.Add(OnCrvArr(i))<br />
Next
From just that error (I haven't taken an actual look yet), it would seam that you can not simply pass an OnCurveArray out of a scripting component. That means that you will have to manually step through the OnCurveArray and put all the items into a normal array of OnCurves or a generic List of OnCurves. Just a few lines, so no big worry<br />
<br />
Dim FinalCrvs as new List(OnCurve)<br />
For i=0 to OnCrvArr.Count -1<br />
FinalCrvs.Add(OnCrvArr(i))<br />
Next