|
|
@ -148,6 +148,12 @@ public: |
|
|
|
*/ |
|
|
|
EDA_RECT GetFootprintRect() const; |
|
|
|
|
|
|
|
/** |
|
|
|
* Returns a bounding polygon for the shapes and pads in the module |
|
|
|
* This operation is slower but more accurate than calculating a bounding box |
|
|
|
*/ |
|
|
|
SHAPE_POLY_SET GetBoundingPoly() const; |
|
|
|
|
|
|
|
// Virtual function |
|
|
|
const EDA_RECT GetBoundingBox() const override; |
|
|
|
|
|
|
@ -336,7 +342,7 @@ public: |
|
|
|
* and adds these polygons to aCornerBuffer |
|
|
|
* Useful to generate a polygonal representation of a footprint |
|
|
|
* in 3D view and plot functions, when a full polygonal approach is needed |
|
|
|
* @param aLayer = the current layer: pads on this layer are considered |
|
|
|
* @param aLayer = the layer to consider, or UNDEFINED_LAYER to consider all |
|
|
|
* @param aCornerBuffer = the buffer to store polygons |
|
|
|
* @param aInflateValue = an additionnal size to add to pad shapes |
|
|
|
* aInflateValue = 0 to have the exact pad size |
|
|
@ -366,7 +372,7 @@ public: |
|
|
|
* and adds these polygons to aCornerBuffer |
|
|
|
* Useful to generate a polygonal representation of a footprint |
|
|
|
* in 3D view and plot functions, when a full polygonal approach is needed |
|
|
|
* @param aLayer = the current layer: items on this layer are considered |
|
|
|
* @param aLayer = the layer to consider, or UNDEFINED_LAYER to consider all |
|
|
|
* @param aCornerBuffer = the buffer to store polygons |
|
|
|
* @param aInflateValue = a value to inflate shapes |
|
|
|
* aInflateValue = 0 to have the exact shape size |
|
|
@ -385,7 +391,8 @@ public: |
|
|
|
int aInflateValue, |
|
|
|
int aCircleToSegmentsCount, |
|
|
|
double aCorrectionFactor, |
|
|
|
int aCircleToSegmentsCountForTexts = 0 ) const; |
|
|
|
int aCircleToSegmentsCountForTexts = 0, |
|
|
|
bool aIncludeText = true ) const; |
|
|
|
|
|
|
|
/** |
|
|
|
* @brief TransformGraphicTextWithClearanceToPolygonSet |
|
|
@ -430,6 +437,17 @@ public: |
|
|
|
|
|
|
|
bool HitTest( const wxPoint& aPosition ) const override; |
|
|
|
|
|
|
|
/** |
|
|
|
* Tests if a point is inside the bounding polygon of the module |
|
|
|
* |
|
|
|
* The other hit test methods are just checking the bounding box, which |
|
|
|
* can be quite inaccurate for rotated or oddly-shaped footprints. |
|
|
|
* |
|
|
|
* @param aPosition is the point to test |
|
|
|
* @return true if aPosition is inside the bounding polygon |
|
|
|
*/ |
|
|
|
bool HitTestAccurate( const wxPoint& aPosition ) const; |
|
|
|
|
|
|
|
bool HitTest( const EDA_RECT& aRect, bool aContained = true, int aAccuracy = 0 ) const override; |
|
|
|
|
|
|
|
/** |
|
|
|