How can I create planar bounding boxes?

Hello, I am a new grasshopper user and I am trying to rebuild a mesh object I downloaded online. There is a solid wall with rectangular holes projected through it, and these holes taper from one end to another. I looked at other forums to help me get started, and created a simple script to generate a bounding box around planar curves, locking the bottom of this plane to be parallel to the XY Plane.

This script works when I connect a single input into it, but creates artifacts when I select multiple curves. I think this has to do with the BBox command using multiple planes at once, but I do not know how to split up the inputs. Any help is appreciated, thank you!


PICTURED ABOVE: My script is working exactly the way I want it to. I have only selected a single Curve input. The bottom of the bounding box snaps to be parallel to the XY plane


PICTURED ABOVE: I have selected “Set multiple geometries,” and now my bounding boxes are no longer planar surfaces, but multiple intersecting boxes (per curve).
How can I resolve this issue?

Rhino Help File.3dm (281.1 KB)
Make planar surfaces.gh (5.7 KB)

Grafting input will do the job:

Just got a chance to plug this in. Thanks for your help!