add_dimension
Add dimensions to FreeCAD drawing pages: auto overall extents, true edge lengths, diameter/radius, angles, or point-to-point distances, with optional tolerances.
Instructions
Add dimension(s) to a drawing page.
Modes (pick one):
auto=True: overall horizontal + vertical extent dimensions for every part-view (or only those named in
views, by name or projection code).view + edge=: dimension the true length of a model edge, projected into that view. The printed value is the real measured length, not the foreshortened projection.
view + kind='diameter'|'radius' + edge=: a ⌀/R dimension of a hole or arc.
view + kind='angle' + face=: the half-angle (or, by default, the 2× included angle) of a conical face — the curved angle a machinist sets for a chamfer cone / countersink / taper (issue #108). Pass half_angle=True to call out the half-angle instead.
view + from_point/to_point ([x,y,z] model points): dimension between two 3D points. view: a view handle, object name, or projection code ('Front', 'Top', ...). kind: 'aligned' (default) | 'horizontal' | 'vertical' | 'diameter' | 'radius' | 'angle'. tolerance: optional, rendered next to the value (a machinist needs it to make the part to size): {"sym": 0.1} for ±0.1, {"plus": .., "minus": ..} for an asymmetric tolerance, or {"fit": "H7"} / {"fit": "H7/g6"} to look up ISO 286 hole-side limits at the dimension's basic size. Returns {dimensions: [{handle, name, type, value}, ...]} — value is the true measured size of each dimension created.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auto | No | ||
| edge | No | ||
| face | No | ||
| kind | No | aligned | |
| page | Yes | ||
| view | No | ||
| views | No | ||
| to_point | No | ||
| tolerance | No | ||
| from_point | No | ||
| half_angle | No |