N = round(H / r_target) Actual riser h = H / N Total run (horizontal length of one flight):
| Parameter | IBC 2021 | ADA | Plugin Check | |-----------|----------|-----|---------------| | Riser height | 4″–7″ | ≤7″ | Warning if outside | | Tread depth | ≥11″ | ≥11″ | Error if <11″ | | Handrail height | 34″–38″ | 34″–38″ | Auto-set, user override | | Baluster spacing | ≤4″ | N/A | Auto-calc spacing | | Landing depth | ≥ stair width | ≥60″ | Auto-enforce | | Nosing projection | ¾″–1¼″ | Optional | Configurable | stairs and railings plugin
Curve continuousRail = Curve.Join(railPaths); continuousRail = ExtendEnds(continuousRail, extension); return new Railing(continuousRail, height, balusterSpacing: 4.0); N = round(H / r_target) Actual riser h
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 ; continuousRail = ExtendEnds(continuousRail
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);
| Operation | Manual (minutes) | Plugin (seconds) | Accuracy gain | |-----------|----------------|-----------------|----------------| | Initial modeling | 25 | 8 | 99.8% fewer manual errors | | Change floor height (+6″) | 15 (redo) | 2 (param update) | 100% consistency | | Railing re-alignment | 10 | 1 | Auto-continuous | | Code check | 5 (manual) | 0.2 (real-time) | 100% coverage |
For Revit: Use Stairs.Create() and Railing.Create() methods; for Rhino: use Brep.CreateFromBox and extrusion along curve.