Commit 27cf4ad0 authored by charras's avatar charras
Browse files

pcbnew: addded zones in non copper areas and starting work to use polygons in...

pcbnew: addded zones in non copper areas and starting work to use polygons in zone fill algos in not copper areas
work in progress: see changelog
parent 064fcf54
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -5,6 +5,18 @@ Started 2007-June-11
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.



2008-Sep-26 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew:
    Starting work to use polygons in zone fill algos.
    Currently, use this to add zone on non copper layers (technical layers)
    Only for eyes.
    Plot outputs do not handle this.
    Problems with holes in zones.
    Also: first used of wxFormBuilder


2008-Sep-17 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
2008-Sep-17 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
================================================================================
+pcbnew:
+pcbnew:
+13 −14
Original line number Original line Diff line number Diff line
@@ -727,42 +727,41 @@ wxPoint LibDrawPin::ReturnPinEndPoint()
int LibDrawPin::ReturnPinDrawOrient( int TransMat[2][2] )
int LibDrawPin::ReturnPinDrawOrient( int TransMat[2][2] )
/********************************************************/
/********************************************************/


/* Return the pin real orientation (PIN_UP, PIN_DOWN, PIN_RIGHT, PIN_LEFT),
/** Function ReturnPinDrawOrient
 *  according to its orientation,
 * Return the pin real orientation (PIN_UP, PIN_DOWN, PIN_RIGHT, PIN_LEFT),
 *  AND the matrix transform (rot, mirror) TransMat
 *  according to its orientation and the matrix transform (rot, mirror) TransMat
 * @param  TransMat = transform matrix
 */
 */
{
{
    int orient;
    int orient;
    int x1 = 0, y1 = 0;
    wxPoint end;    // position of a end pin starting at 0,0 according to its orientation, lenght = 1
    int t1, t2;


    switch( m_Orient )
    switch( m_Orient )
    {
    {
    case PIN_UP:
    case PIN_UP:
        y1 = 1; break;
        end.y = 1; break;


    case PIN_DOWN:
    case PIN_DOWN:
        y1 = -1; break;
        end.y = -1; break;


    case PIN_LEFT:
    case PIN_LEFT:
        x1 = -1; break;
        end.x = -1; break;


    case PIN_RIGHT:
    case PIN_RIGHT:
        x1 = 1; break;
        end.x = 1; break;
    }
    }


    t1     = TransMat[0][0] * x1 + TransMat[0][1] * y1;
    end    = TransformCoordinate( TransMat, end );    // = pos of end point, accordint to the component orientation
    t2     = TransMat[1][0] * x1 + TransMat[1][1] * y1;
    orient = PIN_UP;
    orient = PIN_UP;
    if( t1 == 0 )
    if( end.x == 0 )
    {
    {
        if( t2 > 0 )
        if( end.y > 0 )
            orient = PIN_DOWN;
            orient = PIN_DOWN;
    }
    }
    else
    else
    {
    {
        orient = PIN_RIGHT;
        orient = PIN_RIGHT;
        if( t1 < 0 )
        if( end.x < 0 )
            orient = PIN_LEFT;
            orient = PIN_LEFT;
    }
    }


+798 B (156 KiB)

File changed.

No diff preview for this file type.

Loading