KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ALLEGRO::BOARD_BUILDER::GRAPHIC_DEDUP Class Reference

Rejects graphics that repeat one already accepted into the same container. More...

Public Member Functions

bool IsFirst (const BOARD_ITEM *aItem)
 True when this graphic has not been seen before, and records it.
 

Private Attributes

std::unordered_set< const BOARD_ITEM *, GRAPHIC_KEY_HASH, GRAPHIC_KEY_EQm_seen
 

Detailed Description

Rejects graphics that repeat one already accepted into the same container.

Allegro stacks coincident graphics on documentation layers, up to a third of the items on some designs. They are indistinguishable once drawn, so keeping them only inflates the board. Scope one of these per container: footprint graphics are in footprint-relative coordinates, so identical shapes in different instances are not duplicates.

Definition at line 126 of file allegro_builder.h.

Member Function Documentation

◆ IsFirst()

bool BOARD_BUILDER::GRAPHIC_DEDUP::IsFirst ( const BOARD_ITEM * aItem)

True when this graphic has not been seen before, and records it.

Definition at line 2240 of file allegro_builder.cpp.

References m_seen, PCB_SHAPE_T, PCB_TEXT_T, and EDA_ITEM::Type().

Referenced by ALLEGRO::BOARD_BUILDER::buildFootprint().

Member Data Documentation

◆ m_seen

std::unordered_set<const BOARD_ITEM*, GRAPHIC_KEY_HASH, GRAPHIC_KEY_EQ> ALLEGRO::BOARD_BUILDER::GRAPHIC_DEDUP::m_seen
private

Definition at line 133 of file allegro_builder.h.

Referenced by IsFirst().


The documentation for this class was generated from the following files: