KiCad PCB EDA Suite
Loading...
Searching...
No Matches
grid_helper.h File Reference
#include <vector>
#include <optional>
#include <geometry/point_types.h>
#include <geometry/seg.h>
#include <kiid.h>
#include <math/vector2d.h>
#include <preview_items/anchor_debug.h>
#include <preview_items/snap_indicator.h>
#include <preview_items/construction_geom.h>
#include <snap/snap_resolver.h>
#include <tool/construction_manager.h>
#include <tool/selection.h>
#include <origin_viewitem.h>

Go to the source code of this file.

Classes

class  GRID_HELPER
 
struct  GRID_HELPER::ANCHOR
 
struct  GRID_HELPER::SNAP_RANGES
 World-space snap thresholds derived from the screen-space snap radius. More...
 

Enumerations

enum  GRID_HELPER_GRIDS : int {
  GRID_CURRENT , GRID_CONNECTABLE , GRID_WIRES , GRID_VIAS ,
  GRID_TEXT , GRID_GRAPHICS
}
 

Functions

SNAP_TARGET_ID SnapTargetId (const KIID &aId)
 The snap identity of a document item.
 

Enumeration Type Documentation

◆ GRID_HELPER_GRIDS

enum GRID_HELPER_GRIDS : int
Enumerator
GRID_CURRENT 
GRID_CONNECTABLE 
GRID_WIRES 
GRID_VIAS 
GRID_TEXT 
GRID_GRAPHICS 

Definition at line 54 of file grid_helper.h.

Function Documentation

◆ SnapTargetId()

SNAP_TARGET_ID SnapTargetId ( const KIID & aId)
inline

The snap identity of a document item.

Both editors must agree on this, or the same item earns different stable ids and the resolver's retention and hysteresis stop matching across a frame. The snap library can't do it itself because it doesn't link against KIID.

Definition at line 49 of file grid_helper.h.

References KIID::AsBytes().

Referenced by EE_GRID_HELPER::ResolveSnap(), and PCB_GRID_HELPER::ResolveSnap().