KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_drc_backdrill_postmachining.cpp File Reference

Tests for DRC and connectivity checks related to backdrilling and post-machining. More...

Go to the source code of this file.

Classes

struct  BACKDRILL_TEST_FIXTURE
 

Functions

 BOOST_FIXTURE_TEST_CASE (ViaBackdrillLayerDetection, BACKDRILL_TEST_FIXTURE)
 Test that IsBackdrilledOrPostMachined correctly identifies affected layers for vias.
 
 BOOST_FIXTURE_TEST_CASE (ViaBottomBackdrillLayerDetection, BACKDRILL_TEST_FIXTURE)
 Regression test for GitLab #23902.
 
 BOOST_FIXTURE_TEST_CASE (ViaPostMachiningLayerDetection, BACKDRILL_TEST_FIXTURE)
 Test that IsBackdrilledOrPostMachined correctly identifies affected layers for post-machining.
 
 BOOST_FIXTURE_TEST_CASE (PadBackdrillLayerDetection, BACKDRILL_TEST_FIXTURE)
 Test that IsBackdrilledOrPostMachined correctly identifies affected layers for pads.
 
 BOOST_FIXTURE_TEST_CASE (ViaEffectiveShapeOnBackdrilledLayer, BACKDRILL_TEST_FIXTURE)
 Test that the backdrill widens the hole and the physical extents on affected layers, but leaves the copper shape alone.
 
 BOOST_FIXTURE_TEST_CASE (ZoneConnectivityWithBackdrill, BACKDRILL_TEST_FIXTURE)
 Test that connectivity correctly excludes backdrilled layers for zones.
 
 BOOST_FIXTURE_TEST_CASE (DRCTrackOnPostMachinedLayer, BACKDRILL_TEST_FIXTURE)
 Test DRC error for track connected to post-machined layer.
 
 BOOST_FIXTURE_TEST_CASE (DRCTrackOnBackdrilledLayer, BACKDRILL_TEST_FIXTURE)
 Test DRC error for track connected to backdrilled layer.
 
 BOOST_FIXTURE_TEST_CASE (DRCTrackOnUnaffectedLayerNoDRC, BACKDRILL_TEST_FIXTURE)
 Test that tracks on non-affected layers don't trigger DRC errors.
 
 BOOST_FIXTURE_TEST_CASE (DRCTrackOnBackdrilledPadLayer, BACKDRILL_TEST_FIXTURE)
 Test DRC for pad with backdrill and connected track.
 
 BOOST_FIXTURE_TEST_CASE (PadPostMachiningLayerDetection, BACKDRILL_TEST_FIXTURE)
 Test that pad post-machining is correctly detected.
 
 BOOST_FIXTURE_TEST_CASE (PadBackPostMachiningLayerDetection, BACKDRILL_TEST_FIXTURE)
 Test back post-machining detection.
 
 BOOST_FIXTURE_TEST_CASE (ViaBothBackdrillAndPostMachining, BACKDRILL_TEST_FIXTURE)
 Combined test: both backdrill and post-machining on same via.
 
 BOOST_FIXTURE_TEST_CASE (CountersinkAngleDecidegrees, BACKDRILL_TEST_FIXTURE)
 Verify that countersink angle is stored in decidegrees and the property system round-trips correctly.
 
 BOOST_FIXTURE_TEST_CASE (PadEffectiveShapeOnBackdrilledInnerLayer, BACKDRILL_TEST_FIXTURE)
 A normal padstack holds one shape, stored under PADSTACK::ALL_LAYERS.
 
 BOOST_FIXTURE_TEST_CASE (ViaHoleShapeUsesNetclassDrill, BACKDRILL_TEST_FIXTURE)
 A via can leave its drill unset and inherit the netclass value.
 

Detailed Description

Tests for DRC and connectivity checks related to backdrilling and post-machining.

Definition in file test_drc_backdrill_postmachining.cpp.

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/16]

BOOST_FIXTURE_TEST_CASE ( CountersinkAngleDecidegrees ,
BACKDRILL_TEST_FIXTURE  )

Verify that countersink angle is stored in decidegrees and the property system round-trips correctly.

Regression test for GitLab #23134.

