Spiral Stair Geometry in Dynamo


How to create spiral stair geometry from Revit element in dynamo?
that above picture Dynamo can’t crate that.
Thank a lot .

Hello,

You mean that?
(by the way close the workmode! than Dynamo will run perfectly)

Yes but stair created by cast in place type can’t get geometry. T T
my purpose is get volume of concrete from that.

True, it is even not in schedules. We model our stairs as GenericModel because of 3D/2D representation. It is in a simple way better.
For taging we use 1mm stair, that is on Auxilery Workset.

It’s good choice. :smiley: :smiley:
Thank for your recommend.

Hi @peerawit.ru ,

You can acquire the Solids of the GeometryInstances that makes up the stair, and from there get the Volume. It does require API calls through Python though.

Here’s an example:

Python script:

import clr

#Import the Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

def convertfrominternal(val):
	return UnitUtils.ConvertFromInternalUnits(val, DisplayUnitType.DUT_CUBIC_METERS)

stair = UnwrapElement(IN[0])

opts = Options()
opts.ComputeReferences = True

geom = stair.get_Geometry(opts)

output = []

for i in geom:
	solids_lst = i.GetInstanceGeometry()
	temp = []
	for j in solids_lst:
		temp.append(j.Volume)
	output.append(sum(temp))

OUT = convertfrominternal(sum(output))

Mind that I’m converting this to cubic meters, as this OOTB, comes out in imperial units if not converted.

3 Likes

Can i convert Revit.DB.GeometryInstance to Solid in Dynamo?
I want to find separate face area from solid for defindes something.
thank a lot.

1 Like

Something like this maybe?

Python Script:

import clr

clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

#Import the Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *

#Import ToDSType(bool) extensions method
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)

def convertfrominternal(val):
	return UnitUtils.ConvertFromInternalUnits(val, DisplayUnitType.DUT_CUBIC_METERS)

stair = UnwrapElement(IN[0])

opts = Options()
opts.ComputeReferences = True

geom = stair.get_Geometry(opts)

output = []

for i in geom:
	#output.append(i.GetInstanceGeometry())
	solids_lst = i.GetInstanceGeometry()
	temp = []
	for j in solids_lst:
		faces = j.Faces
		for f in faces:
			if f.Area > 0:
				edgeLoops = f.EdgeLoops
				temp2 = []
				for edges in edgeLoops:
					for e in edges:
						temp2.append(e.AsCurve().ToProtoType())
					temp.append(temp2)
		output.append(temp)


OUT = output

Edit: We can’t turn the Revit API solids into Dynamo solids using the ProtoType() method. It will fail the same way as the Element.Geometry node. I don’t have a better answer, then to recreate the geometry from Edges extracted from the Revit API Solids. Maybe someone with more knowledge about this could supply a better answer :slight_smile:

5 Likes

That all i want.
finally i can create solid from spiral stair
Thank a lot .

2 Likes

Lovely :slight_smile:

No probs :ok_hand: