Hi All,
I am wanting to schedule the orientation of windows within an architectural project. I found two dynamo scripts which allow for this, but each with limitations specific to my project.
The first allows for only four orientations. The second should allow for sub-orientations too (North-East, etc.), however I get quite a few errors/warnings within the script, which prevents any orientation scheduling.
I have tried to combine elements of both, but this results in only one orientation being scheduled, instead of four orientations…
See below a screenshot of the script (I am very new to using Dynamo so please forgive any stupid mistakes). Any help and suggestion would be greatly appreciated.
A better approach than the one they used is to divide the angle by 45, round it then use that to index a list of orientations.
Make a list of strings/names, then index that with the outcome. If you need an example let me know, can whip one up tonight. The way the coder here went about it is quite confusing for a beginner to grasp.
Its a more abstract but computationally efficient way of approaching the problem.
Another approach is to use DotProduct with normalized East and North vectors.
Explanation
1 Like
You might need to adjust the list items if north is not up, but this hopefully shows the general concept.
Adjusting for project north can be done by getting true north angle as a parameter value which is a bit harder, and you can then shift the directional list by that divided by 45.
Window orientation.dyn (22.4 KB)
Window orientation inc north.dyn (34.1 KB)
1 Like
Thank you ever so much Gavin! Both for your speedy responses and the attachments.
That has worked like a charm and I have learned a lot from your Dynamo files
1 Like