48 return VECTOR2I( expansion, expansion );
61 result.m_maxError = aMaxError;
66 const bool sameMargin =
result.m_margin.x ==
result.m_margin.y;
87 resolved.
SetSize( aLayer, adjustedSize );
101 resolved.
SetSize( aLayer, adjustedSize );
122 resolved.
SetSize( aLayer, adjustedSize );
132 dummy.SetSize( aLayer, adjustedSize );
140 makePolygonPad( outline );
141 result.m_contour = std::move( outline );
151 outline.
Append( -halfSize.
x - halfDelta.
y, halfSize.
y + halfDelta.
x );
152 outline.
Append( halfSize.
x + halfDelta.
y, halfSize.
y - halfDelta.
x );
153 outline.
Append( halfSize.
x - halfDelta.
y, -halfSize.
y + halfDelta.
x );
154 outline.
Append( -halfSize.
x + halfDelta.
y, -halfSize.
y - halfDelta.
x );
160 result.m_contour = std::move( outline );
165 makePolygonPad(
result.m_contour );
179 result.m_contour = std::move( outline );
183 resolved.
SetSize( aLayer,
VECTOR2I( std::max( 0, adjustedSize.
x ), std::max( 0, adjustedSize.
y ) ) );
188 default:
result.m_empty =
true;
break;
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
PAD_LAYER_GEOMETRY(const PAD &aPad, PCB_LAYER_ID aLayer)
SHAPE_POLY_SET Polygon() const
std::unique_ptr< PAD > m_pad
void SetAnchorPadShape(PCB_LAYER_ID aLayer, PAD_SHAPE aShape)
Set the shape of the anchor pad for custom shaped pads.
void MergePrimitivesAsPolygon(PCB_LAYER_ID aLayer, SHAPE_POLY_SET *aMergedPolygon, ERROR_LOC aErrorLoc=ERROR_INSIDE) const
Merge all basic shapes to a SHAPE_POLY_SET.
int GetRoundRectCornerRadius(PCB_LAYER_ID aLayer) const
void AddPrimitivePoly(PCB_LAYER_ID aLayer, const SHAPE_POLY_SET &aPoly, int aThickness, bool aFilled)
Has meaning only for custom shape pads.
const VECTOR2I & GetDelta(PCB_LAYER_ID aLayer) const
void SetShape(PCB_LAYER_ID aLayer, PAD_SHAPE aShape)
Set the new shape of this pad.
double GetRoundRectRadiusRatio(PCB_LAYER_ID aLayer) const
void DeletePrimitivesList(PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
Clear the basic shapes list.
PAD_SHAPE GetShape(PCB_LAYER_ID aLayer) const
int GetSolderMaskExpansion(PCB_LAYER_ID aLayer) const
VECTOR2I GetSize(PCB_LAYER_ID aLayer) const
void SetSize(PCB_LAYER_ID aLayer, const VECTOR2I &aSize)
void SetRoundRectCornerRadius(PCB_LAYER_ID aLayer, double aRadius)
VECTOR2I GetSolderPasteMargin(PCB_LAYER_ID aLayer) const
Usually < 0 (mask shape smaller than pad)because the margin can be dependent on the pad size,...
Represent a set of closed polygons.
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Appends a vertex at the end of the given outline/hole (default: the last outline)
int NewOutline()
Creates a new empty polygon in the set and returns its index.
void InflateWithLinkedHoles(int aFactor, CORNER_STRATEGY aCornerStrategy, int aMaxError)
Perform outline inflation/deflation, using round corners.
@ ROUND_ALL_CORNERS
All angles are rounded.
static constexpr EDA_ANGLE ANGLE_0
PAD_LAYER_GEOMETRY ResolvePadLayer(const PAD &aPad, PCB_LAYER_ID aLayer, int aMaxError)
Artwork on one layer as plotted by PlotStandardLayer; keep the plotter independent as the parity orac...
VECTOR2I ResolvePadMargin(const PAD &aPad, PCB_LAYER_ID aLayer)
Per-side mask or paste margin as PlotStandardLayer applies it.
PCB_LAYER_ID
A quick note on layer IDs:
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
PAD_SHAPE
The set of pad shapes, used with PAD::{Set,Get}Shape()
std::vector< FAB_LAYER_COLOR > dummy
wxString result
Test unit parsing edge cases and error handling.
VECTOR2< int32_t > VECTOR2I