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 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
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>
================================================================================
++pcbnew
@@ -12,6 +26,7 @@ email address.
    The Kbool's author, Klaas Holveda, is still working on these problems
    Thanks to Klaas


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

File changed.

Preview size limit exceeded, changes collapsed.

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

    /**
     * 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
      * returns the NETCLASS for this item.
      */
     virtual NETCLASS* GetNetClass() const;
     NETCLASS* GetNetClass() const;
};


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

#include "macros.h"


/**
 * Class DRC_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_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_noCoordinate;

public:

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


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


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

    bool HasSecondItem() const { return m_hasSecondItem; }

    void SetShowNoCoordinate() { m_noCoordinate = true; }

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


    /**
     * Function ShowHtml
     * translates this object into a fragment of HTML suitable for the
@@ -139,22 +144,30 @@ public:
    {
        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
            // to add color if you want:
            ret.Printf( _( "ErrType(%d): <b>%s</b><ul><li> %s: %s </li><li> %s: %s </li></ul>" ),
                       m_ErrorCode,
                       GetErrorText().GetData(),
                       ShowCoord( m_MainPosition ).GetData(), m_MainText.GetData(),
                       ShowCoord( m_AuxiliaryPosition ).GetData(), m_AuxiliaryText.GetData() );
                       GetChars( GetErrorText() ),
                       GetChars( ShowCoord( m_MainPosition )), GetChars( m_MainText ),
                       GetChars( ShowCoord( m_AuxiliaryPosition )), GetChars( m_AuxiliaryText ) );
        }
        else
        {
            ret.Printf( _( "ErrType(%d): <b>%s</b><ul><li> %s: %s </li></ul>" ),
                       m_ErrorCode,
                       GetErrorText().GetData(),
                       ShowCoord( m_MainPosition ).GetData(), m_MainText.GetData() );
                       GetChars( GetErrorText() ),
                       GetChars( ShowCoord( m_MainPosition ) ), GetChars( m_MainText ) );
        }

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


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

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

    /**
     * Function GetReporter
Loading