#include "Plater.hpp"#include "../Utils/NetworkAgent.hpp"#include "IPrinterAgent.hpp"#include "CalibUtils.hpp"#include "Flashforge.hpp"#include "libslic3r/Config.hpp"#include "libslic3r_version.h"#include <boost/assert/source_location.hpp>#include <boost/optional/optional.hpp>#include <cmath>#include <boost/algorithm/string/join.hpp>#include <cassert>#include <boost/algorithm/string/split.hpp>#include <boost/algorithm/string/classification.hpp>#include <boost/algorithm/string/predicate.hpp>#include <climits>#include <array>#include <boost/filesystem/fstream.hpp>#include <clocale>#include <cstddef>#include <algorithm>#include <ios>#include <iomanip>#include <cstring>#include <map>#include <exception>#include <functional>#include <memory>#include <initializer_list>#include <cstdint>#include <cstdlib>#include "libslic3r/CommonDefs.hpp"#include "libslic3r/TriangleSelector.hpp"#include <cstdio>#include "libslic3r/LocalesUtils.hpp"#include "libslic3r/FlushVolCalc.hpp"#include "libslic3r/Point.hpp"#include "libslic3r/GCode/GCodeProcessor.hpp"#include "libslic3r/Technologies.hpp"#include "libslic3r/BoundingBox.hpp"#include "libslic3r/PrintBase.hpp"#include "libslic3r/Preset.hpp"#include <fstream>#include "libslic3r/calib.hpp"#include <iterator>#include "libslic3r/Format/OBJ.hpp"#include "libslic3r/Geometry.hpp"#include "libslic3r/Arrange.hpp"#include "libslic3r/MultiNozzleUtils.hpp"#include "libslic3r/Color.hpp"#include <miniz.h>#include "libslic3r/Exception.hpp"#include "libslic3r/AppConfig.hpp"#include "libslic3r/CSGMesh/CSGMesh.hpp"#include "libslic3r/format.hpp"#include "libslic3r/MeshBoolean.hpp"#include <numeric>#include <limits>#include <optional>#include "slic3r/GUI/Event.hpp"#include "slic3r/GUI/Gizmos/GLGizmoBase.hpp"#include "slic3r/GUI/Widgets/StateColor.hpp"#include "slic3r/GUI/Widgets/AMSItem.hpp"#include "slic3r/GUI/Search.hpp"#include "slic3r/GUI/ObjectDataViewModel.hpp"#include "slic3r/GUI/Field.hpp"#include "slic3r/GUI/Widgets/PopupWindow.hpp"#include <set>#include "slic3r/GUI/Widgets/StaticLine.hpp"#include "slic3r/GUI/GUI_ObjectSettings.hpp"#include "slic3r/GUI/ColorDecomposeDialog.hpp"#include "slic3r/GUI/SettingsIndex.hpp"#include "slic3r/GUI/Jobs/Job.hpp"#include "slic3r/GUI/ParamsPanel.hpp"#include "slic3r/GUI/SceneRaycaster.hpp"#include "slic3r/GUI/PrinterWebView.hpp"#include "slic3r/GUI/ReleaseNote.hpp"#include "slic3r/GUI/Jobs/Worker.hpp"#include "slic3r/GUI/UnsavedChangesDialog.hpp"#include "slic3r/GUI/Printer/PrinterFileSystem.h"#include "slic3r/GUI/GUI_Geometry.hpp"#include "slic3r/GUI/Widgets/DialogButtons.hpp"#include "slic3r/GUI/PrintOptionsDialog.hpp"#include "slic3r/GUI/CalibrationPanel.hpp"#include "slic3r/GUI/CalibrationWizard.hpp"#include "slic3r/GUI/Monitor.hpp"#include <slic3r/plugin/PluginDescriptor.hpp>#include <slic3r/plugin/PluginManager.hpp>#include <slic3r/plugin/PluginResolver.hpp>#include <utility>#include <sstream>#include <unordered_map>#include <unordered_set>#include <vector>#include <string>#include <regex>#include <atomic>#include <mutex>#include <boost/algorithm/string.hpp>#include <boost/iterator/counting_iterator.hpp>#include <boost/optional.hpp>#include <boost/filesystem/path.hpp>#include <boost/filesystem/operations.hpp>#include <boost/log/trivial.hpp>#include <boost/nowide/convert.hpp>#include <boost/uuid/uuid.hpp>#include <boost/uuid/uuid_generators.hpp>#include <boost/uuid/uuid_io.hpp>#include <wx/colour.h>#include <wx/font.h>#include <wx/aui/framemanager.h>#include <wx/gdicmn.h>#include <wx/anybutton.h>#include <wx/dcclient.h>#include <wx/dcbuffer.h>#include <wx/chartype.h>#include <wx/busycursor.h>#include <wx/app.h>#include <wx/aui/floatpane.h>#include <wx/bookctrl.h>#include <wx/dataview.h>#include <wx/dirdlg.h>#include <wx/msgdlg.h>#include <wx/settings.h>#include <wx/scrolwin.h>#include <wx/notebook.h>#include <wx/sizer.h>#include <wx/spinctrl.h>#include <wx/stattext.h>#include <wx/button.h>#include <wx/bmpcbox.h>#include <wx/display.h>#include <wx/statbox.h>#include <wx/statbmp.h>#include <wx/filedlg.h>#include <wx/dnd.h>#include <wx/progdlg.h>#include <wx/strconv.h>#include <wx/string.h>#include <wx/types.h>#include <wx/utils.h>#include <wx/toplevel.h>#include <wx/tglbtn.h>#include <wx/wupdlock.h>#include <wx/numdlg.h>#include <wx/debug.h>#include <wx/busyinfo.h>#include <wx/event.h>#include <wx/evtloop.h>#include <wx/timer.h>#include <wx/wrapsizer.h>#include <wx/clrpicker.h>#include <wx/tokenzr.h>#include <wx/aui/aui.h>#include "libslic3r/libslic3r.h"#include "libslic3r/LifecycleEvents.hpp"#include "libslic3r/Format/STL.hpp"#include "libslic3r/Format/DRC.hpp"#include "libslic3r/Format/STEP.hpp"#include "libslic3r/Format/AMF.hpp"#include "libslic3r/Format/bbs_3mf.hpp"#include "libslic3r/GCode/ThumbnailData.hpp"#include "libslic3r/Model.hpp"#include "libslic3r/SLA/SupportPoint.hpp"#include "libslic3r/SLA/ReprojectPointsOnMesh.hpp"#include "libslic3r/Polygon.hpp"#include "libslic3r/Print.hpp"#include "libslic3r/PrintConfig.hpp"#include "libslic3r/SLAPrint.hpp"#include "libslic3r/Utils.hpp"#include "libslic3r/PresetBundle.hpp"#include "libslic3r/IMEXHelpers.hpp"#include "libslic3r/PublishSettings.hpp"#include "slic3r/Utils/CrealityPrint.hpp"#include "libslic3r/ClipperUtils.hpp"#include "libslic3r/CSGMesh/ModelToCSGMesh.hpp"#include "libslic3r/CSGMesh/PerformCSGMeshBooleans.hpp"#include "GUI.hpp"#include "GUI_App.hpp"#include "Shortcuts.hpp"#include "GUI_ObjectList.hpp"#include "AuiMgr.hpp"#include "AuiPaneLayout.hpp"#include "GUI_Utils.hpp"#include "GUI_Factories.hpp"#include "wxExtensions.hpp"#include "../Utils/PrintHost.hpp"#include "MainFrame.hpp"#include "format.hpp"#include "3DScene.hpp"#include "GLCanvas3D.hpp"#include "Selection.hpp"#include "GLToolbar.hpp"#include "GUI_Preview.hpp"#include "UVEditorCanvas.hpp"#include "3DBed.hpp"#include "PartPlate.hpp"#include "BeltPurgeTower.hpp"#include "IMEXFilamentPickerPopover.hpp"#include "Camera.hpp"#include "Mouse3DController.hpp"#include "Tab.hpp"#include "Jobs/OrientJob.hpp"#include "Jobs/ArrangeJob.hpp"#include "Jobs/FillBedJob.hpp"#include "Jobs/RotoptimizeJob.hpp"#include "Jobs/SLAImportJob.hpp"#include "Jobs/SLAImportDialog.hpp"#include "Jobs/PrintJob.hpp"#include "Jobs/NotificationProgressIndicator.hpp"#include "Jobs/PlaterWorker.hpp"#include "Jobs/BoostThreadWorker.hpp"#include "BackgroundSlicingProcess.hpp"#include "PostProcessor.hpp"#include "SelectMachine.hpp"#include "SendMultiMachinePage.hpp"#include "SendToPrinter.hpp"#include "ConfigWizard.hpp"#include "SyncAmsInfoDialog.hpp"#include "../Utils/ASCIIFolding.hpp"#include "../Utils/UndoRedo.hpp"#include "../Utils/PresetUpdater.hpp"#include "../Utils/Process.hpp"#include "RemovableDriveManager.hpp"#include "InstanceCheck.hpp"#include "NotificationManager.hpp"#include "PresetComboBoxes.hpp"#include "MsgDialog.hpp"#include "Widgets/MultiNozzleSync.hpp"#include "DeviceCore/DevNozzleSystem.h"#include "ProjectDirtyStateManager.hpp"#include "Gizmos/GLGizmoSimplify.hpp"#include "Gizmos/GLGizmoSVG.hpp"#include "Gizmos/GizmoObjectManipulation.hpp"#include "Widgets/ProgressDialog.hpp"#include "BBLStatusBar.hpp"#include "BitmapCache.hpp"#include "ParamsDialog.hpp"#include "ImageDPIFrame.hpp"#include "Widgets/Label.hpp"#include "Widgets/RadioGroup.hpp"#include "Widgets/CheckBox.hpp"#include "Widgets/Button.hpp"#include "GUI_ObjectTable.hpp"#include "libslic3r/Thread.hpp"#include <libslic3r/CutUtils.hpp>#include <wx/glcanvas.h>#include <libslic3r/miniz_extension.hpp>#include <math.h>#include "WipeTowerDialog.hpp"#include "MixedFilamentDialog.hpp"#include "TextureImportDialog.hpp"#include "libslic3r/TexturePainting.hpp"#include "ColorDecomposeSupport.hpp"#include "FilamentBitmapUtils.hpp"#include "libslic3r/FilamentMixer.hpp"#include "libslic3r/CustomGCode.hpp"#include "libslic3r/Platform.hpp"#include "nlohmann/json.hpp"#include "PhysicalPrinterDialog.hpp"#include "PrintHostDialogs.hpp"#include "PlateSettingsDialog.hpp"#include "DailyTips.hpp"#include "CreatePresetsDialog.hpp"#include "FileArchiveDialog.hpp"#include "../Utils/Http.hpp"#include "../Utils/OrcaCloudServiceAgent.hpp"#include "StepMeshDialog.hpp"#include "FilamentMapDialog.hpp"#include "CloneDialog.hpp"#include "PurgeModeDialog.hpp"#include "DeviceCore/DevFilaSystem.h"#include "DeviceCore/DevManager.h"#include "DeviceCore/DevConfigUtil.h"#include "DeviceCore/DevDefs.h"Go to the source code of this file.
Namespaces | |
| namespace | Slic3r |
| |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/ | |
| namespace | Slic3r::GUI |
| namespace | Slic3r::GUI::anonymous_namespace{Plater.cpp} |
Macros | |
| #define | PRINTER_THUMBNAIL_SIZE (wxSize(40, 40)) |
| #define | PRINTER_PANEL_SIZE ( wxSize(70, 60)) |
| #define | PRINTER_PANEL_RADIUS (6) |
| #define | BTN_SYNC_SIZE (wxSize(FromDIP(96), FromDIP(98))) |
| #define | AUTOPLACEMENT_ON_LOAD |
| #define | PROJECT_DROP_DIALOG_SELECT_PLANE_SIZE wxSize(FromDIP(350), FromDIP(120)) |
| #define | EXPORT_WITH_BOOLEAN 0 |
Typedefs | |
| using | Slic3r::GUI::anonymous_namespace{Plater.cpp}::SvgFile = EmbossShape::SvgFile |
| using | Slic3r::GUI::anonymous_namespace{Plater.cpp}::SvgFiles = std::vector<SvgFile*> |
Functions | |
| static bool | Slic3r::GUI::has_importable_texture (const Slic3r::TexturedMesh &textured_mesh) |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_SCHEDULE_BACKGROUND_PROCESS, SimpleEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_SLICING_UPDATE, SlicingStatusEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_SLICING_COMPLETED, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_PROCESS_COMPLETED, SlicingProcessCompletedEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_EXPORT_BEGAN, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_EXPORT_FINISHED, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_IMPORT_MODEL_ID, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_DOWNLOAD_PROJECT, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_OPEN_PLATESETTINGSDIALOG, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_OPEN_FILAMENT_MAP_SETTINGS_DIALOG, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_RESTORE_PROJECT, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_PRINT_FINISHED, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_SEND_CALIBRATION_FINISHED, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_SEND_FINISHED, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_REPAIR_MODEL, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_FILAMENT_COLOR_CHANGED, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_INSTALL_PLUGIN_NETWORKING, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_UPDATE_PLUGINS_WHEN_LAUNCH, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_INSTALL_PLUGIN_HINT, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_PREVIEW_ONLY_MODE_HINT, wxCommandEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_GLCANVAS_COLOR_MODE_CHANGED, SimpleEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_PRINT_FROM_SDCARD_VIEW, SimpleEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_CREATE_FILAMENT, SimpleEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_MODIFY_FILAMENT, SimpleEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_ADD_FILAMENT, SimpleEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_DEL_FILAMENT, SimpleEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_ADD_CUSTOM_FILAMENT, ColorEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_NOTICE_CHILDE_SIZE_CHANGED, SimpleEvent) | |
| Slic3r::GUI::wxDEFINE_EVENT (EVT_NOTICE_FULL_SCREEN_CHANGED, IntEvent) | |
| static std::string | Slic3r::GUI::get_diameter_string (float diameter) |
| template<typename T, typename OptionType> | |
| static void | Slic3r::GUI::set_config_values (DynamicPrintConfig *config, const std::string &key, T value) |
| static void | Slic3r::GUI::zero_pressure_advance_where_disabled (DynamicPrintConfig *filament_config) |
| static wxColour | Slic3r::GUI::extruder_group_chip_bg () |
| static void | Slic3r::GUI::use_nozzle_row_font (ComboBox *combo) |
| std::vector< int > | Slic3r::GUI::get_min_flush_volumes (const DynamicPrintConfig &full_config, size_t nozzle_id) |
| static bool | Slic3r::GUI::has_junction_deviation (const DynamicPrintConfig *printer_config) |
| static bool | Slic3r::GUI::is_skip_high_flow_printer (const std::string &printer) |
| static std::string | Slic3r::GUI::serialize_nozzle_config (const std::map< int, std::vector< DevNozzle > > &nozzle_cfg_map) |
| static std::map< int, std::vector< DevNozzle > > | Slic3r::GUI::deserialize_nozzle_config (const std::string &config_str) |
| static bool | Slic3r::GUI::is_same_nozzle_config (const std::map< int, std::vector< DevNozzle > > &config1, const std::map< int, std::vector< DevNozzle > > &config2) |
| static std::string | Slic3r::GUI::serialize_nozzle_option (const NozzleOption &option) |
| static std::optional< NozzleOption > | Slic3r::GUI::deserialize_nozzle_option (const std::string &option_str) |
| static std::string | Slic3r::GUI::blend_mixed_color (const std::vector< unsigned int > &comp_ids, const std::vector< int > &ratios, const std::vector< std::string > &color_strs) |
| static std::string | Slic3r::GUI::serialize_mixed_gradient_curve_if_custom (const MixedFilamentResult &result) |
| static bool | Slic3r::GUI::create_mixed_filament_from_result (Sidebar *sidebar, const MixedFilamentResult &result, const std::vector< std::string > &color_strs) |
| template<typename T> | |
| void | Slic3r::GUI::setup_dialog_position (T &info) |
| static std::vector< Search::InputInfo > | Slic3r::GUI::get_search_inputs (ConfigOptionMode mode) |
| bool | Slic3r::GUI::anonymous_namespace{Plater.cpp}::emboss_svg (Plater &plater, const wxString &svg_file, const Vec2d &mouse_drop_position) |
| void | Slic3r::GUI::read_binary_stl (const std::string &filename, std::string &model_id, std::string &code) |
| static void | Slic3r::GUI::log_substitutions (const ConfigSubstitutions &substitutions, const std::string &source) |
| static void | Slic3r::GUI::log_substitutions (const PresetsConfigSubstitutions &substitutions, const std::string &source) |
| static void | Slic3r::GUI::sync_loaded_project_filament_config (DynamicConfig &proj_cfg) |
| static std::vector< BoundingBoxf3 > | Slic3r::GUI::free_print_volumes (const BoundingBoxf3 &bed, const std::vector< BoundingBoxf3 > &excludes) |
| std::string | Slic3r::GUI::anonymous_namespace{Plater.cpp}::imex_placement_error (PartPlate *plate) |
| static std::vector< wxString > | Slic3r::GUI::collect_imex_warnings (PartPlate *plate) |
| static void | Slic3r::GUI::get_position (wxWindowBase *child, wxWindowBase *until_parent, int &x, int &y) |
| LoadType | Slic3r::GUI::determine_load_type (std::string filename, std::string override_setting="") |
| static bool | Slic3r::GUI::belt_calib_rotation_params (double &angle_rad, Vec3d &axis) |
| static void | Slic3r::GUI::belt_calib_flip_ringing_tower (Model &model) |
| void | Slic3r::GUI::adjust_settings_for_flowrate_calib (ModelObjectPtrs &objects, bool linear, int pass, InfillPattern pattern) |
| static std::string | Slic3r::GUI::belt_temp_tower_asset (const Calib_Params ¶ms) |
| static long | Slic3r::GUI::GetNumberFromUser (const wxString &msg, const wxString &prompt, const wxString &title, long value, long min, long max, wxWindow *parent) |
| Preset * | Slic3r::GUI::get_printer_preset (const MachineObject *obj) |
| std::string | Slic3r::GUI::anonymous_namespace{Plater.cpp}::get_file_name (const std::string &file_path) |
| std::string | Slic3r::GUI::anonymous_namespace{Plater.cpp}::create_unique_3mf_filepath (const std::string &file, const SvgFiles svgs) |
| bool | Slic3r::GUI::anonymous_namespace{Plater.cpp}::set_by_local_path (SvgFile &svg, const SvgFiles &svgs) |
| void | Slic3r::GUI::anonymous_namespace{Plater.cpp}::publish (Model &model, SaveStrategy strategy) |
| Function to secure private data before store to 3mf. | |
| std::vector< MixedGradientSlot > | Slic3r::GUI::anonymous_namespace{Plater.cpp}::parse_mixed_gradient_slots (const Slic3r::DynamicPrintConfig &config, size_t slot_count) |
| std::string & | Slic3r::GUI::get_object_limited_text () |
| std::string & | Slic3r::GUI::get_object_clashed_text () |
| std::string & | Slic3r::GUI::get_left_extruder_unprintable_text () |
| std::string & | Slic3r::GUI::get_right_extruder_unprintable_text () |
| wxString | Slic3r::GUI::get_view_type_string (Camera::ViewAngleType type) |
| wxArrayString | Slic3r::GUI::get_all_camera_view_type () |
Variables | |
| static const std::pair< unsigned int, unsigned int > | THUMBNAIL_SIZE_3MF = { 512, 512 } |
| static std::map< BedType, std::string > | Slic3r::GUI::bed_type_thumbnails |
| static wxString | Slic3r::GUI::temp_dir |
| static DynamicFilamentList | Slic3r::GUI::dynamic_filament_list |
| static DynamicFilamentList | Slic3r::GUI::dynamic_physical_filament_list (true) |
| static std::map< std::string, std::string > | Slic3r::GUI::printer_thumbnails = {} |
| struct Slic3r::GUI::Plater::priv::DockPane |
| struct Slic3r::GUI::Plater::priv::SidebarLayout |
| struct Slic3r::GUI::Plater::priv::TextureImportResult |
| Class Members | ||
|---|---|---|
| size_t | existing_filament_count = 0 | |
| bool | fallback_to_geometry_only = false | |
| wxString | fallback_warning | |
| vector< TextureFilamentEntry > | filament_entries | |
| vector< FilamentMatch > | matches | |
| vector< array< float, 4 > > | new_filament_colors | |
| vector< string > | new_filament_preset_names | |
| vector< TextureNewMixedFilament > | new_mixed_filaments | |
| PaintedMesh | painted | |
| bool | skipped = false | |
| struct Slic3r::GUI::anonymous_namespace{Plater.cpp}::MixedGradientSlot |
| #define AUTOPLACEMENT_ON_LOAD |
| #define BTN_SYNC_SIZE (wxSize(FromDIP(96), FromDIP(98))) |
| #define EXPORT_WITH_BOOLEAN 0 |
| #define PRINTER_PANEL_RADIUS (6) |
| #define PRINTER_PANEL_SIZE ( wxSize(70, 60)) |
Referenced by Slic3r::GUI::Sidebar::Sidebar(), and Slic3r::GUI::Sidebar::msw_rescale().
| #define PRINTER_THUMBNAIL_SIZE (wxSize(40, 40)) |
| #define PROJECT_DROP_DIALOG_SELECT_PLANE_SIZE wxSize(FromDIP(350), FromDIP(120)) |
|
static |
Referenced by Slic3r::GUI::Plater::export_3mf().