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, see <https://www.gnu.org/licenses/>.
18 */
19
20/*
21 * 1 - create ASCII files for automatic placement of smd components
22 * 2 - create a footprint report (pos and footprint descr) (ascii file)
23 */
24
26
27#include <wx/dirdlg.h>
28#include <wx/msgdlg.h>
29
30#include <board.h>
31#include <confirm.h>
32#include <pcb_edit_frame.h>
34#include <bitmaps.h>
35#include <reporter.h>
38#include <kiface_base.h>
39#include <string_utils.h>
45
46
49 m_editFrame( aEditFrame ),
50 m_job( nullptr )
51{
52 m_messagesPanel->SetFileName( Prj().GetProjectPath() + wxT( "report.txt" ) );
53 m_messagesPanel->MsgPanelSetMinSize( wxSize( -1, 160 ) );
54
56
57 m_variantChoiceCtrl->Append( m_editFrame->GetBoard()->GetVariantNamesForUI() );
58
59 wxString currentVariant = m_editFrame->GetBoard()->GetCurrentVariant();
60
61 if( !currentVariant.IsEmpty() )
62 {
63 int selection = m_variantChoiceCtrl->FindString( currentVariant );
64
65 if( selection != wxNOT_FOUND )
66 m_variantChoiceCtrl->SetSelection( selection );
67 else
68 m_variantChoiceCtrl->SetSelection( 0 );
69 }
70 else
71 {
72 m_variantChoiceCtrl->SetSelection( 0 );
73 }
74
75 SetupStandardButtons( { { wxID_OK, _( "Generate Position File" ) },
76 { wxID_CANCEL, _( "Close" ) } } );
77
78 // DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and
79 // non-job versions.
80 m_hash_key = TO_UTF8( GetTitle() );
81
82 GetSizer()->SetSizeHints( this );
83 Centre();
84}
85
86
88 PCB_EDIT_FRAME* aEditFrame,
89 wxWindow* aParent ) :
91 m_editFrame( aEditFrame ),
92 m_job( aJob )
93{
94 SetTitle( m_job->GetSettingsDialogTitle() );
95
96 m_browseButton->Hide();
98 m_staticTextDir->SetLabel( _( "Output file:" ) );
99
100 if( m_editFrame && m_editFrame->GetBoard() )
101 m_variantChoiceCtrl->Append( m_editFrame->GetBoard()->GetVariantNamesForUI() );
102
103 m_messagesPanel->Hide();
104
106
107 // DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and
108 // non-job versions.
109 m_hash_key = TO_UTF8( GetTitle() );
110
111 GetSizer()->SetSizeHints( this );
112 Centre();
113}
114
115
117{
118 if( m_job )
119 {
120 m_outputDirectoryName->SetValue( m_job->GetConfiguredOutputPath() );
121
122 m_unitsCtrl->SetSelection( static_cast<int>( m_job->m_units ) );
123 m_singleFile->SetValue( m_job->m_singleFile );
124 m_formatCtrl->SetSelection( static_cast<int>( m_job->m_format ) );
125 m_cbIncludeBoardEdge->SetValue( m_job->m_gerberBoardEdge );
126 m_useDrillPlaceOrigin->SetValue( m_job->m_useDrillPlaceFileOrigin );
127 m_onlySMD->SetValue( m_job->m_smdOnly );
128 m_negateXcb->SetValue( m_job->m_negateBottomX );
129 m_excludeTH->SetValue( m_job->m_excludeFootprintsWithTh );
130 m_excludeDNP->SetValue( m_job->m_excludeDNP );
131 m_excludeBOM->SetValue( m_job->m_excludeBOM );
132
133 if( !m_job->m_variant.IsEmpty() )
134 {
135 int selection = m_variantChoiceCtrl->FindString( m_job->m_variant );
136
137 if( selection != wxNOT_FOUND )
138 m_variantChoiceCtrl->SetSelection( selection );
139 else
140 m_variantChoiceCtrl->SetSelection( 0 );
141 }
142 else
143 {
144 m_variantChoiceCtrl->SetSelection( 0 );
145 }
146 }
147
148 return true;
149}
150
151
156
157
158void DIALOG_GEN_FOOTPRINT_POSITION::updateOptionCheckbox( wxUpdateUIEvent& aEvent, bool aSupported )
159{
160 if( !aSupported )
161 static_cast<wxCheckBox*>( aEvent.GetEventObject() )->SetValue( false );
162
163 aEvent.Enable( aSupported );
164}
165
166
168{
170
171 m_unitsLabel->Enable( textFormat );
172 m_unitsCtrl->Enable( textFormat );
173}
174
175
180
181
188
189
194
195
207
208
213
214
216{
217 // Build the absolute path of current output directory to preselect it in the file browser.
218 wxString path = ExpandEnvVarSubstitutions( m_outputDirectoryName->GetValue(), &Prj() );
219 path = Prj().AbsolutePath( path );
220
221 wxDirDialog dirDialog( this, _( "Select Output Directory" ), path );
222
223 if( dirDialog.ShowModal() == wxID_CANCEL )
224 return;
225
226 wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
227
228 if( IsOK( this, _( "Use a relative path?" ) ) )
229 {
230 wxString boardFilePath = ( (wxFileName) m_editFrame->GetBoard()->GetFileName() ).GetPath();
231
232 if( !dirName.MakeRelativeTo( boardFilePath ) )
233 {
234 DisplayErrorMessage( this, _( "Cannot make path relative (target volume different from board "
235 "file volume)!" ) );
236 }
237 }
238
239 m_outputDirectoryName->SetValue( dirName.GetFullPath() );
240}
241
242
243void DIALOG_GEN_FOOTPRINT_POSITION::onGenerate( wxCommandEvent& event )
244{
245 if( !m_job )
246 {
247 m_units = m_unitsCtrl->GetSelection() == 0 ? EDA_UNITS::INCH : EDA_UNITS::MM;
248
250 // Keep unix directory format convention in cfg files
251 m_outputDirectory.Replace( wxT( "\\" ), wxT( "/" ) );
252
255 else
257 }
258 else
259 {
260 m_job->SetConfiguredOutputPath( m_outputDirectoryName->GetValue() );
261 m_job->m_units = m_unitsCtrl->GetSelection() == 0 ? JOB_EXPORT_PCB_POS::UNITS::INCH
263 m_job->m_format = selectedFormat();
265 m_job->m_singleFile = m_singleFile->GetValue();
266 m_job->m_gerberBoardEdge = m_cbIncludeBoardEdge->GetValue();
267 m_job->m_excludeFootprintsWithTh = m_excludeTH->GetValue();
268 m_job->m_smdOnly = m_onlySMD->GetValue();
269 m_job->m_useDrillPlaceFileOrigin = m_useDrillPlaceOrigin->GetValue();
270 m_job->m_negateBottomX = m_negateXcb->GetValue();
271 m_job->m_excludeDNP = m_excludeDNP->GetValue();
272 m_job->m_excludeBOM = m_excludeBOM->GetValue();
273 m_job->m_variant = getSelectedVariant();
274
275 event.Skip(); // Allow normal close action
276 }
277}
278
279
281{
282 BOARD* brd = m_editFrame->GetBoard();
283 wxString msg;
284 int fullcount = 0;
285
286 // Create output directory if it does not exist (also transform it in absolute form).
287 // Bail if it fails.
288
289 std::function<bool( wxString* )> textResolver =
290 [&]( wxString* token ) -> bool
291 {
292 // Handles board->GetTitleBlock() *and* board->GetProject()
293 return m_editFrame->GetBoard()->ResolveTextVar( token, 0 );
294 };
295
296 wxString path = m_outputDirectory;
297 path = ExpandTextVars( path, &textResolver, INTERNAL );
299
300 wxFileName outputDir = wxFileName::DirName( path );
301 wxString boardFilename = m_editFrame->GetBoard()->GetFileName();
302 REPORTER* reporter = &m_messagesPanel->Reporter();
303
304 if( !EnsureFileDirectoryExists( &outputDir, boardFilename, reporter ) )
305 {
306 msg.Printf( _( "Could not write plot files to folder '%s'." ), outputDir.GetPath() );
307 DisplayError( this, msg );
308 return false;
309 }
310
311 wxFileName fn = m_editFrame->GetBoard()->GetFileName();
312 fn.SetPath( outputDir.GetPath() );
313
314 // Create the Front and Top side placement files. Gerber P&P files are always separated.
315 // Not also they include all footprints
316 PLACEFILE_GERBER_WRITER exporter( brd );
317
318 // Set the selected variant for variant-aware DNP/BOM/position file filtering
319 exporter.SetVariant( getSelectedVariant() );
320
321 wxString filename = exporter.GetPlaceFileName( fn.GetFullPath(), F_Cu );
322
323 int fpcount = exporter.CreatePlaceFile( filename, F_Cu, m_cbIncludeBoardEdge->GetValue(),
324 ExcludeDNP(), ExcludeBOM() );
325
326 if( fpcount < 0 )
327 {
328 msg.Printf( _( "Failed to create file '%s'." ), fn.GetFullPath() );
329 wxMessageBox( msg );
330 reporter->Report( msg, RPT_SEVERITY_ERROR );
331 return false;
332 }
333
334 msg.Printf( _( "Front (top side) placement file: '%s'." ), filename );
335 reporter->Report( msg, RPT_SEVERITY_ACTION );
336
337 msg.Printf( _( "Component count: %d." ), fpcount );
338 reporter->Report( msg, RPT_SEVERITY_INFO );
339
340 // Create the Back or Bottom side placement file
341 fullcount = fpcount;
342
343 filename = exporter.GetPlaceFileName( fn.GetFullPath(), B_Cu );
344
345 fpcount = exporter.CreatePlaceFile( filename, B_Cu, m_cbIncludeBoardEdge->GetValue(),
346 ExcludeDNP(), ExcludeBOM() );
347
348 if( fpcount < 0 )
349 {
350 msg.Printf( _( "Failed to create file '%s'." ), filename );
351 reporter->Report( msg, RPT_SEVERITY_ERROR );
352 wxMessageBox( msg );
353 return false;
354 }
355
356 // Display results
357 msg.Printf( _( "Back (bottom side) placement file: '%s'." ), filename );
358 reporter->Report( msg, RPT_SEVERITY_ACTION );
359
360 msg.Printf( _( "Component count: %d." ), fpcount );
361 reporter->Report( msg, RPT_SEVERITY_INFO );
362
363 fullcount += fpcount;
364 msg.Printf( _( "Full component count: %d." ), fullcount );
365 reporter->Report( msg, RPT_SEVERITY_INFO );
366
367 reporter->Report( _( "Done." ), RPT_SEVERITY_INFO );
368
369 return true;
370}
371
372
374{
375 BOARD* brd = m_editFrame->GetBoard();
376 wxString msg;
377 bool singleFile = OneFileOnly();
379 bool useAuxOrigin = m_useDrillPlaceOrigin->GetValue();
380 int fullcount = 0;
381 int topSide = true;
382 int bottomSide = true;
383 bool negateBottomX = m_negateXcb->GetValue();
384
385 // Test for any footprint candidate in list.
386 {
388 ExcludeBOM(), topSide, bottomSide, useCSVfmt, useAuxOrigin,
389 negateBottomX );
390
391 // Set the selected variant for variant-aware DNP/BOM/position file filtering
392 exporter.SetVariant( getSelectedVariant() );
393
394 exporter.GenPositionData();
395
396 if( exporter.GetFootprintCount() == 0 )
397 {
398 wxMessageBox( _( "No footprint for automated placement." ) );
399 return false;
400 }
401 }
402
403 // Create output directory if it does not exist (also transform it in absolute form).
404 // Bail if it fails.
405
406 std::function<bool( wxString* )> textResolver =
407 [&]( wxString* token ) -> bool
408 {
409 // Handles board->GetTitleBlock() *and* board->GetProject()
410 return m_editFrame->GetBoard()->ResolveTextVar( token, 0 );
411 };
412
413 wxString path = m_outputDirectory;
414 path = ExpandTextVars( path, &textResolver, INTERNAL );
416
417 wxFileName outputDir = wxFileName::DirName( path );
418 wxString boardFilename = m_editFrame->GetBoard()->GetFileName();
419 REPORTER* reporter = &m_messagesPanel->Reporter();
420
421 if( !EnsureFileDirectoryExists( &outputDir, boardFilename, reporter ) )
422 {
423 msg.Printf( _( "Could not write plot files to folder '%s'." ), outputDir.GetPath() );
424 DisplayError( this, msg );
425 return false;
426 }
427
428 wxFileName fn = m_editFrame->GetBoard()->GetFileName();
429 fn.SetPath( outputDir.GetPath() );
430
431 // Create the Front or Top side placement file, or a single file
432 topSide = true;
433 bottomSide = singleFile;
434
435 fn.SetName( PLACE_FILE_EXPORTER::DecorateFilename( fn.GetName(), topSide, bottomSide ) );
437
438 if( useCSVfmt )
439 {
440 fn.SetName( fn.GetName() + wxT( "-" ) + FILEEXT::FootprintPlaceFileExtension );
441 fn.SetExt( wxT( "csv" ) );
442 }
443
444 int fpcount = m_editFrame->DoGenFootprintsPositionFile( fn.GetFullPath(), UnitsMM(), OnlySMD(),
445 ExcludeAllTH(), ExcludeDNP(), ExcludeBOM(), topSide,
446 bottomSide, useCSVfmt, useAuxOrigin, negateBottomX );
447 if( fpcount < 0 )
448 {
449 msg.Printf( _( "Failed to create file '%s'." ), fn.GetFullPath() );
450 wxMessageBox( msg );
451 reporter->Report( msg, RPT_SEVERITY_ERROR );
452 return false;
453 }
454
455 if( singleFile )
456 msg.Printf( _( "Placement file: '%s'." ), fn.GetFullPath() );
457 else
458 msg.Printf( _( "Front (top side) placement file: '%s'." ), fn.GetFullPath() );
459
460 reporter->Report( msg, RPT_SEVERITY_ACTION );
461
462 msg.Printf( _( "Component count: %d." ), fpcount );
463 reporter->Report( msg, RPT_SEVERITY_INFO );
464
465 if( singleFile )
466 {
467 reporter->Report( _( "Done." ), RPT_SEVERITY_INFO );
468 return true;
469 }
470
471 // Create the Back or Bottom side placement file
472 fullcount = fpcount;
473 topSide = false;
474 bottomSide = true;
475 fn = brd->GetFileName();
476 fn.SetPath( outputDir.GetPath() );
477 fn.SetName( PLACE_FILE_EXPORTER::DecorateFilename( fn.GetName(), topSide, bottomSide ) );
479
480 if( useCSVfmt )
481 {
482 fn.SetName( fn.GetName() + wxT( "-" ) + FILEEXT::FootprintPlaceFileExtension );
483 fn.SetExt( wxT( "csv" ) );
484 }
485
486 fpcount = m_editFrame->DoGenFootprintsPositionFile( fn.GetFullPath(), UnitsMM(), OnlySMD(),
487 ExcludeAllTH(), ExcludeDNP(), ExcludeBOM(), topSide,
488 bottomSide, useCSVfmt, useAuxOrigin, negateBottomX );
489
490 if( fpcount < 0 )
491 {
492 msg.Printf( _( "Failed to create file '%s'." ), fn.GetFullPath() );
493 reporter->Report( msg, RPT_SEVERITY_ERROR );
494 wxMessageBox( msg );
495 return false;
496 }
497
498 // Display results
499 if( !singleFile )
500 {
501 msg.Printf( _( "Back (bottom side) placement file: '%s'." ), fn.GetFullPath() );
502 reporter->Report( msg, RPT_SEVERITY_ACTION );
503
504 msg.Printf( _( "Component count: %d." ), fpcount );
505 reporter->Report( msg, RPT_SEVERITY_INFO );
506 }
507
508 if( !singleFile )
509 {
510 fullcount += fpcount;
511 msg.Printf( _( "Full component count: %d." ), fullcount );
512 reporter->Report( msg, RPT_SEVERITY_INFO );
513 }
514
515 reporter->Report( _( "Done." ), RPT_SEVERITY_INFO );
516 return true;
517}
518
519
521{
522 wxString variant;
523 int selection = m_variantChoiceCtrl->GetSelection();
524
525 // Selection 0 is the default variant (empty string)
526 if( ( selection != 0 ) && ( selection != wxNOT_FOUND ) )
527 variant = m_variantChoiceCtrl->GetString( selection );
528
529 return variant;
530}
531
532
539
540
541int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName, bool aUnitsMM,
542 bool aOnlySMD, bool aNoTHItems, bool aExcludeDNP,
543 bool aExcludeBOM, bool aTopSide, bool aBottomSide,
544 bool aFormatCSV, bool aUseAuxOrigin, bool aNegateBottomX )
545{
546 FILE * file = nullptr;
547
548 if( !aFullFileName.IsEmpty() )
549 {
550 file = wxFopen( aFullFileName, wxT( "wt" ) );
551
552 if( file == nullptr )
553 return -1;
554 }
555
556 std::string data;
557 PLACE_FILE_EXPORTER exporter( GetBoard(), aUnitsMM, aOnlySMD, aNoTHItems, aExcludeDNP,
558 aExcludeBOM, aTopSide, aBottomSide, aFormatCSV, aUseAuxOrigin,
559 aNegateBottomX );
560
561 // Set the current variant for variant-aware DNP/BOM/position file filtering
562 exporter.SetVariant( GetBoard()->GetCurrentVariant() );
563
564 data = exporter.GenPositionData();
565
566 // if aFullFileName is empty, the file is not created, only the
567 // count of footprints to place is returned
568 if( file )
569 {
570 // Creates a footprint position file
571 // aSide = 0 -> Back (bottom) side)
572 // aSide = 1 -> Front (top) side)
573 // aSide = 2 -> both sides
574 fputs( data.c_str(), file );
575 fclose( file );
576 }
577
578 return exporter.GetFootprintCount();
579}
580
581
583{
584 BOARD* board = m_frame->GetBoard();
585 wxFileName fn;
586
587 wxString boardFilePath = ( (wxFileName) board->GetFileName() ).GetPath();
588 wxDirDialog dirDialog( m_frame, _( "Select Output Directory" ), boardFilePath );
589
590 if( dirDialog.ShowModal() == wxID_CANCEL )
591 return 0;
592
593 fn = board->GetFileName();
594 fn.SetPath( dirDialog.GetPath() );
595 fn.SetExt( wxT( "rpt" ) );
596
597 FILE* rptfile = wxFopen( fn.GetFullPath(), wxT( "wt" ) );
598
599 if( rptfile == nullptr )
600 {
601 wxMessageBox( wxString::Format( _( "Footprint report file created:\n'%s'." ), fn.GetFullPath() ),
602 _( "Footprint Report" ), wxICON_INFORMATION );
603
604 return 0;
605 }
606
607 std::string data;
608 PLACE_FILE_EXPORTER exporter( board, m_frame->GetUserUnits() == EDA_UNITS::MM,
609 false, // aOnlySMD
610 false, // aNoTHItems
611 false, // aExcludeDNP
612 false, // aExcludeBOM
613 true, true, // aTopSide, aBottomSide
614 false, // aFormatCSV
615 true, // aUseAuxOrigin
616 false ); // aNegateBottomX
617
618 // Set the current variant for variant-aware filtering
619 exporter.SetVariant( board->GetCurrentVariant() );
620
621 data = exporter.GenReportData();
622
623 fputs( data.c_str(), rptfile );
624 fclose( rptfile );
625
626 wxMessageBox( wxString::Format( _( "Footprint report file created:\n'%s'." ), fn.GetFullPath() ),
627 _( "Footprint Report" ), wxICON_INFORMATION );
628
629 return 0;
630}
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
Definition bitmap.cpp:106
int GenFootprintsReport(const TOOL_EVENT &aEvent)
int GeneratePosFile(const TOOL_EVENT &aEvent)
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:409
const wxString & GetFileName() const
Definition board.h:452
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...
JOB_EXPORT_PCB_POS::FORMAT selectedFormat() const
void onUpdateUIincludeBoardEdge(wxUpdateUIEvent &event) override
void onUpdateUIExcludeTH(wxUpdateUIEvent &event) override
void updateOptionCheckbox(wxUpdateUIEvent &aEvent, bool aSupported)
Enable the checkbox that raised aEvent, clearing it when the selected output format cannot apply the ...
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
FILTER
The footprint selection filters that may be applied while generating position data.
static bool FormatSupportsFilter(FORMAT aFormat, FILTER aFilter)
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 export.
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:407
A pure virtual class used to derive REPORTER objects from.
Definition reporter.h:73
T * getEditFrame() const
Return the application window object, casted to requested user type.
Definition tool_base.h:182
Generic, UI-independent tool event.
Definition tool_event.h:167
const wxString ExpandEnvVarSubstitutions(const wxString &aString, const PROJECT *aProject)
Replace any environment variable & text variable references with their values.
Definition common.cpp:776
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject, RESOLUTION_CONTEXT aContext)
Definition common.cpp:60
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:797
@ INTERNAL
Definition common.h:92
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
Definition confirm.cpp:274
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition confirm.cpp:217
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
Definition confirm.cpp:192
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:61
@ F_Cu
Definition layer_ids.h:60
@ 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
IbisParser parser & reporter
Definition of file extensions used in Kicad.