How to trim off boundary curves of a Hexagonal Pattern

Trim Boundary curves.gh (24.4 KB)
Dear All

I am trying to trim off the portion of the Hexagons which is outside the plane as seen in the attached GH file (Sketch of desired trimming is also enclosed in the canvas).
I am using CRv/Crv and then Shatter but doesn’t seem to yield any success.

Can anyone help me on this quickly as I need to finish this by tonight :dizzy_face:

Thank you so much !
Yu

You didn’t internalize your surface so I used my own.
Trim (Trim with Region) is what you want for this.


Trim Boundary curves_2020Aug13a.gh (22.4 KB)

Dear Joseph

That’s exactly what I have to make thanks a lot!

regards
Yu

I prefer the HexGrid pattern:


Trim Boundary curves_2020Aug13b.gh (19.0 KB)

Here is a method that centers the HexGrid pattern on the surface:


Trim Boundary curves_2020Aug13c.gh (10.5 KB)

How would you close all the curves along the edges? Close Curve works for the perimeters but doesn’t leave the corners with points, just chamfers? I could combine with the trim surface, but my intention is to have individual cells to extrude.

use this Instead.

That worked great, except one tiny issue:

trimmed_honeycomb.gh (18.5 KB)

Use this.
Does anyone know why Region Intersection in this case leaves one gap?

Thanks for another option! Curious how you got your results as mine don’t replicate the same. When I do the Surface Split it doubles the number of outputs, creating one surface for the hex and one of the full surface with the hex cut out. Not a big deal as I hoped to just Dispatch out the list as the hexes are odd and the surface ones are even. Except that along the edges, it is the opposite. I can’t Flatten the Curves input on the Surface Split if that makes a difference. I always get an error no matter what I feed as the Surface (Rect, Curve, Surface, Brep).

What would be the easiest way to make a list of geometries to extrude whether another method or the logic flow to take even on the edges and odds everywhere else?

trimmed_honeycomb.gh (25.0 KB)


Flattern your Cutters

As I mentioned above, I tried to Flatten but it always returns the error “Splitting returned no results”.

That is odd. It is OK at my end. What is your Rhino tolerance? Mine is 0.001.

Mine is the same

try this instead :


trimmed_honeycomb_001.gh (20.6 KB)

i don’t believe bug in this case, it is more like an old version need to be updated


Trim Boundary curves_2023Nov13a.gh (18.7 KB)

Worked nicely. Would be interested to know what is in that locked cluster to help me in the future.

It’s just programming,may become part of a plugin.