Mechanics figures for LaTeX, drawn like a CAD sketch.
Sketch a truss, a beam or a mechanism roughly. Constrain and dimension it until it is exact, add the supports and the loads, and export TikZ that LaTeX sets in your document’s own font.
Open Mech Sketch See the TikZ it writes
Free, with no account. It runs in your browser and works offline once installed.
A figure from start to finish
A truss drawn roughly, constrained, dimensioned, given its supports and loads, exported, and set by LaTeX in a homework solution. Recorded in the app, at one and a half times the speed.
From a rough sketch to an exact figure
-
Draw roughly
Click the joints with the Line tool, about where they belong. Blue means it can still move.
-
Constrain
Make lines horizontal, parallel, equal or tangent. The box in the corner counts what is still free.
-
Dimension and annotate
Type a length, or a name like a or 2a, and the drawing follows. Then add supports, loads and labels.
-
Export
Save TikZ for LaTeX or SVG for slides and Word, at the width your page needs.
TikZ that LaTeX sets in your font
The export is plain TikZ: lines, arcs and nodes you can read. LaTeX typesets the labels, so F in the figure is the same F as in your equations, at the size of your text.
The figure comes out exactly as wide as you set it, with the text at its print size, so what does not overlap on screen does not overlap on paper.
\begin{tikzpicture}[x=1mm, y=1mm, …]
\draw[member] (0,0) -- (26.76,0);
\draw[member] (0,0) -- (13.38,20.07);
\draw[member] (13.38,20.07) -- (40.14,20.07);
…
\draw[dim, tip-tip] (0,-10.7) -- (26.76,-10.7);
\node[label, anchor=north] at (13.38,-10.7) {$a$};
\end{tikzpicture}
It needs \usepackage{tikz} and \usetikzlibrary{arrows.meta, bending}; then \input{truss.tex} where the figure goes.
What it draws
Supports and loads
Pins, rollers and clamps with hatched ground; forces, moments and distributed loads.
Internal force diagrams
A plotted function laid along a beam, for shear force and bending moment diagrams.
Springs and dampers
Zigzag and coiled springs, dampers, torsion springs and centres of mass.
Plots for pgfplots
Functions and parametric curves, exported with their formulas still written as formulas.
Curves and fills
Arcs, splines and Bézier curves; closed regions filled with colour or hatched as a cut.
Sketches and CAD drawings
Big drawings split into sketches; an SVG from your CAD tool opened to annotate it.
Free, and your files stay yours
- No account
- Open it and start drawing. There is nothing to sign up for.
- Works offline
- Install it from your browser’s address bar and it runs in its own window, without a network.
- Your files stay with you
- Your sketch is kept in your browser. Save writes an SVG with the whole drawing inside it, to open and change later.
Questions
Can I change a figure after I have exported it?
Yes. Exported SVG and TikZ files carry the drawing inside them. Open one in Mech Sketch and you get it back with its dimensions and constraints, ready to change.
Do the dimensions have to be real sizes?
No. The first length you dimension sets the scale, and you can name lengths instead of giving numbers: a, 2a, h. The figure is fitted to the width you set either way.
Can I annotate a drawing from my CAD program?
Export it from your CAD program as an SVG and open it in Mech Sketch. Its lines, arcs and curves come in fixed in place, in a sketch of their own, ready for dimensions, fills and labels.
How is it made?
It is mostly vibe-coded: most of the code was written by an AI coding assistant, and a person decided what it should do, tried it out and had it corrected. It is tested as it goes, but treat a figure as you would one from any new tool, and check it before you hand it in.
What does it cost?
Nothing. If it saves you time, you can support it on Ko-fi.
Mech Sketch is free
It is made for the figures in homework, reports and theses, and it stays free. If it saves you time, you can support it.