Make custom Hatch .Pat file rhino port

Hi All,

Having seen @eirannejad’s extremely helpful custom hatch make extension with Pyrevit, I’ve set about porting this to rhino which inexplicably doesn’t have such a handy function.

I’m struggling not with the usability of the script (plan to use grasshopper/ghpython), but the vector maths to create the .Pat file. My trig logic only works in some cases of line. Should be trivial but this has me humbled!

If anyone could point me towards how this is calculated in the Pyrevit script - deltaX and DeltaY for all classes (acute, obtuse etc.) of line angle I’d be very grateful and share it back with community when I’ve made it.

Attached an image of what I’m getting, it should look like the bottom left tile throughout but this only periodically repeats owing to the deltaX and DeltaY calc (not being the lowest denominator).

Any help much appreciated, it has been a weeks worth of head banging!

Best

R

1 Like

Hi @Ralpgp, sorry for the late reply and welcome to the forum!

I know nothing about the pattern creator, but I can point you to the pyRevit code that handles the pattern creation and export.
There is a lot going on there, I hope you can get out something actionable!