Grasshopper

algorithmic modeling for Rhino

I have a list of curves that I exploded and now I want to cull all segments under 20m how do I do this? I am having trouble finding anything online that can guide me and am unable to find any commands to cull when I type Rhino. in the c# component.

Views: 567

Replies to This Discussion

Culling is not a Rhino operation. Basically it means removing items from a list in Grasshopper. If your C# component takes in a list of curves, then it would look a bit like this:

void RunScript(List<Curve> curves, ref object culled)

{

  List<Curve> longCurves = new List<Curve>();

  foreach (Curve curve in curves)

    if (curve.GetLength() >= 20)

      longCurves.Add(curve);

  culled = longCurves;

}

Thanks David! Works perfectly!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service