Automatic placement of sprinkler family on surface at intersecting grid points

Hi all, recently I have recently looked up the forum and found a code to create grids on a surface. However i do not really understand the full code (new to dynamo) because it is all done inside a code block. Can anybody do me a favour in defragmenting it into nodes?

And i would like to place family (sprinklers) onto the intersecting points on the ceiling face based on some requirements:
maximum distance sprinkler from wall = 1500mm, min = 1000mm.
maximum distance btw each sprinkler = 4200mm, min = 2000mm.

Any help or tips would be appreciated! Cheers!

Credits code: @Vikram_Subbaiah


Appreciate if someone can send some help! Thankssss

Try rewriting the codeblock line by line so you can see what it’s doing. You can also try searching the blue parts for the nodes themselves.