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 <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 | 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 85 of file drc_test_provider_library_parity.cpp.
#define EPSILON_D 0.000002 |
Definition at line 101 of file drc_test_provider_library_parity.cpp.
#define ITEM_DESC | ( | item | ) |
Definition at line 116 of file drc_test_provider_library_parity.cpp.
Referenced by zoneNeedsUpdate().
#define PAD_DESC | ( | pad | ) |
Definition at line 117 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 71 of file drc_test_provider_library_parity.cpp.
Referenced by 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 102 of file drc_test_provider_library_parity.cpp.
Referenced by padNeedsUpdate(), and zoneNeedsUpdate().
#define TEST_PT | ( | a, | |
b, | |||
msg ) |
Definition at line 86 of file drc_test_provider_library_parity.cpp.
Referenced by padNeedsUpdate(), primitiveNeedsUpdate(), and shapeNeedsUpdate().
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 621 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 123 of file drc_test_provider_library_parity.cpp.
References BOARD::GetEnabledLayers(), and BOARD_ITEM::GetLayerSet().
Referenced by padNeedsUpdate(), and zoneNeedsUpdate().
Definition at line 200 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 271 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 134 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 435 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 596 of file drc_test_provider_library_parity.cpp.
References _, BOARD_ITEM::GetLayerSet(), FOOTPRINT::GetStackupMode(), and TEST.
Referenced by FOOTPRINT::FootprintNeedsUpdate().
Definition at line 505 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 | ) |