← Back to team overview

kicad-developers team mailing list archive

[PATCH] Zone clearance to pcb edge etc.

 

Hi,

It seems that currently the clearances between zones and pcb edge
segments (and text items and module edge segments on copper layers)
are not something one would expect based on zone clearance settings.
The reason is that, unlike with, e.g., tracks, the minimum zone
thickness is not taken into account when the corresponding items are
converted into polygons. The attached patch fixes that.

marco
=== modified file 'pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp'
--- pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp	2010-12-01 07:51:21 +0000
+++ pcbnew/zones_convert_brd_items_to_polygons_with_Boost.cpp	2011-01-01 12:12:49 +0000
@@ -280,7 +280,7 @@
             if( item_boundingbox.Intersects( zone_boundingbox ) )
             {
                 ( (EDGE_MODULE*) item )->TransformShapeWithClearanceToPolygon(
-                    cornerBufferPolysToSubstract, m_ZoneClearance,
+                    cornerBufferPolysToSubstract, zone_clearance,
                     s_CircleToSegmentsCount, s_Correction );
             }
         }
@@ -297,7 +297,7 @@
         case TYPE_DRAWSEGMENT:
             ( (DRAWSEGMENT*) item )->TransformShapeWithClearanceToPolygon(
                 cornerBufferPolysToSubstract,
-                m_ZoneClearance,
+                zone_clearance,
                 s_CircleToSegmentsCount,
                 s_Correction );
             break;
@@ -306,7 +306,7 @@
         case TYPE_TEXTE:
             ( (TEXTE_PCB*) item )->TransformShapeWithClearanceToPolygon(
                 cornerBufferPolysToSubstract,
-                m_ZoneClearance,
+                zone_clearance,
                 s_CircleToSegmentsCount,
                 s_Correction );
             break;

=== modified file 'pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp'
--- pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp	2010-12-29 17:47:32 +0000
+++ pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp	2011-01-01 12:09:00 +0000
@@ -318,7 +318,7 @@
             if( item_boundingbox.Intersects( zone_boundingbox ) )
             {
                 ( (EDGE_MODULE*) item )->TransformShapeWithClearanceToPolygon(
-                    cornerBufferPolysToSubstract, m_ZoneClearance,
+                    cornerBufferPolysToSubstract, zone_clearance,
                     s_CircleToSegmentsCount, s_Correction );
             }
         }
@@ -335,7 +335,7 @@
         case TYPE_DRAWSEGMENT:
             ( (DRAWSEGMENT*) item )->TransformShapeWithClearanceToPolygon(
                 cornerBufferPolysToSubstract,
-                m_ZoneClearance,
+                zone_clearance,
                 s_CircleToSegmentsCount,
                 s_Correction );
             break;
@@ -344,7 +344,7 @@
         case TYPE_TEXTE:
             ( (TEXTE_PCB*) item )->TransformShapeWithClearanceToPolygon(
                 cornerBufferPolysToSubstract,
-                m_ZoneClearance,
+                zone_clearance,
                 s_CircleToSegmentsCount,
                 s_Correction );
             break;


Follow ups