C#_bake Hatch pattern

Hi,
I want to bake Hatch pattern from c# script with button/toggle.
How can i do it?
below is the code!

List < Hatch > hts = new List<Hatch>();
foreach(Curve c in x)
{
  Hatch[] ht = Hatch.Create(c, 3, Math.PI / 3, 0.01, 0.01);

  hts.AddRange(ht);

}
A = hts;

011

You can adapt these for GH component use.
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_DocObjects_Tables_ObjectTable_AddHatch.htm

2 Likes

Thanks! its done.

Can you share your script or GH file? I would like to do the same thing. Preferably in Python, if anyone knows how.