~cern-kicad/kicad/kicad-pns-tom

« back to all changes in this revision

Viewing changes to pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp

Pcbnew: fix bug 1179877, due a bad default  copy constructor, after  my changes about CPOLYGONS_LIST class.
More about CPOLYGONS_LIST work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
 
189
189
    // static to avoid unnecessary memory allocation when filling many zones.
190
190
    static CPOLYGONS_LIST cornerBufferPolysToSubstract;
191
 
    cornerBufferPolysToSubstract.clear();
 
191
    cornerBufferPolysToSubstract.RemoveAllContours();
192
192
 
193
193
    /* Use a dummy pad to calculate hole clerance when a pad is not on all copper layers
194
194
     * and this pad has a hole
423
423
    }
424
424
 
425
425
    // put solid areas in m_FilledPolysList:
426
 
    m_FilledPolysList.clear();
 
426
    m_FilledPolysList.RemoveAllContours();
427
427
    CopyPolygonsFromKiPolygonListToFilledPolysList( polyset_zone_solid_areas );
428
428
 
429
429
    // Remove insulated islands:
431
431
        TestForCopperIslandAndRemoveInsulatedIslands( aPcb );
432
432
 
433
433
    // Now we remove all unused thermal stubs.
434
 
    cornerBufferPolysToSubstract.clear();
 
434
    cornerBufferPolysToSubstract.RemoveAllContours();
435
435
 
436
436
    // Test thermal stubs connections and add polygons to remove unconnected stubs.
437
437
    // (this is a refinement for thermal relief shapes)
449
449
        polyset_zone_solid_areas -= polyset_holes;
450
450
 
451
451
        // put these areas in m_FilledPolysList
452
 
        m_FilledPolysList.clear();
 
452
        m_FilledPolysList.RemoveAllContours();
453
453
        CopyPolygonsFromKiPolygonListToFilledPolysList( polyset_zone_solid_areas );
454
454
 
455
455
        if( GetNet() > 0 )
456
456
            TestForCopperIslandAndRemoveInsulatedIslands( aPcb );
457
457
    }
458
458
 
459
 
    cornerBufferPolysToSubstract.clear();
 
459
    cornerBufferPolysToSubstract.RemoveAllContours();
460
460
}
461
461
 
462
462
 
463
463
void ZONE_CONTAINER::CopyPolygonsFromKiPolygonListToFilledPolysList( KI_POLYGON_SET& aKiPolyList )
464
464
{
465
 
    m_FilledPolysList.clear();
 
465
    m_FilledPolysList.RemoveAllContours();
466
466
    m_FilledPolysList.ImportFrom( aKiPolyList );
467
467
}
468
468