Please help me achieve this and learn dynamo.
I am looking into creating a process to computationally set door offset from adjacent walls. I need your help understanding some of the logic. I don’t know how some of the dynamo nodes actually work.
Attached below is my first attempt.
Here is the logic I am following:
Find all the walls (Level filtered later)
Find all the doors and the walls that host them.
Determine the walls that are connected to the wall that is hosting the door.
Determine the distance from those connected walls to the door.
Pick the shortest distance. Do the math calculating the wall widths, and distance to the center of the door.
Move the door toward the wall with the desired offset value.
I am stuck with the node, Geometry.DistanceTo. This is producing exact same values from two doors that are hosted in a single wall. I was hoping the distance would be calculated from the location point of each door which should yield different values.
Here is an update! I was finally able to determine the closest wall to each door. Now the challenge is to move the door closer to that wall at a given distance. I will keep working. If you have suggestions please do so.
Attached is the updated Dynamo file. The @Levels helps structure list a whole lot better.
Made further updates. I am beginning to getting too complex. Figuring out a process to reverse vector direction based on positive or negative value is getting tricky. If someone wants to help out please do so.
Do you really need to reverse the vector if you have a negative distance? Moving an element 3 on the Z axis vector will move it up 3 units. Moving the same element -3 units on the Z axis will move t down 3 units.
Well apparently, I am still searching for an easy way to resolve this. So far here is the strategy. Attached Revit Model and Dynamo file that explains my problem. I am having difficulty with Indices of list within a list for values in a list. Attached image hopefully explains what I am having difficulty with. All my lists indices are coming as empty lists. Please advise!
Finally! The script is in working order. Try it yourself! Below is the dyn file and Revit (2018) sample for you to test on. See if you can use it for spurring other ideas. Thank you!