7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2024-11-22 11:05:04 +00:00
kicad/pcbnew/dialogs/dialog_export_odbpp.h
Eric 1506beecbc Implement ODB++ export
ADDED: Add support in Pcbnew for exporting ODB++ files under Fabrication
       Outputs, base on ODB++Design Format Specification (Release v8.1
       Update 3 February 2021).

Note: There is still a lot of work to do if we will make the feature as
      complete as the ODB++ spec.  However, the current functionality's
      completeness is already sufficient to cover general production
      scenarios. I have compared the output results with Gerber files by
      DFM tool and the accuracy at the graphic level should be able to
      cover most usage scenarios.  Additionally, I am very grateful to
      the great open-source project Horizon EDA for giving me a lot of
      inspiration in terms of ideas.

The feature can be enabled by adding "EnableODB=1" to the kicad_advanced
configuration file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2019
2024-09-14 15:34:51 +00:00

56 lines
1.7 KiB
C++

/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ODBPP_EXPORT_DIALOG_H
#define ODBPP_EXPORT_DIALOG_H
#include "dialog_export_odbpp_base.h"
class PCB_EDIT_FRAME;
class DIALOG_EXPORT_ODBPP : public DIALOG_EXPORT_ODBPP_BASE
{
public:
DIALOG_EXPORT_ODBPP( PCB_EDIT_FRAME* aParent );
wxString GetOutputPath() const { return m_outputFileName->GetValue(); }
wxString GetUnitsString() const
{
if( m_choiceUnits->GetSelection() == 0 )
return wxT( "mm" );
else
return wxT( "inch" );
}
wxString GetPrecision() const { return wxString::Format( "%d", m_precision->GetValue() ); }
bool GetCompress() const { return m_cbCompress->GetValue(); }
private:
void onBrowseClicked( wxCommandEvent& event ) override;
void onOKClick( wxCommandEvent& event ) override;
bool Init();
bool TransferDataFromWindow() override;
PCB_EDIT_FRAME* m_parent;
};
#endif // ODBPP_EXPORT_DIALOG_H