kicad/pcbnew/class_zone_setting.h

92 lines
2.6 KiB
C
Raw Normal View History

/**
* @file class_zone_setting.h
* @brief Class ZONE_SETTING used to handle zones parameters in dialogs.
*/
2008-11-14 22:40:31 +00:00
#ifndef ZONE_SETTING_H
#define ZONE_SETTING_H
class ZONE_CONTAINER;
2011-02-21 19:43:59 +00:00
#define MAX_ZONE_CORNER_RADIUS 4000
2008-11-14 22:40:31 +00:00
/**
* Class ZONE_SETTING
* handles zones parameters.
*/
2008-11-14 22:40:31 +00:00
class ZONE_SETTING
{
public:
2011-02-21 19:43:59 +00:00
enum {
SMOOTHING_NONE,
SMOOTHING_CHAMFER,
SMOOTHING_FILLET,
SMOOTHING_LAST
};
// Mode for filling zone : 1 use segments, 0 use polygons
int m_FillMode;
int m_ZoneClearance; // Clearance value
int m_ZoneMinThickness; // Min thickness value in filled areas
int m_NetcodeSelection; // Net code selection for the current zone
int m_CurrentZone_Layer; // Layer used to create the current zone
// Option to show the zone area (outlines only, short hatches or full hatches
int m_Zone_HatchingStyle;
// Option to select number of segments to approximate a circle 16 or 32 segments.
int m_ArcToSegmentsCount;
long m_ThermalReliefGapValue; // thickness of the gap in thermal reliefs
long m_ThermalReliefCopperBridgeValue; // thickness of the copper bridge in thermal reliefs
int m_Zone_Pad_Options; // How pads are covered by copper in zone
2011-02-21 19:43:59 +00:00
private:
int cornerSmoothingType; // Corner smoothing type
unsigned int cornerRadius; // Corner chamfer distance / fillet radius
2008-11-14 22:40:31 +00:00
public:
ZONE_SETTING( void );
2010-11-12 15:17:10 +00:00
/**
* Function ImportSetting
2008-11-14 22:40:31 +00:00
* copy settings from a given zone
* @param aSource: the given zone
*/
void ImportSetting( const ZONE_CONTAINER& aSource );
2010-11-12 15:17:10 +00:00
/**
* Function ExportSetting
2008-11-14 22:40:31 +00:00
* copy settings to a given zone
* @param aTarget: the given zone
* @param aFullExport: if false: some parameters are NOT exported
* because they must not be exported when export settings from a zone to others zones
* Currently:
* m_NetcodeSelection
2008-11-14 22:40:31 +00:00
*/
void ExportSetting( ZONE_CONTAINER& aTarget, bool aFullExport = true);
2011-02-21 19:43:59 +00:00
void SetCornerSmoothingType( int aType) { cornerSmoothingType = aType; };
int GetCornerSmoothingType() const { return cornerSmoothingType; };
2011-02-21 19:43:59 +00:00
void SetCornerRadius( int aRadius )
{
if( aRadius > MAX_ZONE_CORNER_RADIUS )
cornerRadius = MAX_ZONE_CORNER_RADIUS;
else if( aRadius < 0 )
cornerRadius = 0;
else
cornerRadius = aRadius;
};
unsigned int GetCornerRadius() const { return cornerRadius; };
2008-11-14 22:40:31 +00:00
};
#endif // ifndef ZONE_SETTING_H