Stairs And Railings Plugin -

N = round(H / r_target) Actual riser h = H / N Total run (horizontal length of one flight):

For Revit: Use Stairs.Create() and Railing.Create() methods; for Rhino: use Brep.CreateFromBox and extrusion along curve. stairs and railings plugin

N_balusters = floor(Total_rail_length / Max_spacing) Adjusted so end gaps ≤ half spacing. public class StairGenerator public List<Flight> CreateStraightStair(Point3d start, double rise, double run, double width) int risers = (int)Math.Round(rise / 7.0); // 7" target double h = rise / risers; double tread = run / (risers - 1); Flight flight = new Flight(); for (int i = 0; i <= risers; i++) Point3d p = new Point3d(start.X + i * tread, start.Y, start.Z + i * h); flight.AddPoint(p); return new List<Flight> flight ; N = round(H / r_target) Actual riser h

public class RailingBuilder public Railing AttachToStair(Stair stair, double height, double extension) List<Curve> railPaths = new List<Curve>(); foreach (var flight in stair.Flights) Curve topRail = flight.GetTopRailCurve(height); railPaths.Add(topRail); Flight flight = new Flight()