Commit c5f104a5 authored by Andrey Fedorushkov's avatar Andrey Fedorushkov
Browse files

fix bug plot arc to dxf-format in back_silkscreen, comment and draw layers

parent 0c00c88f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
#ifndef PCBPLOT_H
#define PCBPLOT_H

#include <pcb_plot_params.h>
#include "pcb_plot_params.h"


class PLOTTER;
@@ -52,7 +52,7 @@ void PlotPcbTarget( PLOTTER* plotter, PCB_TARGET* PtMire, int masque_layer,
                    EDA_DRAW_MODE_T trace_mode );

void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* PtEdge,
                        EDA_DRAW_MODE_T trace_mode );
                        EDA_DRAW_MODE_T trace_mode, int masque_layer );

void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone,
                      EDA_DRAW_MODE_T trace_mode );
+38 −29
Original line number Diff line number Diff line
@@ -3,29 +3,29 @@
 * @brief Common plot routines.
 */

#include <fctsys.h>
#include <common.h>
#include <plot_common.h>
#include <base_struct.h>
#include <drawtxt.h>
#include <confirm.h>
#include <trigo.h>
#include <wxBasePcbFrame.h>
#include <pcbcommon.h>
#include <macros.h>

#include <class_board.h>
#include <class_module.h>
#include <class_track.h>
#include <class_edge_mod.h>
#include <class_pcb_text.h>
#include <class_zone.h>
#include <class_drawsegment.h>
#include <class_mire.h>
#include <class_dimension.h>

#include <pcbnew.h>
#include <pcbplot.h>
#include "fctsys.h"
#include "common.h"
#include "plot_common.h"
#include "base_struct.h"
#include "drawtxt.h"
#include "confirm.h"
#include "trigo.h"
#include "wxBasePcbFrame.h"
#include "pcbcommon.h"
#include "macros.h"

#include "class_board.h"
#include "class_module.h"
#include "class_track.h"
#include "class_edge_mod.h"
#include "class_pcb_text.h"
#include "class_zone.h"
#include "class_drawsegment.h"
#include "class_mire.h"
#include "class_dimension.h"

#include "pcbnew.h"
#include "pcbplot.h"

static void Plot_Edges_Modules( PLOTTER* plotter, BOARD* pcb, int aLayerMask,
                                EDA_DRAW_MODE_T trace_mode );
@@ -375,14 +375,14 @@ void Plot_Edges_Modules( PLOTTER* plotter, BOARD* pcb, int aLayerMask, EDA_DRAW_
            if( ( GetLayerMask( edge->GetLayer() ) & aLayerMask ) == 0 )
                continue;

            Plot_1_EdgeModule( plotter, edge, trace_mode );
            Plot_1_EdgeModule( plotter, edge, trace_mode, aLayerMask );
        }
    }
}


/** Plot a graphic item (outline) relative to a footprint */
void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, EDA_DRAW_MODE_T trace_mode )
void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, EDA_DRAW_MODE_T trace_mode, int masque_layer )
{
    int     type_trace;         // Type of item to plot.
    int     thickness;          // Segment thickness.
@@ -418,6 +418,15 @@ void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, EDA_DRAW_MODE_T tr

            double endAngle = startAngle + aEdge->GetAngle();

            if ( ( g_PcbPlotOptions.GetPlotFormat() == PLOT_FORMAT_DXF ) &&
    	       ( masque_layer & ( SILKSCREEN_LAYER_BACK | DRAW_LAYER | COMMENT_LAYER ) ) )
                plotter->thick_arc( pos,
                                -startAngle,
                                -endAngle,
                                radius,
                                thickness,
                                trace_mode );
            else
                plotter->thick_arc( pos,
                                -endAngle,
                                -startAngle,
@@ -791,7 +800,7 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter,
            {
            case PCB_MODULE_EDGE_T:
                if( aLayerMask & GetLayerMask(  item->GetLayer() ) )
                    Plot_1_EdgeModule( aPlotter, (EDGE_MODULE*) item, aPlotMode );
                    Plot_1_EdgeModule( aPlotter, (EDGE_MODULE*) item, aPlotMode, aLayerMask );

                break;