Find left / right beam for a column

Find left / right beam for a column

Anonymous
Not applicable
690 Views
2 Replies
Message 1 of 3

Find left / right beam for a column

Anonymous
Not applicable

Hello!

 

I want for a column to find the left / right  attached beam. (Left attached beam means the beam that enters perpendicular in the face of the column that has the normal on -X, and the right attached beam means the beam that enters perpendicular in the face of the column that has the normal on +X. Now, the problem is that the column can be rotated at any angle, as in column.png, and, in that case, searching beams that are perpendicular on X axis would not be correct. My question is how could I identify the left / right beam in the case of rotated column, if any of them exists?

 

P.S: In the case presented in Column.png, none of the two columns should have left / right beam. A correct left / right beam for the rotated column is indicated by the green lines.

 

Thank you!

0 Likes
Accepted solutions (1)
691 Views
2 Replies
Replies (2)
Message 2 of 3

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear CalinSerban,

 

Instead of checking for complete perpendicularity, simply compute the angle between the face and the X axis.

 

First select all vertical faces of the column and ensure that there are indeed four of them.

 

If not, you will have to add more complete and complicated checks to eliminate the ones you are not interested in.

 

For instance, you might not be interested in very small faces, or only in the four largest ones, or something.

 

For each of those four faces, check whether the absolute value of the angle between the face normal and the X axis is below (or above) a certain threshold.

 

Depending on your threshold, you will require the faces to be more or less aligned with the X axis.

 

Of course, if your column is rotated 45 degrees from the X axis, you have two right and two left faces.

 

To fix this, you may need to add more selection criteria.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 3

Anonymous
Not applicable

Thank you, Jeremy!

Your answer helped me to get the desired result. 🙂

0 Likes