Loading change_log.txt +5 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,11 @@ email address. ================================================================================ ++pcbnew Some cleanup in dialog pad edition. Added: Zones now have a min thickness filled area parameter that ensure a minimun width for filled copper areas (areas below this min thickness are removed) Shapes also are better 2008-Nov-19 UPDATE Jerry Jacobs <jerkejacobs@gmail.com> Loading common/common_plotPS_functions.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -184,7 +184,7 @@ void PlotPolyPS( int nb_segm, int* coord, bool fill, int width ) /* Draw a polygon ( a filled polygon if fill == 1 ) in POSTSCRIPT format * @param nb_segm = corner count * @param coord = corner list (a corner uses 2 int = X coordinate followed by Y coordinate * @param fill :if == 0 : filled polygon * @param fill :if true : filled polygon * @param width = line width */ { Loading pcbnew/class_zone.cpp +32 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,10 @@ bool ZONE_CONTAINER::Save( FILE* aFile ) const if( ret < 2 ) return false; ret = fprintf( aFile, "ZMinThickness %d\n", m_ZoneMinThickness ); if( ret < 1 ) return false; ret = fprintf( aFile, "ZOptions %d %d %c %d %d\n", m_GridFillValue, m_ArcToSegmentsCount, m_DrawOptions ? 'S' : 'F', m_ThermalReliefGapValue, m_ThermalReliefCopperBridgeValue ); if( ret < 3 ) Loading Loading @@ -332,6 +336,16 @@ int ZONE_CONTAINER::ReadDescr( FILE* aFile, int* aLineNum ) } } if( strnicmp( Line, "ZMinThickness", 13 ) == 0 ) // Min Thickness info found { int thickness; text = Line + 13; ret = sscanf( text, "%d", &thickness ); if( ret < 1 ) error = true; else m_ZoneMinThickness = thickness; } if( strnicmp( Line, "$POLYSCORNERS", 13 ) == 0 ) // Read the PolysList (polygons used for fill areas in the zone) { Loading Loading @@ -522,8 +536,26 @@ void ZONE_CONTAINER::DrawFilledArea( WinEDA_DrawPanel* panel, GRClosedPoly( &panel->m_ClipBox, DC, corners_count, CornersBuffer, false, 0, color, color ); else { // Draw outlines: if ( m_ZoneMinThickness > 1 ) { int ilim = corners_count * 2; for ( int is = 0, ie = ilim-2; is < ilim; ie = is, is+=2 ) { int x0 = CornersBuffer[is]; int y0 = CornersBuffer[is+1]; int x1 = CornersBuffer[ie]; int y1 = CornersBuffer[ie+1]; GRFillCSegm( &panel->m_ClipBox, DC, x0, y0, x1 , y1, m_ZoneMinThickness, color ); } } // Draw areas: GRPoly( &panel->m_ClipBox, DC, corners_count, CornersBuffer, true, 0, color, color ); } corners_count = 0; ii = 0; } Loading pcbnew/class_zone.h +1 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ public: CPolyLine* m_Poly; // outlines int m_CornerSelection; // For corner moving, corner index to drag, or -1 if no selection int m_ZoneClearance; // clearance value int m_ZoneMinThickness; // Min thickness value in filled areas int m_GridFillValue; // Grid used for filling, 0 = use polygonal areas to fill int m_ArcToSegmentsCount; // number of segments to convert a cirlce to a polygon (uses 16 or 32) int m_PadOption; // Loading pcbnew/class_zone_setting.cpp +11 −8 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ ZONE_SETTING::ZONE_SETTING( void ) { m_GridFillValue = 250; // Grid value for filling zone by segments, 0 to used polygons to fill m_ZoneClearance = 200; // Clearance value m_ZoneMinThickness = 0; // Min thickness value in filled areas m_NetcodeSelection = 0; // Net code selection for the current zone m_CurrentZone_Layer = 0; // Layer used to create the current zone m_Zone_HatchingStyle = CPolyLine::DIAGONAL_EDGE; // Option to show the zone area (outlines only, short hatches or full hatches Loading @@ -47,6 +48,7 @@ void ZONE_SETTING::ImportSetting( const ZONE_CONTAINER& aSource ) { m_GridFillValue = aSource.m_GridFillValue; m_ZoneClearance = aSource.m_ZoneClearance; m_ZoneMinThickness = aSource.m_ZoneMinThickness; m_NetcodeSelection = aSource.GetNet(); m_CurrentZone_Layer = aSource.GetLayer(); m_Zone_HatchingStyle = aSource.GetHatchStyle(); Loading @@ -68,6 +70,7 @@ void ZONE_SETTING::ExportSetting( ZONE_CONTAINER& aTarget ) { aTarget.m_GridFillValue = m_GridFillValue; aTarget.m_ZoneClearance = m_ZoneClearance; aTarget.m_ZoneMinThickness = m_ZoneMinThickness; aTarget.SetNet( m_NetcodeSelection ); aTarget.SetLayer( m_CurrentZone_Layer ); aTarget.m_Poly->SetHatch( m_Zone_HatchingStyle ); Loading Loading
change_log.txt +5 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,11 @@ email address. ================================================================================ ++pcbnew Some cleanup in dialog pad edition. Added: Zones now have a min thickness filled area parameter that ensure a minimun width for filled copper areas (areas below this min thickness are removed) Shapes also are better 2008-Nov-19 UPDATE Jerry Jacobs <jerkejacobs@gmail.com> Loading
common/common_plotPS_functions.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -184,7 +184,7 @@ void PlotPolyPS( int nb_segm, int* coord, bool fill, int width ) /* Draw a polygon ( a filled polygon if fill == 1 ) in POSTSCRIPT format * @param nb_segm = corner count * @param coord = corner list (a corner uses 2 int = X coordinate followed by Y coordinate * @param fill :if == 0 : filled polygon * @param fill :if true : filled polygon * @param width = line width */ { Loading
pcbnew/class_zone.cpp +32 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,10 @@ bool ZONE_CONTAINER::Save( FILE* aFile ) const if( ret < 2 ) return false; ret = fprintf( aFile, "ZMinThickness %d\n", m_ZoneMinThickness ); if( ret < 1 ) return false; ret = fprintf( aFile, "ZOptions %d %d %c %d %d\n", m_GridFillValue, m_ArcToSegmentsCount, m_DrawOptions ? 'S' : 'F', m_ThermalReliefGapValue, m_ThermalReliefCopperBridgeValue ); if( ret < 3 ) Loading Loading @@ -332,6 +336,16 @@ int ZONE_CONTAINER::ReadDescr( FILE* aFile, int* aLineNum ) } } if( strnicmp( Line, "ZMinThickness", 13 ) == 0 ) // Min Thickness info found { int thickness; text = Line + 13; ret = sscanf( text, "%d", &thickness ); if( ret < 1 ) error = true; else m_ZoneMinThickness = thickness; } if( strnicmp( Line, "$POLYSCORNERS", 13 ) == 0 ) // Read the PolysList (polygons used for fill areas in the zone) { Loading Loading @@ -522,8 +536,26 @@ void ZONE_CONTAINER::DrawFilledArea( WinEDA_DrawPanel* panel, GRClosedPoly( &panel->m_ClipBox, DC, corners_count, CornersBuffer, false, 0, color, color ); else { // Draw outlines: if ( m_ZoneMinThickness > 1 ) { int ilim = corners_count * 2; for ( int is = 0, ie = ilim-2; is < ilim; ie = is, is+=2 ) { int x0 = CornersBuffer[is]; int y0 = CornersBuffer[is+1]; int x1 = CornersBuffer[ie]; int y1 = CornersBuffer[ie+1]; GRFillCSegm( &panel->m_ClipBox, DC, x0, y0, x1 , y1, m_ZoneMinThickness, color ); } } // Draw areas: GRPoly( &panel->m_ClipBox, DC, corners_count, CornersBuffer, true, 0, color, color ); } corners_count = 0; ii = 0; } Loading
pcbnew/class_zone.h +1 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ public: CPolyLine* m_Poly; // outlines int m_CornerSelection; // For corner moving, corner index to drag, or -1 if no selection int m_ZoneClearance; // clearance value int m_ZoneMinThickness; // Min thickness value in filled areas int m_GridFillValue; // Grid used for filling, 0 = use polygonal areas to fill int m_ArcToSegmentsCount; // number of segments to convert a cirlce to a polygon (uses 16 or 32) int m_PadOption; // Loading
pcbnew/class_zone_setting.cpp +11 −8 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ ZONE_SETTING::ZONE_SETTING( void ) { m_GridFillValue = 250; // Grid value for filling zone by segments, 0 to used polygons to fill m_ZoneClearance = 200; // Clearance value m_ZoneMinThickness = 0; // Min thickness value in filled areas m_NetcodeSelection = 0; // Net code selection for the current zone m_CurrentZone_Layer = 0; // Layer used to create the current zone m_Zone_HatchingStyle = CPolyLine::DIAGONAL_EDGE; // Option to show the zone area (outlines only, short hatches or full hatches Loading @@ -47,6 +48,7 @@ void ZONE_SETTING::ImportSetting( const ZONE_CONTAINER& aSource ) { m_GridFillValue = aSource.m_GridFillValue; m_ZoneClearance = aSource.m_ZoneClearance; m_ZoneMinThickness = aSource.m_ZoneMinThickness; m_NetcodeSelection = aSource.GetNet(); m_CurrentZone_Layer = aSource.GetLayer(); m_Zone_HatchingStyle = aSource.GetHatchStyle(); Loading @@ -68,6 +70,7 @@ void ZONE_SETTING::ExportSetting( ZONE_CONTAINER& aTarget ) { aTarget.m_GridFillValue = m_GridFillValue; aTarget.m_ZoneClearance = m_ZoneClearance; aTarget.m_ZoneMinThickness = m_ZoneMinThickness; aTarget.SetNet( m_NetcodeSelection ); aTarget.SetLayer( m_CurrentZone_Layer ); aTarget.m_Poly->SetHatch( m_Zone_HatchingStyle ); Loading