Commit b7db0ef8 authored by charras's avatar charras

updating polygon lib code. A bug removed.

parent 7c5feb61
......@@ -169,16 +169,8 @@ int BOARD::TestAreaPolygon( ZONE_CONTAINER* CurrArea )
int y2i = p->GetY( is2 );
int x2f = p->GetX( is2_next );
int y2f = p->GetY( is2_next );
int ret = FindSegmentIntersections( x1i,
y1i,
x1f,
y1f,
style,
x2i,
y2i,
x2f,
y2f,
style2 );
int ret = FindSegmentIntersections( x1i, y1i, x1f, y1f, style,
x2i, y2i, x2f, y2f, style2 );
if( ret )
{
// intersection between non-adjacent sides
......@@ -246,8 +238,6 @@ int BOARD::ClipAreaPolygon( ZONE_CONTAINER* CurrArea,
str += wxT( "such as adding cutouts. It can't be fixed automatically.\n" );
str += wxT( "Manual correction is recommended." );
wxMessageBox( str );
// bDontShowSelfIntersectionArcsWarning = dlg.bDontShowBoxState;
}
return -1; // arcs intersect with other sides, error
}
......@@ -427,8 +417,6 @@ int BOARD::CombineAllAreasInNet( int aNetCode, bool bMessageBox, bool bUseUtilit
curr_area->m_Netname.GetData() );
str += wxT( "Therefore, these areas can't be combined." );
wxMessageBox( str );
// bDontShowIntersectionArcsWarning = dlg.bDontShowBoxState;
}
}
}
......
This diff is collapsed.
......@@ -47,10 +47,10 @@ void ArmBoolEng( Bool_Engine* aBooleng, bool aConvertHoles = false );
#define to_int( x ) (int) round( (x) )
#ifndef min
#define min( x1, x2 ) ( (x1) > (x2) ) ? (x2) : (x1)
#define min( x1, x2 ) ( (x1) > (x2) ? (x2) : (x1) )
#endif
#ifndef max
#define max( x1, x2 ) ( (x1) > (x2) ) ? (x1) : (x2)
#define max( x1, x2 ) ( (x1) > (x2) ? (x1) : (x2) )
#endif
class CRect
......
......@@ -639,7 +639,6 @@ bool TestForIntersectionOfStraightLineSegments( int x1i, int y1i, int x1f, int y
int * x, int * y, double * d )
{
double a, b, dist;
// first, test for intersection
if( x1i == x1f && x2i == x2f )
{
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////
// Name: polygon_test_point_inside.h
/////////////////////////////////////////////////////////////////////////////
using namespace std;
/** Function TestPointInsidePolygon
* test if a point is inside or outside a polygon.
* @param aPolysList: the list of polygons
* @param istart: the starting point of a given polygon in m_FilledPolysList.
* @param iend: the ending point of the polygon in m_FilledPolysList.
* @param refx, refy: the point coordinate to test
* @return true if the point is inside, false for outside
*/
bool TestPointInsidePolygon( std::vector <CPolyPt> aPolysList,
int istart,
int iend,
int refx,
int refy);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment