From fc86de34f8e14cdb27677451c3a35dda2fcf08e3 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 1 Dec 2023 09:24:54 -0800 Subject: [PATCH] Add default parameter to GetEffectivePolygon() Allows legacy plugins to use this function (cherry picked from commit 6b3ac54a41f44b5987e92f5b17f00dbbcc360721) --- pcbnew/pad.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pcbnew/pad.h b/pcbnew/pad.h index b3c347fbe8..a361cc7c78 100644 --- a/pcbnew/pad.h +++ b/pcbnew/pad.h @@ -33,6 +33,7 @@ #include #include #include +#include #include class PCB_SHAPE; @@ -436,7 +437,7 @@ public: * @param ignoreLineWidth used for edge cuts where the line width is only for visualization. */ void TransformShapeToPolygon( SHAPE_POLY_SET& aBuffer, PCB_LAYER_ID aLayer, int aClearance, - int aMaxError, ERROR_LOC aErrorLoc, + int aMaxError, ERROR_LOC aErrorLoc = ERROR_INSIDE, bool ignoreLineWidth = false ) const override; /** @@ -449,7 +450,7 @@ public: * @return false if the pad has no hole, true otherwise. */ bool TransformHoleToPolygon( SHAPE_POLY_SET& aBuffer, int aClearance, int aError, - ERROR_LOC aErrorLoc ) const; + ERROR_LOC aErrorLoc = ERROR_INSIDE ) const; /** * Some pad shapes can be complex (rounded/chamfered rectangle), even without considering @@ -470,7 +471,7 @@ public: GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER, FLASHING flashPTHPads = FLASHING::DEFAULT ) const override; - const std::shared_ptr& GetEffectivePolygon( ERROR_LOC aErrorLoc ) const; + const std::shared_ptr& GetEffectivePolygon( ERROR_LOC aErrorLoc = ERROR_INSIDE ) const; /** * Return a SHAPE_SEGMENT object representing the pad's hole. @@ -730,7 +731,7 @@ public: * the dirty bit. */ void BuildEffectiveShapes( PCB_LAYER_ID aLayer ) const; - void BuildEffectivePolygon( ERROR_LOC aErrorLoc ) const; + void BuildEffectivePolygon( ERROR_LOC aErrorLoc = ERROR_INSIDE ) const; virtual void ViewGetLayers( int aLayers[], int& aCount ) const override;