37 std::vector<PCB_SHAPE> shortestPathShapes1, shortestPathShapes2;
48 sh.SetStroke(
false );
49 sh.SetFilled(
false );
50 sh.SetLineColor(
WHITE );
51 shortestPathShapes1.push_back( sh );
54 sh.SetFillColor( errorColor.
WithAlpha( 0.5 ) );
55 sh.SetWidth( aLength / 10 );
56 shortestPathShapes2.push_back( sh );
59 if( shortestPathShapes1.size() > 0 )
64 VECTOR2I V1 = shortestPathShapes1[0].GetStart() - shortestPathShapes1[0].GetEnd();
73 VECTOR2I V2 = shortestPathShapes1.back().GetStart() - shortestPathShapes1.back().GetEnd();
81 shortestPathShapes1.push_back( s1 );
82 shortestPathShapes1.push_back( s2 );
86 [aCommit, shortestPathShapes1, shortestPathShapes2](
PCB_MARKER* aMarker )
88 if( !aCommit || !aMarker )
91 aMarker->SetShapes1( std::move( shortestPathShapes1 ) );
92 aMarker->SetShapes2( std::move( shortestPathShapes2 ) );
100 std::shared_ptr<DRC_ITEM>& aDrce,
const VECTOR2I& aMarkerPos,
int aMarkerLayer,
116 double minValue = aDistance * 2;
119 for( std::shared_ptr<GraphConnection> gc : graph.
m_connections )
121 if( ( gc->m_path.weight < minValue ) && ( gc->m_path.weight > 0 ) )
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
Color settings are a bit different than most of the settings objects in that there can be more than o...
static std::vector< COLOR_SETTINGS * > CreateBuiltinColorSettings()
Constructs and returns a list of color settings objects based on the built-in color themes.
static const wxString COLOR_BUILTIN_DEFAULT
COLOR4D GetColor(int aLayer) const
A graph with nodes and connections for creepage calculation.
std::shared_ptr< GraphNode > AddNodeVirtual()
std::vector< std::shared_ptr< GraphConnection > > m_connections
void Addshape(const SHAPE &aShape, std::shared_ptr< GraphNode > &aConnectTo, BOARD_ITEM *aParent=nullptr)
void GeneratePaths(double aMaxWeight, PCB_LAYER_ID aLayer, bool aGenerateBoardEdges=true)
DRC_GRAPHICS_HANDLER m_graphicsHandler
DRC_GRAPHICS_HANDLER m_GraphicsHandlerBuffer
void ReportAndShowPathCuToCu(std::shared_ptr< DRC_ITEM > &aDrce, const VECTOR2I &aMarkerPos, int aMarkerLayer, const BOARD_ITEM *aItem1, const BOARD_ITEM *aItem2, PCB_LAYER_ID layer, int aDistance)
void ShowPathDRC(const std::vector< PCB_SHAPE > &aShapes, const VECTOR2I &aStart, const VECTOR2I &aEnd, int aLength)
virtual void reportViolation(std::shared_ptr< DRC_ITEM > &item, const VECTOR2I &aMarkerPos, int aMarkerLayer)
void SetFilled(bool aFlag)
void SetStart(const VECTOR2I &aStart)
void SetLineColor(const COLOR4D &aColor)
void SetEnd(const VECTOR2I &aEnd)
void SetWidth(int aWidth)
std::vector< PCB_SHAPE > GetShapes()
A color representation with 4 components: red, green, blue, alpha.
COLOR4D WithAlpha(double aAlpha) const
Return a color with the same color, but the given alpha.
constexpr VECTOR2< T > Perpendicular() const
Compute the perpendicular vector.
VECTOR2< T > Resize(T aNewLength) const
Return a vector of the same direction, but length specified in aNewLength.
@ LAYER_DRC_ERROR
layer for drc markers with SEVERITY_ERROR
PCB_LAYER_ID
A quick note on layer IDs: