How to create a grid inside of a set of curves?

I am new to grasshopper and want to create a HexGrid in the area inside two curves. I have attempted this but don’t think I am approaching it the right way. I successfully created a grid of hexagons overlayed on top of a set of curves representing eyewear, however, I am not having luck using the InCurve operation and passing in data from the HexGrid. To be clear, I want to create a pattern overlayed on the eyewear - whatever shapes/curves made using the grid should not extend beyond the curve outlines of the eyewear.

image

In the attached gh and rhino files I tried to create some circles using the output of InCurve, hoping that they would reside inside the curve I selected, but as you can see they are not restricted to inside the curve and also seem to be in a different plane than I anticipated (see perspective view screenshot).

I have attached the rhino file which is a template for some eyewear, and also the grasshopper file in which I make the attempt.

Thanks for any input on how to approach this.
hex grid in curve.gh (13.4 KB)
eyewear template.3dm (114.6 KB)

Hi I’m on my phone , but “point in curve” and “dispatch” is a way

1 Like

2 Likes

Thank you - it seems like Dispatch is the correct tool to be using but unfortunately I’m not getting the output I expected. I inserted some Inspectors to see if anything pops out at you in terms of the data. The InCurves function seems to have mostly -1 values and an occasional 0 value. I don’t see any +1 values which could indicate that there are none found (?)

[gh network with inspectors]


[gh network without inspectors]

This is a perspective view - it seems that the circles are not drawn at all. I also zoomed in on the bottom left corner to ensure there wasn’t any “funny business” going on there.


Included are the updated gh and rhino files
hex grid in curve.gh (19.9 KB)
eyewear template.3dm (95.5 KB)

Thanks - I responded below with what I got so far but I still don’t get what I expected.

hex grid in curve.gh (12.5 KB)
it’s the best i can do , before going to sleep , helps you to get the idea.

1 Like

Thanks, this helps a lot! I can still see areas where the circles are not clipped by the curves (see overlap) but I am investigating the Shatter tool for those - maybe that can be used to trim them and is a separate problem.
image