37 aBoard.SetCopperLayerCount( 4 );
38 aBoard.SetEnabledLayers( aBoard.GetEnabledLayers() |
LSET::AllCuMask( 4 ) );
39 aBoard.GetDesignSettings().SetCopperLayerCount( 4 );
49 via->SetPosition( aPos );
69 std::unique_ptr<FOOTPRINT> footprint = std::make_unique<FOOTPRINT>( &board );
72 const int outerDiameter =
pcbIUScale.mmToIU( 5.0 );
73 const int innerDiameter =
pcbIUScale.mmToIU( 3.0 );
74 const int holeDiameter =
pcbIUScale.mmToIU( 2.5 );
82 pad->SetDrillSize(
VECTOR2I( holeDiameter, holeDiameter ) );
87 footprint->Add(
pad );
88 board.
Add( footprint.release() );
96 "the via and the pad do not touch on F.Cu, so the rest of this test proves nothing" );
98 BOOST_CHECK_MESSAGE(
via->FlashLayer(
F_Cu ),
"the via lost its ring on its start layer" );
99 BOOST_CHECK_MESSAGE(
via->FlashLayer(
B_Cu ),
"the via lost its ring on its end layer" );
100 BOOST_CHECK_MESSAGE(
pad->FlashLayer(
F_Cu ),
"the pad lost its front copper" );
102 BOOST_CHECK_MESSAGE( !
via->FlashLayer(
In1_Cu ),
"the via has a ring on In1.Cu where it touches nothing" );
103 BOOST_CHECK_MESSAGE( !
via->FlashLayer(
In2_Cu ),
"the via has a ring on In2.Cu where it touches nothing" );
104 BOOST_CHECK_MESSAGE( !
pad->FlashLayer(
In1_Cu ),
"the pad has copper on In1.Cu where it touches nothing" );
105 BOOST_CHECK_MESSAGE( !
pad->FlashLayer(
In2_Cu ),
"the pad has copper on In2.Cu where it touches nothing" );
131 "the via and the track do not touch on In1.Cu, so this test proves nothing" );
133 BOOST_CHECK_MESSAGE(
via->FlashLayer(
In1_Cu ),
"the via lost the ring on the layer its track is on" );
134 BOOST_CHECK_MESSAGE( !
via->FlashLayer(
In2_Cu ),
"the via has a ring on In2.Cu where it touches nothing" );
constexpr EDA_IU_SCALE pcbIUScale
virtual void SetNet(NETINFO_ITEM *aNetInfo)
Set a NET_INFO object for the item.
void SetLayer(PCB_LAYER_ID aLayer) override
Set the layer this item is on.
Information pertinent to a Pcbnew printed circuit board.
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
bool BuildConnectivity(PROGRESS_REPORTER *aReporter=nullptr)
Build or rebuild the board connectivity database for the board, especially the list of connected item...
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
bool IsConnectedOnLayer(const BOARD_CONNECTED_ITEM *aItem, int aLayer, const std::initializer_list< KICAD_T > &aTypes={}) const
static LSET AllCuMask(int aCuLayerCount)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Handle the data for a net.
@ NORMAL
Shape is the same on all layers.
@ FRONT_INNER_BACK
Up to three shapes can be defined (F_Cu, inner copper layers, B_Cu)
static constexpr PCB_LAYER_ID ALL_LAYERS
! The layer identifier to use for the single defintion on normal padstacks
static constexpr PCB_LAYER_ID INNER_LAYERS
! The layer identifier to use for "inner layers" on top/inner/bottom padstacks
void SetEnd(const VECTOR2I &aEnd)
void SetStart(const VECTOR2I &aStart)
virtual void SetWidth(int aWidth)
@ PTH
Plated through hole pad.
@ REMOVE_EXCEPT_START_AND_END
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_SUITE_END()
VECTOR2< int32_t > VECTOR2I