41 case PCB_TRACE_T:
return std::make_unique<PCB_TRACK>( aContainer );
42 case PCB_ARC_T:
return std::make_unique<PCB_ARC>( aContainer );
43 case PCB_VIA_T:
return std::make_unique<PCB_VIA>( aContainer );
44 case PCB_TEXT_T:
return std::make_unique<PCB_TEXT>( aContainer );
45 case PCB_TEXTBOX_T:
return std::make_unique<PCB_TEXTBOX>( aContainer );
46 case PCB_SHAPE_T:
return std::make_unique<PCB_SHAPE>( aContainer );
47 case PCB_ZONE_T:
return std::make_unique<ZONE>( aContainer );
48 case PCB_GROUP_T:
return std::make_unique<PCB_GROUP>( aContainer );
58 return std::make_unique<PAD>( footprint );
63 BOARD* board =
dynamic_cast<BOARD*
>( aContainer );
68 return std::make_unique<FOOTPRINT>( board );
79void PackLayerSet( google::protobuf::RepeatedField<int>& aOutput,
const LSET& aLayerSet )
82 aOutput.Add( ToProtoEnum<PCB_LAYER_ID, types::BoardLayer>( layer ) );
90 for(
int layer : aProtoLayerSet )
94 FromProtoEnum<PCB_LAYER_ID>(
static_cast<types::BoardLayer
>( layer ) );
95 set.
set( boardLayer );
std::unique_ptr< BOARD_ITEM > CreateItemForType(KICAD_T aType, BOARD_ITEM_CONTAINER *aContainer)
BASE_SET & set(size_t pos)
Abstract interface for BOARD_ITEMs capable of storing other items inside.
Information pertinent to a Pcbnew printed circuit board.
LSET is a set of PCB_LAYER_IDs.
LSEQ Seq(const LSEQ &aSequence) const
Return an LSEQ from the union of this LSET and a desired sequence.
PCB_LAYER_ID
A quick note on layer IDs:
void PackLayerSet(google::protobuf::RepeatedField< int > &aOutput, const LSET &aLayerSet)
LSET UnpackLayerSet(const google::protobuf::RepeatedField< int > &aProtoLayerSet)
Class to handle a set of BOARD_ITEMs.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_REFERENCE_IMAGE_T
class PCB_REFERENCE_IMAGE, bitmap on a layer
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_PAD_T
class PAD, a pad in a footprint
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)