Stair Coverings

Hi everyone,

I know it’s not practice asking for help without even starting to solve the problem, but I really need a boost for this.
I have a repeating modelling problem on every single project, so i’m getting really frustrated.
My goal is to create a script that automatically creates given wall/floor element covering each thread/riser on given stairs, so i don’t have to do it manually, but i don’t know where to start.
I would appreciate any comment or direction on where to start with creating this kind of script.
Screenshot attached
Thanks in advance.

Here is a loose map:

  1. Element.Geometry > Geometry.Explode
  2. from 1 - Surface.PerimeterCurves > List.Count and filter out surfaces with values other than four.
  3. from 2 - Surface.NormalAtParameter and filter group by the Z value of your normals.
  4. from 3 - Pull the Z==1 values - these are the walking surfaces. Place your family-whatnot based on the two long edges or use an adaptive component in all 4 parts.
  5. from 3 - Pull the Z almost equal to 0 values. These are typically risers or leading/ trailing edges at landings. Filter by area and/or least distance to every other surface (risers will have at least one value equal to the tread depth, wile the landing edges will have 0 or the landing depth. Place family instances as per #4.