Loading pcbnew/gen_drill_report_files.cpp +6 −13 Original line number Original line Diff line number Diff line Loading @@ -41,7 +41,7 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, wxPoint offset; wxPoint offset; PLOTTER* plotter = NULL; PLOTTER* plotter = NULL; const PCB_PLOT_PARAMS& plot_opts = aPcb->GetPlotOptions(); PCB_PLOT_PARAMS plot_opts; // starts plotting with default options LOCALE_IO toggle; // use standard C notation for float numbers LOCALE_IO toggle; // use standard C notation for float numbers Loading Loading @@ -131,33 +131,26 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, plotter->SetDefaultLineWidth( 10 * IU_PER_DECIMILS ); plotter->SetDefaultLineWidth( 10 * IU_PER_DECIMILS ); plotter->StartPlot( aFile ); plotter->StartPlot( aFile ); // Draw items on edge layer // Draw items on edge layer (not all, only items useful for drill map BRDITEMS_PLOTTER itemplotter( plotter, aPcb, plot_opts ); itemplotter.SetLayerMask( EDGE_LAYER ); for( EDA_ITEM* PtStruct = aPcb->m_Drawings; PtStruct != NULL; PtStruct = PtStruct->Next() ) for( EDA_ITEM* PtStruct = aPcb->m_Drawings; PtStruct != NULL; PtStruct = PtStruct->Next() ) { { switch( PtStruct->Type() ) switch( PtStruct->Type() ) { { case PCB_LINE_T: case PCB_LINE_T: PlotDrawSegment( plotter, plot_opts, (DRAWSEGMENT*) PtStruct, EDGE_LAYER, FILLED ); itemplotter.PlotDrawSegment( (DRAWSEGMENT*) PtStruct ); break; break; case PCB_TEXT_T: case PCB_TEXT_T: PlotTextePcb( plotter, plot_opts, (TEXTE_PCB*) PtStruct, EDGE_LAYER, FILLED ); itemplotter.PlotTextePcb( (TEXTE_PCB*) PtStruct ); break; break; case PCB_DIMENSION_T: case PCB_DIMENSION_T: PlotDimension( plotter, plot_opts, (DIMENSION*) PtStruct, EDGE_LAYER, FILLED ); break; case PCB_TARGET_T: case PCB_TARGET_T: PlotPcbTarget( plotter, plot_opts, (PCB_TARGET*) PtStruct, EDGE_LAYER, FILLED ); break; case PCB_MARKER_T: // do not draw case PCB_MARKER_T: // do not draw break; default: default: DisplayError( NULL, wxT( "WinEDA_DrillFrame::GenDrillMap() : Unexpected Draw Type" ) ); break; break; } } } } Loading pcbnew/pcbplot.h +41 −20 Original line number Original line Diff line number Diff line Loading @@ -7,14 +7,16 @@ #include <pcb_plot_params.h> #include <pcb_plot_params.h> class PLOTTER; class PLOTTER; class TEXTE_PCB; class TEXTE_PCB; class DRAWSEGMENT; class DRAWSEGMENT; class DIMENSION; class DIMENSION; class MODULE; class EDGE_MODULE; class EDGE_MODULE; class PCB_TARGET; class PCB_TARGET; class TEXTE_MODULE; class ZONE_CONTAINER; class ZONE_CONTAINER; class BOARD; // Shared Config keys for plot and print // Shared Config keys for plot and print Loading Loading @@ -43,25 +45,44 @@ class ZONE_CONTAINER; // Small drill marks diameter value (in 1/10000 inch) // Small drill marks diameter value (in 1/10000 inch) #define SMALL_DRILL 150 #define SMALL_DRILL 150 // A helper class to plot board items class BRDITEMS_PLOTTER: public PCB_PLOT_PARAMS { PLOTTER* m_plotter; BOARD* m_board; int m_layerMask; public: BRDITEMS_PLOTTER( PLOTTER* aPlotter, BOARD* aBoard, const PCB_PLOT_PARAMS& aPlotOpts ) : PCB_PLOT_PARAMS( aPlotOpts ) { m_plotter = aPlotter; m_board = aBoard; m_layerMask = 0; } // Basic functions to plot a board item void SetLayerMask( int aLayerMask ){ m_layerMask = aLayerMask; } void Plot_Edges_Modules(); void Plot_1_EdgeModule( EDGE_MODULE* aEdge ); void PlotTextModule( TEXTE_MODULE* aTextMod, EDA_COLOR_T aColor ); bool PlotAllTextsModule( MODULE* aModule ); void PlotDimension( DIMENSION* Dimension ); void PlotPcbTarget( PCB_TARGET* PtMire ); void PlotFilledAreas( ZONE_CONTAINER* aZone ); void PlotTextePcb( TEXTE_PCB* pt_texte ); void PlotDrawSegment( DRAWSEGMENT* PtSegm ); /** void PlotTextePcb( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, TEXTE_PCB* pt_texte, int masque_layer, * Function getColor EDA_DRAW_MODE_T trace_mode ); * @return the layer color * @param aLayer = the layer id void PlotDrawSegment( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, DRAWSEGMENT* PtSegm, int masque_layer, * White color is special: cannot be seen on a white paper EDA_DRAW_MODE_T trace_mode ); * and in B&W mode, is plotted as white but other colors are plotted in BLACK * so the returned color is LIGHTGRAY when the layer color is WHITE void PlotDimension( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, DIMENSION* Dimension, int masque_layer, */ EDA_DRAW_MODE_T trace_mode ); EDA_COLOR_T getColor( int aLayer ); }; void PlotPcbTarget( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, PCB_TARGET* PtMire, int masque_layer, EDA_DRAW_MODE_T trace_mode ); void Plot_1_EdgeModule( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, EDGE_MODULE* PtEdge, EDA_DRAW_MODE_T trace_mode, int masque_layer ); void PlotFilledAreas( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T trace_mode ); PLOTTER *StartPlotBoard( BOARD *aBoard, PLOTTER *StartPlotBoard( BOARD *aBoard, PCB_PLOT_PARAMS *aPlotOpts, PCB_PLOT_PARAMS *aPlotOpts, Loading pcbnew/plot_rtn.cpp +138 −161 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
pcbnew/gen_drill_report_files.cpp +6 −13 Original line number Original line Diff line number Diff line Loading @@ -41,7 +41,7 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, wxPoint offset; wxPoint offset; PLOTTER* plotter = NULL; PLOTTER* plotter = NULL; const PCB_PLOT_PARAMS& plot_opts = aPcb->GetPlotOptions(); PCB_PLOT_PARAMS plot_opts; // starts plotting with default options LOCALE_IO toggle; // use standard C notation for float numbers LOCALE_IO toggle; // use standard C notation for float numbers Loading Loading @@ -131,33 +131,26 @@ void GenDrillMapFile( BOARD* aPcb, FILE* aFile, const wxString& aFullFileName, plotter->SetDefaultLineWidth( 10 * IU_PER_DECIMILS ); plotter->SetDefaultLineWidth( 10 * IU_PER_DECIMILS ); plotter->StartPlot( aFile ); plotter->StartPlot( aFile ); // Draw items on edge layer // Draw items on edge layer (not all, only items useful for drill map BRDITEMS_PLOTTER itemplotter( plotter, aPcb, plot_opts ); itemplotter.SetLayerMask( EDGE_LAYER ); for( EDA_ITEM* PtStruct = aPcb->m_Drawings; PtStruct != NULL; PtStruct = PtStruct->Next() ) for( EDA_ITEM* PtStruct = aPcb->m_Drawings; PtStruct != NULL; PtStruct = PtStruct->Next() ) { { switch( PtStruct->Type() ) switch( PtStruct->Type() ) { { case PCB_LINE_T: case PCB_LINE_T: PlotDrawSegment( plotter, plot_opts, (DRAWSEGMENT*) PtStruct, EDGE_LAYER, FILLED ); itemplotter.PlotDrawSegment( (DRAWSEGMENT*) PtStruct ); break; break; case PCB_TEXT_T: case PCB_TEXT_T: PlotTextePcb( plotter, plot_opts, (TEXTE_PCB*) PtStruct, EDGE_LAYER, FILLED ); itemplotter.PlotTextePcb( (TEXTE_PCB*) PtStruct ); break; break; case PCB_DIMENSION_T: case PCB_DIMENSION_T: PlotDimension( plotter, plot_opts, (DIMENSION*) PtStruct, EDGE_LAYER, FILLED ); break; case PCB_TARGET_T: case PCB_TARGET_T: PlotPcbTarget( plotter, plot_opts, (PCB_TARGET*) PtStruct, EDGE_LAYER, FILLED ); break; case PCB_MARKER_T: // do not draw case PCB_MARKER_T: // do not draw break; default: default: DisplayError( NULL, wxT( "WinEDA_DrillFrame::GenDrillMap() : Unexpected Draw Type" ) ); break; break; } } } } Loading
pcbnew/pcbplot.h +41 −20 Original line number Original line Diff line number Diff line Loading @@ -7,14 +7,16 @@ #include <pcb_plot_params.h> #include <pcb_plot_params.h> class PLOTTER; class PLOTTER; class TEXTE_PCB; class TEXTE_PCB; class DRAWSEGMENT; class DRAWSEGMENT; class DIMENSION; class DIMENSION; class MODULE; class EDGE_MODULE; class EDGE_MODULE; class PCB_TARGET; class PCB_TARGET; class TEXTE_MODULE; class ZONE_CONTAINER; class ZONE_CONTAINER; class BOARD; // Shared Config keys for plot and print // Shared Config keys for plot and print Loading Loading @@ -43,25 +45,44 @@ class ZONE_CONTAINER; // Small drill marks diameter value (in 1/10000 inch) // Small drill marks diameter value (in 1/10000 inch) #define SMALL_DRILL 150 #define SMALL_DRILL 150 // A helper class to plot board items class BRDITEMS_PLOTTER: public PCB_PLOT_PARAMS { PLOTTER* m_plotter; BOARD* m_board; int m_layerMask; public: BRDITEMS_PLOTTER( PLOTTER* aPlotter, BOARD* aBoard, const PCB_PLOT_PARAMS& aPlotOpts ) : PCB_PLOT_PARAMS( aPlotOpts ) { m_plotter = aPlotter; m_board = aBoard; m_layerMask = 0; } // Basic functions to plot a board item void SetLayerMask( int aLayerMask ){ m_layerMask = aLayerMask; } void Plot_Edges_Modules(); void Plot_1_EdgeModule( EDGE_MODULE* aEdge ); void PlotTextModule( TEXTE_MODULE* aTextMod, EDA_COLOR_T aColor ); bool PlotAllTextsModule( MODULE* aModule ); void PlotDimension( DIMENSION* Dimension ); void PlotPcbTarget( PCB_TARGET* PtMire ); void PlotFilledAreas( ZONE_CONTAINER* aZone ); void PlotTextePcb( TEXTE_PCB* pt_texte ); void PlotDrawSegment( DRAWSEGMENT* PtSegm ); /** void PlotTextePcb( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, TEXTE_PCB* pt_texte, int masque_layer, * Function getColor EDA_DRAW_MODE_T trace_mode ); * @return the layer color * @param aLayer = the layer id void PlotDrawSegment( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, DRAWSEGMENT* PtSegm, int masque_layer, * White color is special: cannot be seen on a white paper EDA_DRAW_MODE_T trace_mode ); * and in B&W mode, is plotted as white but other colors are plotted in BLACK * so the returned color is LIGHTGRAY when the layer color is WHITE void PlotDimension( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, DIMENSION* Dimension, int masque_layer, */ EDA_DRAW_MODE_T trace_mode ); EDA_COLOR_T getColor( int aLayer ); }; void PlotPcbTarget( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, PCB_TARGET* PtMire, int masque_layer, EDA_DRAW_MODE_T trace_mode ); void Plot_1_EdgeModule( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, EDGE_MODULE* PtEdge, EDA_DRAW_MODE_T trace_mode, int masque_layer ); void PlotFilledAreas( PLOTTER* plotter, const PCB_PLOT_PARAMS& aPlotOpts, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T trace_mode ); PLOTTER *StartPlotBoard( BOARD *aBoard, PLOTTER *StartPlotBoard( BOARD *aBoard, PCB_PLOT_PARAMS *aPlotOpts, PCB_PLOT_PARAMS *aPlotOpts, Loading
pcbnew/plot_rtn.cpp +138 −161 File changed.Preview size limit exceeded, changes collapsed. Show changes