Grasshopper

algorithmic modeling for Rhino

Pick up a particular side of box; need help convert gh to C#

Hi, I am trying to use C# to sort and pick up a side of box.  

It has been done with Grasshopper components(file attached), and I am trying to pack everything and practice coding with C#,(I understand we can use the cluster, just wanna take the chance to learn C#).

Question 1. Is this the same process when you guys are coding? make a logic drawing before coding. 

Question 2. Below is where I stocked. what should I use to filter lines that parallel to X-axis? having a hard time on Rhino Develop Docs and C# Docs.

oh!! and Question 3. Does anyone know how to setup Grasshopper's language? my Rhino is in English, and UI of Grasshopper is in English too, but Error message of C# component is in Chinese...... the translation is very confusing. 

private void RunScript(List<Curve> curves, ref object culled)
{
List<Curve> xParallel = new List<Curve>();
foreach (Curve curve in curves)
if (curve._____________)
xParallel.Add(curve);

culled = xParallel;
}

Thanks for the hints and suggestions~

Shong

Views: 777

Attachments:

Replies to This Discussion

I guess "IsParallelTo" is what I need, will try it and let you know :D

Only vector3d has the method:IsParallelTo

You should convert the edges into vector3d first!

Thank you, Panda Sensai! 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service