57    int actual_clearance = std::numeric_limits<int>::max();
 
   58    std::vector<const SHAPE*> a_shapes;
 
   59    std::vector<const SHAPE*> b_shapes;
 
   69            a_shapes.push_back( &polySet->
COutline( 0 ) );
 
   80            b_shapes.push_back( &polySet->
COutline( 0 ) );
 
   88        a_shapes.push_back( 
this );
 
   91        b_shapes.push_back( aOther );
 
   93    for( 
const SHAPE* a : a_shapes )
 
   95        for( 
const SHAPE* b : b_shapes )
 
   98            a->Collide( b, std::numeric_limits<int>::max() / 2, &temp_dist );
 
  100            if( temp_dist < actual_clearance )
 
  101                actual_clearance = temp_dist;
 
  105    return actual_clearance;
 
 
ERROR_LOC
When approximating an arc or circle, should the error be placed on the outside or inside of the curve...
 
VECTOR2I::extended_type ecoord
 
virtual size_t GetIndexableSubshapeCount() const
 
SHAPE_TYPE m_type
< type of our shape
 
virtual void GetIndexableSubshapes(std::vector< const SHAPE * > &aSubshapes) const
 
SHAPE_TYPE Type() const
Return the type of the shape.
 
bool PointInside(const VECTOR2I &aPt, int aAccuracy=0, bool aUseBBoxCache=false) const override
Check if point aP lies inside a closed shape.
 
SEG::ecoord SquaredDistance(const VECTOR2I &aP, bool aOutlineOnly=false) const override
 
Represent a set of closed polygons.
 
int AddOutline(const SHAPE_LINE_CHAIN &aOutline)
Adds a new outline to the set and returns its index.
 
int OutlineCount() const
Return the number of outlines in the set.
 
const SHAPE_LINE_CHAIN & COutline(int aIndex) const
 
SHAPE_LINE_CHAIN m_points
 
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.
 
int GetClearance(const SHAPE *aOther) const
Return the actual minimum distance between two shapes.
 
virtual void TransformToPolygon(SHAPE_POLY_SET &aBuffer, int aError, ERROR_LOC aErrorLoc) const =0
Fills a SHAPE_POLY_SET with a polygon representation of this shape.
 
virtual bool Parse(std::stringstream &aStream)
 
virtual bool PointInside(const VECTOR2I &aPt, int aAccuracy=0, bool aUseBBoxCache=false) const
Check if point aP lies inside a closed shape.
 
SHAPE(SHAPE_TYPE aType)
Create an empty shape of type aType.
 
virtual const std::string Format(bool aCplusPlus=true) const
 
virtual int Distance(const VECTOR2I &aP) const
Returns the minimum distance from a given point to this shape.
 
virtual SEG::ecoord SquaredDistance(const VECTOR2I &aP, bool aOutlineOnly=false) const
 
static constexpr extended_type ECOORD_MAX
 
@ SH_POLY_SET
set of polygons (with holes, etc.)
 
VECTOR2< int32_t > VECTOR2I