generate_precise_cap
Generates a threaded cap STL/STEP file from provided outer diameter, inner diameter, and height, adding internal helical threads based on optional thread parameters.
Instructions
Generate a threaded cap STL/STEP from measured opening dimensions: a solid closed top with a skirt carrying real helical internal threads (swept, not just a bore). Takes structured JSON only (no image) — vision/dimension extraction happens client-side before this is called. Deterministic CadQuery, no network call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| height | Yes | mm, cap height | |
| confidence | No | caller-supplied confidence in the extracted dimensions, from client-side vision analysis | medium |
| threadDepth | No | mm, radial depth the thread ridge protrudes inward from the skirt wall; omit for a 0.6mm default | |
| threadPitch | No | mm, omit to fall back to a standard single-start pitch (~PCO 1810, 3.18mm) | |
| threadStarts | No | number of parallel thread starts (2-3 is typical for quick-on caps); omit for a single-start thread | |
| topThickness | No | mm, solid top wall thickness; omit to derive one from height (clamped to 1.2-3mm) | |
| innerDiameter | Yes | mm, opening the cap must clear | |
| outerDiameter | Yes | mm, cap outer diameter |