// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Find a build’s dominant bounds axis // Not compiled or tested in-world // Setup: Use a rezzed object without seated avatars; touch as owner. // Stop / restore: Remove or disable. This inspector changes no build properties. // Notes: Bounds are root-local and based on physical representation. Seated avatars can enlarge them; mesh visible geometry can differ. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. default { touch_start(integer count) { if(llDetectedKey(0)!=llGetOwner()) return; if(llGetAttached()) { llOwnerSay("Use a rezzed object."); return; } list bounds=llGetBoundingBox(llGetKey()); if(llGetListLength(bounds)!=2) { llOwnerSay("Bounds unavailable."); return; } vector extent=llList2Vector(bounds,1)-llList2Vector(bounds,0); float longest=extent.x; string axis="X"; if(extent.y>longest) { longest=extent.y; axis="Y"; } if(extent.z>longest) { longest=extent.z; axis="Z"; } if(longest<=0.0) { llOwnerSay("Degenerate bounds."); return; } llOwnerSay("Dominant local axis: "+axis+"; relative proportions: "+(string)(extent/longest)); } changed(integer flags) { if(flags & CHANGED_OWNER) llResetScript(); } }