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 = H / N Total run (horizontal length of one flight): stairs and railings plugin
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()
| 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 | for (int i = 0
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 = H / N Total run (horizontal length of one flight):
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);
| 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 |