Definition at line 696 of file test_drc_backdrill_postmachining.cpp.

References PADSTACK::ALL_LAYERS, PADSTACK::POST_MACHINING_PROPS::angle, B_Cu, BOOST_CHECK_EQUAL(), COUNTERSINK, F_Cu, PADSTACK::NORMAL, pcbIUScale, and via.

◆ BOOST_FIXTURE_TEST_CASE() [2/16]

BOOST_FIXTURE_TEST_CASE ( DRCTrackOnBackdrilledLayer ,
BACKDRILL_TEST_FIXTURE  )

Test DRC error for track connected to backdrilled layer.

Definition at line 509 of file test_drc_backdrill_postmachining.cpp.

References B_Cu, DRCE_TRACK_ON_POST_MACHINED_LAYER, F_Cu, In1_Cu, In2_Cu, pcbIUScale, and via.

◆ BOOST_FIXTURE_TEST_CASE() [3/16]

BOOST_FIXTURE_TEST_CASE ( DRCTrackOnBackdrilledPadLayer ,
BACKDRILL_TEST_FIXTURE  )

Test DRC for pad with backdrill and connected track.

Definition at line 574 of file test_drc_backdrill_postmachining.cpp.

References DRCE_TRACK_ON_POST_MACHINED_LAYER, F_Cu, In1_Cu, In2_Cu, pad, FOOTPRINT::Pads(), and pcbIUScale.

◆ BOOST_FIXTURE_TEST_CASE() [4/16]

BOOST_FIXTURE_TEST_CASE ( DRCTrackOnPostMachinedLayer ,
BACKDRILL_TEST_FIXTURE  )

Test DRC error for track connected to post-machined layer.

Definition at line 481 of file test_drc_backdrill_postmachining.cpp.

References COUNTERBORE, DRCE_TRACK_ON_POST_MACHINED_LAYER, F_Cu, pcbIUScale, and via.

◆ BOOST_FIXTURE_TEST_CASE() [5/16]

BOOST_FIXTURE_TEST_CASE ( DRCTrackOnUnaffectedLayerNoDRC ,
BACKDRILL_TEST_FIXTURE  )

Test that tracks on non-affected layers don't trigger DRC errors.

Definition at line 537 of file test_drc_backdrill_postmachining.cpp.

References B_Cu, BOOST_CHECK_EQUAL(), DRCE_TRACK_ON_POST_MACHINED_LAYER, F_Cu, In2_Cu, EDA_ITEM::m_Uuid, pcbIUScale, and via.

◆ BOOST_FIXTURE_TEST_CASE() [6/16]

BOOST_FIXTURE_TEST_CASE ( PadBackdrillLayerDetection ,
BACKDRILL_TEST_FIXTURE  )

Test that IsBackdrilledOrPostMachined correctly identifies affected layers for pads.

Definition at line 358 of file test_drc_backdrill_postmachining.cpp.

References B_Cu, F_Cu, In1_Cu, In2_Cu, In3_Cu, pad, FOOTPRINT::Pads(), and pcbIUScale.

◆ BOOST_FIXTURE_TEST_CASE() [7/16]

BOOST_FIXTURE_TEST_CASE ( PadBackPostMachiningLayerDetection ,
BACKDRILL_TEST_FIXTURE  )

Test back post-machining detection.

Definition at line 628 of file test_drc_backdrill_postmachining.cpp.

References B_Cu, COUNTERSINK, F_Cu, pad, FOOTPRINT::Pads(), and pcbIUScale.

◆ BOOST_FIXTURE_TEST_CASE() [8/16]

BOOST_FIXTURE_TEST_CASE ( PadEffectiveShapeOnBackdrilledInnerLayer ,
BACKDRILL_TEST_FIXTURE  )

A normal padstack holds one shape, stored under PADSTACK::ALL_LAYERS.

A backdrilled pad queried on an inner layer must still find that shape instead of throwing.

Definition at line 744 of file test_drc_backdrill_postmachining.cpp.

References ALWAYS_FLASHED, B_Cu, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), F_Cu, In1_Cu, In2_Cu, PADSTACK::NORMAL, pad, FOOTPRINT::Pads(), pcbIUScale, PHYSICAL_CLEARANCE_CONSTRAINT, and SILK_CLEARANCE_CONSTRAINT.

