Commit 362b6b53 authored by dickelbeck's avatar dickelbeck
Browse files

NETCLASS work, see CHANGELOG.txt

parent 8682a9fa
Loading
Loading
Loading
Loading
+15 −0
Original line number Original line Diff line number Diff line
@@ -4,6 +4,20 @@ KiCad ChangeLog 2009
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.


2009-Sep-10 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
++pcbnew
    More NETCLASS work, started on the UI also.  Almost done.  Put NETCLASS support
    into DRC.  Fixed DRC dialog so progress during DRC is sensible and visible.
    The specctra_export probably still needs a little work regarding VIAs.
    Don't install this version of PCBNEW if you need stability.  You can compile
    and look but I would not install it quite yet.  I compiled wxformbuilder
    from source, so you may need to upgrade to load my *.fbp files.

    Jean-Pierre @   todo:    pcbnew/zones_test_and_combine_areas.cpp needs to
                             use NETCLASS and not g_DesignSettings.m_TrackClearance


2009-sept-10 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
2009-sept-10 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
================================================================================
++pcbnew
++pcbnew
@@ -12,6 +26,7 @@ email address.
    The Kbool's author, Klaas Holveda, is still working on these problems
    The Kbool's author, Klaas Holveda, is still working on these problems
    Thanks to Klaas
    Thanks to Klaas



2009-aug-23 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
2009-aug-23 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
================================================================================
++pcbnew
++pcbnew
+1006 −1006

File changed.

Preview size limit exceeded, changes collapsed.

+8 −3
Original line number Original line Diff line number Diff line
@@ -267,15 +267,20 @@ public:


    /**
    /**
     * Function GetClearance
     * Function GetClearance
     * returns the clearance in 1/10000 inches to aItem from this BOARD_CONNECTED_ITEM.
     * returns the clearance in 1/10000 inches.  If \a aItem is not NULL then the
     * returned clearance is the greater of this object's NETCLASS clearance and
     * aItem's NETCLASS clearance.  If \a aItem is NULL, then this objects clearance
     * is returned.
     * @param aItem is another BOARD_CONNECTED_ITEM or NULL
     * @return int - the clearance in 1/10000 inches.
     */
     */
     virtual int GetClearance( BOARD_CONNECTED_ITEM* aItem ) const;
    virtual int GetClearance( BOARD_CONNECTED_ITEM* aItem = NULL ) const;


     /**
     /**
      * Function GetNetClass
      * Function GetNetClass
      * returns the NETCLASS for this item.
      * returns the NETCLASS for this item.
      */
      */
     virtual NETCLASS* GetNetClass() const;
     NETCLASS* GetNetClass() const;
};
};




+22 −9
Original line number Original line Diff line number Diff line
@@ -25,6 +25,9 @@
#ifndef _CLASS_DRC_ITEM_H
#ifndef _CLASS_DRC_ITEM_H
#define _CLASS_DRC_ITEM_H
#define _CLASS_DRC_ITEM_H


#include "macros.h"


