KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_gen_footprint_position.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24/*
25 * 1 - create ASCII files for automatic placement of smd components
26 * 2 - create a footprint report (pos and footprint descr) (ascii file)
27 */
28
30
31#include <wx/dirdlg.h>
32#include <wx/msgdlg.h>
33
34#include <confirm.h>
35#include <pcb_edit_frame.h>
37#include <bitmaps.h>
38#include <reporter.h>
41#include <kiface_base.h>
42#include <string_utils.h>
48
49
52 m_editFrame( aEditFrame ),
53 m_job( nullptr )
54{
55 m_messagesPanel->SetFileName( Prj().GetProjectPath() + wxT( "report.txt" ) );
56 m_messagesPanel->MsgPanelSetMinSize( wxSize( -1, 160 ) );
57
59
60 SetupStandardButtons( { { wxID_OK, _( "Generate Position File" ) },
61 { wxID_CANCEL, _( "Close" ) } } );
62
63 // DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and
64 // non-job versions.
65 m_hash_key = TO_UTF8( GetTitle() );
66
67 GetSizer()->SetSizeHints( this );
68 Centre();
69}
70
71
73 PCB_EDIT_FRAME* aEditFrame,
74 wxWindow* aParent ) :
76 m_editFrame( aEditFrame ),
77 m_job( aJob )
78{
79 SetTitle( m_job->GetSettingsDialogTitle() );
80
81 m_browseButton->Hide();
83 m_staticTextDir->SetLabel( _( "Output file:" ) );
84
85 m_messagesPanel->Hide();
86
88
89 // DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and
90 // non-job versions.
91 m_hash_key = TO_UTF8( GetTitle() );
92
93 GetSizer()->SetSizeHints( this );
94 Centre();
95}
96
97
99{
100 if( m_job )
101 {
102 m_outputDirectoryName->SetValue( m_job->GetConfiguredOutputPath() );
103
104 m_unitsCtrl->SetSelection( static_cast<int>( m_job->m_units ) );
105 m_singleFile->SetValue( m_job->m_singleFile );
106 m_formatCtrl->SetSelection( static_cast<int>( m_job->m_format ) );
107 m_cbIncludeBoardEdge->SetValue( m_job->m_gerberBoardEdge );
108 m_useDrillPlaceOrigin->SetValue( m_job->m_useDrillPlaceFileOrigin );
109 m_onlySMD->SetValue( m_job->m_smdOnly );
110 m_negateXcb->SetValue( m_job->m_negateBottomX );
111 m_excludeTH->SetValue( m_job->m_excludeFootprintsWithTh );
112 m_excludeDNP->SetValue( m_job->m_excludeDNP );
113 m_excludeBOM->SetValue( m_job->m_excludeBOM );
114 }
115
116 return true;
117}
118
119
121{
122 m_unitsLabel->Enable( m_formatCtrl->GetSelection() != 2 );
123 m_unitsCtrl->Enable( m_formatCtrl->GetSelection() != 2 );
124}
125
126
128{
129 m_singleFile->Enable( m_formatCtrl->GetSelection() != 2 );
130}
131
132
134{
135 if( m_formatCtrl->GetSelection() == 2 )
136 {
137 m_onlySMD->SetValue( false );
138 m_onlySMD->Enable( false );
139 }
140 else
141 {
142 m_onlySMD->Enable( true );
143 }
144}
145
146
148{
149 if( m_formatCtrl->GetSelection() == 2 )
150 {
151 m_negateXcb->SetValue( false );
152 m_negateXcb->Enable( false );
153 }
154 else
155 {
156 m_negateXcb->Enable( true );
157 }
158}
159
161{
162 if( m_formatCtrl->GetSelection() == 2 )
163 {
164 if( event.GetEventObject() == m_excludeTH )
165 m_excludeTH->SetValue( false );
166 else if( event.GetEventObject() == m_excludeDNP )
167 m_excludeDNP->SetValue( false );
168 else if( event.GetEventObject() == m_excludeBOM )
169 m_excludeBOM->SetValue( false );
170
171 event.Enable( false );
172 }
173 else
174 {
175 event.Enable( true );
176 }
177}
178
179
181{
182 m_cbIncludeBoardEdge->Enable( m_formatCtrl->GetSelection() == 2 );
183}
184
185
187{
188 // Build the absolute path of current output directory to preselect it in the file browser.
189 wxString path = ExpandEnvVarSubstitutions( m_outputDirectoryName->GetValue(), &Prj() );
190 path = Prj().AbsolutePath( path );
191
192 wxDirDialog dirDialog( this, _( "Select Output Directory" ), path );
193
194 if( dirDialog.ShowModal() == wxID_CANCEL )
195 return;
196
197 wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
198
199 if( IsOK( this, _( "Use a relative path?" ) ) )
200 {
201 wxString boardFilePath = ( (wxFileName) m_editFrame->GetBoard()->GetFileName() ).GetPath();
202
203 if( !dirName.MakeRelativeTo( boardFilePath ) )
204 {
205 DisplayErrorMessage( this, _( "Cannot make path relative (target volume different from board "
206 "file volume)!" ) );
207 }
208 }
209
210 m_outputDirectoryName->SetValue( dirName.GetFullPath() );
211}
212
213
214void DIALOG_GEN_FOOTPRINT_POSITION::onGenerate( wxCommandEvent& event )
215{
216 if( !m_job )
217 {
218 m_units = m_unitsCtrl->GetSelection() == 0 ? EDA_UNITS::INCH : EDA_UNITS::MM;
219
221 // Keep unix directory format convention in cfg files
222 m_outputDirectory.Replace( wxT( "\\" ), wxT( "/" ) );
223
224 if( m_formatCtrl->GetSelection() == 2 )
226 else
228 }
229 else
230 {
231 m_job->SetConfiguredOutputPath( m_outputDirectoryName->GetValue() );
232 m_job->m_units = m_unitsCtrl->GetSelection() == 0 ? JOB_EXPORT_PCB_POS::UNITS::INCH
234 m_job->m_format = static_cast<JOB_EXPORT_PCB_POS::FORMAT>( m_formatCtrl->GetSelection() );
236 m_job->m_singleFile = m_singleFile->GetValue();
237 m_job->m_gerberBoardEdge = m_cbIncludeBoardEdge->GetValue();
238 m_job->m_excludeFootprintsWithTh = m_excludeTH->GetValue();
239 m_job->m_smdOnly = m_onlySMD->GetValue();
240 m_job->m_useDrillPlaceFileOrigin = m_useDrillPlaceOrigin->GetValue();
241 m_job->m_negateBottomX = m_negateXcb->GetValue();
242 m_job->m_excludeDNP = m_excludeDNP->GetValue();
243 m_job->m_excludeBOM = m_excludeBOM->GetValue();
244
245 event.Skip(); // Allow normal close action
246 }
247}
248
249
251{
252 BOARD* brd = m_editFrame->GetBoard();
253 wxString msg;
254 int fullcount = 0;
255
256 // Create output directory if it does not exist (also transform it in absolute form).
257 // Bail if it fails.
258
259 std::function<bool( wxString* )> textResolver =
260 [&]( wxString* token ) -> bool
261 {
262 // Handles board->GetTitleBlock() *and* board->GetProject()
263 return m_editFrame->GetBoard()->ResolveTextVar( token, 0 );
264 };
265
266 wxString path = m_outputDirectory;
267 path = ExpandTextVars( path, &textResolver );
268 path = ExpandEnvVarSubstitutions( path, nullptr );
269
270 wxFileName outputDir = wxFileName::DirName( path );
271 wxString boardFilename = m_editFrame->GetBoard()->GetFileName();
272 REPORTER* reporter = &m_messagesPanel->Reporter();
273
274 if( !EnsureFileDirectoryExists( &outputDir, boardFilename, reporter ) )
275 {
276 msg.Printf( _( "Could not write plot files to folder '%s'." ), outputDir.GetPath() );
277 DisplayError( this, msg );
278 return false;
279 }
280
281 wxFileName fn = m_editFrame->GetBoard()->GetFileName();
282 fn.SetPath( outputDir.GetPath() );
283
284 // Create the Front and Top side placement files. Gerber P&P files are always separated.
285 // Not also they include all footprints
286 PLACEFILE_GERBER_WRITER exporter( brd );
287
288 // Set the current variant for variant-aware DNP/BOM/position file filtering
289 exporter.SetVariant( brd->GetCurrentVariant() );
290
291 wxString filename = exporter.GetPlaceFileName( fn.GetFullPath(), F_Cu );
292
293 int fpcount = exporter.CreatePlaceFile( filename, F_Cu, m_cbIncludeBoardEdge->GetValue(),
294 m_excludeDNP->GetValue(), ExcludeBOM() );
295
296 if( fpcount < 0 )
297 {
298 msg.Printf( _( "Failed to create file '%s'." ), fn.GetFullPath() );
299 wxMessageBox( msg );
300 reporter->Report( msg, RPT_SEVERITY_ERROR );
301 return false;
302 }
303
304 msg.Printf( _( "Front (top side) placement file: '%s'." ), filename );
305 reporter->Report( msg, RPT_SEVERITY_ACTION );
306
307 msg.Printf( _( "Component count: %d." ), fpcount );
308 reporter->Report( msg, RPT_SEVERITY_INFO );
309
310 // Create the Back or Bottom side placement file
311 fullcount = fpcount;
312
313 filename = exporter.GetPlaceFileName( fn.GetFullPath(), B_Cu );
314
315 fpcount = exporter.CreatePlaceFile( filename, B_Cu, m_cbIncludeBoardEdge->GetValue(),
316 m_excludeDNP->GetValue(), ExcludeBOM() );
317
318 if( fpcount < 0 )
319 {
320 msg.Printf( _( "Failed to create file '%s'." ), filename );
321 reporter->Report( msg, RPT_SEVERITY_ERROR );
322 wxMessageBox( msg );
323 return false;
324 }
325
326 // Display results
327 msg.Printf( _( "Back (bottom side) placement file: '%s'." ), filename );
328 reporter->Report( msg, RPT_SEVERITY_ACTION );
329
330 msg.Printf( _( "Component count: %d." ), fpcount );
331 reporter->Report( msg, RPT_SEVERITY_INFO );
332
333 fullcount += fpcount;
334 msg.Printf( _( "Full component count: %d." ), fullcount );
335 reporter->Report( msg, RPT_SEVERITY_INFO );
336
337 reporter->Report( _( "Done." ), RPT_SEVERITY_INFO );
338
339 return true;
340}
341
342
344{
345 BOARD* brd = m_editFrame->GetBoard();
346 wxString msg;
347 bool singleFile = OneFileOnly();
348 bool useCSVfmt = m_formatCtrl->GetSelection() == 1;
349 bool useAuxOrigin = m_useDrillPlaceOrigin->GetValue();
350 int fullcount = 0;
351 int topSide = true;
352 int bottomSide = true;
353 bool negateBottomX = m_negateXcb->GetValue();
354
355 // Test for any footprint candidate in list.
356 {
358 ExcludeBOM(), topSide, bottomSide, useCSVfmt, useAuxOrigin,
359 negateBottomX );
360
361 // Set the current variant for variant-aware DNP/BOM/position file filtering
362 exporter.SetVariant( brd->GetCurrentVariant() );
363
364 exporter.GenPositionData();
365
366 if( exporter.GetFootprintCount() == 0 )
367 {
368 wxMessageBox( _( "No footprint for automated placement." ) );
369 return false;
370 }
371 }
372
373 // Create output directory if it does not exist (also transform it in absolute form).
374 // Bail if it fails.
375
376 std::function<bool( wxString* )> textResolver =
377 [&]( wxString* token ) -> bool
378 {
379 // Handles board->GetTitleBlock() *and* board->GetProject()
380 return m_editFrame->GetBoard()->ResolveTextVar( token, 0 );
381 };
382
383 wxString path = m_outputDirectory;
384 path = ExpandTextVars( path, &textResolver );
385 path = ExpandEnvVarSubstitutions( path, nullptr );
386
387 wxFileName outputDir = wxFileName::DirName( path );
388 wxString boardFilename = m_editFrame->GetBoard()->GetFileName();
389 REPORTER* reporter = &m_messagesPanel->Reporter();
390
391 if( !EnsureFileDirectoryExists( &outputDir, boardFilename, reporter ) )
392 {
393 msg.Printf( _( "Could not write plot files to folder '%s'." ), outputDir.GetPath() );
394 DisplayError( this, msg );
395 return false;
396 }
397
398 wxFileName fn = m_editFrame->GetBoard()->GetFileName();
399 fn.SetPath( outputDir.GetPath() );
400
401 // Create the Front or Top side placement file, or a single file
402 topSide = true;
403 bottomSide = singleFile;
404
405 fn.SetName( PLACE_FILE_EXPORTER::DecorateFilename( fn.GetName(), topSide, bottomSide ) );
407
408 if( useCSVfmt )
409 {
410 fn.SetName( fn.GetName() + wxT( "-" ) + FILEEXT::FootprintPlaceFileExtension );
411 fn.SetExt( wxT( "csv" ) );
412 }
413
414 int fpcount = m_editFrame->DoGenFootprintsPositionFile( fn.GetFullPath(), UnitsMM(), OnlySMD(),
415 ExcludeAllTH(), ExcludeDNP(), ExcludeBOM(), topSide,
416 bottomSide, useCSVfmt, useAuxOrigin, negateBottomX );
417 if( fpcount < 0 )
418 {
419 msg.Printf( _( "Failed to create file '%s'." ), fn.GetFullPath() );
420 wxMessageBox( msg );
421 reporter->Report( msg, RPT_SEVERITY_ERROR );
422 return false;
423 }
424
425 if( singleFile )
426 msg.Printf( _( "Placement file: '%s'." ), fn.GetFullPath() );
427 else
428 msg.Printf( _( "Front (top side) placement file: '%s'." ), fn.GetFullPath() );
429
430 reporter->Report( msg, RPT_SEVERITY_ACTION );
431
432 msg.Printf( _( "Component count: %d." ), fpcount );
433 reporter->Report( msg, RPT_SEVERITY_INFO );
434
435 if( singleFile )
436 {
437 reporter->Report( _( "Done." ), RPT_SEVERITY_INFO );
438 return true;
439 }
440
441 // Create the Back or Bottom side placement file
442 fullcount = fpcount;
443 topSide = false;
444 bottomSide = true;
445 fn = brd->GetFileName();
446 fn.SetPath( outputDir.GetPath() );
447 fn.SetName( PLACE_FILE_EXPORTER::DecorateFilename( fn.GetName(), topSide, bottomSide ) );
449
450 if( useCSVfmt )
451 {
452 fn.SetName( fn.GetName() + wxT( "-" ) + FILEEXT::FootprintPlaceFileExtension );
453 fn.SetExt( wxT( "csv" ) );
454 }
455
456 fpcount = m_editFrame->DoGenFootprintsPositionFile( fn.GetFullPath(), UnitsMM(), OnlySMD(),
457 ExcludeAllTH(), ExcludeDNP(), ExcludeBOM(), topSide,
458 bottomSide, useCSVfmt, useAuxOrigin, negateBottomX );
459
460 if( fpcount < 0 )
461 {
462 msg.Printf( _( "Failed to create file '%s'." ), fn.GetFullPath() );
463 reporter->Report( msg, RPT_SEVERITY_ERROR );
464 wxMessageBox( msg );
465 return false;
466 }
467
468 // Display results
469 if( !singleFile )
470 {
471 msg.Printf( _( "Back (bottom side) placement file: '%s'." ), fn.GetFullPath() );
472 reporter->Report( msg, RPT_SEVERITY_ACTION );
473
474 msg.Printf( _( "Component count: %d." ), fpcount );
475 reporter->Report( msg, RPT_SEVERITY_INFO );
476 }
477
478 if( !singleFile )
479 {
480 fullcount += fpcount;
481 msg.Printf( _( "Full component count: %d." ), fullcount );
482 reporter->Report( msg, RPT_SEVERITY_INFO );
483 }
484
485 reporter->Report( _( "Done." ), RPT_SEVERITY_INFO );
486 return true;
487}
488
489
496
497
498int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName, bool aUnitsMM,
499 bool aOnlySMD, bool aNoTHItems, bool aExcludeDNP,
500 bool aExcludeBOM, bool aTopSide, bool aBottomSide,
501 bool aFormatCSV, bool aUseAuxOrigin, bool aNegateBottomX )
502{
503 FILE * file = nullptr;
504
505 if( !aFullFileName.IsEmpty() )
506 {
507 file = wxFopen( aFullFileName, wxT( "wt" ) );
508
509 if( file == nullptr )
510 return -1;
511 }
512
513 std::string data;
514 PLACE_FILE_EXPORTER exporter( GetBoard(), aUnitsMM, aOnlySMD, aNoTHItems, aExcludeDNP,
515 aExcludeBOM, aTopSide, aBottomSide, aFormatCSV, aUseAuxOrigin,
516 aNegateBottomX );
517
518 // Set the current variant for variant-aware DNP/BOM/position file filtering
519 exporter.SetVariant( GetBoard()->GetCurrentVariant() );
520
521 data = exporter.GenPositionData();
522
523 // if aFullFileName is empty, the file is not created, only the
524 // count of footprints to place is returned
525 if( file )
526 {
527 // Creates a footprint position file
528 // aSide = 0 -> Back (bottom) side)
529 // aSide = 1 -> Front (top) side)
530 // aSide = 2 -> both sides
531 fputs( data.c_str(), file );
532 fclose( file );
533 }
534
535 return exporter.GetFootprintCount();
536}
537
538
540{
541 BOARD* board = m_frame->GetBoard();
542 wxFileName fn;
543
544 wxString boardFilePath = ( (wxFileName) board->GetFileName() ).GetPath();
545 wxDirDialog dirDialog( m_frame, _( "Select Output Directory" ), boardFilePath );
546
547 if( dirDialog.ShowModal() == wxID_CANCEL )
548 return 0;
549
550 fn = board->GetFileName();
551 fn.SetPath( dirDialog.GetPath() );
552 fn.SetExt( wxT( "rpt" ) );
553
554 FILE* rptfile = wxFopen( fn.GetFullPath(), wxT( "wt" ) );
555
556 if( rptfile == nullptr )
557 {
558 wxMessageBox( wxString::Format( _( "Footprint report file created:\n'%s'." ), fn.GetFullPath() ),
559 _( "Footprint Report" ), wxICON_INFORMATION );
560
561 return 0;
562 }
563
564 std::string data;
565 PLACE_FILE_EXPORTER exporter( board, m_frame->GetUserUnits() == EDA_UNITS::MM,
566 false, // aOnlySMD
567 false, // aNoTHItems
568 false, // aExcludeDNP
569 false, // aExcludeBOM
570 true, true, // aTopSide, aBottomSide
571 false, // aFormatCSV
572 true, // aUseAuxOrigin
573 false ); // aNegateBottomX
574
575 // Set the current variant for variant-aware filtering
576 exporter.SetVariant( board->GetCurrentVariant() );
577
578 data = exporter.GenReportData();
579
580 fputs( data.c_str(), rptfile );
581 fclose( rptfile );
582
583 wxMessageBox( wxString::Format( _( "Footprint report file created:\n'%s'." ), fn.GetFullPath() ),
584 _( "Footprint Report" ), wxICON_INFORMATION );
585
586 return 0;
587}
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
Definition bitmap.cpp:110
int GenFootprintsReport(const TOOL_EVENT &aEvent)
int GeneratePosFile(const TOOL_EVENT &aEvent)
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:322
const wxString & GetFileName() const
Definition board.h:359
wxString GetCurrentVariant() const
Definition board.h:404
DIALOG_GEN_FOOTPRINT_POSITION_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Generate Placement Files"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
The dialog to create footprint position files and choose options (one or 2 files, units and force all...
void onUpdateUIincludeBoardEdge(wxUpdateUIEvent &event) override
void onUpdateUIExcludeTH(wxUpdateUIEvent &event) override
bool CreateGerberFiles()
Creates placement files in gerber format.
void onGenerate(wxCommandEvent &event) override
void onUpdateUIFileOpt(wxUpdateUIEvent &event) override
void onUpdateUIOnlySMD(wxUpdateUIEvent &event) override
DIALOG_GEN_FOOTPRINT_POSITION(PCB_EDIT_FRAME *aEditFrame)
bool CreateAsciiFiles()
Creates files in text or csv format.
void onUpdateUInegXcoord(wxUpdateUIEvent &event) override
void onOutputDirectoryBrowseClicked(wxCommandEvent &event) override
void onUpdateUIUnits(wxUpdateUIEvent &event) override
EDA_UNITS m_units
void SetupStandardButtons(std::map< int, wxString > aLabels={})
std::string m_hash_key
int ShowModal() override
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
BOARD * GetBoard() const
The main frame for Pcbnew.
int DoGenFootprintsPositionFile(const wxString &aFullFileName, bool aUnitsMM, bool aOnlySMD, bool aNoTHItems, bool aExcludeDNP, bool aExcludeBOM, bool aTopSide, bool aBottomSide, bool aFormatCSV, bool aUseAuxOrigin, bool aNegateBottomX)
Create an ASCII footprint position file.
BOARD * board() const
Used to create Gerber drill files.
const wxString GetPlaceFileName(const wxString &aFullBaseFilename, PCB_LAYER_ID aLayer) const
void SetVariant(const wxString &aVariant)
Set the variant name for variant-aware filtering.
int CreatePlaceFile(const wxString &aFullFilename, PCB_LAYER_ID aLayer, bool aIncludeBrdEdges, bool aExcludeDNP, bool aExcludeBOM)
Create an pnp gerber file.
The ASCII format of the kicad place file is:
static wxString DecorateFilename(const wxString &aBaseName, bool aFront, bool aBack)
std::string GenPositionData()
build a string filled with the position data
void SetVariant(const wxString &aVariant)
Set the variant name for variant-aware DNP filtering.
std::string GenReportData()
build a string filled with the pad report data This report does not used options aForceSmdItems,...
virtual const wxString AbsolutePath(const wxString &aFileName) const
Fix up aFileName if it is relative to the project's directory to be an absolute path and filename.
Definition project.cpp:391
A pure virtual class used to derive REPORTER objects from.
Definition reporter.h:73
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Report a string with a given severity.
Definition reporter.h:102
T * getEditFrame() const
Return the application window object, casted to requested user type.
Definition tool_base.h:186
Generic, UI-independent tool event.
Definition tool_event.h:171
const wxString ExpandEnvVarSubstitutions(const wxString &aString, const PROJECT *aProject)
Replace any environment variable & text variable references with their values.
Definition common.cpp:557
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject, int aFlags)
Definition common.cpp:61
bool EnsureFileDirectoryExists(wxFileName *aTargetFullFileName, const wxString &aBaseFilename, REPORTER *aReporter)
Make aTargetFullFileName absolute and create the path of this file if it doesn't yet exist.
Definition common.cpp:578
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
Definition confirm.cpp:259
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition confirm.cpp:202
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
Definition confirm.cpp:177
This file is part of the common library.
#define _(s)
Classes used in place file generation.
static const std::string FootprintPlaceFileExtension
@ B_Cu
Definition layer_ids.h:65
@ F_Cu
Definition layer_ids.h:64
@ RPT_SEVERITY_ERROR
@ RPT_SEVERITY_INFO
@ RPT_SEVERITY_ACTION
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
std::string path
Definition of file extensions used in Kicad.