How to make this grid form around the circle? – Grasshopper


Hi guys,

Iv been working on this script over the weekend (with plenty of help from you fine folk).
I think its just about there but i have one last thing i would like to change but im not sure how to go about it.

Currently the script creates a grid from a point, finds the centre of the grid and creates a circle from that point. But I would like it to work the other way around so i can adjust the grid cell size and circle radius without having to change the X & Y extent of the grid. As well as, have to adjust the origin point of the grid.

I want to be able to pick a point as the centre of the circle. Define its radius, and then create a grid with the same centre point as the circle. So then it will automatically fit around the circle and grow / shrink to the needed size.

I’m hoping this makes sense the way i have explained it. Below is a small section of the current script where the circle is created from the centre of the grid. This works, but requires more fiddling to get it correct than i would like.

Diagram Script V3.gh (159.9 KB)

If you decide to open the grasshopper file, the internalised points might be a million miles away because they are based on the map of the UK.

Thanks in advance guys.

You mean like this?
Diagram Script V3b.gh (157.8 KB)

I noticed you were working on it separately too all the way to the bottom of the canvas so I applied the same to that – I might have dragged it to the top:
Diagram Script V3c.gh (160.4 KB)



1 Like

I’d do something like this, bounding box is pretty fast, the circle curve is not needed, you can delete it if you want (I think point in curve is slower than Distance from center for the culling pattern)

in your definition it would look like this, with the advantage that Distances are already calculated, so after a cull pattern they can be plugged directly into the Data Binning:

Diagram Script V3 (1)_inno.gh (161.9 KB)

lol true why did I even do that :rofl:



1 Like

on a side note, the colors you are seeing in the bars are not right…

this is what it looks like if the outputs of the list item are not flattened (shouldn’t be flattened in this case)

this might not look like what you desire, but this is what this definition is producing when wired correctly (I think you have posted about this on the other thread, I’m going to read it :smiley: )


[edit] sorry for this, I have continued the conversation about this particular thing in the other Thread to not mix things up: How can i clean up / simplify this grasshopper script? – #4 by inno



Source link

Leave a Comment