tsdraft

tsdraft docs

tsdraft docs

These pages ship in the npm package, in node_modules/tsdraft/docs/, and are published at tsdraft.com/docs. An agent starts with the guide.

Start here

  • The guide for agents covers the setup, the loop through tsdraft's MCP server, the command for when there is no MCP, and what tsdraft cannot draw yet.
  • The tsdraft command covers render, dev, write, the MCP server's tools, the JSON they give, and what happens without the PNG renderer.
  • The Drawing format covers format 0, entity ids, toJSON and fromJSON, and what a diagnostic carries.
  • Rules lists what lint refuses and what it warns about.

Drawing

  • Polylines covers arcs by their bulge, rounded corners, revision clouds, widths and donuts, how a wide polyline plots, and what lint refuses of them.
  • Ellipses and splines covers ellipses and their arcs, splines through fit points and by control points, how they plot and dash, and what lint refuses of them.
  • Points covers points and the point style, how a figure plots and how big, and what lint refuses of them.
  • Blocks covers blocks, inserts and attributes: layers in a block, names, handles and what the preview draws.
  • Fills, wipeouts and masks covers hatches with holes, solid, of a pattern file's patterns or of a gradient, wipeouts, the masks of paragraphs, leaders and dimensions, the draw order, and what lint refuses.
  • Colors covers an entity's own color by index or as a true color, ByBlock in a block, how each plots under a plot style table, and the color codes of paragraph text.
  • Transparency covers an entity's own transparency, ByBlock in a block, and how it plots when the plot asks for it.
  • Images covers raster images: the path and the pixels, clips, frames, transparency, how the plot draws one, and what lint refuses.
  • Underlays covers PDF underlays: the path, the page and its size, scale, clips, fade, contrast and monochrome, frames, the page's picture the plot draws, and what lint refuses.
  • Xrefs covers references to DWG files: the path, units, a missing file, and how the preview draws a referenced drawing.

Text, dimensions and tables

  • Text covers text styles, fonts and justification, how long a text plots with measureText, the warnings of inspectText about text that overlaps or leaves its border, what tsdraft escapes in text, and what the leading CAD app does with it after a save.
  • Paragraphs covers paragraph text: its width and box, the codes its value takes, the helpers that write them, how it is laid out, and what lint refuses.
  • Dimensions covers dimension styles, linear, aligned, radius, diameter, jogged radius, angular, arc length and ordinate dimensions, how a measurement is written, and what lint refuses.
  • Leaders covers leader styles, a note or a block on a leader, how a leader is drawn, and leaders under a standard.
  • Tables covers table styles, a schedule drawn as one table, how a table is laid out, and what lint refuses.

Sheets

  • Layouts covers sheets: the papers, the page setup, viewports and their scale, names, and how the preview draws a sheet as it plots.
  • Title blocks covers a title block whose fields are attributes, and a firm's own border placed under a sheet as an xref.
  • Plotting covers toPDF and svgToPDF: a PDF for each sheet and for the set, what a page holds, and the faces text is set in.

Standards and checks

  • Standards covers a firm's standard: the document, defineStandard, the built-in standard, drawing to a standard, what lint holds a drawing to, and the standard a drawing file exports.
  • Layer names explains how the leading CAD app compares layer and linetype names, and lists the pairs AUDIT calls duplicates and the characters it refuses.
  • Checks of intent covers checkIntent, which warns of a footprint that crosses a setback, and the intent a drawing file exports.

A firm's files

  • Reading drawing files covers readDXF, the read model it gives of a firm's DXF, and the readers a package adds for other formats.
  • Editing a firm's drawing covers the edit file, the edited copy of a DXF, the checks of every job and tsdraft write.

This page as Markdown