◆ BOOST_FIXTURE_TEST_CASE() [9/16]

BOOST_FIXTURE_TEST_CASE ( PadPostMachiningLayerDetection ,
BACKDRILL_TEST_FIXTURE  )

Test that pad post-machining is correctly detected.

Definition at line 602 of file test_drc_backdrill_postmachining.cpp.

References B_Cu, COUNTERBORE, F_Cu, pad, FOOTPRINT::Pads(), and pcbIUScale.

◆ BOOST_FIXTURE_TEST_CASE() [10/16]

BOOST_FIXTURE_TEST_CASE ( ViaBackdrillLayerDetection ,
BACKDRILL_TEST_FIXTURE  )

Test that IsBackdrilledOrPostMachined correctly identifies affected layers for vias.

Definition at line 276 of file test_drc_backdrill_postmachining.cpp.

References B_Cu, F_Cu, In1_Cu, In2_Cu, In3_Cu, pcbIUScale, and via.

◆ BOOST_FIXTURE_TEST_CASE() [11/16]

BOOST_FIXTURE_TEST_CASE ( ViaBothBackdrillAndPostMachining ,
BACKDRILL_TEST_FIXTURE  )

Combined test: both backdrill and post-machining on same via.

Definition at line 654 of file test_drc_backdrill_postmachining.cpp.

References PADSTACK::ALL_LAYERS, B_Cu, COUNTERBORE, F_Cu, In2_Cu, pcbIUScale, and via.

◆ BOOST_FIXTURE_TEST_CASE() [12/16]

BOOST_FIXTURE_TEST_CASE ( ViaBottomBackdrillLayerDetection ,
BACKDRILL_TEST_FIXTURE  )

Regression test for GitLab #23902.

Iterating LAYER_RANGE walked PCB_LAYER_ID enum order, so a bottom-anchored backdrill (B_Cu to In3_Cu) wrongly flagged the top inner layers and skipped the actually-drilled In4_Cu. A bottom backdrill must report only the bottom-side copper as machined.

Definition at line 307 of file test_drc_backdrill_postmachining.cpp.

References B_Cu, F_Cu, In1_Cu, In2_Cu, In3_Cu, In4_Cu, pcbIUScale, and via.

◆ BOOST_FIXTURE_TEST_CASE() [13/16]

BOOST_FIXTURE_TEST_CASE ( ViaEffectiveShapeOnBackdrilledLayer ,
BACKDRILL_TEST_FIXTURE  )

Test that the backdrill widens the hole and the physical extents on affected layers, but leaves the copper shape alone.

Definition at line 388 of file test_drc_backdrill_postmachining.cpp.

References PADSTACK::ALL_LAYERS, B_Cu, BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), CLEARANCE_CONSTRAINT, DEFAULT, F_Cu, In2_Cu, pcbIUScale, PHYSICAL_CLEARANCE_CONSTRAINT, and via.

◆ BOOST_FIXTURE_TEST_CASE() [14/16]

BOOST_FIXTURE_TEST_CASE ( ViaHoleShapeUsesNetclassDrill ,
BACKDRILL_TEST_FIXTURE  )

◆ BOOST_FIXTURE_TEST_CASE() [15/16]

BOOST_FIXTURE_TEST_CASE ( ViaPostMachiningLayerDetection ,
BACKDRILL_TEST_FIXTURE  )

Test that IsBackdrilledOrPostMachined correctly identifies affected layers for post-machining.

Definition at line 334 of file test_drc_backdrill_postmachining.cpp.

References B_Cu, COUNTERSINK, F_Cu, pcbIUScale, and via.

◆ BOOST_FIXTURE_TEST_CASE() [16/16]

BOOST_FIXTURE_TEST_CASE ( ZoneConnectivityWithBackdrill ,
BACKDRILL_TEST_FIXTURE  )

Test that connectivity correctly excludes backdrilled layers for zones.

Definition at line 436 of file test_drc_backdrill_postmachining.cpp.

References B_Cu, F_Cu, In2_Cu, pcbIUScale, and via.