HOLE SPACING CALCULATOR — AI URL GUIDE Tool: https://www.lejnel.com/tools/hole-spacing/ Query parameter: plan LINK CREATION Serialize the state as compact JSON and percent-encode it ONCE as the named query parameter. Do not use Base64. JavaScript: encodeURIComponent(JSON.stringify(state)); Python: urllib.parse.quote(json.dumps(state,separators=(',',':')),safe=''). Encode Unicode, &, #, +, % and other reserved characters. Return a clickable URL and summarize inputs and assumptions. Ask about missing inputs; do not invent measurements or product requirements. All JSON numbers must be finite, with decimal points and no unit suffixes. SAVING The complete URL stores the inputs, not a server-side account record. Open the link and check every input. Bookmark or copy the updated URL after edits to retain that version. Anyone with the link can read its contents; avoid personal data. Results are recalculated on reopening and may change with future tool improvements. Print a fixed record when necessary. STATE EXAMPLE (illustrative only) { "length": 1000, "start": 50, "end": 50, "diameter": 8, "count": 5, "target": 100, "mode": "count" } FIELDS AND LIMITATIONS All fields are required. All lengths are in MILLIMETRES; convert imperial inputs first (inches × 25.4, feet × 304.8). Hole count is unitless. length: total straight length, 1–100000. start: start edge to FIRST HOLE CENTRE, >=0. end: LAST HOLE CENTRE to end edge, >=0. diameter: equal hole diameter, >0 and <=length. count: integer 2–200 when mode="count". target: positive maximum centre-to-centre spacing when mode="spacing". mode: "count" or "spacing". Include both count and target even though only one is active. If the inactive value is unknown, use count=5 or target=200 and explicitly say it is inactive. start+end must be less than length. With count mode: spacing=(length-start-end)/(count-1). With spacing mode, gaps=ceil((length-start-end)/target), minimum one gap; holes=gaps+1, at most 200. Clear gap=spacing-diameter. Overlapping holes and end holes crossing material edges are flagged. This is one straight row, not a grid or bolt circle. For edge-to-hole-edge margins, add half the diameter before setting start/end. Ask which margin convention the user means. Keep decoded state under 2000 characters. Structural safety and suitable fixing distances are not established. READY-TO-OPEN EXAMPLE https://www.lejnel.com/tools/hole-spacing/?plan=%7B%22length%22%3A1000%2C%22start%22%3A50%2C%22end%22%3A50%2C%22diameter%22%3A8%2C%22count%22%3A5%2C%22target%22%3A100%2C%22mode%22%3A%22count%22%7D