Curves intersections defining regions ("hatches")

Hi,
I’ve been working on a plugin to make staircases in 3d, inspired by that one plugin on SketchUp called Stair Maker. However, the importante part of making the 3d model is done, and more or less works, but I’m trying to improve it.
The basic input is a 2d draw of the stair in plan, so every step is a region (not a surface) defined by 4 boundary curves, now I’m trying to figure out how to make it so the input required is no longer a collection of definded steps, but just the curves and the programm figure out the region from the intersectiones.
It reminds me of the way rhino detects the space between a lot of curves intersecting each others when you make a hatch by regions.
I have been trying some codes but none of them is consistent enought to send, so I’m uploading a scheme to explain the way I think it could be. Anyways, I’m really open to ideas.

Among the most important things about stairs is the vertical distance in Z (height) between floors or landings, as that determines number of steps.

Many threads about steps using GH on this forum.

Thank you for your comment but I have no problem in that aspect. Im trying to figure out a way to “all regions hatches” automathically or something that just results in many surfaces from a bunch of curves that intersect each other

Try with: Curve.CreateBooleanRegions

https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.curve/createbooleanregions?version=8.x

@Vicente
Maybe?
Stairs.gh (13.3 KB)