// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Convert pinion turns into rack travel // Not compiled or tested in-world // Setup: Place in a spare owned prim. Set positive MODULE/TEETH and signed TURNS. Touch for private results. // Stop / restore: Disable/remove; no scene properties change. // Notes: Ignores backlash, tooth shape, friction and mechanical loading. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Planning only. float MODULE=0.08; integer TEETH=20; float TURNS=1.5; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(MODULE<=0.0||TEETH<1) { llOwnerSay("Positive module/teeth required."); return; } float diameter=MODULE*TEETH; llOwnerSay("Travel="+(string)(PI*diameter*TURNS)+" travel per tooth="+(string)(PI*MODULE)); } }