Floor plan from multiple rooms

Hey guys. does anybody know a note similar to FloorPlan.ByRoom, but which uses more than one room to create a single view?

You could create the view and then group the rooms, get a bounding box for all rooms in question, project the bounding box onto the view plane, and use that shape to set your crop box.

Well, the rooms are already grouped, but if it’s possible I’d prefer to work on rooms, since they got a custom parameter “Apartment number”, and I need to make as many separate views as I have apartments. If I used groups I would only get as many views as groups I have. And the groups repeat themselves, whilst apartment numbers don’t. I know the apartments are repeatable, but sometimes there are small differences, so I really need as many views as apartments.

Sorry - I meant to group the rooms in Dynamo via the Lost.GroupByKey node. Rooms would be the list. Apartment numbers the key.

1 Like

Oh, ok. That’s very helpful. Just grouped the apartments that way. Seems to work fine. Big thanks for the help so far!

grouping

Now two things about the boundary boxes. "I’m testing creating an apartment view on a single apartment at the moment. I’ve just understood, that they are not the same as the 3D scope boxes that are used to crop views, are they? I’ve tried the “BoudingBox.ByGeometry” node and noticed it creates orange boxes in the 3D views, that are not cutted by the section box. What are those? I can’t even select them.

How Can I “sum” the geometry of the rooms so that I cna make a single boudnign box out of a couple of rooms, and add an offset from that geometry.

Looks like those boxes are the preview for the Dynamo geometry of the rooms - they aren’t in the model yet. Disable the backround preview for Revit to confirm. Also, making geometry is going to slow you down, so avoid this when possible.

Instead, look to quickly make the bounding box look into the BoundingBox.ByElements node in the clockwork package. It creates a bounding box for each list of elements.

1 Like

Ok, Tried the node you suggested. It gave a ridiculously small bounding box, marked on the floor plan in red. I’m probably making an obvious mistake, but I’m still new to Dynamo.

Also It didn’t apply the bounding box in any way to the view.


That doesn’t look like my version of that node. I’ll try and test this later today.

Ok, My dynamo and packages were outdated. I’ve just updated them, which as I expected annihilated even my simplest scripts. Old nodes just stopped working… But I think I got that somewhat under control. Now the node you mentioned looks different, but I can’t seem to apply it to a view. I mean the view doesn’t crop in any way. I’m probably making a simple mistake again that I just can’t see.

You have only made the bounding box. Now you need to find the plane, intersect the plane with the box, and set the crop region acordingly.

1 Like

Doesn’t the “BoundingBox.PerimeterCurvesOnPlane” feeded by “View.Plane”, and curves sent to “View.SetCropBoxCurves” do just that? I mean they don’t cause I don’t see the effect, but I have no idea why.

And btw. I don’t see the BoudingBox preview in Revit anymore (though the Revit preview is on).

EDIT. OK! had to change the “Curves” input Level i "View.SetCropBoxCurves, and it cropped! Now the strange thing is, that “View.Plane” When given the exact level on which the rooms are show the Z origin point of the plane as 300, when the level is on 447 cm above 0 (Is that how the numbers translate to Dynamo?)

EDIT2 Yes, The Z coordinate in View.Plane when given views seems to be random. Like views from lower levels give a higher Z and I don’t see any conection between the values.

EDIT3 Ok, I’ve changed “View.Plane” with “Level.Plane” and the Z is now ok, but there is a next problem… If the plane is at Z = 447, and the lowest point of the boudingbox is at Z = 447, does that “tickling” count as “Intersect”?

EDIT4 (I’m on fire) Thought I would offset the plane up, but It failed, so I randomly changed “View.SetCropBoxCurve” curves level input up by one and it worked. Got rid of the offset and it still works so… yay me.

Ok, I am glad to report, that I can now can generate floor plans of all my apartments. Gigantic thanks JacobSmall! :slight_smile:

Still this is not the end of what I’m ultimately aiming for. But for now only one question.

I got a list of bounding boxes. Is there any simple way to offset their min and max point by a fixed distance outside?

I am trying more less the same thing except I wanted the cropped view to follow the perimeter of a selection

of rooms. I got the bounding boxes for my individual rooms, made curves out of them and now I would like to combine them in some way for rooms sharing a common parameter - a Comment for instance. This way I would get a bounding curve which I would use to crop view. My little knowledge of Dynamo got me stuck almost at the beginning - what should I do next?

Make a hull out of these.

Or make make cubiods from the bounding boxes, union them and then intersect that with a plane to form a large single surface.

Correct me if I am wrong, but aren’t all bounding boxes min and max point in the same respective corner for all elements (geographically)? So you could also get all min points, find the smallest and all max points, finding the biggest. Then create a new bounding box using those. Should avoid making new geometry.

I do wonder how bounding boxes compare with geometry in terms of processing speed. Any clue @jacob.small?

Wouldn’t follow the countours though. Think of a bigger bounding box around an L shaped Tetris piece as opposed to 4 small bounding boxes at each sub cube.

1 Like

Ah true. But if you are using it for making a single bounding box to encase all of the rooms, the contours wouldn’t be needed. Also that the bounding boxes don’t account for the element’s perimeter/angle. I guess it depends on the desired outcome.

1 Like

ok, so I managed to get the perimeter right and project it onto a plane. Then I am able to crop a selected view. Up until now everything works just fine. Now comes another part - to make it work I would have to copy a floorplan view the number of times equal to the number of appartments on a specified level. Is there an easy way to do it?:slight_smile:

List.Count and List.OfRepeatedItems and (may be misremembering) View.Duplicate

If those don’t work make a new topic please as this is already solved.

Thank you