Commit f3cc32f9 authored by Wayne Stambaugh's avatar Wayne Stambaugh
Browse files

Put KiCad on a diet to remove the uncessary slices of pi. (fixes 1066194)

parent f03b9048
Loading
Loading
Loading
Loading
+16 −14
Original line number Original line Diff line number Diff line
@@ -12,23 +12,23 @@
#endif
#endif


// for all others, include the necessary headers (this file is usually all you
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers
// need because it includes almost all "standard" wxWidgetss headers
#ifndef WX_PRECOMP
#ifndef WX_PRECOMP
#include <wx/wx.h>
#include <wx/wx.h>
#endif
#endif


/*
/**
 * FIXME: This appears to already be included in the OSX build of wxWidgets.
 * @note This appears to already be included in the OSX build of wxWidgets.
 *        Will someone with OSX please remove this and see if it compiles.
 *       Will someone with OSX please remove this and see if it compiles?
 */
 */
#ifdef __WXMAC__
#ifdef __WXMAC__
#include <Carbon/Carbon.h>
#include <Carbon/Carbon.h>
#endif
#endif


#ifndef M_PI
/**
#define M_PI 3.141592653
 * @note Shouldn't we be using wxFileName::GetPathSeparator() instead of the following code
#endif
 *       for improved portability?

 */
#ifdef __WINDOWS__
#ifdef __WINDOWS__
#define DIR_SEP        '\\'
#define DIR_SEP        '\\'
#define STRING_DIR_SEP wxT( "\\" )
#define STRING_DIR_SEP wxT( "\\" )
@@ -37,6 +37,12 @@
#define STRING_DIR_SEP wxT( "/" )
#define STRING_DIR_SEP wxT( "/" )
#endif
#endif


/**
 * @note Do we really need these defined again?
 */
#define UNIX_STRING_DIR_SEP wxT( "/" )
#define WIN_STRING_DIR_SEP  wxT( "\\" )

#ifdef DEBUG
#ifdef DEBUG
#define D(x)        x
#define D(x)        x
#else
#else
@@ -63,18 +69,14 @@ template <typename T> inline const T& Clamp( const T& lower, const T& value, con
    return value;
    return value;
}
}


#define UNIX_STRING_DIR_SEP wxT( "/" )
#define WIN_STRING_DIR_SEP  wxT( "\\" )

#define USE_RESIZE_BORDER
#define USE_RESIZE_BORDER
#if defined(__UNIX__) || defined(USE_RESIZE_BORDER)
#if defined(__UNIX__) || defined(USE_RESIZE_BORDER)
#define MAYBE_RESIZE_BORDER wxRESIZE_BORDER   // linux users like resizeable
#define MAYBE_RESIZE_BORDER wxRESIZE_BORDER   // Linux users like resizeable borders
                                              // borders
#else
#else
#define MAYBE_RESIZE_BORDER 0                 // no resizeable border
#define MAYBE_RESIZE_BORDER 0                 // no resizeable border
#endif
#endif


// wxNullPtr is not defined prior to wxWidget 2.9.0.
// wxNullPtr is not defined prior to wxWidgets 2.9.0.
#if !wxCHECK_VERSION( 2, 9, 0 )
#if !wxCHECK_VERSION( 2, 9, 0 )
#define wxNullPtr ((void *)NULL)
#define wxNullPtr ((void *)NULL)
#endif
#endif
+1 −1
Original line number Original line Diff line number Diff line
@@ -320,7 +320,7 @@ static void gen_arc( std::vector <wxPoint>& aBuffer,
    if( seg_count == 0 )
    if( seg_count == 0 )
        seg_count = 1;
        seg_count = 1;


    double increment_angle = (double) a_ArcAngle * 3.14159 / 1800 / seg_count;
    double increment_angle = (double) a_ArcAngle * M_PI / 1800 / seg_count;


    // Creates nb_seg point to approximate arc by segments:
    // Creates nb_seg point to approximate arc by segments:
    for( int ii = 1; ii <= seg_count; ii++ )
    for( int ii = 1; ii <= seg_count; ii++ )
+1 −1
Original line number Original line Diff line number Diff line
@@ -137,7 +137,7 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
     * For a circle the min radius is radius * cos( 2PI / s_CircleToSegmentsCount / 2)
     * For a circle the min radius is radius * cos( 2PI / s_CircleToSegmentsCount / 2)
     * s_Correction is 1 /cos( PI/s_CircleToSegmentsCount  )
     * s_Correction is 1 /cos( PI/s_CircleToSegmentsCount  )
     */
     */
    s_Correction = 1.0 / cos( 3.14159265 / s_CircleToSegmentsCount );
    s_Correction = 1.0 / cos( M_PI / s_CircleToSegmentsCount );


    // This KI_POLYGON_SET is the area(s) to fill, with m_ZoneMinThickness/2
    // This KI_POLYGON_SET is the area(s) to fill, with m_ZoneMinThickness/2
    KI_POLYGON_SET polyset_zone_solid_areas;
    KI_POLYGON_SET polyset_zone_solid_areas;