70 m_XRef = cfg->m_ExportVrml.ref_x;
71 m_YRef = cfg->m_ExportVrml.ref_y;
108 cfg->m_ExportVrml.ref_x = val;
111 cfg->m_ExportVrml.ref_y = val;
180 if( wxMessageBox(
_(
"Are you sure you want to overwrite the existing file?" ),
181 _(
"Warning" ), wxYES_NO | wxCENTER | wxICON_QUESTION,
this ) == wxNO )
192 static wxString subDirFor3Dshapes;
200 brdFile.SetExt(
"wrl" );
201 path = brdFile.GetFullPath();
204 if( subDirFor3Dshapes.IsEmpty() )
205 subDirFor3Dshapes = wxT(
"shapes3D" );
210 double scaleList[4] = { 1.0, 0.001, 10.0/25.4, 1.0/25.4 };
216 if( dlg.ShowModal() != wxID_OK )
236 wxFileName modelPath = path;
241 modelPath.AppendDir( subDirFor3Dshapes );
243 if( export3DFiles && !modelPath.DirExists() )
245 if( !modelPath.Mkdir() )
248 _(
"Unable to create directory \"%s\"" ), modelPath.GetPath() );
255 usePlainPCB, modelPath.GetPath(), aXRef, aYRef ) )
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
wxFilePickerCtrl * m_filePicker
This file is part of the common library.
wxString GetSubdir3Dshapes()
bool GetUseRelativePathsOption()
wxFilePickerCtrl * FilePicker()
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.
DIALOG_EXPORT_VRML m_ExportVrml
const wxString & GetFileName() const
wxString GetLastPath(LAST_PATH_TYPE aType)
Get the last path for a particular type.
DIALOG_EXPORT_3DFILE(PCB_EDIT_FRAME *parent)
PCB_EDIT_FRAME * m_parent
void OnUpdateUseRelativePath(wxUpdateUIEvent &event)
wxCheckBox * m_cbCopyFiles
wxChoice * m_VRML_RefUnitChoice
Class DIALOG_EXPORT_3DFILE_BASE.
void SetSubdir(const wxString &aDir)
bool GetUsePlainPCBOption()
bool GetCopyFilesOption()
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
bool m_useRelativePathsOpt
wxCheckBox * m_cbPlainPCB
bool ExportVRML_File(const wxString &aFullFileName, double aMMtoWRMLunit, bool aExport3DFiles, bool aUseRelativePaths, bool aUsePlainPCB, const wxString &a3D_Subdir, double aXRef, double aYRef)
Creates the file(s) exporting current BOARD to a VRML file.
void OnExportVRML(wxCommandEvent &event)
Export the current BOARD to a VRML file.
The main frame for Pcbnew.
PCBNEW_SETTINGS * GetPcbNewSettings() const
wxTextCtrl * m_SubdirNameCtrl
bool TransferDataFromWindow() override
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
wxCheckBox * m_cbUseRelativePaths
void SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.
wxRadioBox * m_rbSelectUnits