This widget accepts one step ('LandingStep') of arbitrary geometry as the basis for the whole ladder, with 'X' and 'Z' offsets for the pivot point(s). The step may be drawn manually in a Rhino CAD file or can be the result of other GH scripts. The widget has sliders for total number of steps and the spacing between them, a distance measured when the ladder is horizontal (0 degrees) or vertical (90 degrees). It rotates the entire ladder to the specified angle and rotates each step separately in the opposite direction.
The 'LandingStep' is fixed, not part of the ladder. It can be hidden after the ladder is "baked", replaced by a deck or the leading edge of the forward crossbeam.
'Pivot_X' and 'Pivot_Z' offsets define the relative position of each step's pivot point to its "CG" (actually, its bounding box center). Not only does the whole ladder rotate around the axis between the top pair, but each step is rotated separately, in the opposite direction, around a point that is at the same relative offset.
This list of points is output as 'pivot_P' and the first and last are used to draw lines, the basis for rails (user defined) that connect the step pivot points.