Hello! I’m using a “LB Direct Sun Hours” to form a grid that displays direct sun hour values over the floor of a basic context model (see screenshots). I’m trying to create a second part of the script (grouped in blue) that culls any of the squares that are less than a given value on a slider. For it to work I think when I use “unjoint mesh” I should be getting a number of values in the output that are equal to the number of squares determined with the slider at the beginning, but the output only comes as two values. I’ve been trying all different types of flattening and grafting and deconstructing but can’t figure out how to fix this any help would be greatly appreciated! I’m pretty new to GH so apologies if this is really obvious and I’ve totally missed something. Thank you!
Contextual Shading Help file.gh (62.6 KB)

Could you post only your GH with the blue part and the output Mesh internalized ?
Hi, thank you for looking at it! Here it is:
Contextual Shading Help file 2.gh (14.4 KB)
Hi,
Assuming you’re supposed to get identical amounts of faces and numbers (121), then removing the Disjoint Mesh component helped do the trick.
However I’m not sure your output mesh is exactly the way you’d like it to be, there are a lot of overlapping faces, is this normal ? I would expect it to have 36 faces in your example.
Contextual Shading Help file 2.gh (17.3 KB)
Hi, thank you this works!
I am unsure why I have 121 faces, I was also expecting 36 as I have defined 6 subdivisions on each side in the internalised data and I can’t figure out why the output is different. In the first file, if I didn’t flatten the geometry then I would get 36 outputs, but they would not be connected into one grid (it would be 36 different evaluations of daylight hours rather than one over a grid of faces that could be culled). I think this is the crux of why my workflow wasn’t working as I’ve managed this with 3D object before but it doesn’t seem to be working with 2D faces.
Working blind as your Python code does not work on my laptop, but maybe feed a mesh instead of 36 Brep squares to obtain what you need ?
Hi, I have input this and it doesn’t seem to be calculating the direct sun hours anymore (see input below), however I can work with the workaround above so no worries if my script is unfixable, thank you!
I know that the value being shown for the “BRep Mesh” component is what should be coming out of “disjoint mesh” after the LB direct sun hours component.