Specific Room Color 3d

I have been trying to create room color in 3d view based on the Department, but I got a weird shaped room as the result. Can someone tell me my mistake?


From the top of my head I think that there’s some issue with the coordinates.
Please try converting dynamo coordinates to revit.

Actually, the rooms created are at the right place, it is just the shape does not match the actual room shape, seems like it only generates the shape of the smallest room.