Floor with multiple outlines

Dear Colleagues,

Is there a way to create a floor using Dynamo that consists of two outlines (one nested within the other)? When I use the Floor.ByOutlineTypeAndLevel node, the Floor.ByCurveLoops node, or similar nodes and input multiple outlines, it creates two separate floors instead.

I would greatly appreciate any ideas or suggestions.

Thank you!

hi
Look here

cordially
first answer
christian.stan

I would swear i saw a node which can do this.
Not 100% sure though.

You can create Shafts and Openings in the floor but I believe the API is still limited to a singular boundary loop.

1 Like

Not sure it is an API limit as of… 2022. The API call’s input is for a List of CurveLoop elements.

2 Likes

I must be mis-remembering something. Was it just that the sketch mode wasn’t available? There was an issue with sketch-based elements for quite a while. I thought that only got fixed within the last few years. Maybe it’s just that the nodes don’t accept that structure?

EDIT: Maybe my statement wasn’t clear. I meant that the API only accepts a singular external boundary loop. You can provide multiple closed loops for multiple floor plates, but it does not allow for internal openings. Those have to be added as Floor Openings or Shafts separately.

I tried to do something cleaner in python script
with a list of ordered curves

but I still have to learn python, I’m not at the top yet (it must be better written for sure for someone who is proficient)

import sys
import clr

import System
from System.Collections.Generic import List

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager 

clr.AddReference("RevitAPI")
import Autodesk 
from Autodesk.Revit.DB import Curve,CurveLoop,Floor,Transaction,Level,Line,XYZ

doc = DocumentManager.Instance.CurrentDBDocument

ArrayCurves=IN[0]
floortype=UnwrapElement(IN[1])
level=UnwrapElement(IN[2])
structural=IN[3]

def c_loop_create(lst):
    revc=Autodesk.Revit.DB.Curve
    listCL=List[CurveLoop]()
    for i in range(len(lst)):
        a=List[revc]([c.ToRevitType() for c in lst[i]])
        aL=CurveLoop.Create(a)
        listCL.Add(aL)
    return listCL

lslope=Line.CreateBound(XYZ(0,0,0),XYZ(1,0,0))
t=Transaction(doc,"Create Floors")
t.Start()
for i in ArrayCurves:
    floor=Floor.Create(doc,c_loop_create(i),floortype.Id,level.Id,structural,lslope,0)
t.Commit()
OUT = "do"


Sincerely
christian.stan

4 Likes

I stand corrected! Awesome!

Now we just need to update the ootb nodes to handle both cases… :thinking:

3 Likes

thank you in advance, I had seen a post by Mr. Poupin (I couldn’t find it anymore), but as I had taken notes on the CurveLoop lists, it helped me a lot
thanks by the way

Sincerely
christian.stan

Agreed.

FYI @solamour @emrullah.yildiz @achintya_bhat - would be good to get this on the Revit team’s back log. Perhaps a ‘Floor.ByPlannarSurface’ node?

2 Likes

Perfect, that´s exactly what I was looking for!

Thank you very much, great job!

1 Like

3 Likes

yeah and Crumple have one as well in python…if i remember

1 Like

I went ahead and added this here so it is logged.

3 Likes