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

Fixed minor issues in Gerbview

parent f0364c9d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -606,6 +606,7 @@ void AM_PRIMITIVE::ConvertShapeToPolygon( GERBER_DRAW_ITEM* aParent,
    }
        break;

    case AMP_COMMENT:
    case AMP_UNKNOWN:
    case AMP_EOF:
        break;
@@ -707,6 +708,7 @@ int AM_PRIMITIVE::GetShapeDim( GERBER_DRAW_ITEM* aParent )
        dim = scale( params[4].GetValue( tool ), m_GerbMetric ) / 2;      // Radius
        break;

    case AMP_COMMENT:
    case AMP_UNKNOWN:
    case AMP_EOF:
        break;
+2 −1
Original line number Diff line number Diff line
@@ -44,7 +44,8 @@
 * This complex shape is flashed.
 */
enum AM_PRIMITIVE_ID {
    AMP_UNKNOWN = 0,            // A value for uninitialized AM_PRIMITIVE.
    AMP_UNKNOWN = -1,           // A value for uninitialized AM_PRIMITIVE.
    AMP_COMMENT = 0,            // A primitive description is not really a primitive, this is a comment
    AMP_CIRCLE  = 1,            // Circle. (diameter and position)
    AMP_LINE2   = 2,            // Line with rectangle ends. (Width, start and end pos + rotation)
    AMP_LINE20  = 20,           // Same as AMP_LINE2
+0 −16
Original line number Diff line number Diff line
@@ -76,9 +76,6 @@ const wxChar* D_CODE::ShowApertureType( APERTURE_T aType )
    case APT_CIRCLE:
        ret = wxT( "Round" );   break;

    case APT_LINE:
        ret = wxT( "Line" );    break;

    case APT_RECT:
        ret = wxT( "Rect" );    break;

@@ -114,7 +111,6 @@ int D_CODE::GetShapeDim( GERBER_DRAW_ITEM* aParent )
    switch( m_Shape )
    {
    case APT_CIRCLE:
    case APT_LINE:
        dim = m_Size.x;
        break;

@@ -300,8 +296,6 @@ void WinEDA_GerberFrame::CopyDCodesSizeToItems()
        {
            switch( dcode->m_Shape )
            {
            case APT_LINE:          // might not appears here, but some broken
            // gerber files use it
            case APT_CIRCLE:        /* spot round */
                gerb_item->m_Shape = GBR_SPOT_CIRCLE;
                break;
@@ -371,11 +365,6 @@ void D_CODE::DrawFlashedShape( GERBER_DRAW_ITEM* aParent,
            }
        break;

    case APT_LINE:

        // not used for flashed items
        break;

    case APT_RECT:
    {
        wxPoint start;
@@ -514,11 +503,6 @@ void D_CODE::ConvertShapeToPolygon()
        addHoleToPolygon( m_PolyCorners, m_DrillShape, m_Drill, initialpos );
        break;

    case APT_LINE:

        // Not used for flashed shapes
        break;

    case APT_RECT:
        currpos.x  = m_Size.x / 2;
        currpos.y  = m_Size.y / 2;
+0 −1
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ class GERBER_DRAW_ITEM;
 */
enum APERTURE_T {
    APT_CIRCLE  = 'C',      // Flashed shape: Circle with or without hole
    APT_LINE    = 'L',      // tool to draw line. Not used to flash items
    APT_RECT    = 'R',      // Flashed shape: Rectangle with or without hole
    APT_OVAL    = '0',      // Flashed shape: Oval with or without hole
    APT_POLYGON = 'P',      // Flashed shape: Regular polygon (3 to 12 edges)
+0 −1
Original line number Diff line number Diff line
@@ -109,7 +109,6 @@ static void fillFlashedGBRITEM( GERBER_DRAW_ITEM* aGbrItem,
        aGbrItem->m_Shape = GBR_SPOT_POLY;
        break;

    case APT_LINE:              // Should not be used.
    case APT_CIRCLE:
        aGbrItem->m_Shape  = GBR_SPOT_CIRCLE;
        aGbrItem->m_Size.y = aGbrItem->m_Size.x;
Loading