Pattern not staying inside surface

I am trying to create a pattern on a few walls of my part. I created my part in solidworks and brought it into grasshopper.

I used brep and extracted the surfaces that I wanted to create a pattern on.

But when I pattern the surface, the pattern is no not bounded but the edges of my surface

I am not sure what I am doing wrong.

Once I create the pattern I would extrude the pattern and connect it to the rest of my part.

organiser_grasshopper_pattern.gh (90.5 KB)

organiser_grasshopper_pattern Edited v0 Timmed vs Untrimmed.gh (103.2 KB)

Plugin: Clipper 1
That Lunchbox component untrims the trimmed surface and then splits it to the panels.


I have a question on this,

Will it work if I am trying the same solution on a curved surface.

Thanks!