public static Solid CreateSolidFromBoundingBox(Stairs stair, View view3D) {
BoundingBoxXYZ boundingBox = stair.get_BoundingBox(view3D);
XYZ point0 = new XYZ(boundingBox.Min.X, boundingBox.Min.Y, boundingBox.Min.Z);
XYZ point1 = new XYZ(boundingBox.Max.X, boundingBox.Min.Y, boundingBox.Min.Z);
XYZ point2 = new XYZ(boundingBox.Max.X, boundingBox.Max.Y, boundingBox.Min.Z);
XYZ point3 = new XYZ(boundingBox.Min.X, boundingBox.Max.Y, boundingBox.Min.Z);
Line edge0 = Line.CreateBound(point0, point1);
Line edge1 = Line.CreateBound(point1, point2);
Line edge2 = Line.CreateBound(point2, point3);
Line edge3 = Line.CreateBound(point3, point0);
List<Curve> edges = new List<Curve>();
edges.Add(edge0);
edges.Add(edge1);
edges.Add(edge2);
edges.Add(edge3);
List<CurveLoop> loopList = new List<CurveLoop>();
loopList.Add(CurveLoop.Create(edges));
Solid temporaryExtrusion = GeometryCreationUtilities.CreateExtrusionGeometry(loopList, XYZ.BasisZ, boundingBox.Max.Z - boundingBox.Min.Z);
Solid solid = SolidUtils.CreateTransformed(temporaryExtrusion, boundingBox.Transform);
return solid;
}