| name | kalpataru-make-a-part |
| description | Build a parametric part from scratch in SolidWorks. Sketch-then-feature workflow, correct feature ordering, and how to chain features so the topology stays valid. |
Making a part with Kalpataru
The non-negotiable: every solid feature starts with a fully-defined sketch.
Skip the sketch step and you get geometry that breaks the moment you change
a parameter.
The four-step rhythm
For every feature in the part:
- Plan — what feature is this? Extrude / cut / revolve / fillet?
What does it depend on?
- Sketch —
kalpataru_create_sketch with the right plane or face.
For common shapes (cube, plate, cylinder, hex nut, slot) just pass a
single closed primitive (rectangle, circle, polygon, slot).
- Feature — when the response has
ready_to_extrude: true,
call kalpataru_extrude / kalpataru_cut / kalpataru_revolve
directly. Do not retry the sketch. The companion
kalpataru-examples skill has copy-pasteable recipes for the most
common shapes.
- Verify (optional) —
kalpataru_summary if you want to confirm
face/body counts.
If ready_to_extrude is false, the response carries a note
explaining what's wrong — usually segments not meeting at endpoints.
Fix that instead of retrying with the same shape.
Feature ordering rules
Order matters. Get it wrong and downstream features break.
- Detail features go last in their stage. Fillets, chamfers, drafts —
these change the topology of every face they touch. Any edge ID you
captured before becomes invalid.
- Patterns and mirrors reference earlier features by name. Build the
source feature first.
- Reference planes go before the features that depend on them.
- Cut features need a body to cut. Boss-extrude first, then cut.
A typical bracket sequence:
- Sketch on Front plane (L-profile)
- Extrude the L (50mm length, midplane)
- Sketch on a leg face (4-hole pattern)
- Cut through all
- Fillet the inner corner edges (radius 3mm)
- (Optional) Linear pattern of additional mounting holes
Picking the right sketch plane
- Standard planes by name:
"Front", "Top", "Right". Front is
usually best for the first sketch of a new part.
- Existing faces by ID: call
kalpataru_query_faces(of_feature="...")
to get face IDs, then pass face_id="F3" to create_sketch.
For a feature like "drill a hole in the top face of an extrusion":
extrude_result = kalpataru_extrude(sketch_name=..., depth=25)
top_face = kalpataru_query_faces(
surface="plane",
of_feature=extrude_result.result.feature_name,
)[0] # pick the highest centroid if multiple planar faces
sk2 = kalpataru_create_sketch(face_id=top_face.id, entities=[...])
kalpataru_cut(sketch_name=sk2.result.sketch_name)
When the agent should ask the user
The user must click for these operations (they're documented as HITL —
human in the loop):
kalpataru_fillet, kalpataru_chamfer on specific edges where querying
is ambiguous
kalpataru_revolve axis selection when no explicit axis line exists
kalpataru_mirror plane selection when no named plane fits
- Any time
query_* returns 3+ candidates with no way to disambiguate
Call kalpataru_request_selection(prompt, select_type="edge", count=2).
The user clicks; you get back entity IDs. Don't try to guess coordinates
to short-circuit this — pick points across coordinate systems are
unreliable. The user's click is authoritative.
Saving and closing
After the part is built, kalpataru_save_part(path) writes it to disk.
If the user is testing iteratively, kalpataru_close_part(save=False)
discards their changes — confirm before doing this.