pcb-rnd knowledge pool


The user mark and the grab mark

mark_cleanup2 by Tibor 'Igor2' Palinkas on 2019-08-10

Tags: spec, mark, ortho, move

node source



Abstract: Describe how the two marks work, what user actions affect them and what they are for.


pcb-rnd has two marks: the user mark and the grab mark.

The user mark

The user mark is a smallish 45 degree X drawn on the "xor" overlay (same as the crosshair). Its size is controlled by the conf node appearance/mark_size.

The user can place or remove the mark using the {a m} key. When the mark is placed, the relative distance and angle to the crosshair is displayed in the overhead coordinate readouts.

If the user does not place the mark, some drawing actions will temporarily place it. For example when the line tool starts to place the first line segment, the user mark is placed in the first endpoint. This way the user can keep track of the relative distance in the readout - not to be confused with track length, tho. If the user had a mark explicitly placed, no drawing action will move or override that mark.

The grab mark

The grab mark is a slightly smaller, rotated (off-45-degree) mark that appears where some drag&drop operation originates at. This helps keeping track of the original location of objects in a move (or copy) operation.

The grab mark is always managed by pcb-rnd, the user can not change the coordinates; the grab mark is always removed when the mouse button is released.

For any drag&drop operation the grab mark is set even if it is not displayed. The "orthogonal moves" feature calculate X or Y based on the drag mark.

prior art

This node was written after a refactoring of the mark code to overcome a number of bugs in the original implementation (inherited from PCB).

The refactoring fixed two things: