You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

  1. /******************/
  2. /**** Plot DXF ****/
  3. /******************/
  4. #include "fctsys.h"
  5. #include "common.h"
  6. #include "plot_common.h"
  7. #include "confirm.h"
  8. #include "pcbnew.h"
  9. #include "pcbplot.h"
  10. #include "trigo.h"
  11. #include "protos.h"
  12. bool WinEDA_BasePcbFrame::Genere_DXF( const wxString& FullFileName, int Layer,
  13. GRTraceMode trace_mode )
  14. {
  15. Ki_PageDescr* currentsheet = GetScreen()->m_CurrentSheetDesc;
  16. FILE* output_file = wxFopen( FullFileName, wxT( "wt" ) );
  17. if( output_file == NULL )
  18. {
  19. return false;
  20. }
  21. SetLocaleTo_C_standard();
  22. DXF_PLOTTER* plotter = new DXF_PLOTTER();
  23. plotter->set_paper_size( currentsheet );
  24. plotter->set_viewport( wxPoint( 0, 0 ), 1, 0 );
  25. plotter->set_creator( wxT( "PCBNEW-DXF" ) );
  26. plotter->set_filename( FullFileName );
  27. plotter->start_plot( output_file );
  28. if( g_pcb_plot_options.Plot_Frame_Ref )
  29. PlotWorkSheet( plotter, GetScreen() );
  30. Plot_Layer( plotter, Layer, trace_mode );
  31. plotter->end_plot();
  32. delete plotter;
  33. SetLocaleTo_Default();
  34. return true;
  35. }