Apply Fillet or Chamfer Blend
apply_surface_blendUse this to author and evaluate a fillet or chamfer on a kernelCAD Shape. It inserts Shape.fillet(radius, selector, { continuity: G1 }), Shape.fillet({ start, end }, selector, { continuity }), or Shape.chamfer(distance, selector), then returns the patched source and evaluation diagnostics. Constant-radius OCCT fillets expose measured G1 only; G2, G3, and G4 are refused because their support seams remained G1 in the tested mode/tolerance sweep. A linear two-station radius_profile uses the NURBS constrained route on one selected edge and reports its measured result; the planar fixture measured G2, while requests above or outside measured support pairs can downgrade with feature.fillet.continuity-not-applicable. Selectors accept EdgeSelector syntax, including stable edge refs from get_selection (for example @kc[box_1/edge/s]), arrays of selected edge refs, query strings, EdgeQuery objects, or { face: canonical name, face label, or face query }. This authors a blend operation but does not extract blend-surface NURBS poles.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>",
"shape_binding": "<shape_binding>"
},
"name": "apply_surface_blend"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Inline .kcad.ts source. | |
| radius | No | Fillet radius in mm; required for operation:'fillet'. | |
| distance | No | Chamfer distance in mm; required for operation:'chamfer'. | |
| selector | No | Optional EdgeSelector: a stable @kc[...] edge ref from get_selection, an array of selected edge refs, an edge query string, an EdgeQuery object such as { parallel: "X", atY: 10 }, or { face: canonical face name, face label, or FaceQuery descriptor }. Higher-order blend requests require one selected edge. | |
| operation | No | Operation; defaults to 'fillet'. | |
| continuity | No | Requested fillet continuity; defaults to G1. Constant-radius fillets accept G1 only. With radius_profile, the achieved class is measured and any downgrade is reported. Chamfer rejects this field. | |
| shape_binding | Yes | Existing Shape variable name to blend. | |
| radius_profile | No | Optional linear start/end radius profile along one selected fillet edge. When supplied, radius is not required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||