41 int aWalkaroundThickness )
43 int cl = aClearance + ( aWalkaroundThickness + 1 )/ 2;
45 switch( aShape->
Type() )
63 2.0 * ( 1.0 - M_SQRT1_2 ) * ( r + cl ) );
69 return SegmentHull( *seg, aClearance, aWalkaroundThickness );
75 return ArcHull( *arc, aClearance, aWalkaroundThickness );
100 return HoleHull( aClearance, aWalkaroundThickness, aLayer );
109 if ( cmpnd->
Shapes().size() == 1 )
112 aWalkaroundThickness );
121 aWalkaroundThickness ) );
144 if ( cmpnd->
Shapes().size() == 1 )
147 aWalkaroundThickness );
156 aWalkaroundThickness ) );
Base class for PNS router board items.
static ROUTER * GetInstance()
const SHAPE_LINE_CHAIN Hull(int aClearance=0, int aWalkaroundThickness=0, int aLayer=-1) const override
const SHAPE_LINE_CHAIN HoleHull(int aClearance, int aWalkaroundThickness, int aLayer) const override
void SetPos(const VECTOR2I &aCenter)
ITEM * Clone() const override
Return a deep copy of the item.
SHAPE_TYPE Type() const
Return the type of the shape.
const VECTOR2I GetCenter() const
const std::vector< SHAPE * > & Shapes() const
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Represent a set of closed polygons.
int AddOutline(const SHAPE_LINE_CHAIN &aOutline)
Adds a new hole to the given outline (default: last) and returns its index.
void Simplify(POLYGON_MODE aFastMode)
SHAPE_LINE_CHAIN & Outline(int aIndex)
const VECTOR2I & GetPosition() const
const VECTOR2I GetSize() const
Represent a simple polygon consisting of a zero-thickness closed chain of connected line segments.
An abstract shape on 2D plane.
virtual void Move(const VECTOR2I &aVector)=0
Push and Shove diff pair dimensions (gap) settings dialog.
const SHAPE_LINE_CHAIN OctagonalHull(const VECTOR2I &aP0, const VECTOR2I &aSize, int aClearance, int aChamfer)
const SHAPE_LINE_CHAIN ArcHull(const SHAPE_ARC &aSeg, int aClearance, int aWalkaroundThickness)
Various utility functions.
const SHAPE_LINE_CHAIN ConvexHull(const SHAPE_SIMPLE &aConvex, int aClearance)
Function ConvexHull()
const SHAPE_LINE_CHAIN SegmentHull(const SHAPE_SEGMENT &aSeg, int aClearance, int aWalkaroundThickness)
static const SHAPE_LINE_CHAIN buildHullForPrimitiveShape(const SHAPE *aShape, int aClearance, int aWalkaroundThickness)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
@ SH_RECT
axis-aligned rectangle
@ SH_SIMPLE
simple polygon
@ SH_COMPOUND
compound shape, consisting of multiple simple shapes
static wxString SHAPE_TYPE_asString(SHAPE_TYPE a)