# Stair Take-Offs Are Confusing

**URL:** <https://forum.dynamobim.com/t/stair-take-offs-are-confusing/101444>\
**Category:** Revit\
**Tags:** revit, python, geometry, dynamo\
**Created:** [May 30, 2024, 7:02am UTC](https://forum.dynamobim.com/t/stair-take-offs-are-confusing/101444 "2024-05-30T07:02:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![arincakkin](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arincakkin](https://forum.dynamobim.com/u/arincakkin)\
**Post date:** [May 30, 2024, 7:02am UTC](https://forum.dynamobim.com/t/stair-take-offs-are-confusing/101444/1 "2024-05-30T07:02:36Z")

</div>

Hey community;  
I have modified stair-takeoff script from @GavinNicholls 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](https://www.youtube)

 ![s1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/7/575b8711165d4b7885cbc1b7f1707211e5725042.jpeg)  
 ![Stairs Dimensions](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/7/d7b91f8167aad8e89d4a95bd10a8db9224893d47.png)  
.com/watch?v=AoCp3ghlwCc&t=508s  
[Stairs Dimensions.dyn](https://forum.dynamobim.com/uploads/short-url/6pwmYhr3C1EKoVgICGkSnl1nXiq.dyn) (370.6 KB)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 30, 2024, 1:22pm UTC](https://forum.dynamobim.com/t/stair-take-offs-are-confusing/101444/2 "2024-05-30T13:22:43Z")

</div>

Filter first, then after you filter pull the solids and set the values. The circular stair will be skipped entirely.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/5/85d68cb5d022f3e24220652f21d9b5bfa230ef48.jpeg)

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.

---

<div class="post-metadata">

**Author:** ![arincakkin](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arincakkin](https://forum.dynamobim.com/u/arincakkin)\
**Post date:** [May 30, 2024, 2:01pm UTC](https://forum.dynamobim.com/t/stair-take-offs-are-confusing/101444/3 "2024-05-30T14:01:56Z")

</div>

Thank you @jacob.small . This is beyond my knowledge. But i would expect to get spirala as solid by element.solids node at least. @GavinNicholls 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.”

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 30, 2024, 2:15pm UTC](https://forum.dynamobim.com/t/stair-take-offs-are-confusing/101444/4 "2024-05-30T14:15:18Z")

</div>

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 @GavinNicholls here over his youtube is that you can attach files).

---

<div class="post-metadata">

**Author:** ![arincakkin](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arincakkin](https://forum.dynamobim.com/u/arincakkin)\
**Post date:** [May 30, 2024, 2:26pm UTC](https://forum.dynamobim.com/t/stair-take-offs-are-confusing/101444/5 "2024-05-30T14:26:57Z")

</div>

here is a revit file with 4 different stairs and my revised script.  
[Stairs MTO.dyn](https://forum.dynamobim.com/uploads/short-url/su7Jipny0j2AfUSyMJM9cuR8Jpy.dyn) (379.0 KB)

[stairs.TXT](https://forum.dynamobim.com/uploads/short-url/kyicIfSiNHgupBbwpxOS4ObyPZO.TXT) (7.7 MB)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 30, 2024, 2:41pm UTC](https://forum.dynamobim.com/t/stair-take-offs-are-confusing/101444/6 "2024-05-30T14:41:51Z")

</div>

> [@arincakkin](#):
>
> [stairs.TXT](https://forum.dynamobim.com/uploads/short-url/kyicIfSiNHgupBbwpxOS4ObyPZO.TXT) (7.7 MB)

Assuming this is a renamed .RVT?  
Also is your riser “length” the inside or outside?

---

<div class="post-metadata">

**Author:** ![arincakkin](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arincakkin](https://forum.dynamobim.com/u/arincakkin)\
**Post date:** [May 30, 2024, 2:51pm UTC](https://forum.dynamobim.com/t/stair-take-offs-are-confusing/101444/7 "2024-05-30T14:51:02Z")

</div>

Correct it renamed.  
And riser “length” inside.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 30, 2024, 2:59pm UTC](https://forum.dynamobim.com/t/stair-take-offs-are-confusing/101444/8 "2024-05-30T14:59:54Z")

</div>

Sadly the renaming has caused it to corrupt in transit. Can you post again with the original extension?

---

<div class="post-metadata">

**Author:** ![arincakkin](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arincakkin](https://forum.dynamobim.com/u/arincakkin)\
**Post date:** [May 30, 2024, 3:12pm UTC](https://forum.dynamobim.com/t/stair-take-offs-are-confusing/101444/9 "2024-05-30T15:12:18Z")

</div>

Sorry my bad. Actually renamed from \*.rar

---

<div class="post-metadata">

**Author:** ![arincakkin](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arincakkin](https://forum.dynamobim.com/u/arincakkin)\
**Post date:** [May 31, 2024, 11:10am UTC](https://forum.dynamobim.com/t/stair-take-offs-are-confusing/101444/10 "2024-05-31T11:10:02Z")

</div>

Let me know if it’s still corrupted in transit

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 31, 2024, 11:59am UTC](https://forum.dynamobim.com/t/stair-take-offs-are-confusing/101444/11 "2024-05-31T11:59:46Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![arincakkin](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arincakkin](https://forum.dynamobim.com/u/arincakkin)\
**Post date:** [June 3, 2024, 12:34pm UTC](https://forum.dynamobim.com/t/stair-take-offs-are-confusing/101444/12 "2024-06-03T12:34:36Z")

</div>

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.
