Finding centre cell of grid + Extruding mesh in grasshopper

Hi guys,

So im trying to make a sort of population density model thing at the moment and have ran into 2 issues.

First off is I cant seem to find the correct centre cell of the grid. I have been trying to do it by: list each cell, List Length, Divide list length by 2, and then retrieve that item from the list.
But it seems to pick the one above the item I am after (see below)

Although as I’m typing this, i have just realised that computers start their list at 0 instead of 1 so maybe that is what’s causing my issue here? if I’m right, would adding 1 to the number item im after correct this issue?

So My second issue is that i would like to extrude each cell that is within the defined boundary (the circle). So i constructed a mesh with the points but am unable to extrude the mesh. so where am i going wrong here?

I would like something that looks similar to this for my end result just with some other variables i would like control over. Obviously I’m not that far down the line of this script yet. So if I’m going about this all wrong, then please feel free to push me in the right direction.

Here is the script currently
Diagram Script V1.gh (16.4 KB)

Thanks in advance for any help guys!

Hi,

  1. Subtract 1, not add
  2. Cell extrusion works for me

Diagram Script V1.gh (16.3 KB)

1 Like

Diagram Script V1 Edited v0 Binning.gh (41.8 KB)

1 Like

Hey,

cheers for the reply. And yeah subtract one was the answer (glad to see I’m beginning to get the hang of the way grasshopper thinks now (Even if my answer was wrong, i had the right logic haha))

But yeah the cell extrusion works for me as well, but the issue is that i want it to extrude only the cells within the circle. To do this i made a mesh from the points within the circle, but grasshopper isn’t a fan of my way to extrude the mesh

Thanks for the reply.

This seems about what I’m after i think.

I don’t suppose that i could be annoying though please. If you have the time, could you give me a short breakdown on this section you have added?

Just so I can have a good understanding of it and am able to continue working on the next part of the script please?

Ahh i see now!
Just trying to create the mesh in the first place was the issue!

I hadn’t realised that the list output from cull pattern was a list of each cell and not the points that made up each cell.

Thanks for your help!

1 Like