Commit 1e2b145a authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Pcbnew: Add NPTH pads (seen changelog).

Minor fixes and enhancements.
parent c64a6937
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -4,6 +4,14 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
email address.


2011-Aug-19, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
Pcbnew:
    Add support for not plated through holes (NPTH) pads
    * These NPTH pads are used for mechanical purpose only, and cannot be connected to a net.
    * When these pads have a same size and shape for the hole and the pad, the pad is not plotted
    in GERBER files.

2011-Apr-12, UPDATE Jerry Jacobs <xor.gate.engineering@gmail.com>
2011-Apr-12, UPDATE Jerry Jacobs <xor.gate.engineering@gmail.com>
================================================================================
================================================================================
Minor UI changes that affect OS X platform.
Minor UI changes that affect OS X platform.
+12 −2
Original line number Original line Diff line number Diff line
@@ -33,6 +33,8 @@ bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aFile, bool aSetFieldAttributeToVis
    SCH_REFERENCE_LIST referencesList;
    SCH_REFERENCE_LIST referencesList;
    SheetList.GetComponents( referencesList, false );
    SheetList.GetComponents( referencesList, false );


    // Now, foe each component found in file,
    // replace footprint field value by the new value:
    while( GetLine( aFile, Line, &LineNum, sizeof(Line) ) )
    while( GetLine( aFile, Line, &LineNum, sizeof(Line) ) )
    {
    {
        if( sscanf( Line, "comp = \"%s module = \"%s", Ref, FootPrint ) == 2 )
        if( sscanf( Line, "comp = \"%s module = \"%s", Ref, FootPrint ) == 2 )
@@ -58,12 +60,20 @@ bool SCH_EDIT_FRAME::ProcessStuffFile( FILE* aFile, bool aSetFieldAttributeToVis
                    // So we do not stop the search here
                    // So we do not stop the search here
                    SCH_COMPONENT* component = referencesList[ii].GetComponent();
                    SCH_COMPONENT* component = referencesList[ii].GetComponent();
                    SCH_FIELD * fpfield = component->GetField( FOOTPRINT );
                    SCH_FIELD * fpfield = component->GetField( FOOTPRINT );
                    /* Give a reasonable value to the field position and
                     * orientation, if the text is empty at position 0, because
                     * it is probably not yet initialized
                     */
                    if( fpfield->m_Text.IsEmpty()
                    if( fpfield->m_Text.IsEmpty()
                        && ( fpfield->m_Pos == wxPoint( 0, 0 ) ) )
                        && ( fpfield->m_Pos == component->m_Pos ) )
                    {
                    {
                        fpfield->m_Orient = component->GetField( VALUE )->m_Orient;
                        fpfield->m_Orient = component->GetField( VALUE )->m_Orient;
                        fpfield->m_Pos    = component->GetField( VALUE )->m_Pos;
                        fpfield->m_Pos    = component->GetField( VALUE )->m_Pos;
                        fpfield->m_Pos.y -= 100;
                        fpfield->m_Size   = component->GetField( VALUE )->m_Size;
                        if( fpfield->m_Orient == 0 )
                            fpfield->m_Pos.y += 100;
                        else
                            fpfield->m_Pos.x += 100;
                    }
                    }


                    fpfield->m_Text = footprint;
                    fpfield->m_Text = footprint;
+13 −8
Original line number Original line Diff line number Diff line
@@ -1065,20 +1065,25 @@ bool SCH_SCREEN::SetComponentFootprint( SCH_SHEET_PATH* aSheetPath, const wxStri
             * orientation, if the text is empty at position 0, because
             * orientation, if the text is empty at position 0, because
             * it is probably not yet initialized
             * it is probably not yet initialized
             */
             */
            if( component->GetField( FOOTPRINT )->m_Text.IsEmpty()
            SCH_FIELD * fpfield = component->GetField( FOOTPRINT );
                && ( component->GetField( FOOTPRINT )->m_Pos == wxPoint( 0, 0 ) ) )
            if( fpfield->m_Text.IsEmpty()
            {
                && ( fpfield->m_Pos == component->m_Pos ) )
                component->GetField( FOOTPRINT )->m_Orient = component->GetField( VALUE )->m_Orient;
            {
                component->GetField( FOOTPRINT )->m_Pos    = component->GetField( VALUE )->m_Pos;
                fpfield->m_Orient = component->GetField( VALUE )->m_Orient;
                component->GetField( FOOTPRINT )->m_Pos.y -= 100;
                fpfield->m_Pos    = component->GetField( VALUE )->m_Pos;
                fpfield->m_Size   = component->GetField( VALUE )->m_Size;
                if( fpfield->m_Orient == 0 )
                    fpfield->m_Pos.y += 100;
                else
                    fpfield->m_Pos.x += 100;
            }
            }


            component->GetField( FOOTPRINT )->m_Text = aFootPrint;
            fpfield->m_Text = aFootPrint;


            if( aSetVisible )
            if( aSetVisible )
                component->GetField( FOOTPRINT )->m_Attributs &= ~TEXT_NO_VISIBLE;
                fpfield->m_Attributs &= ~TEXT_NO_VISIBLE;
            else
            else
                component->GetField( FOOTPRINT )->m_Attributs |= TEXT_NO_VISIBLE;
                fpfield->m_Attributs |= TEXT_NO_VISIBLE;


            found = true;
            found = true;
        }
        }
+16 −1
Original line number Original line Diff line number Diff line
@@ -406,8 +406,23 @@ public:
    void     Plot_Layer( PLOTTER*    plotter,
    void     Plot_Layer( PLOTTER*    plotter,
                         int         Layer,
                         int         Layer,
                         GRTraceMode trace_mode );
                         GRTraceMode trace_mode );
    /**
     * Function Plot_Standard_Layer
     * plot copper or technical layers.
     * not used for silk screen layers, because these layers have specific
     * requirements, mainly for pads
     * @param aPlotter = the plotter to use
     * @param aLayerMask = the mask to define the layers to plot
     * @param aPlotVia = true to plot vias, false to skip vias (has meaning
     *                  only for solder mask layers).
     * @param aPlotMode = the plot mode (files, sketch). Has meaning for some formats only
     * @param aSkipNPTH_Pads = true to skip NPTH Pads, when the pad size and the pad hole
     *                      have the same size. Used in GERBER format only.
     */
    void     Plot_Standard_Layer( PLOTTER* aPlotter, int aLayerMask,
    void     Plot_Standard_Layer( PLOTTER* aPlotter, int aLayerMask,
                                  bool aPlotVia, GRTraceMode aPlotMode );
                                  bool aPlotVia, GRTraceMode aPlotMode,
                                  bool aSkipNPTH_Pads = false );

    void     Plot_Serigraphie( PLOTTER*    plotter,
    void     Plot_Serigraphie( PLOTTER*    plotter,
                               int         masque_layer,
                               int         masque_layer,
                               GRTraceMode trace_mode );
                               GRTraceMode trace_mode );
+7 −6
Original line number Original line Diff line number Diff line
@@ -53,6 +53,7 @@ const wxChar* s_AllowedExtensionsToList[] =
    wxT( "^.*\\.html$" ),
    wxT( "^.*\\.html$" ),
    wxT( "^.*\\.rpt$" ),
    wxT( "^.*\\.rpt$" ),
    wxT( "^.*\\.csv$" ),
    wxT( "^.*\\.csv$" ),
    wxT( "^.*\\.drl$" ),            // Excellon drill files
    NULL                            // end of list
    NULL                            // end of list
};
};


Loading