/**
/**
 * Class DRC_ITEM
 * Class DRC_ITEM
 * is a holder for a DRC (in Pcbnew) or ERC (in Eeschema) error item.
 * is a holder for a DRC (in Pcbnew) or ERC (in Eeschema) error item.
@@ -46,7 +49,7 @@ protected:
    wxPoint  m_MainPosition;                    ///< the location of the first (or main ) BOARD_ITEM or SCH_ITEM. This is also the position of the marker
    wxPoint  m_MainPosition;                    ///< the location of the first (or main ) BOARD_ITEM or SCH_ITEM. This is also the position of the marker
    wxPoint  m_AuxiliaryPosition;               ///< the location of the second BOARD_ITEM or SCH_ITEM
    wxPoint  m_AuxiliaryPosition;               ///< the location of the second BOARD_ITEM or SCH_ITEM
    bool     m_hasSecondItem;                   ///< true when 2 items create a DRC/ERC error, false if only one item
    bool     m_hasSecondItem;                   ///< true when 2 items create a DRC/ERC error, false if only one item

    bool     m_noCoordinate;


public:
public:


@@ -54,9 +57,9 @@ public:
    {
    {
        m_ErrorCode     = 0;
        m_ErrorCode     = 0;
        m_hasSecondItem = false;
        m_hasSecondItem = false;
        m_noCoordinate = false;
    }
    }



    DRC_ITEM( int aErrorCode,
    DRC_ITEM( int aErrorCode,
              const wxString& aMainText, const wxString& bAuxiliaryText,
              const wxString& aMainText, const wxString& bAuxiliaryText,
              const wxPoint& aMainPos, const wxPoint& bAuxiliaryPos )
              const wxPoint& aMainPos, const wxPoint& bAuxiliaryPos )
@@ -66,7 +69,6 @@ public:
                 aMainPos, bAuxiliaryPos );
                 aMainPos, bAuxiliaryPos );
    }
    }



    DRC_ITEM( int aErrorCode,
    DRC_ITEM( int aErrorCode,
              const wxString& aText, const wxPoint& aPos )
              const wxString& aText, const wxPoint& aPos )
    {
    {
@@ -124,11 +126,14 @@ public:


    bool HasSecondItem() const { return m_hasSecondItem; }
    bool HasSecondItem() const { return m_hasSecondItem; }


    void SetShowNoCoordinate() { m_noCoordinate = true; }

    /** acces to A and B texts
    /** acces to A and B texts
     */
     */
    wxString GetMainText() const { return m_MainText; }
    wxString GetMainText() const { return m_MainText; }
    wxString GetAuxiliaryText() const { return m_AuxiliaryText; }
    wxString GetAuxiliaryText() const { return m_AuxiliaryText; }



    /**
    /**
     * Function ShowHtml
     * Function ShowHtml
     * translates this object into a fragment of HTML suitable for the
     * translates this object into a fragment of HTML suitable for the
@@ -139,22 +144,30 @@ public:
    {
    {
        wxString ret;
        wxString ret;


        if( m_hasSecondItem )
        if( m_noCoordinate )
        {
            // omit the coordinate, a NETCLASS has no location
            ret.Printf( _( "ErrType(%d): <b>%s</b><ul><li> %s </li></ul>" ),
                       m_ErrorCode,
                       GetChars( GetErrorText() ),
                       GetChars( m_MainText ) );
        }
        else if( m_hasSecondItem )
        {
        {
            // an html fragment for the entire message in the listbox.  feel free
            // an html fragment for the entire message in the listbox.  feel free
            // to add color if you want:
            // to add color if you want:
            ret.Printf( _( "ErrType(%d): <b>%s</b><ul><li> %s: %s </li><li> %s: %s </li></ul>" ),
            ret.Printf( _( "ErrType(%d): <b>%s</b><ul><li> %s: %s </li><li> %s: %s </li></ul>" ),
                       m_ErrorCode,
                       m_ErrorCode,
                       GetErrorText().GetData(),
                       GetChars( GetErrorText() ),
                       ShowCoord( m_MainPosition ).GetData(), m_MainText.GetData(),
                       GetChars( ShowCoord( m_MainPosition )), GetChars( m_MainText ),
                       ShowCoord( m_AuxiliaryPosition ).GetData(), m_AuxiliaryText.GetData() );
                       GetChars( ShowCoord( m_AuxiliaryPosition )), GetChars( m_AuxiliaryText ) );
        }
        }
        else
        else
        {
        {
            ret.Printf( _( "ErrType(%d): <b>%s</b><ul><li> %s: %s </li></ul>" ),
            ret.Printf( _( "ErrType(%d): <b>%s</b><ul><li> %s: %s </li></ul>" ),
                       m_ErrorCode,
                       m_ErrorCode,
                       GetErrorText().GetData(),
                       GetChars( GetErrorText() ),
                       ShowCoord( m_MainPosition ).GetData(), m_MainText.GetData() );
                       GetChars( ShowCoord( m_MainPosition ) ), GetChars( m_MainText ) );
        }
        }


        return ret;
        return ret;
+6 −1
Original line number Original line Diff line number Diff line
@@ -135,7 +135,8 @@ public:
                  const wxString& aText, const wxPoint& aPos );
                  const wxString& aText, const wxPoint& aPos );




    /** Function SetAuxiliaryData
    /**
     * Function SetAuxiliaryData
     * initialize data for the second (auxiliary) item
     * initialize data for the second (auxiliary) item
     * @param aAuxiliaryText = the second text (main text) concerning the second schematic or board item
     * @param aAuxiliaryText = the second text (main text) concerning the second schematic or board item
     * @param aAuxiliaryPos = position the second item
     * @param aAuxiliaryPos = position the second item
@@ -145,6 +146,10 @@ public:
        m_drc.SetAuxiliaryData( aAuxiliaryText, aAuxiliaryPos );
        m_drc.SetAuxiliaryData( aAuxiliaryText, aAuxiliaryPos );
    }
    }


    void SetShowNoCoordinate()
    {
        m_drc.SetShowNoCoordinate();
    }


    /**
    /**
     * Function GetReporter
     * Function GetReporter
Loading