Floor Finishes with Threshols from Rooms

Hi community.
I have combined and revised two dynamo scripts from @GavinCrump .
1 of them is “floor finishes from rooms*” and 2. is “floor finishes with thresholds from rooms” .
1 - https://www.youtube.com/watch?v=qzkH0kPkevM&t=789s
2 - https://www.youtube.com/watch?v=awRDODFS8wE
The script i have shared here can create floor finishes with threshold according to “floor finish parameter” in the room properties by selecting the levels.
I want to add another function. What i need is creating threshols till the end off the wall according to door open direction, not till the middle of the wall. How can i add this function? Maybe adding “a: treshold to the middle, b: threshold according to door open direction”


Floor Finishes with Door Thresholds from Room(Final SUM).dyn (129.0 KB)

Door threshold example.rvt (7.6 MB)

The way to crack this one is to check for the to room property of the door if you dont flip them. It will likely require some python. Clockwork has the code you need.

Assuming doors always report to their actual to direction you can instead filter doors down to their from rooms only, then push the point i find in my tutorial by the distance to room finish boundary away from the distance towards it, to double that offset to the other room.

Hope that helps open up the logic at least.

1 Like

To/From room won’t work, as doors have variable thickness and swing from different locations relative to the face of the wall. Pulling the door panel geometry and finding the centerline of the bottom face is the best bet.

2 Likes

Sure, if all the door has is a single solid. The location point to me is typically the best you can deoend on in absence of that imho.

2 Likes

How can i the door panel geometry and find the centerline of the bottom face in this script?

Depends on how your doors are built. As a starting outline:

  1. Get the door’s solids and explode to surfaces.
  2. Filter out surfaces which don’t face down.
  3. Filter out surfaces which have an area other than panel length * panel thickness.
  4. Filter out any surfaces above the lowest expected height.
  5. Get the perimeter curves of the surfaces.
  6. Filter out any curves which are not equal to the panel thickness - you should have two lines per panel now in most cases.
  7. Draw a line between the point at parameter 0.5.
  8. Incorporate the lines into your floor boundary.

Edit: Personally I would add a line to the panel families on a separate subcategory as that would make this information instantly available, and allow hosting actual threshold families someday if desired.

1 Like

some thing like this?
How can i filter out surfaces in reference to its orientation, area, height etc

Surface.NormalAtParameter will clue you into the facing orientation.

Geometry.BoundingBox > BoundingBox.MinPoint and compare that to the min point of the door element’s bounding box would get you started for elevation filter.

Area can be pulled by Surface.Area node, and compare that to the results of the panel math.

I extracted Boundingbox.minpoints from doors. But could find how to connect the other nodes.


Floor Finishes with Door Thresholds from Room(door explode).dyn (144.2 KB)

I think i’m not close to solution yet. Could you help me to complete this script? @jacob.small , @GavinCrump

As I said getting door geometry is not a stable approach imho, it’s not how I’d go about this. My script shows my simplified approach. If the door line needs to be a different setout to the centre of door I’d look into either getting it to sit one side or the other (use door to/from directions as per my initial tips) versus half/half, or go half/half but then store a table of offsets based on door families to be post applied, minus the doors host wall thickness.

Beyond that there will be fringe cases such as a door in one wall joined to a second, at which point that last X% or so becomes the job for a revit tech to make slight adjustments to.

Unfortunately personally I don’t have the free time to write this and where I work people get by with the halfway across wall approach.

2 Likes
  1. Get a location line of the wall, get it’s total witdh.
  2. Build wall lines, using location line and offset (wall’s width)
  3. Get facing vector of the door.
  4. Project points to wall line according to facing vector of the door.
  5. Build lines from points.

In short, you just move thershold line to opposite wall’s line, using door’s facing vector.

Thank you Gavin

1 Like

Nice try for me ha? Am i on the correct way?


and it’s better to offset with Curve.Offset+ from Springs Package with specified point.

1 Like

Now i need to combine the doors threshold with these curves. @Vladimir , @jacob.small
Floor Finishes with Door Thresholds from Room(opening way).dyn (142.7 KB)

Than do it:

İ built wall lines with offsets according to their width (But i’m not sure) And buid lines from threshold vectors.I stuced at this point again. Now i need to move threshold lines to wall lines and the line must be according to the direction of the door opening.


Floor Finishes with Door Thresholds from Room(opening way).dyn (170.9 KB)

Use geometry.translate, maybe with vector.

I’m trying to implement your suggestion for hours but its beyond my knowledge . Springs.ClosedCurve.Offset+ node provides external and internal offsets of the walls. I couldnt match which offset is
on the door opening side by geometry.translate node . I can’t find the correct nodes to connect with correct levels and lacing.