Reading distances between columns in main directions

Hi everyone, I made this algorithm to read column distances in x and y directions. However it works only if columns are perfectly oriented in x and y direction, but it should work even if they are rotated compared to x & y.

Here you are my original structure in revit and my dynamo definition. So i wuold like to have same results (distances in main directions) if my structure is rotated, like in the image below:

How can I solve this issue? Thanks everyone

Here you are links to revi and dynamo files
https://drive.google.com/file/d/0B6kNnjxnLaSOZ1AwMFJIQ2hZekE/view?usp=sharing
https://drive.google.com/file/d/0B6kNnjxnLaSOZDhURG5WNE9qb2s/view?usp=sharing

Hi, are you comparing the x and y locations of the columns by using the coordinates in Dynamo or revit? You may need to translate them to your project coordinate system if using the later. Not at the PC till tmw, will update with an example then (but feel free to chime in anyone at their desk)

Also away from my desk can you upload a camera export of the Dynamo graph?

Don’t know if i understood what you mean, but i don’t think that the problem is in using revit or dynamo coordinate system, because i need to maintain the building rotation, even if it’s rotated in the project coordinate system. So i need to read distances between columns in the two main directions of the building plan.
I’m sorry if i can’t explainit better.
Anyway here it is my dynamo graph screenshot @jacob.small.

Capture

Thank you both :slight_smile:

Hi,
I was thinking you would need transform the location points into a rotated coordinate system so that the X and Y were able to be read consistently. Is this clearer?

image

Sure it is. Any suggestion on how can i do this with dynamo components? i’m not sure about how can i set the rotation center.
Thanks

Please have a look at this: http://generativecomponents.blogspot.co.uk/2017/07/dynamo-coordinates-system.html

In your case:

But instead of rotating the building I would rotate the Project Base Point.

1 Like