Hi all
I found a weird bug where hatches couldn’t be found in a new empty Rhino document.
But if I open Options/Hatch in Rhino at least once everything starts working.
Here is a script and a test file
var hatch = RhinoDocument.HatchPatterns.FindName(Pattern);
if (hatch != null)
Hatch = Rhino.Geometry.Hatch.Create(Curves, hatch.Index, Rotation, Scale, RhinoDocument.ModelAbsoluteTolerance);
else
Component.AddRuntimeMessage(GH_RuntimeMessageLevel.Error, string.Format("Pattern {0} is not found", Pattern));
hatchProblem.gh (7.9 KB)