KiCad PCB EDA Suite
Loading...
Searching...
No Matches
DRILL_MARKERS Namespace Reference

Drill marker outlines, as plain geometry. More...

Classes

struct  MARKER_PART
 One stroke of a mark. More...
 

Functions

int CuratedShapeCount ()
 Marks that stay legible at chart size and in monochrome.
 
unsigned CuratedShape (int aIndex)
 Pattern index for the nth curated mark.
 
std::vector< MARKER_PARTBuildMarker (const VECTOR2I &aPosition, int aRadius, unsigned aShapeId)
 Decompose one mark, in the order the parts must be drawn.
 

Variables

constexpr unsigned MARKER_COUNT = 58
 Total marks the pattern table can express.
 

Detailed Description

Drill marker outlines, as plain geometry.

The plotter and the canvas painter both build their marks from here so a symbol on screen and the same symbol in a plotted fabrication drawing cannot drift apart.

Function Documentation

◆ BuildMarker()

std::vector< MARKER_PART > DRILL_MARKERS::BuildMarker ( const VECTOR2I & aPosition,
int aRadius,
unsigned aShapeId )

Decompose one mark, in the order the parts must be drawn.

An out-of-range shape id yields a plain circle, matching the plotter's long-standing fallback.

Definition at line 146 of file drill_markers.cpp.

References addSegment(), DRILL_MARKERS::MARKER_PART::CIRCLE, KiROUND(), DRILL_MARKERS::MARKER_PART::m_Radius, DRILL_MARKERS::MARKER_PART::m_Type, MARKER_COUNT, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by KIGFX::PCB_PAINTER::drawChartSymbols(), KIGFX::PCB_PAINTER::drawDrillMarks(), and PLOTTER::Marker().

◆ CuratedShape()

unsigned DRILL_MARKERS::CuratedShape ( int aIndex)

◆ CuratedShapeCount()

int DRILL_MARKERS::CuratedShapeCount ( )

Marks that stay legible at chart size and in monochrome.

The later patterns in the table stack up to three parts on top of each other and are hard to tell apart on paper, so symbol assignment works through this subset first and falls back to letters rather than reaching for them.

Definition at line 131 of file drill_markers.cpp.

Referenced by AssignDrillSymbols(), and CuratedShape().

Variable Documentation

◆ MARKER_COUNT

unsigned DRILL_MARKERS::MARKER_COUNT = 58
constexpr

Total marks the pattern table can express.

Definition at line 40 of file drill_markers.h.

Referenced by BuildMarker().