45 m_editFrame( aEditFrame )
96 catch(
const std::runtime_error& e )
98 wxFAIL_MSG( e.what() );
127 if( wxMessageBox(
_(
"Are you sure you want to overwrite the existing file?" ),
128 _(
"Warning" ), wxYES_NO | wxCENTER | wxICON_QUESTION,
this ) == wxNO )
151 static wxString subDirFor3Dshapes;
159 brdFile.SetExt( wxT(
"wrl" ) );
160 path = brdFile.GetFullPath();
163 if( subDirFor3Dshapes.IsEmpty() )
164 subDirFor3Dshapes = wxT(
"shapes3D" );
169 double scaleList[4] = { 1.0, 0.001, 10.0/25.4, 1.0/25.4 };
205 wxFileName modelPath =
path;
210 modelPath.AppendDir( subDirFor3Dshapes );
212 if( export3DFiles && !modelPath.DirExists() )
214 if( !modelPath.Mkdir() )
216 wxString msg = wxString::Format(
_(
"Failed to create folder '%s'." ),
217 modelPath.GetPath() );
224 useRelativePaths, modelPath.GetPath(), aXRef, aYRef ) )
226 wxString msg = wxString::Format(
_(
"Failed to create file '%s'." ),
path );
constexpr EDA_IU_SCALE pcbIUScale
Information pertinent to a Pcbnew printed circuit board.
BOX2I ComputeBoundingBox(bool aBoardEdgesOnly=false) const
Calculate the bounding box containing all board items (or board edge segments).
const wxString & GetFileName() const
constexpr const Vec GetCenter() const
Class DIALOG_EXPORT_VRML_BASE.
wxRadioBox * m_rbSelectUnits
wxCheckBox * m_cbRemoveUnspecified
wxChoice * m_VRML_RefUnitChoice
wxCheckBox * m_cbCopyFiles
wxRadioBox * m_rbCoordOrigin
wxCheckBox * m_cbUseRelativePaths
wxFilePickerCtrl * m_filePicker
wxCheckBox * m_cbRemoveDNP
bool GetUseRelativePathsOption()
wxFilePickerCtrl * FilePicker()
DIALOG_EXPORT_VRML(PCB_EDIT_FRAME *aEditFrame)
PCB_EDIT_FRAME * m_editFrame
wxString GetSubdir3Dshapes()
bool m_useRelativePathsOpt
bool GetCopyFilesOption()
bool TransferDataFromWindow() override
void SetSubdir(const wxString &aDir)
bool GetNoUnspecifiedOption()
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
DIALOG_EXPORT_VRML m_ExportVrml
PCBNEW_SETTINGS * GetPcbNewSettings() const
The main frame for Pcbnew.
void SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.
wxString GetLastPath(LAST_PATH_TYPE aType)
Get the last path for a particular type.
void OnExportVRML(wxCommandEvent &event)
Export the current BOARD to a VRML file.
bool ExportVRML_File(const wxString &aFullFileName, double aMMtoWRMLunit, bool aIncludeUnspecified, bool aIncludeDNP, bool aExport3DFiles, bool aUseRelativePaths, const wxString &a3D_Subdir, double aXRef, double aYRef)
Create the file(s) exporting current BOARD to a VRML file.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
KICOMMON_API double DoubleValueFromString(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Function DoubleValueFromString converts aTextValue to a double.
std::vector< FAB_LAYER_COLOR > dummy
constexpr double IUTomm(int iu) const