I am trying to create a node that can get the xyz vertices of a shape-edited Floor. It would essentially be the opposite of the Clockwork node RoofOrFloor.SlabShapeByPoints, except it only has a single input (Floor) and a single output (Points).
I have used the script from the Clockwork node as a “template,” but so far my script is not doing anything. This is the main part that I am struggling with:
for item in slabshape:
I am fairly new at this, so I’m not sure if I need to do some additional geometry conversion or if I’m not using the RevitApit correctly.
Any help would be greatly appreciated!
Here is the full script:
from Autodesk.Revit.DB import *
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
slabshape = UnwrapElement(IN)
xyzs = list()
successlist = list()
faillist = list()
for item in slabshape:
OUT = xyzs
Though I would like to understand… what is happening with this line:
for v in vert:
Lauren, I don’t know if you’re using Python for some particular reason.
While I’m sure Dimitar will clarify your Python doubt, just wanted to point out (assuming you aren’t already aware) that the same can be easily done with OOTB nodes
Hi Vikram. I have tried the Element.Geometry node, though for some reason it does not work for me like it does for you. This is why I looked at Python. Are you using a Floor element? That is what I am trying to get the vertices from. Thanks for the suggestion, though.
Good thinking, Vikram. I forgot about the “Topology.Vertices” node.
Lauren, the previous line gives us a list of all of the floor vertices ( https://en.wikipedia.org/wiki/Vertex_(geometry) . The line you highlighted goes through each vertex in the list, extracts its XYZ location and then converts that to a Dynamo point.
Used a floor (Generic 150mm from the default Metric template) with Sub Elements modified (as it seemed like that was your intent ) and one of the more recent Dynamo builds (0.8.3)
I am still using 0.8.2, so maybe that is it.
What are the purpose of these points? How are you using them?
Im very new to Dynamo and i think these points has potential for landscape hardscape floors.
Hi @Dimitar_Venkov do you have clear copy of the code? Im trying to do the same but still no luck. Thank you.
You can now directly use the built-in “Floor.Points” node:
Thank you. I’ll check if it’s available in 1.2