// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Gable roof cross-section // Not compiled or tested in-world // Setup: Place in a spare prim. Set span and pitch degrees between zero and eighty. Owner touch prints results without altering the scene. // Stop / restore: Disable or remove. No prim properties are changed. // Notes: An idealized cross-section; ignores thickness, overhangs and structural loads. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Owner-only calculation. float SPAN=10.0; float PITCH=35.0; default { touch_start(integer detectedCount) { if (llDetectedKey(0)!=llGetOwner()) return; if(SPAN<=0.0||PITCH<=0.0||PITCH>=80.0) { llOwnerSay("Use positive span and pitch between0 and80."); return; } float angle=PITCH*DEG_TO_RAD; float half=SPAN*0.5; float rise=half*llTan(angle); llOwnerSay("Ridge rise="+(string)rise+"; slope length="+(string)(half/llCos(angle))); } }