37        ss << shape->Format() << 
" ";
 
 
   55        m_shapes.push_back( shape->Clone() );
 
 
   85    for( 
size_t i = 1; i < 
m_shapes.size(); i++ )
 
 
   94            item->
Move( aVector );
 
 
  120    int closest_dist = std::numeric_limits<int>::max();
 
  128        if( item->Collide( aSeg, aClearance,
 
  129                           aActual || aLocation ? &
actual : 
nullptr,
 
  130                           aLocation ? &pn : 
nullptr ) )
 
  132            if( 
actual < closest_dist )
 
  137                if( !aLocation && !aActual )
 
  140            else if( aLocation && 
actual == closest_dist )
 
  142                if( ( pn - aSeg.
A ).SquaredEuclideanNorm()
 
  143                    < ( nearest - aSeg.
A ).SquaredEuclideanNorm() )
 
  151    if( closest_dist == 0 || closest_dist < aClearance )
 
  154            *aLocation = nearest;
 
  157            *aActual = closest_dist;
 
 
  170        item->TransformToPolygon( aBuffer, aError, aErrorLoc );
 
 
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
 
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
 
constexpr void Move(const Vec &aMoveVector)
Move the rectangle by the aMoveVector.
 
bool IsSolid() const override
 
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
 
bool Collide(const SEG &aSeg, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
Check if the boundary of shape (this) lies closer to the segment aSeg than aClearance,...
 
const std::vector< SHAPE * > & Shapes() const
 
void TransformToPolygon(SHAPE_POLY_SET &aBuffer, int aError, ERROR_LOC aErrorLoc) const override
Fills a SHAPE_POLY_SET with a polygon representation of this shape.
 
std::vector< SHAPE * > m_shapes
 
const std::string Format(bool aCplusPlus=true) const override
 
SHAPE_COMPOUND * Clone() const override
Return a dynamically allocated copy of the shape.
 
void Rotate(const EDA_ANGLE &aAngle, const VECTOR2I &aCenter={ 0, 0 }) override
 
int Distance(const SEG &aSeg) const
 
void Move(const VECTOR2I &aVector) override
 
Represent a set of closed polygons.
 
SHAPE(SHAPE_TYPE aType)
Create an empty shape of type aType.
 
@ SH_COMPOUND
compound shape, consisting of multiple simple shapes
 
VECTOR2< int32_t > VECTOR2I