| 
    KiCad PCB EDA Suite
    
   | 
 
#include <layer_range.h>#include <layer_utils.h>#include <kiway.h>#include <macros.h>#include <netlist_reader/pcb_netlist.h>#include <fp_lib_table.h>#include <board.h>#include <pcb_shape.h>#include <pcb_barcode.h>#include <zone.h>#include <footprint.h>#include <pad.h>#include <drc/drc_engine.h>#include <drc/drc_item.h>#include <drc/drc_test_provider.h>#include <project_pcb.h>#include <string_utils.h>Go to the source code of this file.
Classes | |
| class | DRC_TEST_PROVIDER_LIBRARY_PARITY | 
Namespaces | |
| namespace | detail | 
Macros | |
| #define | TEST(a, b, msg) | 
| #define | EPSILON 2 | 
| #define | TEST_PT(a, b, msg) | 
| #define | EPSILON_D 0.000002 | 
| #define | TEST_D(a, b, msg) | 
| #define | ITEM_DESC(item) | 
| #define | PAD_DESC(pad) | 
| #define | REPORT_MSG(s, p) | 
| #define | TEST_ATTR(a, b, attr, msg) | 
| #define | REPORT(msg) | 
| #define | CHECKPOINT { if( diff && !aReporter ) return diff; } | 
Functions | |
| LSET | getBoardNormalizedLayerSet (const BOARD_ITEM *aLibItem, const BOARD *aBoard) | 
| bool | primitiveNeedsUpdate (const std::shared_ptr< PCB_SHAPE > &a, const std::shared_ptr< PCB_SHAPE > &b) | 
| bool | padHasOverrides (const PAD *a, const PAD *b, REPORTER &aReporter) | 
| bool | padNeedsUpdate (const PAD *a, const PAD *b, REPORTER *aReporter) | 
| bool | barcodeNeedsUpdate (const PCB_BARCODE &curr_barcode, const PCB_BARCODE &ref_barcode) | 
| bool | shapeNeedsUpdate (const PCB_SHAPE &curr_shape, const PCB_SHAPE &ref_shape) | 
| bool | zoneNeedsUpdate (const ZONE *a, const ZONE *b, REPORTER *aReporter) | 
| bool | stackupNeedsUpdate (const FOOTPRINT &a, const FOOTPRINT &b, REPORTER *aReporter) | 
| Compare the stackup related settings of two footprints.   | |
| bool | footprintVsBoardStackup (const FOOTPRINT &aFp, const BOARD &aBoard, REPORTER *aReporter) | 
| Report board->footprint stackup differences.   | |
Variables | |
| UNITS_PROVIDER | g_unitsProvider (pcbIUScale, EDA_UNITS::MM) | 
| static DRC_REGISTER_TEST_PROVIDER< DRC_TEST_PROVIDER_LIBRARY_PARITY > | detail::dummy | 
| #define CHECKPOINT { if( diff && !aReporter ) return diff; } | 
Referenced by FOOTPRINT::FootprintNeedsUpdate().
| #define EPSILON 2 | 
Definition at line 86 of file drc_test_provider_library_parity.cpp.
| #define EPSILON_D 0.000002 | 
Definition at line 102 of file drc_test_provider_library_parity.cpp.
| #define ITEM_DESC | ( | item | ) | 
Definition at line 117 of file drc_test_provider_library_parity.cpp.
Referenced by barcodeNeedsUpdate(), and zoneNeedsUpdate().
| #define PAD_DESC | ( | pad | ) | 
Definition at line 118 of file drc_test_provider_library_parity.cpp.
Referenced by padHasOverrides(), and padNeedsUpdate().
| #define REPORT | ( | msg | ) | 
| #define REPORT_MSG | ( | s, | |
| p ) | 
Referenced by padHasOverrides().
| #define TEST | ( | a, | |
| b, | |||
| msg ) | 
Definition at line 72 of file drc_test_provider_library_parity.cpp.
Referenced by barcodeNeedsUpdate(), padNeedsUpdate(), primitiveNeedsUpdate(), shapeNeedsUpdate(), stackupNeedsUpdate(), and zoneNeedsUpdate().
| #define TEST_ATTR | ( | a, | |
| b, | |||
| attr, | |||
| msg ) | 
Referenced by FOOTPRINT::FootprintNeedsUpdate().
| #define TEST_D | ( | a, | |
| b, | |||
| msg ) | 
Definition at line 103 of file drc_test_provider_library_parity.cpp.
Referenced by padNeedsUpdate(), and zoneNeedsUpdate().
| #define TEST_PT | ( | a, | |
| b, | |||
| msg ) | 
Definition at line 87 of file drc_test_provider_library_parity.cpp.
Referenced by barcodeNeedsUpdate(), padNeedsUpdate(), primitiveNeedsUpdate(), and shapeNeedsUpdate().
| bool barcodeNeedsUpdate | ( | const PCB_BARCODE & | curr_barcode, | 
| const PCB_BARCODE & | ref_barcode ) | 
Definition at line 436 of file drc_test_provider_library_parity.cpp.
References _, PCB_BARCODE::GetErrorCorrection(), PCB_BARCODE::GetHeight(), PCB_BARCODE::GetKind(), PCB_BARCODE::GetPosition(), PCB_BARCODE::GetText(), PCB_BARCODE::GetTextSize(), PCB_BARCODE::GetWidth(), ITEM_DESC, TEST, and TEST_PT.
Referenced by FOOTPRINT::FootprintNeedsUpdate().
Report board->footprint stackup differences.
This is not necessarily a comparison failure, but may be useful information for the user to see.
Definition at line 650 of file drc_test_provider_library_parity.cpp.
References _, LAYER_UTILS::AccumulateNames(), LSET::AllCuMask(), LSET::AllCuMask(), EXPAND_INNER_LAYERS, BOARD::GetEnabledLayers(), FOOTPRINT::GetStackupLayers(), FOOTPRINT::GetStackupMode(), REPORTER::Report(), and LSET::UserDefinedLayersMask().
Referenced by FOOTPRINT::FootprintNeedsUpdate().
| LSET getBoardNormalizedLayerSet | ( | const BOARD_ITEM * | aLibItem, | 
| const BOARD * | aBoard ) | 
Definition at line 124 of file drc_test_provider_library_parity.cpp.
References BOARD::GetEnabledLayers(), and BOARD_ITEM::GetLayerSet().
Referenced by padNeedsUpdate(), and zoneNeedsUpdate().
Definition at line 201 of file drc_test_provider_library_parity.cpp.
References _, PAD::GetCustomShapeInZoneOpt(), PAD::GetLocalClearance(), PAD::GetLocalSolderMaskMargin(), PAD::GetLocalSolderPasteMargin(), PAD::GetLocalSolderPasteMarginRatio(), PAD::GetLocalThermalGapOverride(), PAD::GetLocalThermalSpokeWidthOverride(), PAD::GetLocalZoneConnection(), PAD::GetThermalGap(), PAD::GetThermalSpokeAngle(), INHERITED, PAD_DESC, and REPORT_MSG.
Referenced by FOOTPRINT::FootprintNeedsUpdate(), and padNeedsUpdate().
Definition at line 272 of file drc_test_provider_library_parity.cpp.
References _, EDA_ANGLE::AsDegrees(), CHAMFERED_RECT, PADSTACK::ForEachUniqueLayer(), PAD::GetAttribute(), BOARD_ITEM::GetBoard(), getBoardNormalizedLayerSet(), PAD::GetChamferPositions(), PAD::GetChamferRectRatio(), PAD::GetDelta(), PAD::GetDrillShape(), PAD::GetDrillSize(), PAD::GetFPRelativeOrientation(), BOARD_ITEM::GetFPRelativePosition(), PAD::GetKeepTopBottom(), BOARD::GetLayerName(), PAD::GetNumber(), PAD::GetOffset(), PAD::GetPadToDieLength(), PAD::GetPrimitives(), PAD::GetProperty(), PAD::GetRemoveUnconnected(), PAD::GetRoundRectRadiusRatio(), PAD::GetShape(), PAD::GetSize(), LayerName(), EDA_ANGLE::Normalize(), PAD_DESC, padHasOverrides(), PAD::Padstack(), primitiveNeedsUpdate(), REPORTER::Report(), ROUNDRECT, TEST, TEST_D, TEST_PT, UNDEFINED_LAYER, and PADSTACK::UniqueLayers().
Referenced by FOOTPRINT::FootprintNeedsUpdate().
| bool primitiveNeedsUpdate | ( | const std::shared_ptr< PCB_SHAPE > & | a, | 
| const std::shared_ptr< PCB_SHAPE > & | b ) | 
Definition at line 135 of file drc_test_provider_library_parity.cpp.
References ARC, BEZIER, CIRCLE, BOX2< Vec >::GetEnd(), BOX2< Vec >::GetOrigin(), BOX2< Vec >::Normalize(), pcbIUScale, POLY, RECTANGLE, SEGMENT, TEST, TEST_PT, and UNIMPLEMENTED_FOR.
Referenced by padNeedsUpdate().
Definition at line 464 of file drc_test_provider_library_parity.cpp.
References ARC, BEZIER, CIRCLE, SHAPE_POLY_SET::CVertex(), EDA_SHAPE::GetArcMid(), EDA_SHAPE::GetBezierC1(), EDA_SHAPE::GetBezierC2(), BOX2< Vec >::GetEnd(), EDA_SHAPE::GetEnd(), EDA_SHAPE::GetFillMode(), PCB_SHAPE::GetLayer(), BOX2< Vec >::GetOrigin(), EDA_SHAPE::GetPolyShape(), EDA_SHAPE::GetShape(), EDA_SHAPE::GetStart(), PCB_SHAPE::GetStroke(), BOARD_ITEM::IsOnCopperLayer(), BOX2< Vec >::Normalize(), pcbIUScale, POLY, RECTANGLE, SEGMENT, EDA_SHAPE::SHAPE_T_asString(), TEST, TEST_PT, SHAPE_POLY_SET::TotalVertices(), and UNIMPLEMENTED_FOR.
Referenced by FOOTPRINT::FootprintNeedsUpdate().
Compare the stackup related settings of two footprints.
Returns true if they differ.
Definition at line 625 of file drc_test_provider_library_parity.cpp.
References _, BOARD_ITEM::GetLayerSet(), FOOTPRINT::GetStackupMode(), and TEST.
Referenced by FOOTPRINT::FootprintNeedsUpdate().
Definition at line 534 of file drc_test_provider_library_parity.cpp.
References _, EDA_ANGLE::AsDegrees(), SHAPE_POLY_SET::CVertex(), ZONE::GetAssignedPriority(), BOARD_ITEM::GetBoard(), getBoardNormalizedLayerSet(), ZONE::GetCornerRadius(), ZONE::GetCornerSmoothingType(), ZONE::GetDoNotAllowFootprints(), ZONE::GetDoNotAllowPads(), ZONE::GetDoNotAllowTracks(), ZONE::GetDoNotAllowVias(), ZONE::GetDoNotAllowZoneFills(), ZONE::GetFillMode(), ZONE::GetHatchGap(), ZONE::GetHatchHoleMinArea(), ZONE::GetHatchOrientation(), ZONE::GetHatchSmoothingLevel(), ZONE::GetHatchSmoothingValue(), ZONE::GetHatchThickness(), ZONE::GetIslandRemovalMode(), ZONE::GetIsRuleArea(), ZONE::GetLayerSet(), ZONE::GetLocalClearance(), ZONE::GetMinIslandArea(), ZONE::GetMinThickness(), ZONE::GetPadConnection(), ZONE::GetThermalReliefGap(), ZONE::GetThermalReliefSpokeWidth(), ZONE::GetZoneName(), ITEM_DESC, ZONE::Outline(), REPORTER::Report(), TEST, TEST_D, and SHAPE_POLY_SET::TotalVertices().
Referenced by FOOTPRINT::FootprintNeedsUpdate().
| UNITS_PROVIDER g_unitsProvider(pcbIUScale, EDA_UNITS::MM) | ( | pcbIUScale | , | 
| EDA_UNITS::MM | ) |