46 m_editFrame( aEditFrame ),
48 m_noUnspecified( false ),
50 m_copy3DFilesOpt( false ),
51 m_useRelativePathsOpt( false ),
63 m_noDNP = cfg->m_ExportVrml.no_dnp;
67 m_XRef = cfg->m_ExportVrml.ref_x;
68 m_YRef = cfg->m_ExportVrml.ref_y;
104 cfg->m_ExportVrml.no_dnp =
m_noDNP;
112 cfg->m_ExportVrml.ref_x = val;
115 cfg->m_ExportVrml.ref_y = val;
126 if( wxMessageBox(
_(
"Are you sure you want to overwrite the existing file?" ),
127 _(
"Warning" ), wxYES_NO | wxCENTER | wxICON_QUESTION,
this ) == wxNO )
150 static wxString subDirFor3Dshapes;
160 brdFile.SetExt( wxT(
"wrl" ) );
161 path = brdFile.GetFullPath();
164 if( subDirFor3Dshapes.IsEmpty() )
165 subDirFor3Dshapes = wxT(
"shapes3D" );
170 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() )
217 modelPath.GetPath() ) );
223 useRelativePaths, modelPath.GetPath(), aXRef, aYRef ) )
constexpr EDA_IU_SCALE pcbIUScale
int ExportVRML(const TOOL_EVENT &aEvent)
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...
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.
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)
Convert aTextValue to a double.
std::vector< FAB_LAYER_COLOR > dummy
constexpr double IUTomm(int iu) const