36h rim onto 40h hub is one of the worst ones you can do if you go for full spoke crossings on both flanges. I think you may need nine different lengths of spoke on each flange (which may boil down to about five different lengths if you are prepared to put up with an error of ~1mm or so).

It is much, much easier to build a 32h rim onto a 40h hub; you only need two different spoke lengths to do it.

I have documented my approach to building odd combinations here

https://forum.cyclinguk.org/viewtopic.php?f=5&t=118718It really is not difficult to work out the spoke lengths provided

a) you have a spoke calculator that supports fractional crossing values and

b) you have a good plan and

c) you know what fractional crossing values are needed.

although I've built several, I have not listed the fractional spoke crossing values for 36rim/40hub in the link above.

If I get a few spare minutes I'll do that.

cheers