Flip doors that clash with non host walls

Hello dynamiters,

I am placing doors with Dynamo-python but it is difficult to find the way to place them properly.
I am using DB.ElementTransformUtils.MirrorElement to mirror the doors, but sometimes I need to flip them twice. I need to check if there is a collision with other no host walls to determine how many times I need to flip the door and in which axis. To extract the geometry from the door I am using
options = DB.Options()
geo = door.GetOriginalGeometry(options)

Any hints on that? it is not working out.

thanks in advance

You could use the node Geometry.Intersect with Cross Lacing and then CountTrue to see if your doors intersect with a host wall.