39 auto footprint = std::make_unique<FOOTPRINT>( &board );
44 auto pad1 =
new PAD( footprint.get() );
45 auto pad2 =
new PAD( footprint.get() );
56 pad1->SetDrillSize(
VECTOR2I( drill, drill ) );
57 pad2->SetDrillSize(
VECTOR2I( drill, drill ) );
58 pad1->SetPosition(
VECTOR2I( 0, 0 ) );
59 pad2->SetPosition(
VECTOR2I( 0, 0 ) );
65 footprint->Add( pad1 );
66 footprint->Add( pad2 );
67 board.
Add( footprint.release() );
71 BOOST_CHECK( pad1->FlashLayer(
F_Cu ) );
72 BOOST_CHECK( pad2->FlashLayer(
B_Cu ) );
73 BOOST_CHECK( !pad1->FlashLayer(
In1_Cu ) );
74 BOOST_CHECK( !pad2->FlashLayer(
In1_Cu ) );
82 auto footprint1 = std::make_unique<FOOTPRINT>( &board );
83 auto footprint2 = std::make_unique<FOOTPRINT>( &board );
88 auto pad1 =
new PAD( footprint1.get() );
89 auto pad2 =
new PAD( footprint2.get() );
100 pad1->SetDrillSize(
VECTOR2I( drill, drill ) );
101 pad2->SetDrillSize(
VECTOR2I( drill, drill ) );
102 pad1->SetPosition(
VECTOR2I( 0, 0 ) );
103 pad2->SetPosition(
VECTOR2I( 0, 0 ) );
109 footprint1->Add( pad1 );
110 footprint2->Add( pad2 );
111 board.
Add( footprint1.release() );
112 board.
Add( footprint2.release() );
116 BOOST_CHECK( pad1->FlashLayer(
F_Cu ) );
117 BOOST_CHECK( pad2->FlashLayer(
B_Cu ) );
118 BOOST_CHECK( !pad1->FlashLayer(
In1_Cu ) );
119 BOOST_CHECK( !pad2->FlashLayer(
In1_Cu ) );
128 auto footprint = std::make_unique<FOOTPRINT>( &board );
133 auto pad =
new PAD( footprint.get() );
146 pad->BuildEffectiveShapes();
148 auto shapes =
pad->GetEffectiveShape(
F_Mask );
155 shapes =
pad->GetEffectiveShape(
B_Mask );
constexpr EDA_IU_SCALE pcbIUScale
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.
void SetBoardUse(BOARD_USE aUse)
Set what the board is going to be used for.
bool BuildConnectivity(PROGRESS_REPORTER *aReporter=nullptr)
Build or rebuild the board connectivity database for the board, especially the list of connected item...
static const LSET & AllBoardTechMask()
Return a mask holding board technical layers (no CU layer) on both side.
static LSET AllCuMask(int aCuLayerCount)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Handle the data for a net.
@ CUSTOM
Shapes can be defined on arbitrary layers.
static constexpr PCB_LAYER_ID ALL_LAYERS
! Temporary layer identifier to identify code that is not padstack-aware
const std::vector< SHAPE * > & Shapes() const
An abstract shape on 2D plane.
@ PTH
Plated through hole pad.
@ REMOVE_EXCEPT_START_AND_END
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(PadsInSameFootprintDoNotForceInnerLayerFlashing)
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I