pcb-rnd knowledge pool
Extended objects: dimension lines
extobj_dim by Tibor 'Igor2' Palinkas on 2019-12-14 | Tags: howto, extended, object, objects, extobj, dimension, line, mechanical, size, annotation |
Abstract: n/a
A line object (with extobj::role=edit, on any layer) can be a basis of a dimension line. The dimension line will stand out above the base line and will print the length of the base line. As the base line is moved or resized, the dimension line follows. The user can drag&drop move the dimension line to determine its distance from the base line. The dimension line can be drawn on any layer.
Extobj details:
- the edit-object is the base line
- the dimension line that is parallel with the base line is also a floater so can be moved (role is "dimline")
- when the dimline is moved, the dimension line is recalculated based on the distance of the center of the moved dimension line and the base line
- the extobj attribute should be dimension
- the printout format (including unit) can be optionally specified using the extobj::format attribute
An example/test board is available.
Demo video:
Steps shown in the video:
- 1. optional: create a new extobj layer group and layer. When done, this can be used to avoid the edit-object interfering with the board. By user convention the new layer group should be a global doc layer and the purpose should be 'extobj'.
- 2. draw the line
- 3. use the menu or {e s x} to convert the line into an extended object
- 4. edit the geometry by grabbing the edit-object line or its endpoints
- 5. edit properties by right clicking on the 'E' mark
- 6. the format string is a coordinate-only pcb-printf format string; the %m formats are documented in src/pcb-printf.h