Browse Source

pcbnew: made TransformShapeWithClearanceToPolygon virtual

pull/5/merge
Tomasz Włostowski 8 years ago
parent
commit
58ce865352
  1. 7
      include/class_board_item.h
  2. 9
      pcbnew/board_items_to_polygon_shape_transform.cpp
  3. 9
      pcbnew/class_board_item.cpp
  4. 2
      pcbnew/class_drawsegment.h
  5. 2
      pcbnew/class_pad.h
  6. 2
      pcbnew/class_track.h
  7. 6
      pcbnew/class_zone.h

7
include/class_board_item.h

@ -39,7 +39,7 @@
class BOARD;
class BOARD_ITEM_CONTAINER;
class EDA_DRAW_PANEL;
class SHAPE_POLY_SET;
/**
* Enum STROKE_T
@ -334,6 +334,11 @@ public:
static std::string FormatInternalUnits( const wxSize& aSize );
virtual void ViewGetLayers( int aLayers[], int& aCount ) const override;
virtual void TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
int aClearanceValue,
int aCircleToSegmentsCount,
double aCorrectionFactor ) const;
};
#endif /* BOARD_ITEM_STRUCT_H */

9
pcbnew/board_items_to_polygon_shape_transform.cpp

@ -1251,3 +1251,12 @@ void CreateThermalReliefPadPolygon( SHAPE_POLY_SET& aCornerBuffer,
;
}
}
void ZONE_CONTAINER::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
int aClearanceValue,
int aCircleToSegmentsCount,
double aCorrectionFactor ) const
{
aCornerBuffer = m_FilledPolysList;
aCornerBuffer.Simplify( SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
}

9
pcbnew/class_board_item.cpp

@ -31,6 +31,7 @@
#include <fctsys.h>
#include <common.h>
#include <pcbnew.h>
#include <wx/debug.h>
#include <class_board.h>
#include <string>
@ -264,3 +265,11 @@ void BOARD_ITEM::SwapData( BOARD_ITEM* aImage )
{
}
void BOARD_ITEM::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
int aClearanceValue,
int aCircleToSegmentsCount,
double aCorrectionFactor ) const
{
wxASSERT_MSG(false, wxT("Called TransformShapeWithClearanceToPolygon() on unsupported BOARD_ITEM."));
};

2
pcbnew/class_drawsegment.h

@ -230,7 +230,7 @@ public:
void TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
int aClearanceValue,
int aCircleToSegmentsCount,
double aCorrectionFactor ) const;
double aCorrectionFactor ) const override;
virtual wxString GetSelectMenuText() const override;

2
pcbnew/class_pad.h

@ -428,7 +428,7 @@ public:
void TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
int aClearanceValue,
int aCircleToSegmentsCount,
double aCorrectionFactor ) const;
double aCorrectionFactor ) const override;
/**
* Function GetClearance

2
pcbnew/class_track.h

@ -194,7 +194,7 @@ public:
void TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
int aClearanceValue,
int aCircleToSegmentsCount,
double aCorrectionFactor ) const;
double aCorrectionFactor ) const override;
/**
* Function IsPointOnEnds
* returns STARTPOINT if point if near (dist = min_dist) start point, ENDPOINT if

6
pcbnew/class_zone.h

@ -360,6 +360,12 @@ public:
void TransformOutlinesShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
int aMinClearanceValue,
bool aUseNetClearance );
void TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
int aClearanceValue,
int aCircleToSegmentsCount,
double aCorrectionFactor ) const override;
/**
* Function HitTestForCorner
* tests if the given wxPoint is near a corner.

Loading…
Cancel
Save