2011-09-23 13:57:12 +00:00
|
|
|
/**
|
|
|
|
* @file zones_test_and_combine_areas.cpp
|
|
|
|
* @brief Functions to test, merge and cut polygons used as copper areas outlines
|
|
|
|
* some pieces of code come from FreePCB.
|
|
|
|
*/
|
2008-01-04 12:32:10 +00:00
|
|
|
|
2012-06-08 09:56:42 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
|
|
|
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
|
|
|
|
*
|
|
|
|
* Some code comes from FreePCB.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <fctsys.h>
|
|
|
|
#include <common.h>
|
|
|
|
#include <confirm.h>
|
|
|
|
#include <class_undoredo_container.h>
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <class_board.h>
|
|
|
|
#include <class_zone.h>
|
|
|
|
#include <class_marker_pcb.h>
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <pcbnew.h>
|
|
|
|
#include <drc_stuff.h>
|
2012-07-30 07:40:25 +00:00
|
|
|
#include <math_for_graphics.h>
|
2008-01-04 12:32:10 +00:00
|
|
|
|
2012-07-31 17:51:58 +00:00
|
|
|
#define STRAIGHT 0 // To be remove after math_for_graphics code cleanup
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-04 12:32:10 +00:00
|
|
|
|
2012-07-31 13:12:51 +00:00
|
|
|
bool BOARD::OnAreaPolygonModified( PICKED_ITEMS_LIST* aModifiedZonesList,
|
2013-03-20 14:50:12 +00:00
|
|
|
ZONE_CONTAINER* modified_area )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
|
|
|
// clip polygon against itself
|
2012-07-31 13:12:51 +00:00
|
|
|
bool modified = NormalizeAreaPolygon( aModifiedZonesList, modified_area );
|
2008-01-04 12:32:10 +00:00
|
|
|
|
|
|
|
// now see if we need to clip against other areas
|
2013-03-31 13:27:46 +00:00
|
|
|
LAYER_NUM layer = modified_area->GetLayer();
|
2012-07-31 13:12:51 +00:00
|
|
|
bool bCheckAllAreas = TestAreaIntersections( modified_area );
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-04 12:32:10 +00:00
|
|
|
if( bCheckAllAreas )
|
2012-07-31 13:12:51 +00:00
|
|
|
{
|
|
|
|
modified = true;
|
2014-02-25 10:47:27 +00:00
|
|
|
CombineAllAreasInNet( aModifiedZonesList, modified_area->GetNetCode(), true );
|
2012-07-31 13:12:51 +00:00
|
|
|
}
|
2008-01-04 12:32:10 +00:00
|
|
|
|
2013-04-09 16:00:46 +00:00
|
|
|
if( !IsCopperLayer( layer ) ) // Refill non copper zones on this layer
|
2008-09-26 19:51:36 +00:00
|
|
|
{
|
2012-07-31 13:12:51 +00:00
|
|
|
for( unsigned ia = 0; ia < m_ZoneDescriptorList.size(); ia++ )
|
|
|
|
if( m_ZoneDescriptorList[ia]->GetLayer() == layer )
|
2013-05-01 19:01:14 +00:00
|
|
|
m_ZoneDescriptorList[ia]->BuildFilledSolidAreasPolygons( this );
|
2008-09-26 19:51:36 +00:00
|
|
|
}
|
2009-03-11 13:29:10 +00:00
|
|
|
|
2008-11-28 20:10:05 +00:00
|
|
|
// Test for bad areas: all zones must have more than 2 corners:
|
|
|
|
// Note: should not happen, but just in case.
|
2012-08-04 09:43:27 +00:00
|
|
|
for( unsigned ii = 0; ii < m_ZoneDescriptorList.size(); )
|
2008-11-28 20:10:05 +00:00
|
|
|
{
|
2012-08-04 09:43:27 +00:00
|
|
|
ZONE_CONTAINER* zone = m_ZoneDescriptorList[ii];
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2009-03-11 13:29:10 +00:00
|
|
|
if( zone->GetNumCorners() >= 3 )
|
2012-08-04 09:43:27 +00:00
|
|
|
ii++;
|
2011-09-23 13:57:12 +00:00
|
|
|
else // Remove zone because it is incorrect:
|
2009-08-23 15:22:44 +00:00
|
|
|
RemoveArea( aModifiedZonesList, zone );
|
2008-11-28 20:10:05 +00:00
|
|
|
}
|
2009-03-11 13:29:10 +00:00
|
|
|
|
2012-07-31 13:12:51 +00:00
|
|
|
return modified;
|
2008-01-04 12:32:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-07-31 13:12:51 +00:00
|
|
|
bool BOARD::CombineAllAreasInNet( PICKED_ITEMS_LIST* aDeletedList, int aNetCode,
|
2013-03-26 09:58:40 +00:00
|
|
|
bool aUseLocalFlags )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
2009-03-11 13:29:10 +00:00
|
|
|
if( m_ZoneDescriptorList.size() <= 1 )
|
2012-07-31 13:12:51 +00:00
|
|
|
return false;
|
2009-03-11 13:29:10 +00:00
|
|
|
|
2012-07-31 13:12:51 +00:00
|
|
|
bool modified = false;
|
2009-03-11 13:29:10 +00:00
|
|
|
|
2012-07-31 13:12:51 +00:00
|
|
|
//Loop through all combinations
|
2009-03-11 13:29:10 +00:00
|
|
|
for( unsigned ia1 = 0; ia1 < m_ZoneDescriptorList.size() - 1; ia1++ )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
2009-03-11 13:29:10 +00:00
|
|
|
ZONE_CONTAINER* curr_area = m_ZoneDescriptorList[ia1];
|
2013-03-20 14:50:12 +00:00
|
|
|
|
2014-02-25 10:47:27 +00:00
|
|
|
if( curr_area->GetNetCode() != aNetCode )
|
2009-03-11 13:29:10 +00:00
|
|
|
continue;
|
2008-01-04 12:32:10 +00:00
|
|
|
|
2009-03-11 13:29:10 +00:00
|
|
|
// legal polygon
|
2013-09-21 18:09:41 +00:00
|
|
|
CRect b1 = curr_area->Outline()->GetBoundingBox();
|
2009-03-11 13:29:10 +00:00
|
|
|
bool mod_ia1 = false;
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2009-03-11 13:29:10 +00:00
|
|
|
for( unsigned ia2 = m_ZoneDescriptorList.size() - 1; ia2 > ia1; ia2-- )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
2009-03-11 13:29:10 +00:00
|
|
|
ZONE_CONTAINER* area2 = m_ZoneDescriptorList[ia2];
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2014-02-25 10:47:27 +00:00
|
|
|
if( area2->GetNetCode() != aNetCode )
|
2008-01-04 12:32:10 +00:00
|
|
|
continue;
|
2012-07-13 18:55:29 +00:00
|
|
|
|
2012-01-29 19:29:19 +00:00
|
|
|
if( curr_area->GetPriority() != area2->GetPriority() )
|
|
|
|
continue;
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-07-13 18:55:29 +00:00
|
|
|
if( curr_area->GetIsKeepout() != area2->GetIsKeepout() )
|
|
|
|
continue;
|
|
|
|
|
2012-08-04 09:43:27 +00:00
|
|
|
if( curr_area->GetLayer() != area2->GetLayer() )
|
|
|
|
continue;
|
|
|
|
|
2013-09-21 18:09:41 +00:00
|
|
|
CRect b2 = area2->Outline()->GetBoundingBox();
|
2013-03-20 14:50:12 +00:00
|
|
|
|
2012-08-04 09:43:27 +00:00
|
|
|
if( !( b1.left > b2.right || b1.right < b2.left
|
|
|
|
|| b1.bottom > b2.top || b1.top < b2.bottom ) )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
2012-08-04 09:43:27 +00:00
|
|
|
// check area2 against curr_area
|
2013-03-26 09:58:40 +00:00
|
|
|
if( curr_area->GetLocalFlags() || area2->GetLocalFlags()
|
|
|
|
|| aUseLocalFlags == false )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
2012-08-04 09:43:27 +00:00
|
|
|
bool ret = TestAreaIntersection( curr_area, area2 );
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-08-04 09:43:27 +00:00
|
|
|
if( ret )
|
|
|
|
ret = CombineAreas( aDeletedList, curr_area, area2 );
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-08-04 09:43:27 +00:00
|
|
|
if( ret )
|
|
|
|
{
|
|
|
|
mod_ia1 = true;
|
|
|
|
modified = true;
|
2008-01-04 12:32:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2009-03-11 13:29:10 +00:00
|
|
|
|
|
|
|
if( mod_ia1 )
|
|
|
|
ia1--; // if modified, we need to check it again
|
2008-01-04 12:32:10 +00:00
|
|
|
}
|
2008-11-28 20:10:05 +00:00
|
|
|
|
2012-07-31 13:12:51 +00:00
|
|
|
return modified;
|
2008-01-04 12:32:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool BOARD::TestAreaIntersections( ZONE_CONTAINER* area_to_test )
|
|
|
|
{
|
|
|
|
for( unsigned ia2 = 0; ia2 < m_ZoneDescriptorList.size(); ia2++ )
|
|
|
|
{
|
|
|
|
ZONE_CONTAINER* area2 = m_ZoneDescriptorList[ia2];
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2014-02-25 10:47:27 +00:00
|
|
|
if( area_to_test->GetNetCode() != area2->GetNetCode() )
|
2008-01-04 12:32:10 +00:00
|
|
|
continue;
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-10 20:53:41 +00:00
|
|
|
if( area_to_test == area2 )
|
2008-01-20 19:55:22 +00:00
|
|
|
continue;
|
|
|
|
|
|
|
|
// see if areas are on same layer
|
|
|
|
if( area_to_test->GetLayer() != area2->GetLayer() )
|
|
|
|
continue;
|
|
|
|
|
2012-07-13 18:55:29 +00:00
|
|
|
// test for different priorities
|
2012-01-29 19:29:19 +00:00
|
|
|
if( area_to_test->GetPriority() != area2->GetPriority() )
|
|
|
|
continue;
|
|
|
|
|
2012-07-13 18:55:29 +00:00
|
|
|
// test for different types
|
|
|
|
if( area_to_test->GetIsKeepout() != area2->GetIsKeepout() )
|
|
|
|
continue;
|
|
|
|
|
2012-08-02 13:23:53 +00:00
|
|
|
if( TestAreaIntersection( area_to_test, area2 ) )
|
|
|
|
return true;
|
2008-01-20 19:55:22 +00:00
|
|
|
}
|
2008-01-04 12:32:10 +00:00
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-08-02 13:23:53 +00:00
|
|
|
bool BOARD::TestAreaIntersection( ZONE_CONTAINER* area_ref, ZONE_CONTAINER* area_to_test )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
|
|
|
// see if areas are on same layer
|
|
|
|
if( area_ref->GetLayer() != area_to_test->GetLayer() )
|
2012-08-02 13:23:53 +00:00
|
|
|
return false;
|
2008-01-04 12:32:10 +00:00
|
|
|
|
2013-03-20 14:50:12 +00:00
|
|
|
CPolyLine* poly1 = area_ref->Outline();
|
|
|
|
CPolyLine* poly2 = area_to_test->Outline();
|
2008-01-04 12:32:10 +00:00
|
|
|
|
|
|
|
// test bounding rects
|
2013-09-21 18:09:41 +00:00
|
|
|
CRect b1 = poly1->GetBoundingBox();
|
|
|
|
CRect b2 = poly2->GetBoundingBox();
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-07-31 13:12:51 +00:00
|
|
|
if( b1.bottom > b2.top || b1.top < b2.bottom ||
|
|
|
|
b1.left > b2.right || b1.right < b2.left )
|
2012-08-02 13:23:53 +00:00
|
|
|
return false;
|
2008-01-04 12:32:10 +00:00
|
|
|
|
|
|
|
// now test for intersecting segments
|
2012-07-25 07:36:56 +00:00
|
|
|
for( int icont1 = 0; icont1<poly1->GetContoursCount(); icont1++ )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
|
|
|
int is1 = poly1->GetContourStart( icont1 );
|
|
|
|
int ie1 = poly1->GetContourEnd( icont1 );
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-04 12:32:10 +00:00
|
|
|
for( int ic1 = is1; ic1<=ie1; ic1++ )
|
|
|
|
{
|
|
|
|
int xi1 = poly1->GetX( ic1 );
|
|
|
|
int yi1 = poly1->GetY( ic1 );
|
2012-07-31 13:12:51 +00:00
|
|
|
int xf1, yf1;
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-04 12:32:10 +00:00
|
|
|
if( ic1 < ie1 )
|
|
|
|
{
|
|
|
|
xf1 = poly1->GetX( ic1 + 1 );
|
|
|
|
yf1 = poly1->GetY( ic1 + 1 );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
xf1 = poly1->GetX( is1 );
|
|
|
|
yf1 = poly1->GetY( is1 );
|
|
|
|
}
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-07-25 07:36:56 +00:00
|
|
|
for( int icont2 = 0; icont2<poly2->GetContoursCount(); icont2++ )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
|
|
|
int is2 = poly2->GetContourStart( icont2 );
|
|
|
|
int ie2 = poly2->GetContourEnd( icont2 );
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-04 12:32:10 +00:00
|
|
|
for( int ic2 = is2; ic2<=ie2; ic2++ )
|
|
|
|
{
|
|
|
|
int xi2 = poly2->GetX( ic2 );
|
|
|
|
int yi2 = poly2->GetY( ic2 );
|
2012-07-31 13:12:51 +00:00
|
|
|
int xf2, yf2;
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-04 12:32:10 +00:00
|
|
|
if( ic2 < ie2 )
|
|
|
|
{
|
|
|
|
xf2 = poly2->GetX( ic2 + 1 );
|
|
|
|
yf2 = poly2->GetY( ic2 + 1 );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
xf2 = poly2->GetX( is2 );
|
|
|
|
yf2 = poly2->GetY( is2 );
|
|
|
|
}
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-08-02 13:23:53 +00:00
|
|
|
bool intersect = FindSegmentIntersections( xi1, yi1, xf1, yf1,
|
|
|
|
xi2, yi2, xf2, yf2 );
|
|
|
|
if( intersect )
|
|
|
|
return true;
|
2008-01-04 12:32:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-08-02 13:23:53 +00:00
|
|
|
// If a contour is inside an other contour, no segments intersects, but the zones
|
|
|
|
// can be combined if a corner is inside an outline (only one corner is enought)
|
2013-05-09 19:08:12 +00:00
|
|
|
for( int ic2 = 0; ic2 < poly2->GetCornersCount(); ic2++ )
|
2008-01-20 19:55:22 +00:00
|
|
|
{
|
2012-08-02 13:23:53 +00:00
|
|
|
int x = poly2->GetX( ic2 );
|
|
|
|
int y = poly2->GetY( ic2 );
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-08-02 13:23:53 +00:00
|
|
|
if( poly1->TestPointInside( x, y ) )
|
|
|
|
{
|
2012-08-04 09:43:27 +00:00
|
|
|
return true;
|
2008-01-20 19:55:22 +00:00
|
|
|
}
|
2012-08-02 13:23:53 +00:00
|
|
|
}
|
2008-01-20 19:55:22 +00:00
|
|
|
|
2013-05-09 19:08:12 +00:00
|
|
|
for( int ic1 = 0; ic1 < poly1->GetCornersCount(); ic1++ )
|
2012-08-02 13:23:53 +00:00
|
|
|
{
|
|
|
|
int x = poly1->GetX( ic1 );
|
|
|
|
int y = poly1->GetY( ic1 );
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-08-02 13:23:53 +00:00
|
|
|
if( poly2->TestPointInside( x, y ) )
|
|
|
|
{
|
2012-08-04 09:43:27 +00:00
|
|
|
return true;
|
2008-01-20 19:55:22 +00:00
|
|
|
}
|
|
|
|
}
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-08-04 09:43:27 +00:00
|
|
|
return false;
|
2008-01-04 12:32:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-07-31 13:12:51 +00:00
|
|
|
bool BOARD::CombineAreas( PICKED_ITEMS_LIST* aDeletedList, ZONE_CONTAINER* area_ref,
|
2013-03-20 14:50:12 +00:00
|
|
|
ZONE_CONTAINER* area_to_combine )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
|
|
|
if( area_ref == area_to_combine )
|
2009-05-21 17:42:42 +00:00
|
|
|
{
|
2009-08-12 10:40:01 +00:00
|
|
|
wxASSERT( 0 );
|
2012-07-31 13:12:51 +00:00
|
|
|
return false;
|
2009-05-21 17:42:42 +00:00
|
|
|
}
|
2008-01-04 12:32:10 +00:00
|
|
|
|
|
|
|
// polygons intersect, combine them
|
2012-07-25 07:36:56 +00:00
|
|
|
KI_POLYGON_WITH_HOLES areaRefPoly;
|
|
|
|
KI_POLYGON_WITH_HOLES areaToMergePoly;
|
2013-05-08 18:20:58 +00:00
|
|
|
area_ref->Outline()->m_CornersList.ExportTo( areaRefPoly );
|
|
|
|
area_to_combine->Outline()->m_CornersList.ExportTo( areaToMergePoly );
|
2012-07-25 07:36:56 +00:00
|
|
|
|
|
|
|
KI_POLYGON_WITH_HOLES_SET mergedOutlines;
|
|
|
|
mergedOutlines.push_back( areaRefPoly );
|
2012-07-30 07:40:25 +00:00
|
|
|
mergedOutlines |= areaToMergePoly;
|
2012-07-25 07:36:56 +00:00
|
|
|
|
2012-08-04 09:43:27 +00:00
|
|
|
// We should have one polygon with hole
|
|
|
|
// We can have 2 polygons with hole, if the 2 initial polygons have only one common corner
|
|
|
|
// and therefore cannot be merged (they are dectected as intersecting)
|
|
|
|
// but we should never have more than 2 polys
|
|
|
|
if( mergedOutlines.size() > 2 )
|
|
|
|
{
|
|
|
|
wxLogMessage(wxT("BOARD::CombineAreas error: more than 2 polys after merging") );
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( mergedOutlines.size() > 1 )
|
|
|
|
return false;
|
2008-05-15 11:20:19 +00:00
|
|
|
|
2012-08-04 09:43:27 +00:00
|
|
|
areaRefPoly = mergedOutlines[0];
|
2013-03-20 14:50:12 +00:00
|
|
|
area_ref->Outline()->RemoveAllContours();
|
2008-01-04 12:32:10 +00:00
|
|
|
|
2012-07-25 07:36:56 +00:00
|
|
|
KI_POLYGON_WITH_HOLES::iterator_type corner = areaRefPoly.begin();
|
2013-03-20 14:50:12 +00:00
|
|
|
|
2008-05-30 18:06:21 +00:00
|
|
|
// create area with external contour: Recreate only area edges, NOT holes
|
2013-03-20 14:50:12 +00:00
|
|
|
area_ref->Outline()->Start( area_ref->GetLayer(), corner->x(), corner->y(),
|
|
|
|
area_ref->Outline()->GetHatchStyle() );
|
|
|
|
|
2012-07-25 07:36:56 +00:00
|
|
|
while( ++corner != areaRefPoly.end() )
|
2008-05-15 11:20:19 +00:00
|
|
|
{
|
2013-03-20 14:50:12 +00:00
|
|
|
area_ref->Outline()->AppendCorner( corner->x(), corner->y() );
|
2008-05-15 11:20:19 +00:00
|
|
|
}
|
|
|
|
|
2013-03-20 14:50:12 +00:00
|
|
|
area_ref->Outline()->CloseLastContour();
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-07-25 07:36:56 +00:00
|
|
|
// add holes (set of polygons)
|
|
|
|
KI_POLYGON_WITH_HOLES::iterator_holes_type hole = areaRefPoly.begin_holes();
|
2013-03-20 14:50:12 +00:00
|
|
|
|
2012-07-25 07:36:56 +00:00
|
|
|
while( hole != areaRefPoly.end_holes() )
|
2008-05-15 11:20:19 +00:00
|
|
|
{
|
2012-07-25 07:36:56 +00:00
|
|
|
KI_POLYGON::iterator_type hole_corner = hole->begin();
|
2013-03-20 14:50:12 +00:00
|
|
|
|
2012-07-25 07:36:56 +00:00
|
|
|
// create area with external contour: Recreate only area edges, NOT holes
|
|
|
|
while( hole_corner != hole->end() )
|
2008-05-15 11:20:19 +00:00
|
|
|
{
|
2013-03-20 14:50:12 +00:00
|
|
|
area_ref->Outline()->AppendCorner( hole_corner->x(), hole_corner->y() );
|
2012-07-25 07:36:56 +00:00
|
|
|
hole_corner++;
|
2008-05-30 18:06:21 +00:00
|
|
|
}
|
2013-03-20 14:50:12 +00:00
|
|
|
|
|
|
|
area_ref->Outline()->CloseLastContour();
|
2012-07-25 07:36:56 +00:00
|
|
|
hole++;
|
2008-05-15 11:20:19 +00:00
|
|
|
}
|
2012-07-30 07:40:25 +00:00
|
|
|
|
|
|
|
RemoveArea( aDeletedList, area_to_combine );
|
2008-05-30 18:06:21 +00:00
|
|
|
|
2013-03-26 09:58:40 +00:00
|
|
|
area_ref->SetLocalFlags( 1 );
|
2013-03-20 14:50:12 +00:00
|
|
|
area_ref->Outline()->Hatch();
|
2012-07-25 07:36:56 +00:00
|
|
|
|
2012-07-31 13:12:51 +00:00
|
|
|
return true;
|
2008-01-04 12:32:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-01-10 20:53:41 +00:00
|
|
|
int BOARD::Test_Drc_Areas_Outlines_To_Areas_Outlines( ZONE_CONTAINER* aArea_To_Examine,
|
2008-01-20 19:55:22 +00:00
|
|
|
bool aCreate_Markers )
|
2008-01-10 20:53:41 +00:00
|
|
|
{
|
2011-08-09 03:41:20 +00:00
|
|
|
wxString str;
|
|
|
|
int nerrors = 0;
|
2008-01-10 20:53:41 +00:00
|
|
|
|
|
|
|
// iterate through all areas
|
|
|
|
for( int ia = 0; ia < GetAreaCount(); ia++ )
|
|
|
|
{
|
|
|
|
ZONE_CONTAINER* Area_Ref = GetArea( ia );
|
2011-08-09 03:41:20 +00:00
|
|
|
CPolyLine* refSmoothedPoly = Area_Ref->GetSmoothedPoly();
|
2011-02-21 19:43:59 +00:00
|
|
|
|
2009-03-11 13:29:10 +00:00
|
|
|
if( !Area_Ref->IsOnCopperLayer() )
|
2008-09-26 19:51:36 +00:00
|
|
|
continue;
|
|
|
|
|
2012-07-13 18:55:29 +00:00
|
|
|
// When testing only a single area, skip all others
|
2008-01-20 19:55:22 +00:00
|
|
|
if( aArea_To_Examine && (aArea_To_Examine != Area_Ref) )
|
|
|
|
continue;
|
2009-10-21 19:16:25 +00:00
|
|
|
|
2008-01-10 20:53:41 +00:00
|
|
|
for( int ia2 = 0; ia2 < GetAreaCount(); ia2++ )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
2012-07-13 18:55:29 +00:00
|
|
|
ZONE_CONTAINER* area_to_test = GetArea( ia2 );
|
|
|
|
CPolyLine* testSmoothedPoly = area_to_test->GetSmoothedPoly();
|
2008-01-10 20:53:41 +00:00
|
|
|
|
2012-07-13 18:55:29 +00:00
|
|
|
if( Area_Ref == area_to_test )
|
2008-01-10 20:53:41 +00:00
|
|
|
continue;
|
2008-01-20 19:55:22 +00:00
|
|
|
|
2008-01-10 20:53:41 +00:00
|
|
|
// test for same layer
|
2012-07-13 18:55:29 +00:00
|
|
|
if( Area_Ref->GetLayer() != area_to_test->GetLayer() )
|
2008-01-10 20:53:41 +00:00
|
|
|
continue;
|
2008-01-20 19:55:22 +00:00
|
|
|
|
|
|
|
// Test for same net
|
2014-02-25 10:47:27 +00:00
|
|
|
if( Area_Ref->GetNetCode() == area_to_test->GetNetCode() && Area_Ref->GetNetCode() >= 0 )
|
2008-01-10 20:53:41 +00:00
|
|
|
continue;
|
|
|
|
|
2012-01-29 19:29:19 +00:00
|
|
|
// test for different priorities
|
2012-07-13 18:55:29 +00:00
|
|
|
if( Area_Ref->GetPriority() != area_to_test->GetPriority() )
|
2012-01-29 19:29:19 +00:00
|
|
|
continue;
|
|
|
|
|
2012-07-13 18:55:29 +00:00
|
|
|
// test for different types
|
|
|
|
if( Area_Ref->GetIsKeepout() != area_to_test->GetIsKeepout() )
|
|
|
|
continue;
|
|
|
|
|
|
|
|
// Examine a candidate zone: compare area_to_test to Area_Ref
|
2009-10-21 19:16:25 +00:00
|
|
|
|
2011-08-09 03:41:20 +00:00
|
|
|
// Get clearance used in zone to zone test. The policy used to
|
|
|
|
// obtain that value is now part of the zone object itself by way of
|
|
|
|
// ZONE_CONTAINER::GetClearance().
|
2012-07-13 18:55:29 +00:00
|
|
|
int zone2zoneClearance = Area_Ref->GetClearance( area_to_test );
|
2009-10-21 19:16:25 +00:00
|
|
|
|
2012-07-30 07:40:25 +00:00
|
|
|
// Keepout areas have no clearance, so set zone2zoneClearance to 1
|
|
|
|
// ( zone2zoneClearance = 0 can create problems in test functions)
|
|
|
|
if( Area_Ref->GetIsKeepout() )
|
|
|
|
zone2zoneClearance = 1;
|
|
|
|
|
2012-07-13 18:55:29 +00:00
|
|
|
// test for some corners of Area_Ref inside area_to_test
|
2013-05-09 19:08:12 +00:00
|
|
|
for( int ic = 0; ic < refSmoothedPoly->GetCornersCount(); ic++ )
|
2008-01-10 20:53:41 +00:00
|
|
|
{
|
2011-02-21 19:43:59 +00:00
|
|
|
int x = refSmoothedPoly->GetX( ic );
|
|
|
|
int y = refSmoothedPoly->GetY( ic );
|
2011-08-09 03:41:20 +00:00
|
|
|
|
2011-02-21 19:43:59 +00:00
|
|
|
if( testSmoothedPoly->TestPointInside( x, y ) )
|
2008-01-10 20:53:41 +00:00
|
|
|
{
|
|
|
|
// COPPERAREA_COPPERAREA error: copper area ref corner inside copper area
|
2008-01-20 19:55:22 +00:00
|
|
|
if( aCreate_Markers )
|
|
|
|
{
|
2011-07-14 15:42:44 +00:00
|
|
|
wxString msg1 = Area_Ref->GetSelectMenuText();
|
2012-07-13 18:55:29 +00:00
|
|
|
wxString msg2 = area_to_test->GetSelectMenuText();
|
2011-07-14 15:42:44 +00:00
|
|
|
MARKER_PCB* marker = new MARKER_PCB( COPPERAREA_INSIDE_COPPERAREA,
|
|
|
|
wxPoint( x, y ),
|
|
|
|
msg1, wxPoint( x, y ),
|
|
|
|
msg2, wxPoint( x, y ) );
|
2008-01-20 19:55:22 +00:00
|
|
|
Add( marker );
|
|
|
|
}
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-10 20:53:41 +00:00
|
|
|
nerrors++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-13 18:55:29 +00:00
|
|
|
// test for some corners of area_to_test inside Area_Ref
|
2013-05-09 19:08:12 +00:00
|
|
|
for( int ic2 = 0; ic2 < testSmoothedPoly->GetCornersCount(); ic2++ )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
2011-02-21 19:43:59 +00:00
|
|
|
int x = testSmoothedPoly->GetX( ic2 );
|
|
|
|
int y = testSmoothedPoly->GetY( ic2 );
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2011-02-21 19:43:59 +00:00
|
|
|
if( refSmoothedPoly->TestPointInside( x, y ) )
|
2008-01-10 20:53:41 +00:00
|
|
|
{
|
|
|
|
// COPPERAREA_COPPERAREA error: copper area corner inside copper area ref
|
2008-01-20 19:55:22 +00:00
|
|
|
if( aCreate_Markers )
|
|
|
|
{
|
2012-07-13 18:55:29 +00:00
|
|
|
wxString msg1 = area_to_test->GetSelectMenuText();
|
2011-07-14 15:42:44 +00:00
|
|
|
wxString msg2 = Area_Ref->GetSelectMenuText();
|
|
|
|
MARKER_PCB* marker = new MARKER_PCB( COPPERAREA_INSIDE_COPPERAREA,
|
|
|
|
wxPoint( x, y ),
|
|
|
|
msg1, wxPoint( x, y ),
|
|
|
|
msg2, wxPoint( x, y ) );
|
2008-01-20 19:55:22 +00:00
|
|
|
Add( marker );
|
|
|
|
}
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-10 20:53:41 +00:00
|
|
|
nerrors++;
|
|
|
|
}
|
|
|
|
}
|
2008-01-04 12:32:10 +00:00
|
|
|
|
2008-01-10 20:53:41 +00:00
|
|
|
// now test spacing between areas
|
2012-07-25 07:36:56 +00:00
|
|
|
for( int icont = 0; icont < refSmoothedPoly->GetContoursCount(); icont++ )
|
2008-01-10 20:53:41 +00:00
|
|
|
{
|
2011-02-21 19:43:59 +00:00
|
|
|
int ic_start = refSmoothedPoly->GetContourStart( icont );
|
|
|
|
int ic_end = refSmoothedPoly->GetContourEnd( icont );
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-10 20:53:41 +00:00
|
|
|
for( int ic = ic_start; ic<=ic_end; ic++ )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
2011-02-21 19:43:59 +00:00
|
|
|
int ax1 = refSmoothedPoly->GetX( ic );
|
|
|
|
int ay1 = refSmoothedPoly->GetY( ic );
|
2008-01-10 20:53:41 +00:00
|
|
|
int ax2, ay2;
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-10 20:53:41 +00:00
|
|
|
if( ic == ic_end )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
2011-02-21 19:43:59 +00:00
|
|
|
ax2 = refSmoothedPoly->GetX( ic_start );
|
|
|
|
ay2 = refSmoothedPoly->GetY( ic_start );
|
2008-01-04 12:32:10 +00:00
|
|
|
}
|
2008-01-10 20:53:41 +00:00
|
|
|
else
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
2011-02-21 19:43:59 +00:00
|
|
|
ax2 = refSmoothedPoly->GetX( ic + 1 );
|
|
|
|
ay2 = refSmoothedPoly->GetY( ic + 1 );
|
2008-01-04 12:32:10 +00:00
|
|
|
}
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-07-25 07:36:56 +00:00
|
|
|
for( int icont2 = 0; icont2 < testSmoothedPoly->GetContoursCount(); icont2++ )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
2011-02-21 19:43:59 +00:00
|
|
|
int ic_start2 = testSmoothedPoly->GetContourStart( icont2 );
|
|
|
|
int ic_end2 = testSmoothedPoly->GetContourEnd( icont2 );
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-10 20:53:41 +00:00
|
|
|
for( int ic2 = ic_start2; ic2<=ic_end2; ic2++ )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
2011-02-21 19:43:59 +00:00
|
|
|
int bx1 = testSmoothedPoly->GetX( ic2 );
|
|
|
|
int by1 = testSmoothedPoly->GetY( ic2 );
|
2008-01-10 20:53:41 +00:00
|
|
|
int bx2, by2;
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-10 20:53:41 +00:00
|
|
|
if( ic2 == ic_end2 )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
2011-02-21 19:43:59 +00:00
|
|
|
bx2 = testSmoothedPoly->GetX( ic_start2 );
|
|
|
|
by2 = testSmoothedPoly->GetY( ic_start2 );
|
2008-01-04 12:32:10 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-02-21 19:43:59 +00:00
|
|
|
bx2 = testSmoothedPoly->GetX( ic2 + 1 );
|
|
|
|
by2 = testSmoothedPoly->GetY( ic2 + 1 );
|
2008-01-04 12:32:10 +00:00
|
|
|
}
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-10 20:53:41 +00:00
|
|
|
int x, y;
|
2009-09-10 15:22:26 +00:00
|
|
|
|
2012-07-31 13:12:51 +00:00
|
|
|
int d = GetClearanceBetweenSegments( bx1, by1, bx2, by2,
|
2011-09-23 13:57:12 +00:00
|
|
|
0,
|
2012-07-31 13:12:51 +00:00
|
|
|
ax1, ay1, ax2, ay2,
|
2011-09-23 13:57:12 +00:00
|
|
|
0,
|
|
|
|
zone2zoneClearance,
|
|
|
|
&x, &y );
|
2009-09-10 15:22:26 +00:00
|
|
|
|
2009-10-21 19:16:25 +00:00
|
|
|
if( d < zone2zoneClearance )
|
2008-01-04 12:32:10 +00:00
|
|
|
{
|
2008-01-10 20:53:41 +00:00
|
|
|
// COPPERAREA_COPPERAREA error : intersect or too close
|
2008-01-20 19:55:22 +00:00
|
|
|
if( aCreate_Markers )
|
|
|
|
{
|
2011-07-14 15:42:44 +00:00
|
|
|
wxString msg1 = Area_Ref->GetSelectMenuText();
|
2012-07-13 18:55:29 +00:00
|
|
|
wxString msg2 = area_to_test->GetSelectMenuText();
|
2009-08-01 19:26:05 +00:00
|
|
|
MARKER_PCB* marker = new MARKER_PCB( COPPERAREA_CLOSE_TO_COPPERAREA,
|
2011-07-14 15:42:44 +00:00
|
|
|
wxPoint( x, y ),
|
|
|
|
msg1, wxPoint( x, y ),
|
|
|
|
msg2, wxPoint( x, y ) );
|
2008-01-20 19:55:22 +00:00
|
|
|
Add( marker );
|
|
|
|
}
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-10 20:53:41 +00:00
|
|
|
nerrors++;
|
2008-01-04 12:32:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-01-20 19:55:22 +00:00
|
|
|
|
|
|
|
return nerrors;
|
2008-01-04 12:32:10 +00:00
|
|
|
}
|
|
|
|
|
2008-01-20 19:55:22 +00:00
|
|
|
|
2008-05-30 18:06:21 +00:00
|
|
|
bool DRC::doEdgeZoneDrc( ZONE_CONTAINER* aArea, int aCornerIndex )
|
2008-01-20 19:55:22 +00:00
|
|
|
{
|
2009-03-11 13:29:10 +00:00
|
|
|
if( !aArea->IsOnCopperLayer() ) // Cannot have a Drc error if not on copper layer
|
2008-09-26 19:51:36 +00:00
|
|
|
return true;
|
|
|
|
|
2008-01-20 19:55:22 +00:00
|
|
|
wxString str;
|
2008-05-15 11:20:19 +00:00
|
|
|
|
2008-05-30 18:06:21 +00:00
|
|
|
wxPoint start = aArea->GetCornerPosition( aCornerIndex );
|
|
|
|
wxPoint end;
|
|
|
|
|
|
|
|
// Search the end point of the edge starting at aCornerIndex
|
2013-03-20 14:50:12 +00:00
|
|
|
if( aArea->Outline()->m_CornersList[aCornerIndex].end_contour == false
|
2008-05-30 18:06:21 +00:00
|
|
|
&& aCornerIndex < (aArea->GetNumCorners() - 1) )
|
|
|
|
{
|
|
|
|
end = aArea->GetCornerPosition( aCornerIndex + 1 );
|
|
|
|
}
|
|
|
|
else // aCornerIndex is the last corner of an outline.
|
|
|
|
// the corresponding end point of the segment is the first corner of the outline
|
|
|
|
{
|
|
|
|
int ii = aCornerIndex - 1;
|
|
|
|
end = aArea->GetCornerPosition( ii );
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-05-30 18:06:21 +00:00
|
|
|
while( ii >= 0 )
|
|
|
|
{
|
2013-03-20 14:50:12 +00:00
|
|
|
if( aArea->Outline()->m_CornersList[ii].end_contour )
|
2008-05-30 18:06:21 +00:00
|
|
|
break;
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-05-30 18:06:21 +00:00
|
|
|
end = aArea->GetCornerPosition( ii );
|
|
|
|
ii--;
|
|
|
|
}
|
|
|
|
}
|
2008-01-20 19:55:22 +00:00
|
|
|
|
|
|
|
// iterate through all areas
|
|
|
|
for( int ia2 = 0; ia2 < m_pcb->GetAreaCount(); ia2++ )
|
|
|
|
{
|
2012-07-13 18:55:29 +00:00
|
|
|
ZONE_CONTAINER* area_to_test = m_pcb->GetArea( ia2 );
|
2013-03-18 19:36:07 +00:00
|
|
|
int zone_clearance = std::max( area_to_test->GetZoneClearance(),
|
|
|
|
aArea->GetZoneClearance() );
|
2008-01-20 19:55:22 +00:00
|
|
|
|
|
|
|
// test for same layer
|
2012-07-13 18:55:29 +00:00
|
|
|
if( area_to_test->GetLayer() != aArea->GetLayer() )
|
2008-01-20 19:55:22 +00:00
|
|
|
continue;
|
|
|
|
|
|
|
|
// Test for same net
|
2014-02-25 10:47:27 +00:00
|
|
|
if( ( aArea->GetNetCode() == area_to_test->GetNetCode() ) && (aArea->GetNetCode() >= 0) )
|
2008-01-20 19:55:22 +00:00
|
|
|
continue;
|
|
|
|
|
2012-01-29 19:29:19 +00:00
|
|
|
// test for same priority
|
2012-07-13 18:55:29 +00:00
|
|
|
if( area_to_test->GetPriority() != aArea->GetPriority() )
|
2012-01-29 19:29:19 +00:00
|
|
|
continue;
|
|
|
|
|
2012-07-13 18:55:29 +00:00
|
|
|
// test for same type
|
|
|
|
if( area_to_test->GetIsKeepout() != aArea->GetIsKeepout() )
|
|
|
|
continue;
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-07-30 07:40:25 +00:00
|
|
|
// For keepout, there is no clearance, so use a minimal value for it
|
|
|
|
// use 1, not 0 as value to avoid some issues in tests
|
|
|
|
if( area_to_test->GetIsKeepout() )
|
|
|
|
zone_clearance = 1;
|
|
|
|
|
2012-07-13 18:55:29 +00:00
|
|
|
// test for ending line inside area_to_test
|
2013-03-20 14:50:12 +00:00
|
|
|
if( area_to_test->Outline()->TestPointInside( end.x, end.y ) )
|
2008-01-20 19:55:22 +00:00
|
|
|
{
|
|
|
|
// COPPERAREA_COPPERAREA error: corner inside copper area
|
2012-07-13 18:55:29 +00:00
|
|
|
m_currentMarker = fillMarker( aArea, end,
|
2008-01-20 19:55:22 +00:00
|
|
|
COPPERAREA_INSIDE_COPPERAREA,
|
|
|
|
m_currentMarker );
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// now test spacing between areas
|
2008-01-31 20:53:44 +00:00
|
|
|
int ax1 = start.x;
|
|
|
|
int ay1 = start.y;
|
|
|
|
int ax2 = end.x;
|
|
|
|
int ay2 = end.y;
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2013-03-20 14:50:12 +00:00
|
|
|
for( int icont2 = 0; icont2 < area_to_test->Outline()->GetContoursCount(); icont2++ )
|
2008-01-20 19:55:22 +00:00
|
|
|
{
|
2013-03-20 14:50:12 +00:00
|
|
|
int ic_start2 = area_to_test->Outline()->GetContourStart( icont2 );
|
|
|
|
int ic_end2 = area_to_test->Outline()->GetContourEnd( icont2 );
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-20 19:55:22 +00:00
|
|
|
for( int ic2 = ic_start2; ic2<=ic_end2; ic2++ )
|
|
|
|
{
|
2013-03-20 14:50:12 +00:00
|
|
|
int bx1 = area_to_test->Outline()->GetX( ic2 );
|
|
|
|
int by1 = area_to_test->Outline()->GetY( ic2 );
|
2008-01-20 19:55:22 +00:00
|
|
|
int bx2, by2;
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2008-01-20 19:55:22 +00:00
|
|
|
if( ic2 == ic_end2 )
|
|
|
|
{
|
2013-03-20 14:50:12 +00:00
|
|
|
bx2 = area_to_test->Outline()->GetX( ic_start2 );
|
|
|
|
by2 = area_to_test->Outline()->GetY( ic_start2 );
|
2008-01-20 19:55:22 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-03-20 14:50:12 +00:00
|
|
|
bx2 = area_to_test->Outline()->GetX( ic2 + 1 );
|
|
|
|
by2 = area_to_test->Outline()->GetY( ic2 + 1 );
|
2008-01-20 19:55:22 +00:00
|
|
|
}
|
2011-09-23 13:57:12 +00:00
|
|
|
|
2012-07-13 18:55:29 +00:00
|
|
|
int x, y; // variables containing the intersecting point coordinates
|
2012-08-01 07:07:56 +00:00
|
|
|
int d = GetClearanceBetweenSegments( bx1, by1, bx2, by2,
|
2011-09-23 13:57:12 +00:00
|
|
|
0,
|
2012-08-01 07:07:56 +00:00
|
|
|
ax1, ay1, ax2, ay2,
|
2011-09-23 13:57:12 +00:00
|
|
|
0,
|
2012-07-30 07:40:25 +00:00
|
|
|
zone_clearance,
|
2011-09-23 13:57:12 +00:00
|
|
|
&x, &y );
|
|
|
|
|
2008-10-23 10:26:06 +00:00
|
|
|
if( d < zone_clearance )
|
2008-01-20 19:55:22 +00:00
|
|
|
{
|
|
|
|
// COPPERAREA_COPPERAREA error : edge intersect or too close
|
2008-01-31 20:53:44 +00:00
|
|
|
m_currentMarker = fillMarker( aArea, wxPoint( x, y ),
|
2008-01-20 19:55:22 +00:00
|
|
|
COPPERAREA_CLOSE_TO_COPPERAREA,
|
|
|
|
m_currentMarker );
|
2008-05-30 18:06:21 +00:00
|
|
|
return false;
|
2008-01-20 19:55:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-05-30 18:06:21 +00:00
|
|
|
return true;
|
2008-01-20 19:55:22 +00:00
|
|
|
}
|