/kernelcad-design-skills:kernelcad-drawingsfrom kernelCAD — Parametric CAD & MCP
Export 2D engineering-drawing sheets (SVG, or a printable PDF on a standard sheet) from any model or assembly — third-angle front/top/left + isometric views with hidden-line removal, overall dimensions, and a title block. Use when the deliverable is a human-readable fabrication or review drawing.
Ships in kernelCAD — Parametric CAD & MCP. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
export({ target: 'model', format: 'svg-drawing' }) renders a .kcad.ts model as a standard third-angle engineering-drawing sheet in SVG. It works on single bodies and on assemblies (assembly.model() / solvedModel(...)) — assembly parts are projected together in world frame, so one part occluding another renders correctly as hidden lines.
annotations (below) to dimension actual features instead.format: 'pdf-drawing' writes the same sheet as a vector PDF ready to print or send: the views, hidden lines, dimensions, hole callouts and GD&T are the SVG sheet's, transcribed page for page. It adds a standard sheet and a full title block:
sheet is 'a4' 'a3' (default) 'a2' 'a1' 'a0' or 'ansi-a' … 'ansi-e', always landscape; 'auto' / 'auto-ansi' pick the smallest sheet that holds the views at 1:1, else the largest one with a reduced scale. The scale is snapped to the standard series and printed in the title block. Section views take room inside the sheet instead of growing the page.projection: 'third' (default) or 'first'. First angle puts the top view below the front view, the left view right of it, the isometric lower-left, and draws the first-angle symbol; automatic dimensions move to each view's free side.title, default the model name), PART NAME (partName), MATERIAL (material, default the shared material of the assembly parts), REV (revision), SCALE, UNITS, SHEET size, DATE (date, default today). Unset fields print —. The DATE cell also carries a small "Made with kernelCAD · kernelcad.com" line, a clickable link in the PDF; the PDF Producer is the kernelCAD version.autoAnnotate is on unless you pass annotations; pass autoAnnotate: false for the overall bounding-box dimensions only.{ "tool": "export", "input": { "target": "model", "file": "bracket.kcad.ts", "format": "pdf-drawing", "output_path": "out/bracket.pdf",
"options": { "format": "pdf-drawing", "title": "L mounting bracket", "partName": "BRK-001", "material": "AlMg3", "revision": "B" } } }
kernelcad export pdf-drawing bracket.kcad.ts -o out/bracket.pdf --title "L mounting bracket" --revision B --material AlMg3 --sheet a3
Text is set in the standard Helvetica face, so the PDF needs no embedded font; ⌀ prints as Ø, and the GD&T and hole symbols (⌖ ⏥ ⟂ ∥ ⌴ ⌵ ↧ …) are drawn as vector strokes.
MCP:
{ "tool": "export", "input": { "target": "model", "file": "bracket.kcad.ts", "format": "svg-drawing", "output_path": "out/bracket-drawing.svg" } }
CLI:
kernelcad export svg-drawing bracket.kcad.ts -o out/bracket-drawing.svg
Pass via options (MCP) — all optional:
sheet: 'a4' (default, 297×210 landscape), 'a3' (420×297), or any pdf-drawing size ('a2' … 'ansi-e', 'auto').projection: 'third' (default) or 'first' — see "PDF sheet for the shop".titleBlock: { title?, partName?, material?, revision? } — switches to the full title block the PDF sheet uses.modelName: title-block name; defaults to the script's file name.date: title-block date string; defaults to a placeholder so output stays byte-deterministic (stamp an ISO date when the drawing is released).annotations: authored dimensions and notes — see below.sections: cutting-plane section views — see "Section views" below.exploded: { factor, mode } — explode the isometric cell (mode is mate-axis or radial). Ortho views stay assembled.balloons: item balloons on the isometric cell; numbers match BOM item numbers from inspect({ of: 'bom' }).partsList: parts-list table (item, name, qty, material) above the title block, from the same BOM rows.{ "options": { "format": "svg-drawing", "sheet": "a3", "modelName": "Clamp body", "date": "2026-06-10" } }
The automatic dimensions can only ever state the overall bounding box. annotations is how you say dimension THIS hole. Supplying any annotation replaces the bounding-box dimensions — a sheet carrying both would double-dimension the outline.
Every entry shares four optional fields: view (front default, or top / left / iso), text (override the computed label), and offset (extra sheet-millimetres pushing the annotation further from the geometry). The rest is per kind:
kind | geometry | label |
|---|---|---|
linear | from, to anchors, optional tol | distance along the dominant view axis, optionally ± 0.1 / +0.2/−0.05 / H7 |
radius | edge (an EdgeQuery selecting a circular edge) | R<r> |
diameter | edge (ditto) | ⌀<d> |
angular | from, to EdgeQueries — the apex is where the two edges cross in that view | <deg>° |
note | at anchor + required text | your text, on a leader |
hole | edge (rim), one of through: true / depth, optional counterbore/countersink/count | ⌀6.5 THRU, blind ⌀6.5 ▾ 10, ⌴⌀12 ▾ 4 / ⌵⌀12 × 90° suffixes, 4× pattern prefix |
fillet | edge (a circular fillet boundary arc) | R<r> |
chamfer | edge (anchor) + required size, optional angleDeg (default 45) | <size> × <angle>° |
datum | face (a FaceQuery) + required label | ASME square datum-feature symbol with the letter |
fcf | one of edge/face + type (position|flatness|perpendicularity|parallelism|concentricity|cylindricity) + value, optional datums/modifier | feature control frame: type symbol · value(±modifier) · datum letters |
chamfer's size is author-supplied rather than measured — a bare edge query carries no feature history, so the chamfer leg length isn't recoverable from geometry alone at export time. hole requires exactly one of through/depth — the export fails loudly (naming the annotation) if both or neither are set, same honesty contract as every other annotation kind.
{ "kind": "hole", "view": "top", "edge": { "ofCurveType": "CIRCLE", "near": [10, 10, 0] }, "through": true, "counterbore": { "diameter": 12, "depth": 4 } }
{ "kind": "fcf", "view": "top", "edge": { "ofCurveType": "CIRCLE", "near": [70, 40, 0] }, "type": "position", "value": 0.1, "datums": ["A"], "modifier": "⌀" }
An anchor is an explicit model point [x, y, z], { edge: EdgeQuery } (resolves to the edge's curve midpoint), or { face: FaceQuery } (resolves to the face centre) — the same selector vocabulary fillet / chamfer / selectEdge use.
{
"options": {
"format": "svg-drawing",
"annotations": [
{ "kind": "linear", "from": [0, 0, 0], "to": [60, 0, 0] },
{ "kind": "linear", "from": { "face": { "atZ": 0 } }, "to": { "face": { "atZ": 10 } } },
{ "kind": "diameter", "view": "top", "edge": { "ofCurveType": "CIRCLE", "atZ": 10 } },
{ "kind": "angular",
"from": { "ofCurveType": "LINE", "near": [20, 0, 0], "within": { "zMin": -0.5, "zMax": 0.5 } },
"to": { "ofCurveType": "LINE", "near": [0, 0, 15], "within": { "xMin": -0.5, "xMax": 0.5 } } },
{ "kind": "note", "at": { "face": { "atZ": 10 } }, "text": "BREAK ALL EDGES 0.5" }
]
}
}
linear whose projected span is wider than tall goes below its view, otherwise right of it. Within a bucket the first sits 8 mm out and each further one steps 8 mm further; angular arcs grow by 8 mm; leaders rotate 30° per leader. Reordering the model cannot reshuffle the sheet — only reordering the array can. View captions move down automatically to clear whatever stacks beneath them.An annotation whose query matches zero edges/faces, matches more than one without a near disambiguator, asks for a radius on a non-circular edge, or measures an angle between edges that are parallel in that view, fails the export with a feature.selection.no-match diagnostic naming annotations[i] and the reason. All failures are reported at once. Nothing is silently dropped: a drawing that quietly omits a dimension you asked for is worse than one that errors.
<g id="view-front|top|left|iso"> per view with class="visible|hidden|tangent" subgroups, data-kc-scale / data-kc-units on the root element..kcad.ts, re-export.options.sections: [{ plane, label }] cuts the assembled body with a real half-space boolean (not a render-time visual clip) and adds a section-view cell below the standard 4-view grid — the sheet grows taller to make room; the standard views are pixel-for-pixel unaffected.
{
"options": {
"format": "svg-drawing",
"sections": [{ "plane": "xy", "label": "A" }]
}
}
plane: 'xy' (cuts along Z), 'xz' (cuts along Y), 'yz' (cuts along X) — position defaults to the bounding-box midpoint on that axis — or { origin: [x,y,z], normal: [nx,ny,nz] } for an explicit position. Only axis-aligned normals are supported (within ~2.5° of ±X/±Y/±Z); an oblique plane fails with feature.invalid-args rather than being approximated.'top' for an 'xy' cut, 'front' for 'xz', 'left' for 'yz'), so it renders through the same HLR pipeline (visible/hidden/tangent styling) as every other view.fill="url(#kc-section-hatch)"). A hole the plane slices through renders correctly as a hole in the hatch (outer + inner wire, fill-rule="evenodd"), not a solid disk.'front' for an 'xy'/'yz' cut, 'top' for an 'xz' cut).drawing.section.plane-misses-body.SECTION A-A (from label).A building or room model drawn with the default (mechanical) style gets part
annotations — datums, flatness, ISO 2768 — that mean nothing on a floor plan,
and the export warns drawing.style.architectural-suggested. Pass
style: 'architectural' (svg-drawing or pdf-drawing) for a plan instead:
{ "options": { "format": "pdf-drawing", "style": "architectural", "title": "Cabin",
"plan": { "rooms": [{ "name": "Living", "at": [1000, 1000] }], "northDeg": 30 } } }
plan.cutHeight (mm above the floor) moves the cut.plan.rooms[i].at, else ROOM n) and net area (m², or ft²).plan.units: 'metric' | 'imperial'. The scale is the largest architectural scale that fits (1:20 … 1:2000, or 1/2" … 1/32" = 1'-0"); sheet: 'auto' picks the smallest sheet that holds 1:100 (1/8" = 1'-0").plan.northDeg, clockwise from sheet up) and a title block (title, scale, units, sheet, date, revision) complete the sheet. The mechanical-only keys (annotations, sections, autoAnnotate, exploded, balloons, partsList) do not apply.datum/fcf) and the hole/fillet/chamfer callouts are authored through options.annotations, the same surface as every other dimension — there is no Shape.datum() / Shape.tolerance() capture-graph method. Adding a capture-graph method for that is out of scope. Use options.annotations.chamfer's leg size is author-supplied — not recoverable from a bare edge query without feature history.{ origin, normal } fails loudly rather than being approximated (see "Section views" above).exploded plus balloons / partsList. A script that is not an assembly() fails explode with render.explode.no-assembly; balloons without a BOM warn drawing.balloons.bom-unavailable. Balloon and table labels share the existing overlap check.drawing.annotation.overlap is a REAL, non-fatal check: after rendering, every axis-aligned <text> label's approximate bounding box (rotated labels — the vertical linear dimension — are skipped, not estimated) is compared pairwise across DIFFERENT annotations. An overlapping pair does not fail the export (a crowded callout is still more useful than a silently dropped one); it emits one warn diagnostic naming every overlapping pair. Use offset, a different view, or reorder the array to separate them. The shared leader-rotation stacking (every leader-based kind — radius/diameter/note/hole/fillet/chamfer/datum/fcf) already fans successive callouts on the same view apart, which covers the common case; the overlap check is the backstop for when it isn't enough.param() values.drawing_to_cad is the reverse direction: it reads a vector drawing PDF (this
exporter's sheets included) and rebuilds an editable .kcad.ts with an
assumption ledger, then re-projects the result through the same view stage to
check it. See kernelcad-from-reference § Engineering drawing PDF.
Render the SVG to PNG and look at it (e.g. google-chrome --headless --screenshot=sheet.png file://…/drawing.svg). Check: hidden bores dashed where expected, tangent fillet lines thin, views aligned, dimensions match the model's bbox, title block populated. A drawing with a wrong or unreadable view is not done even if the export succeeded.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub w1ne/kernelcad-skills --plugin kernelcad-design-skills28 skills in this plugin
/blockout-modelCoarse parametric blockout of the primary masses before committing to detail. Establishes the bounding envelope, canonical-view alignment, and reference-image plane, then confirms the blockout is plausible before detail work begins./image-replicatorThe render→score→iterate loop for reference-photo reconstruction. How to invoke kernelcad render, run scoreAgainstReference, interpret per-gate numbers, and decide which gate to chase next./kernelcadkernelCAD entry decision tree — what skill to load when, universal conventions that apply everywhere. Load this FIRST; it points at the right specialty skill for your task./kernelcad-assembliesMulti-part assemblies — assembly(), parts, connectors, 7 mate types, fixed and revolute joints, .model()/.solvedModel(). Use for any model with two or more mechanical parts that need joint metadata./kernelcad-authoringkernelCAD model authoring API — primitives, transforms, booleans, sketches, path-builder, sketch-text, return-single-shape rule, conventions, CLI commands, and verification gates. Load this when writing or modifying .kcad.ts geometry./kernelcad-feaAnswer "will this part hold this load?" with solver evidence — declare a linear-static structural study with shape.feaStudy({ material, fixed, loads, minSafetyFactor? }), then run it with run_fea for peak von Mises stress, peak displacement, minimum safety factor against yield, named hot-spot regions, mesh-trust flags and stress-heatmap PNGs. A declared minSafetyFactor turns the study into a gate that fails evaluate_script. Use when sizing a bracket, mount, tab, clevis or any load-bearing part, when a load-capacity check reported beam-not-applicable, or before committing to a wall thickness or material grade.