algorithmic modeling for Rhino
Hi there,
I'm stuck on a C# issue:
1. I've got a bunch of curves stored in a list which I want to join with the Curve.JoinCurves() method
2. Now, the following works: A = Curve.JoinCurves(crvBits);
3. But I don't get to store the newly created polyline in an array of polylines
Any help? Cheers.
r
Tags:
To be a little bit more specific, the following code:
private void RunScript(List<Curve> x, ref object A)
{
Polyline poly = new Polyline();
poly = Curve.JoinCurves(x);
A = poly;
}
returns the cast error: Cannot implicitly convert type 'Rhino.Geometry.Curve[]' to 'Rhino.Geometry.Polyline'
How do I workaround this?
Hi Riccardo,
JoinCurves returns a curve array:
Curve[] polys = Curve.JoinCurves(x);
- Giulio
___________________
giulio@mcneel.com
McNeel Europe, Barcelona
Thanks Giulio, this makes definitely much more sense. And it does make even more sense to use data trees with those bits of curves, something I hadn't absolutely thought about.
Cheers!
r
Hi Giulio !
I have another question !
Why the return type should be " a curve array " ?
After joining curves at the rhino, only "one curve" is created.
please let me know ~ Thanks in advance :D
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