Voronoi pattern and matching it to a surface

Hi, if you look at the photo you will see the desired shape I want the voronoi to appear on and on the left the vornoi outcome from my script. The voronoi script is going onto the surface but not being cut off by my polygon instead just a square form. Was wondering if there was anyway I could map the pattern perfectly onto my desired surface.
Cheers
pavilion 002 voronoi and polygon.gh (93.5 KB)

@chugreinhardt finally i come to an end for this issue.Before I selecting this gh file to solve I thought it would be easy. But when I started trying it. Took me long hours (because I’m not a pro in grasshopper). After many tries I find that your surface have problem in it. Now all done.
Here is the script.

pavilion 002 voronoi and polygon re bvr.gh (17.3 KB)

You are a life saver, thanks a lot for your help

2d_pattern24_voronoi.3dm (100.7 KB) 2d_pattern24_voronoi_surface_trim.gh (15.9 KB) Hi,
I am trying to morph 2d voronoi pattern from a plane surface to a curved surface
using the point attractor.
This is the error I am getting. Can anyone please help me in solving it.
Thank you for your time in advance.
Arya

I’ll give a try