© Doors.ToFrom (crumple) does not find all doors

hello Pros,

i am trying to find the door in between two rooms.

for some reason, the node “© Doors.ToFrom” does not seem to collect all doors in a room.

any fix for that?
Doors Distribution.dyn (17.8 KB)


@sahawneh_majdi ,

is the family set up well ? - room calculation point

1 Like

hello @Draxl_Andreas,

the arch. model (where is the doors) is a linked model and i don’t haave control over it.

i will check and revert back to you.

1 Like

hello @Draxl_Andreas ,

i’ve tried to change as you recommended but it didn’t solve the problem.

the other doors type is not check at “Room Calculation Point” and yet the node can still find them.

Hi you could try BG open your linked doors and set calculation point…or as i normal do as i dont wanna touch others model or tell the architect they miss calculation point…get link doors solid and a centroid and then translate that point the normal door direction and use rooms/space at point

1 Like

PS if the calculation point dont hit room its probably becourse that point need to be moved so it hit…sparrow package have some nodes for control that

1 Like

hello @sovitek ,

thanks for your advice.

i’m trying to find the doors between multiple rooms, that are not hand picked but rather filtered, means that i’m filtering the corridors and stairs in a certain level and getting the doors in between them wherever they are as location (point) as reference for next step.

so the doors are really unknown to me.

i believe the problem with wall category as it is curtain wall category not a wall category.

1 Like

Generally due to revit limitations I believe doors wont respond to linked rooms and vice versa. I could be mistaken though, but my node should just return the builtin to/from room parameters by provided phase.

1 Like

thanks @GavinCrump for clearing things up :slight_smile:

superb package by the way :slight_smile:

1 Like

@sahawneh_majdi

a work around can be using

working with the geometry of the elements.

2 Likes

thanks @Draxl_Andreas

i will try it :slight_smile:

I can confirm this is the way if you want it to work for links.

Some things to account for include accounting for link transforms, the order in which you try for rooms at points (e.g. you probably try live model first, then each link) and finally cycling through all the phases using the getroomatpoint method which incorporates the phase as well.

Some snippets from my toolkit in pyRevit which might help:

Collate the current and link instance properties, including inverted transforms (to move points to the links):

# Collect all links and their information
docs_all, doc_titles, doc_xforms, doc_phaseSets = [REVIT_DOC], [REVIT_DOC.Title], [None], [REVIT_DOC.Phases]
# Get all link instances
linkInstances_all = DB.FilteredElementCollector(REVIT_DOC).OfClass(DB.RevitLinkInstance).ToElements()
# Get one of each linked instance
for l in linkInstances_all:
	try:
		linkDoc = l.GetLinkDocument()
		linkTit = linkDoc.Title
		if linkTit not in doc_titles:
			doc_titles.append(linkTit)
			docs_all.append(linkDoc)
			doc_xforms.append(l.GetTotalTransform().Inverse)
			doc_phaseSets.append(linkDoc.Phases)
	except:
		pass

Get the door point in front:

def doorUtils_getForwardPoint(door, distance = 1):
	try:
		loc = door.Location.Point
		rot = door.FacingOrientation
		pt  = loc - rot * distance
		return pt
	except:
		return None

Given a point, list of documents, transforms (inverse of the link transform) and their phase as sets, try to get a room at point:

# Function to try to get room
def doorUtils_roomByPoint(pt, docs, xforms, phaseSets):
	rm = None
	for d,x,ps in zip(docs, xforms, phaseSets):
		if x is not None:
			pt = x.OfPoint(pt)
		for p in ps:
			rm = d.GetRoomAtPoint(pt, p)
			if rm is not None:
				break
		if rm is not None:
			break
	return rm
2 Likes