Fixing roof top to a level


i placed roof now , but for over hangings to give , i use curve.offset . but by doing that roof height changes . Is there anyway to restrict/fix the roof top to a level ?

Process is the same if you did it by hand.

Which 2 of the three elements do you wanna ant to hold true? Top of Roof, Slope, Bottom of Roof. Once you decide that you’ll need to do some trig to find out how you have to adjust your roof’s starting elevation or slope.

1 Like

sorry jacob , didnt understand . can you explain a bit more

You’re setting the base point, and the pitch (angle) of the roof. That sets the top point as the 3rd side of the triangle becomes a given. This is a trigonometry problem.

If you want to kee the angle and set the top of the roof, figure out your triangle (or get the total rise of the roof element after you create it), add that to your top of wall, subtract that from the target height, and lower your roof’s base by that distance.

If you want to keep the base and the height, get the height and the base and subtract the two, call that the opposite leg of the triangle. Then get the length and width of the building, divide by two, and that will be the adjacent leg of the triangle. Divide the opposite by the adjacent, and then use the triganomic tangent function (Math.Tan node) to get what your roof slope needs to be.

If you want to keep all 3 (the slope, the top, and the bottom), you have to adjust your building width/length. Subtract the top from the bottom, call this the opposite leg. Your angle is already know so you can just use that. Use another tangent function on the angle, and divide the opposite side by the result. Multiply the result by 2 and you have the building dimension.

1 Like