Closed Curve as boundary for random points on a plane

Nothing needs to be trimmed. The spheres are subtracted from the extruded solid, leaving only the divots. It doesn’t matter if they cross the edge or not - unless you want to handle edges differently. Most of my code comes from @anikolo’s earlier post, so start with that (his first reply).

@RIL, everyone has an opinion… Commercial self promotion on forums is widely considered to be spam. Not posting a GH file or geometry with the initial question on a thread is widely considered to be rude, with rare exceptions. It ignores the forum standard practice as recommended in How to ask effective questions and makes it more difficult to offer help, practically and “socially”.