Hey community;
I have modified stair-takeoff script from @GavinCrump and added “Length” parameter for total actual riser length calculation. It works perfectly except spiral stairs. I have tried to filter the nulls from element.solids node output. Because element.solids can’t identifiy spiral stairs as solid. Length can be calculated for spirals.
The problem is after filtering, spiral stair takeoff values been assigned to ortogonal one and ortogonal one’s takeoff values assigned to spiral ones. How can i solve this confusion?
Related video: https://www.youtube
.com/watch?v=AoCp3ghlwCc&t=508s
Stairs Dimensions.dyn (370.6 KB)
Filter first, then after you filter pull the solids and set the values. The circular stair will be skipped entirely.
There are likely a few ways to do the the circular stair. If you don’t want to go into the stair API I recommend using the ‘out’ list to get just the faces from the stair, filter out faces which don’t point up by checking the angle of the normal of the surface geometry and the global Z axis and removing anything which is greater than 0.1 degrees. Next you can pull the edges from the face, convert to lines, and remove anything which isn’t a curve. Finally you can sort the curves by their length to get the ‘inside’ or ‘outside’ tread edges as desired; sum up the lengths for either group and you should be good to go.
More complex geometries (which you might have but I’m not seeing) might not work for this method, but a basic monolithic stair should be fine.
1 Like
Thank you @jacob.small . This is beyond my knowledge. But i would expect to get spirala as solid by element.solids node at least. @GavinCrump has replied my comment of his youtube video as “Hrm strange, sounds like a limitation. The Revit API element geometry methods may be an alternative to explore.”
My instinct is that it’s somehow related to the creation method; try converting to a sketch based stair if it isn’t already and see if that fixes it. If not post a sample RVT and we can have a look (an advantage to contacting @GavinCrump here over his youtube is that you can attach files).
1 Like
here is a revit file with 4 different stairs and my revised script.
Stairs MTO.dyn (379.0 KB)
stairs.TXT (7.7 MB)
Assuming this is a renamed .RVT?
Also is your riser “length” the inside or outside?
Correct it renamed.
And riser “length” inside.
Sadly the renaming has caused it to corrupt in transit. Can you post again with the original extension?
1 Like
Sorry my bad. Actually renamed from *.rar
1 Like
Let me know if it’s still corrupted in transit
I got it to open, but there isn’t an ‘easy’ way to access the data unfortunately. Converting to a sketch based stair makes the geometry convert though (which is both helpful and infuriating).
This script is also confusing when i ass tread and risers to stairs.When i connect element.solids node output to Solid.ByUnion node input there’s a warning like this:
Solid.ByUnion operation failed. Unable to union two solids: OSCULATING_CURVES – curves osculate at vertex - cannot evaluate order.