Craft Lacing Hole Count
Count regularly pitched lacing holes starting at zero, optionally adding an irregular final hole at the far endpoint.
Description
Count regularly pitched lacing holes starting at zero, optionally adding an irregular final hole at the far endpoint.
Regular lacing holes begin at zero and advance by a fixed pitch. An optional end hole may break that regular spacing.
When to use this tool
Count regularly pitched lacing holes starting at zero, optionally adding an irregular final hole at the far endpoint.
- Prepare the supplied length, pitch, includeBothEnds fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter length, pitch, includeBothEnds. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.holes, result.regularEnd. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Require nonnegative length and positive pitch. Count floor(length/pitch) plus one regular holes; add one when includeBothEnds is true and the endpoint is not on that regular grid. Return regularEnd as floor(length/pitch)*pitch.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| length | length. | Finite number |
| pitch | pitch. | Finite number; greater than zero |
| includeBothEnds | Explicit choice for include both ends; supply a boolean rather than a text label. | true or false |
| Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.holes | The holes value under the stated formula or text convention. |
| result.regularEnd | The regular end value under the stated formula or text convention. |
{
"input": {
"length": 10,
"pitch": 3,
"includeBothEnds": true
},
"output": {
"result": {
"holes": 5,
"regularEnd": 9
}
}
} Limitations and assumptions
- No material edge allowance or drilling layout is inferred. Include-both-ends adds an irregular final gap when necessary; floating-point equality determines exact alignment.
- Every declared top-level field is required and unexpected fields are rejected. Numeric inputs must be finite; ordinary text fields are bounded to 8,192 UTF-16 code units, with tighter operation-specific limits where stated.
- Lists are limited to 128 entries. JSON text must meet bounded size and depth checks, and numeric outputs beyond the safe finite magnitude are rejected. Exact large integers use decimal strings.
- Indexes are zero-based and spans have an exclusive end unless explicitly stated otherwise. A valid false, null or empty-list result is distinct from malformed input.
Alternative or Complementary methods
Use the printer, material or pattern specification to choose allowances and rates. These tools perform the stated dimensional and count arithmetic, without measuring artwork or simulating production.
References
Similar or alternative tools
- Craft Bead String Length
Budget craft bead string length from individually supplied bead diameters, inter-bead gaps and total end allowance; no elastic or knot model.
- Craft Circle Stitch Angular Pitch
Compute equal angular pitch for an explicit circular stitch count; does not estimate circumference or fabric deformation.