How to measure diagonal length of a triangle

Hi all!!

To start this post, I hope you all have a good day!

This is my problem, I want to create a dynamic components (a roof) that you can change in the width and the length!

So I have one big component,called roof and this component have all the other components in it. I can change the withd and the length of component roof and everything inside it does the same!.

Now here is my problem. I have an diagonal rectangle (white arrow on the pic). This rectangle is 30 degrees rotated and should always be like that. The vertical rectangle (Red arrow) is always in the center of the horintal rectangle. If I changed the width of the roof this rectangles go to the right position so far so good! But the diagonal rectangle, doesn’t connect anymore with the vertical rectangle. The simpel reason is that the diagonal rectangle is now to short. Does someone of you masterminds have any idea how I can measure what the length should be of that diagonal rectangle, so it can connect back with the vertical rectangle.

I hope I explained my problem kind of good so that you masterminds see what i meant!

Thank you for your time, and have a nice day!

Kind Regards,
Gaelic

You can create the relationship by using Pythagorean theorem or trigonometry.
The example is a rafter showing how the length is changed by pitch and run using trigonometry

rafter.skp (33.8 KB)

4 Likes

Pcmoor, you’re a Hero! I think I can make it work now, Thanks a lot!