OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI Namespace Reference

Namespaces

namespace  Config
namespace  anonymous_namespace{ActionRegistry.cpp}
namespace  anonymous_namespace{AnimatedTexture.cpp}
namespace  anonymous_namespace{AuiMgr.cpp}
namespace  anonymous_namespace{DesignSketchTool.cpp}
namespace  anonymous_namespace{McpControl.cpp}
namespace  anonymous_namespace{SketchInlineEditor.cpp}
namespace  anonymous_namespace{calib_dlg.cpp}
namespace  anonymous_namespace{ColorPickerDialog.cpp}
namespace  anonymous_namespace{ConfigManipulation.cpp}
namespace  anonymous_namespace{Downloader.cpp}
namespace  anonymous_namespace{Field.cpp}
namespace  anonymous_namespace{FilamentBitmapUtils.cpp}
namespace  anonymous_namespace{GLGizmoAlignment.cpp}
namespace  CommonGizmosDataObjects
namespace  anonymous_namespace{GLGizmoTextureDisplacement.cpp}
namespace  GLGizmoUtils
namespace  anonymous_namespace{GradientCurveEditor.cpp}
namespace  anonymous_namespace{GUI_App.cpp}
namespace  anonymous_namespace{HintNotification.cpp}
namespace  I18N
namespace  anonymous_namespace{IdleScheduler.cpp}
namespace  MessageHandlerInternal
namespace  Emboss
namespace  anonymous_namespace{KBShortcutsDialog.cpp}
namespace  anonymous_namespace{KeyChord.cpp}
namespace  anonymous_namespace{MainFrame.cpp}
namespace  anonymous_namespace{NativeCommands.cpp}
namespace  NativeCommands
namespace  anonymous_namespace{NotificationManager.cpp}
namespace  anonymous_namespace{ParamsPanel.cpp}
namespace  anonymous_namespace{Plater.cpp}
namespace  anonymous_namespace{PluginsConfigDialog.cpp}
namespace  anonymous_namespace{PluginsDialog.cpp}
namespace  detail
namespace  anonymous_namespace{PrinterWebViewHandler.cpp}
namespace  anonymous_namespace{PrintHostDialogs.cpp}
namespace  anonymous_namespace{PublishSettingsDialog.cpp}
namespace  search_for_drives_internal
namespace  anonymous_namespace{SceneBenchmark.cpp}
namespace  anonymous_namespace{Shortcuts.cpp}
namespace  anonymous_namespace{SlicingProgressNotification.cpp}
namespace  anonymous_namespace{SpeedDialDialog.cpp}
namespace  anonymous_namespace{Tab.cpp}
namespace  anonymous_namespace{TerminalDialog.cpp}
namespace  anonymous_namespace{TextureLibrary.cpp}
namespace  anonymous_namespace{UVEditorCanvas.cpp}
namespace  anonymous_namespace{WebMediaController.cpp}
namespace  anonymous_namespace{WebUserLoginDialog.cpp}
namespace  web_hosting
namespace  anonymous_namespace{WebViewHostDialog.cpp}

Classes

class  Bed_2D
class  Bed3D
class  CopyrightsDialog
class  AboutDialog
struct  AppActionRunResult
struct  AppActionId
struct  AppAction
class  ActionRegistry
struct  DryingPreset
class  FilamentItemPanel
class  AMSFilamentPanel
class  AMSDryCtrWin
struct  TrayData
class  MaterialItem
class  MaterialSyncItem
class  MappingItem
class  MappingContainer
class  DevIconLabel
class  AmsMapingPopup
class  AmsMapingTipPopup
class  AmsHumidityLevelList
class  AmsHumidityTipPopup
class  AmsTutorialPopup
class  AmsIntroducePopup
class  AmsRMGroup
class  AmsReplaceMaterialDialog
class  ColorPicker
class  ColorPickerPopup
class  AMSMaterialsSetting
class  AMSSetting
class  AMSSettingTypePanel
class  TrayListModel
class  AnimatedTexture
class  AnimatedTextureCache
class  AuiMgr
class  AuFile
class  AuFiles
class  AuFolderPanel
class  DesignerPanel
class  AuxiliaryPanel
class  AuxiliaryDialog
class  BaseTransparentDPIFrame
struct  BedShape
class  BedShapePanel
class  BedShapeDialog
struct  BeltPurgeSignature
struct  MemoryStruct
class  PingCodeBindDialog
class  BindMachineDialog
class  UnBindMachineDialog
class  BitmapCache
class  BitmapComboBox
class  DesignCanvas
struct  CadInteractionState
struct  OfferVerb
struct  DpToken
class  DesignVariableDialog
class  DesignPanel
class  DesignRowList
struct  PlanePiece
class  DesignSketchTool
class  DesignTextDialog
class  SketchInlineEditor
class  PA_Calibration_Dlg
class  Temp_Calibration_Dlg
class  MaxVolumetricSpeed_Test_Dlg
class  VFA_Test_Dlg
class  Retraction_Test_Dlg
class  Input_Shaping_Freq_Test_Dlg
class  Input_Shaping_Damp_Test_Dlg
class  Cornering_Test_Dlg
class  FlowRateCalibrationDialog
class  CalibrationDialog
class  MObjectPanel
class  MPanel
class  SelectMObjectPopup
class  CalibrationPanel
struct  TrayInfo
class  CalibrationWizardPageStep
struct  ConfigIndexValue
class  CalibrationWizard
class  PressureAdvanceWizard
class  FlowRateWizard
class  MaxVolumetricSpeedWizard
class  CalibrationCaliPage
class  FilamentComboBox
class  CaliPageCaption
class  CaliPageStepGuide
class  CaliPagePicture
class  PAPageHelpPanel
class  CaliPageButton
class  CaliPageSendingPanel
class  CaliPageActionPanel
class  CalibrationWizardPage
class  CaliPresetCaliStagePanel
class  CaliComboBox
class  CaliPresetWarningPanel
class  CaliPresetTipsPanel
class  CaliPresetCustomRangePanel
class  CalibrationPresetPage
class  MaxVolumetricSpeedPresetPage
class  GridTextInput
class  GridComboBox
class  CalibrationCommonSavePage
class  PAColumnDataPanel
class  CaliSavePresetValuePanel
class  CaliPASaveAutoPanel
class  CaliPASaveManualPanel
class  CaliPASaveP1PPanel
class  CalibrationPASavePage
class  CalibrationFlowX1SavePage
class  CalibrationFlowCoarseSavePage
class  CalibrationFlowFineSavePage
class  CalibrationMaxVolumetricSpeedSavePage
class  CalibrationStartPage
class  CalibrationPAStartPage
class  CalibrationFlowRateStartPage
class  CalibrationMaxVolumetricSpeedStartPage
class  HistoryWindow
class  EditCalibrationHistoryDialog
class  NewCalibrationHistoryDialog
struct  Camera
class  CameraPopup
class  CameraItem
class  CameraUtils
 Help divide camera data and camera functions This utility work with camera data by static funtions. More...
class  CapsuleButton
class  CloneDialog
struct  DecomposeComponent
struct  ColorDecomposeResult
class  ColorDecomposeDialog
struct  DecomposeOfficialComponent
struct  DecomposeMissingComponent
struct  ColorPickerOptions
struct  FilamentColorPickerValue
class  ColorPickerDialog
class  ConfigManipulation
struct  PrinterPickerEvent
class  DiamTextCtrl
class  SpinCtrlDouble
class  ConfigWizard
struct  Bundle
struct  BundleMap
struct  Materials
struct  PrinterPicker
struct  ConfigWizardPage
struct  PageWelcome
struct  PagePrinters
struct  DataList
struct  ProfilePrintData
struct  PageMaterials
struct  PageCustom
struct  PageFirmware
struct  PageBedShape
struct  PageDiameters
struct  PageTemperatures
class  ConfigWizardIndex
class  ConnectPrinterDialog
class  CrealityDiscoveryDialog
class  CreateFilamentPresetDialog
class  CreatePrinterPresetDialog
class  CreatePresetSuccessfulDialog
class  ExportConfigsDialog
class  CreatePresetForPrinterDialog
class  PresetTree
class  EditFilamentPresetDialog
struct  DailyTipsData
class  DailyTipsDataRenderer
class  DailyTipsPanel
class  DailyTipsWindow
class  DeviceErrorDialog
class  UiStyledAMSPanel
class  UiStyledSwitchPanel
class  UiAMSSlot
struct  DataAmsSlotInfo
class  UiAMS
struct  DataStatusParam
class  ReselectMachineDialog
struct  uiAmsHumidityInfo
class  uiAmsPercentHumidityDryPopup
class  uiDeviceUpdateVersion
class  wgtDeviceNozzleRackTitle
class  wgtDeviceNozzleRack
class  wgtDeviceNozzleRackToolHead
class  wgtDeviceNozzleRackArea
class  wgtDeviceNozzleRackPos
class  wgtDeviceNozzleRackNozzleItem
class  wgtDeviceNozzleRackUpgradeDlg
class  wgtDeviceNozzleRackUprade
class  wgtDeviceNozzleRackHotendUpdate
class  wgtDeviceNozzleRackSelect
class  wgtMsgBox
class  wgtMsgPanelItem
class  wgtMsgPanel
class  DockPanel
class  Download
class  Downloader
class  FileGet
class  DownloadProgressDialog
class  DragShape
class  DragCanvas
struct  CustomData
class  ColorDataObject
class  ColorDropSource
class  ColorDropTarget
class  SeparatedColorDropTarget
class  DragDropPanel
class  ColorPanel
class  SeparatedDragDropPanel
class  EditGCodeDialog
class  ParamsNode
class  ParamsModel
class  ParamsViewCtrl
struct  SimpleEvent
struct  IntEvent
struct  ArrayEvent
struct  Event
class  LoadPrinterViewEvent
class  ExportPresetBundleDialog
class  ExtrusionCalibration
struct  Builder
struct  wxEventFunctorRef
struct  myEvtHandler
class  UndoValueUIManager
class  Field
class  TextCtrl
class  CheckBox
class  SpinCtrl
class  DynamicList
class  Choice
class  PrinterAgentChoice
class  PluginField
class  PluginConfigField
class  ColourPicker
class  PointCtrl
class  StaticText
class  SliderCtrl
struct  BitmapDC
struct  TriPoint
struct  MixedGradientCurve
struct  MixedGradientTheme
struct  MixedTriangleTheme
class  FilamentGroupPopup
class  SmartFilamentPanel
class  FilamentMapDialog
class  FilamentMapManualPanel
class  FilamentMapBtnPanel
class  FilamentMapAutoPanel
class  FilamentMapDefaultPanel
class  FilamentPickerDialog
class  ArchiveViewNode
class  ArchiveViewModel
class  ArchiveViewCtrl
class  FileArchiveDialog
class  FrameProfiler
class  ToolpathsObjExporter
class  GCodeViewer
class  GizmoObjectManipulation
class  GLGizmoAlignment
class  GLGizmoAssembly
class  GLGizmoBase
class  GLGizmoBrimEars
class  GLGizmoCut3D
class  GLGizmoEmboss
class  GLGizmoFdmSupports
class  GLGizmoFlatten
class  GLGizmoFuzzySkin
class  TransformHelper
class  GLGizmoMeasure
struct  VolumeInfo
class  GLGizmoMeshBoolean
class  GLMmSegmentationGizmo3DScene
class  GLGizmoMmuSegmentation
class  GLGizmoMove3D
class  TriangleSelectorGUI
struct  TrianglePatch
class  TriangleSelectorPatch
class  GLGizmoPainterBase
class  GLGizmoRotate
class  GLGizmoRotate3D
class  GLGizmoScale3D
class  CommonGizmosDataPool
class  CommonGizmosDataBase
class  GLGizmoSeam
class  GLGizmoSimplify
class  Rect
class  GLGizmosManager
struct  Texture
class  GLGizmoSVG
class  GLGizmoTextureDisplacement
class  Size
class  RenderTimerEvent
class  ToolbarHighlighterTimerEvent
class  GizmoHighlighterTimerEvent
class  GLCanvas3D
class  GLModel
class  GLSelectionRectangle
class  GLTexture
class  GLToolbarItem
struct  BackgroundTexture
class  GLToolbar
class  GradientCurveEditor
class  SplashScreen
struct  FileWildcards
class  wxBoostLog
class  VersionInfo
class  GUI_App
struct  SimpleSettingData
struct  SettingsFactory
class  MenuFactory
class  TransformationType
struct  OpenGLVersions
struct  GUI_InitParams
class  LayerRangeEditor
class  ObjectLayers
class  wxRenderer
struct  ObjectVolumeID
struct  ItemForDelete
struct  MeshErrorsInfo
class  ObjectList
class  OG_Settings
class  ObjectSettings
class  GridCellIconRenderer
class  GridCellTextEditor
class  GridCellFilamentsEditor
class  GridCellFilamentsRenderer
class  GridCellChoiceEditor
class  GridCellComboBoxRenderer
class  GridCellSupportEditor
class  GridCellSupportRenderer
class  ObjectGrid
class  ObjectGridTable
class  ObjectTablePanel
class  ObjectTableDialog
class  OTG_Settings
class  ObjectTableSettings
class  View3D
class  Preview
class  AssembleView
class  DPIAware
class  DPIDialog
class  EventGuard
class  CheckboxFileDialog
class  WindowMetrics
class  TaskTimer
class  KeyAutoRepeatFilter
struct  HintData
class  HintDatabase
class  HMSQuery
class  HMSNotifyItem
class  HMSPanel
class  http_headers
class  HttpServer
class  session
class  IconManager
 Keep texture with icons for UI Manage texture live -> create and destruct texture by live of icon shared pointers. More...
class  IdleScheduler
class  ImageDPIFrame
class  ImageGrid
class  IMediaController
class  IMEXFilamentPickerPopover
class  IMEXModesCtrl
class  ImGuiWrapper
class  IMTexture
class  IMSlider
class  IMToolbarItem
class  IMToolbar
class  IMReturnToolbar
class  OtherInstanceMessageHandler
class  WipeTower
class  ArrangeJob
class  BindJob
class  BoostThreadWorker
struct  CursorSetterRAII
class  BusyCursored
struct  FontImageData
 Keep data for rasterization of text by font face. More...
class  CreateFontImageJob
 Create image for face name. More...
class  FillBedJob
class  Job
class  NotificationProgressIndicator
struct  OAuthParams
struct  OAuthResult
struct  OAuthData
class  OAuthJob
class  OrientJob
class  PlaterWorker
class  PrintPrepareData
class  PlateListData
class  PrintJob
class  RotoptimizeJob
class  SendJob
class  SLAImportDialog
class  SLAImportJobView
class  SLAImportJob
struct  TextureDisplacementBakeVolume
struct  TextureDisplacementBakeInput
class  TextureDisplacementBakeJob
struct  TextureDisplacementDebugInput
class  TextureDisplacementDebugJob
struct  TextureDisplacementPrepareVolume
struct  TextureDisplacementPrepareInput
class  TextureDisplacementPrepareJob
struct  TextureDisplacementPreviewVolume
struct  TextureDisplacementPreviewInput
struct  TextureDisplacementPreviewResult
class  TextureDisplacementPreviewJob
struct  BlockingWait
class  ThreadSafeQueueSPSC
class  UpgradeNetworkJob
class  Worker
class  KBShortcutsDialog
class  ShortcutCaptureDialog
struct  KeyChord
struct  KeyChordHash
class  LazyInstance
class  LazyBase
class  Lazy
class  LazyPage
struct  ConfigsOverwriteConfirmDialog
struct  PresetTab
class  SettingsDialog
class  MainFrame
class  MarkdownTip
struct  MediaProgressDialog
class  MediaFilePanel
class  MediaFileFrame
class  MediaPlayCtrl
class  ClippingPlane
class  MeshClipper
class  MeshRaycaster
struct  PickingModel
class  RatioLabelPanel
struct  MixedFilamentResult
class  MixedFilamentDialog
class  ModelMallDialog
class  AddMachinePanel
class  MonitorPanel
class  MonitorBasePanel
 Class MonitorBasePanel. More...
class  VideoMonitoringBasePanel
 Class VideoMonitoringBasePanel. More...
class  TaskListBasePanel
 Class TaskListBasePanel. More...
class  MonitorPage
class  Mouse3DController
class  CodeExcerptTagHandler
struct  ButtonData
class  MsgButton
struct  MsgDialog
class  ErrorDialog
class  WarningDialog
class  MessageDialog
class  RichMessageDialog
class  InfoDialog
class  DownloadDialog
class  DeleteConfirmDialog
class  Newer3mfVersionDialog
class  NetworkErrorDialog
struct  FilamentWarningInfo
class  FilamentWarningDialog
class  MultiChoiceDialog
class  DeviceItem
struct  ObjState
struct  SortItem
class  MultiMachineItem
class  MultiMachineManagerPage
class  MultiMachinePage
class  DevicePickItem
class  MultiMachinePickPage
class  MultiSendMachineModel
class  MultiTaskItem
class  LocalTaskManagerPage
class  CloudTaskManagerPage
struct  NativeCommand
class  NetworkPluginDownloadDialog
class  NetworkPluginRestartDialog
class  NetworkTestDialog
struct  JumpTo
class  NotificationManager
class  OAuthDialog
struct  InfoItemAtributes
class  ObjectDataViewModelNode
class  ObjectDataViewModel
class  OG_CustomCtrl
class  OpenGLManager
class  UIBuildCanceled
struct  Option
 std::function<wxWindow*(wxWindow*)>; More...
class  Line
 Represents option lines. More...
class  OptionsGroup
class  ConfigOptionsGroup
class  ExtruderOptionsGroup
class  ogStaticText
class  Filamentinformation
class  ParamsDialog
class  TipsDialog
class  ParamsPanel
 Class ParamsPanel. More...
struct  ExclusionVolumePrismPreview
struct  WipeTowerRelocation
class  PartPlate
class  PartPlateList
class  PartSkipConfirmDialog
class  PartSkipDialog
class  PhysicalPrinterDialog
class  SlicedInfo
class  HoverLabel
struct  ExtruderGroup
struct  DynamicFilamentList
class  AMSCountPopupWindow
class  PlaterDropTarget
class  ProjectDropDialog
class  SidebarProps
class  Sidebar
class  Plater
class  SuppressBackgroundProcessingUpdate
struct  LayerSeqInfo
class  LayerNumberTextInput
class  OtherLayersSeqPanel
class  PlateSettingsDialog
class  PlateNameEditDialog
class  PluginPickerDialog
class  PluginProgressDialog
class  PluginsConfigDialog
class  PluginsDialog
class  PrebuildQueue
class  MyscrolledWindow
class  WikiLabel
class  PreferencesDialog
struct  prePrintInfo
class  PrePrintChecker
class  PrinterMsgPanel
class  PresetBundleDialog
class  PresetComboBox
class  PlaterPresetComboBox
class  TabPresetComboBox
class  CalibrateFilamentComboBox
class  PrinterCloudAuthDialog
class  PrinterWebView
class  PrinterWebViewHandler
class  PrintHostSendDialog
class  PrintHostQueueDialog
class  ElegooPrintHostSendDialog
class  CrealityPrintHostSendDialog
class  FlashforgePrintHostSendDialog
class  PrinterPartsDialog
class  PrintOptionsDialog
class  PrivacyUpdateDialog
class  ProcessRunner
struct  project_file
class  ProjectPanel
class  ProjectDirtyStateManager
class  MixedFilamentWarningDialog
struct  PublishMaterialIdentity
struct  MixedDependencyIssue
class  PublishSettingsDialog
class  PurgeModeBtnPanel
class  PurgeModeDialog
class  RecenterDialog
class  ReleaseNoteDialog
class  UpdatePluginDialog
class  UpdateVersionDialog
class  SecondaryCheckDialog
class  PrintErrorDialog
struct  ConfirmBeforeSendInfo
class  ConfirmBeforeSendDialog
class  InputIpAddressDialog
class  SendFailedConfirm
struct  DriveData
class  RemovableDriveManager
class  SafetyOptionsDialog
class  SavePresetDialog
struct  FrameTimeStats
class  SceneCache
class  SceneRaycasterItem
class  SceneRaycaster
class  Selection
class  Material
struct  POItem
class  PrintOptionItem
class  PrintOption
class  ThumbnailPanel
class  SendModeSwitchButton
class  SelectMachineDialog
class  PrinterInfoBox
class  MachineObjectPanel
class  MachinePanel
class  PinCodePanel
class  SelectMachinePopup
class  EditDevNameDialog
class  ScrolledWindow
class  AmsRadioSelector
class  SendDeviceItem
class  SendMultiMachinePage
class  SendSystemInfoDialog
class  SendSystemInfoProgressDialog
class  ShowJsonDialog
class  SendToPrinterDialog
struct  SequentialClearanceInstance
struct  ShortcutInfo
class  ShortcutRegistry
class  SingleChoiceDialog
struct  ObjectInfo
class  SkipPartCanvas
class  _BBS_3MF_Base
struct  PlateInfo
class  ModelSettingHelper
class  SliceInfoPopup
class  SliceInfoPanel
class  SpeedDialWebDialog
class  StagedBuild
struct  ScoreData
class  ExtruderImage
class  ExtruderSwithingStatus
class  ScoreDialog
class  PrintingTaskPanel
class  StatusBasePanel
class  StatusPanel
struct  SurfaceDrag
class  SyncAmsInfoDialog
class  SyncNozzleAndAmsDialog
class  FinishSyncAmsDialog
class  Page
class  Tab
class  TabPrint
class  TabPrintModel
class  TabPrintPlate
class  TabPrintObject
class  TabPrintPart
class  TabPrintLayer
class  TabFilament
class  TabPrinter
class  TabSLAMaterial
class  TabSLAPrint
class  TerminalDialog
class  TextLinesModel
class  FilamentSelectPopup
class  AutoMixSelectPopup
struct  TextureFilamentEntry
struct  TextureNewMixedFilament
struct  FilamentMappingRow
class  TexturePreviewCanvas
class  TextureImportDialog
struct  TextureLibraryEntry
class  TextureProjectorFrame
class  ThermalPreconditioningDialog
struct  TickCode
class  TickCodeInfo
class  TroubleshootDialog
class  CenteredMultiLinePanel
class  ModelNode
class  DiffModel
class  DiffViewCtrl
struct  PresetItem
class  UnsavedChangesDialog
class  FullCompareDialog
class  DiffPresetDialog
class  MsgUpdateSlic3r
class  MsgUpdateConfig
class  MsgUpdateForced
class  MsgDataIncompatible
class  MsgNoUpdates
class  ExtensionPanel
class  AmsPanel
class  ExtraAmsPanel
class  MachineInfoPanel
class  UpgradePanel
class  UVToolButton
class  UVEditorCanvas
class  UVEditorPanel
class  WebDialog
class  GuideFrame
class  WebMediaController
class  WebPanel
class  WebRtcMediaController
class  ZUserLogin
class  WebViewPanel
class  SourceViewDialog
class  AMSControl
struct  Caninfo
struct  AMSinfo
class  AMSExtText
class  AMSrefresh
class  AMSextruderImage
class  AMSExtImage
class  SwitcherImage
class  AMSextruder
class  AMSLib
class  AMSRoad
class  AMSRoadUpPart
class  AMSRoadDownPart
class  AMSPreview
class  AMSHumidity
class  AmsItem
class  DevExtruderImage
class  FeedDirectionDialog
class  DialogButtons
struct  RotateOffSet
class  Fan
class  FanOperate
class  FanControlNew
class  FanControlNewSwitchPanel
class  FanControlPopupNew
class  FilamentLoad
struct  NozzleOption
class  ManualNozzleCountDialog
class  ExtruderBadge
class  HotEndTable
class  NozzleListTable
class  MultiNozzleStatusTable
class  MultiNozzleSyncDialog
class  ProgressDialog
class  RadioBox
class  SideToolsPanel
class  SideTools
class  WebViewHostDialog
class  CalibInfo
class  CalibUtils
class  RaycastManager
 Cast rays from camera to scene Used for find hit point on model volume under mouse cursor. More...
class  RetinaHelper
class  WxFontUtils
class  Snapshot

Typedefs

using ConfigOptionsGroupShp = std::shared_ptr<ConfigOptionsGroup>
using ConfigOptionsGroupWkp = std::weak_ptr<ConfigOptionsGroup>
typedef std::vector< FilamentComboBox * > FilamentComboBoxList
using DecomposeMode = ColorDecomposeRecipeMode
using ColorGradient = std::vector<ColorRGBA>
using ColorSelection = std::variant<ColorRGBA, ColorGradient>
typedef std::function< bool(const VendorProfile::PrinterModel &)> ModelFilter
typedef DataList< wxListBox, std::string > StringList
typedef DataList< wxCheckListBox, std::string > PresetList
typedef std::map< std::string, std::pair< PagePrinters *, PagePrinters * > > Pages3rdparty
typedef std::map< std::string, std::set< std::string > > PresetAliases
using ParamsNodePtrArray = std::vector<std::unique_ptr<ParamsNode>>
using choice_ctrl = ::ComboBox
using t_field = std::unique_ptr<Field>
using t_kill_focus = std::function<void(const std::string&)>
using t_change = std::function<void(const t_config_option_key&, const boost::any&)>
using t_back_to_init = std::function<void(const std::string&)>
using RBtnEvent = Event<std::pair<Vec2d, bool>>
using RBtnPlateEvent = Event<std::pair<Vec2d, int>>
template<size_t N>
using Vec3dsEvent = ArrayEvent<Vec3d, N>
using HeightProfileSmoothEvent = Event<HeightProfileSmoothingParams>
typedef std::map< std::string, std::vector< std::pair< std::string, std::string > > > FullSettingsHierarchy
typedef double coordf_t
typedef std::pair< coordf_t, coordf_t > t_layer_height_range
typedef Event< ObjectVolumeID > ObjectSettingEvent
typedef DPIAware< wxFrame > DPIFrame
using LoadFromOtherInstanceEvent = Event<std::vector<boost::filesystem::path>>
using StartDownloadOtherInstanceEvent = Event<std::vector<std::string>>
using InstanceGoToFrontEvent = SimpleEvent
using ArrangePolygon = arrangement::ArrangePolygon
typedef std::function< void(int status, int code, std::string msg)> OnUpdateStatusFn
typedef std::function< bool()> WasCancelledFn
typedef std::function< void(int status, int percent, bool &cancel)> InstallProgressFn
using EjectDriveNotificationClickedEvent = SimpleEvent
using ExportGcodeNotificationClickedEvent = SimpleEvent
using PresetUpdateAvailableClickedEvent = SimpleEvent
using PrinterConfigUpdateAvailableClickedEvent = SimpleEvent
using CancelFn = std::function<void()>
using widget_t = std::function<wxSizer*(wxWindow*)>
 Widget type describes a function object that returns a wxWindow (our widget) and accepts a wxWidget (parent window).
using column_t = std::function<wxWindow*(wxWindow* parent, const Line&)>
using t_optionfield_map = std::map<t_config_option_key, t_field>
using t_opt_map = std::map< std::string, std::pair<std::string, int> >
using GCodeResult = GCodeProcessorResult
typedef std::vector< std::pair< int, PartState > > PartsInfo
using ColorEvent = Event<wxColour>
using RemovableDriveEjectEvent = Event<std::pair<DriveData, bool>>
using RemovableDrivesChangedEvent = SimpleEvent
using MaterialHash = std::map<int, Material *>
using Coord = float
using FloatPoint = std::array<Coord, 2>
typedef std::function< void(BBLModelTask *subtask)> OnGetSubTaskFn
using PageShp = std::shared_ptr<Page>
using ModelNodePtrArray = std::vector<std::unique_ptr<ModelNode>>

Enumerations

enum class  ActionChange { Added , Removed }
enum class  AppActionKind { Plugin , Command }
enum class  DryCtrState { IDLE , DRY_WHEN_PRINT , UNKNOWN }
enum class  DryCtrDev { N3S , N3F , UNKNOWN }
enum  TrayType { NORMAL , THIRD , EMPTY }
enum  ShowType { LEFT , RIGHT , LEFT_AND_RIGHT , LEFT_AND_RIGHT_DYNAMIC }
enum class  CadLevel : int { Idle = 0 , Tool = 1 , Gesture = 2 , Transient = 3 }
enum class  OfferSel : int {
  None = 0 , FacePlanar = 1 , FaceCyl = 2 , FaceOther = 3 ,
  EdgeStr = 4 , EdgeCirc = 5 , Vertex = 6 , BodySolid = 7 ,
  BodySheet = 8 , Bodies2 = 9 , DatumPlane = 10 , DatumAxis = 11 ,
  CoordSys = 12 , Art = 13 , SkLoop = 14 , SkNone = 15 ,
  SkLine = 16 , SkArc = 17 , SkPoint = 18 , Sk2Ent = 19 ,
  Count = 20
}
enum  DpTok {
  TokRibbonBg , TokRibbonHover , TokPanelBg , TokSecText ,
  TokCtlText , TokItemText , TokItemDim , TokBorder ,
  TokCount
}
enum  RowAction {
  RowEdit , RowMove , RowVisibility , RowDelete ,
  RowZoom
}
enum  FILAMENT_TYPE : int {
  tPLA = 0 , tABS_ASA , tPETG , tPCTG ,
  tTPU , tTPU_AMS , tPA_CF , tPET_CF ,
  tCustom
}
enum class  CalibrationStyle : int { CALI_STYLE_DEFAULT = 0 , CALI_STYLE_X1 , CALI_STYLE_P1P }
enum  CalibrationFilamentMode { CALI_MODEL_SINGLE = 0 , CALI_MODEL_MULITI }
enum  CalibrationMethod { CALI_METHOD_MANUAL = 0 , CALI_METHOD_AUTO , CALI_METHOD_NEW_AUTO , CALI_METHOD_NONE }
enum class  CaliPageType {
  CALI_PAGE_START = 0 , CALI_PAGE_PRESET , CALI_PAGE_CALI , CALI_PAGE_COARSE_SAVE ,
  CALI_PAGE_FINE_CALI , CALI_PAGE_FINE_SAVE , CALI_PAGE_PA_SAVE , CALI_PAGE_FLOW_SAVE ,
  CALI_PAGE_COMMON_SAVE
}
enum class  CaliPageActionType : int {
  CALI_ACTION_MANAGE_RESULT = 0 , CALI_ACTION_MANUAL_CALI , CALI_ACTION_AUTO_CALI , CALI_ACTION_START ,
  CALI_ACTION_CALI , CALI_ACTION_FLOW_CALI_STAGE_2 , CALI_ACTION_RECALI , CALI_ACTION_PREV ,
  CALI_ACTION_NEXT , CALI_ACTION_CALI_NEXT , CALI_ACTION_PA_SAVE , CALI_ACTION_FLOW_SAVE ,
  CALI_ACTION_FLOW_COARSE_SAVE , CALI_ACTION_FLOW_FINE_SAVE , CALI_ACTION_COMMON_SAVE , CALI_ACTION_GO_HOME ,
  CALI_ACTION_COUNT
}
enum  CaliPresetStage { CALI_MANULA_STAGE_NONE = 0 , CALI_MANUAL_STAGE_1 , CALI_MANUAL_STAGE_2 }
enum  FlowRatioCaliSource { FROM_PRESET_PAGE = 0 , FROM_COARSE_PAGE }
enum  CaliPresetPageStatus {
  CaliPresetStatusInit = 0 , CaliPresetStatusNormal , CaliPresetStatusNoUserLogin , CaliPresetStatusInvalidPrinter ,
  CaliPresetStatusConnectingServer , CaliPresetStatusInUpgrading , CaliPresetStatusInSystemPrinting , CaliPresetStatusInPrinting ,
  CaliPresetStatusLanModeNoSdcard , CaliPresetStatusNoSdcard , CaliPresetStatusNeedForceUpgrading , CaliPresetStatusNeedConsistencyUpgrading ,
  CaliPresetStatusUnsupportedPrinter , CaliPresetStatusInConnecting , CaliPresetStatusFilamentIncompatible , CaliPresetStatusLanModeSDcardNotAvailable ,
  CaliPresetStatusDifferentNozzleDiameters , CaliPresetStatusOptionalPrinterModel
}
enum class  GridTextInputType { K , N , FlowRatio , Name }
enum  CaliSaveStyle { CALI_SAVE_P1P_STYLE = 0 , CALI_SAVE_X1_STYLE }
enum  CaliColumnType : int {
  Cali_Name = 0 , Cali_Filament , Cali_Nozzle_ID , Cali_Nozzle ,
  Cali_K_Value , Cali_Delete , Cali_Edit , Cali_Type_Count
}
enum class  DecomposeBaseColor {
  None , Cyan , Magenta , Yellow ,
  White , Red , Green , Blue
}
enum  {
  WRAP_WIDTH = 500 , MODEL_MIN_WRAP = 150 , DIALOG_MARGIN = 15 , INDEX_MARGIN = 40 ,
  BTN_SPACING = 10 , INDENT_SPACING = 30 , VERTICAL_SPACING = 10 , MAX_COLS = 4 ,
  ROW_SPACING = 75
}
enum  Technology { T_FFF = 0x1 , T_SLA = 0x2 , T_ANY = ~0 }
enum  SuccessType { PRINTER = 0 , FILAMENT }
enum class  DailyTipsLayout { Horizontal , Vertical }
enum  PrintFromType { FROM_NORMAL , FROM_SDCARD_VIEW }
enum  DataStatusType { ADJUST , OK , UNMATCHED }
enum  DownloadState {
  DownloadPending = 0 , DownloadOngoing , DownloadStopped , DownloadDone ,
  DownloadError , DownloadPaused , DownloadStateUnknown
}
enum  DownloaderUserAction { DownloadUserCanceled , DownloadUserPaused , DownloadUserContinued , DownloadUserOpenedFolder }
enum class  DragMode { NONE , DRAGGING }
enum class  ParamType { Undef , Scalar , Vector , FilamentVector }
enum  ExportCase {
  INITIALIZE_FAIL = 0 , ADD_FILE_FAIL , ADD_BUNDLE_STRUCTURE_FAIL , FINALIZE_FAIL ,
  OPEN_ZIP_WRITTEN_FILE , EXPORT_CANCEL , EXPORT_SUCCESS , CASE_COUNT
}
enum class  FilamentRenderMode {
  Single , Dual , Triple , Quadruple ,
  Gradient
}
enum class  EMeasureMode : unsigned char { ONLY_MEASURE , ONLY_ASSEMBLY }
enum class  AssemblyMode : unsigned char { FACE_FACE , POINT_POINT }
enum class  MeshBooleanSelectingState { Undef , SelectSource , SelectTool }
enum class  MeshBooleanOperation { Undef , Union , Difference , Intersection }
enum class  PainterGizmoType {
  FDM_SUPPORTS , SEAM , MM_SEGMENTATION , FUZZY_SKIN ,
  TEXTURE_DISPLACEMENT
}
enum class  SLAGizmoEventType : unsigned char {
  LeftDown = 1 , LeftUp , RightDown , RightUp ,
  Dragging , Delete , SelectAll , CtrlDown ,
  CtrlUp , ShiftDown , ShiftUp , AltUp ,
  Escape , ApplyChanges , DiscardChanges , AutomaticGeneration ,
  ManualEditing , MouseWheelUp , MouseWheelDown , ResetClippingPlane ,
  Moving
}
enum class  CommonGizmosDataID {
  None = 0 , SelectionInfo = 1 << 0 , InstancesHider = 1 << 1 , Raycaster = 1 << 3 ,
  ObjectClipper = 1 << 4
}
enum class  CollapseSide { None , Left , Right }
enum  FileType {
  FT_STEP , FT_STL , FT_OBJ , FT_AMF ,
  FT_3MF , FT_GCODE_3MF , FT_GCODE , FT_MODEL ,
  FT_ZIP , FT_PROJECT , FT_GALLERY , FT_INI ,
  FT_SVG , FT_TEX , FT_SL1 , FT_DRC ,
  FT_SIZE
}
enum  ConfigMenuIDs { ConfigMenuPreferences , ConfigMenuPrinter , ConfigMenuCnt }
enum  OrcaSlicerMenuIDs { OrcaSlicerMenuAbout , OrcaSlicerMenuPreferences }
enum  CameraMenuIDs { wxID_CAMERA_PERSPECTIVE , wxID_CAMERA_ORTHOGONAL , wxID_CAMERA_COUNT }
enum class  ECoordinatesType : unsigned char { World = 0 , Instance , Local }
enum  EditorType { etUndef = 0 , etMinZ = 1 , etMaxZ = 2 , etLayerHeight = 4 }
enum  { DPI_DEFAULT = 96 }
enum class  HintDataNavigation { Curr , Prev , Next , Random }
enum  SelectedSlider { ssUndef = 0 , ssLower = 1 , ssHigher = 2 }
enum  DrawMode { dmRegular , dmSlaPrint , dmSequentialFffPrint , dmSequentialGCodeView }
enum  LabelType { ltHeightWithLayer , ltHeight , ltEstimatedTime }
enum class  TextureDisplacementPrepareOutcome { Committed , Unchanged , PaintLost , Failed }
enum  PluginInstallStatus {
  InstallStatusNormal = 0 , InstallStatusDownloadFailed = 1 , InstallStatusDownloadCompleted = 2 , InstallStatusUnzipFailed = 3 ,
  InstallStatusInstallCompleted = 4
}
enum class  ERescaleTarget { Mainframe , SettingsDialog }
enum  QuickSlice {
  qsUndef = 0 , qsReslice = 1 , qsSaveAs = 2 , qsExportSVG = 4 ,
  qsExportPNG = 8
}
enum class  CalibKind : int {
  Temperature , MaxVolumetric , PressureAdvance , FlowRatio ,
  Retraction , Cornering , InputShapingFreq , InputShapingDamp ,
  VFA
}
enum  TestJob { TEST_BING_JOB = 0 , TEST_ORCA_JOB = 1 , TEST_PING_JOB , TEST_JOB_MAX }
enum class  NotificationType {
  CustomNotification = 0 , ExportFinished , Mouse3dDisconnected , NewAppAvailable ,
  NewAlphaAvailable , NewBetaAvailable , PresetUpdateAvailable , PresetUpdateFinished ,
  ValidateError , ValidateWarning , SlicingError , SlicingSeriousWarning ,
  SlicingWarning , BBLGeneralError , PlaterError , LeftExtruderUnprintableError ,
  RightExtruderUnprintableError , PlaterWarning , ProgressBar , PrintHostUpload ,
  SlicingProgress , EmptyColorChangeCode , CustomSupportsAndSeamRemovedAfterRepair , EmptyAutoColorChange ,
  SignDetected , QuitSLAManualMode , DesktopIntegrationSuccess , DesktopIntegrationFail ,
  UndoDesktopIntegrationSuccess , UndoDesktopIntegrationFail , MmSegmentationExceededExtrudersLimit , DidYouKnowHint ,
  UpdatedItemsInfo , ProgressIndicator , SimplifySuggestion , UnknownFont ,
  CgalFinished , ExportOngoing , URLDownload , ArrangeOngoing ,
  BBLPlateInfo , BBL3MFInfo , BBLObjectInfo , BBLSliceEmptyLayer ,
  BBLNeedSupportON , BBLGcodeOverlap , BBLSeqPrintInfo , BBLPluginInstallHint ,
  BBLFlushingVolumeZero , BBLMixedFilamentBroken , BBLPluginUpdateAvailable , BBLPreviewOnlyMode ,
  BBLPrinterConfigUpdateAvailable , BBLUserPresetExceedLimit , BBLFilamentPrintableError , BBLSliceLimitError ,
  BBLSliceMultiExtruderHeightOutside , BBLBedFilamentIncompatible , BBLMixUsePLAAndPETG , BBLNozzleFilamentIncompatible ,
  BBLSingleExtruderMixedFilamentRisk , OrcaSharedProfilesAvailable , OrcaCloudAPIError , OrcaSyncConflict ,
  OrcaLocalPluginMissingError , OrcaCloudPluginMissingError , OrcaPluginInactiveError , OrcaPluginCapabilityUnavailableError ,
  NotificationTypeCount
}
enum  ItemType {
  itUndef = 0 , itPlate = 1 , itObject = 2 , itVolume = 4 ,
  itInstanceRoot = 8 , itInstance = 16 , itSettings = 32 , itLayerRoot = 64 ,
  itLayer = 128 , itInfo = 256
}
enum  ColumnNumber {
  colName = 0 , colHeight , colPrint , colFilament ,
  colSupportPaint , colColorPaint , colSinking , colEditing ,
  colCount
}
enum  PrintIndicator { piUndef = 0 , piPrintable , piUnprintable }
enum  VaryHeightIndicator { hiUnVariable , hiVariable }
enum class  InfoItemType {
  Undef , CustomSupports , MmSegmentation , FuzzySkin ,
  CutConnectors
}
enum  PartState { psUnCheck , psChecked , psSkipped }
enum  URL_STATE { URL_TCP , URL_TUTK }
enum  SlicedInfoIdx {
  siFilament_m , siFilament_mm3 , siFilament_g , siMateril_unit ,
  siCost , siEstimatedTime , siWTNumbetOfToolchanges , siCount
}
enum class  LoadFilesType {
  NoFile , Single3MF , SingleOther , Multiple3MF ,
  MultipleOther , Multiple3MFOther
}
enum class  LoadType : unsigned char { Unknown , OpenProject , LoadGeometry , LoadConfig }
enum class  ActionButtonType : int { abReslice , abExport , abSendGCode }
enum  ExportingStatus { NOT_EXPORTING , EXPORTING_TO_REMOVABLE , EXPORTING_TO_LOCAL }
enum class  PluginSortKey {
  Status , Name , Source , Version ,
  None
}
enum class  PluginSortOrder { Asc , Desc }
enum class  PluginSource { Mine , Subscribed , Orphaned , Local }
enum class  PluginStatus {
  Activated , Error , RuntimeError , Inactive ,
  Loading
}
enum class  PreferencesTab { General , Control , Graphics , Online }
enum  prePrintInfoLevel { Normal , Warning , Error }
enum  prePrintInfoType { Printer , Filament }
enum  PrintDialogStatus : unsigned int {
  PrintStatusErrorBegin , PrintStatusPrinterErrorBegin , PrintStatusInit , PrintStatusNoUserLogin ,
  PrintStatusInvalidPrinter , PrintStatusConnectingServer , PrintStatusReadingTimeout , PrintStatusReading ,
  PrintStatusConnecting , PrintStatusReconnecting , PrintStatusInUpgrading , PrintStatusFirmwareNotSupportTpuAtLeft ,
  PrintStatusModeNotFDM , PrintStatusInSystemPrinting , PrintStatusInPrinting , PrintStatusNozzleMatchInvalid ,
  PrintStatusNozzleDataInvalid , PrintStatusNozzleTypeMismatch , PrintStatusNozzleNoMatchedHotends , PrintStatusNozzleRackMaximumInstalled ,
  PrintStatusRefreshingMachineList , PrintStatusSending , PrintStatusLanModeNoSdcard , PrintStatusNoSdcard ,
  PrintStatusLanModeSDcardNotAvailable , PrintStatusNeedForceUpgrading , PrintStatusNeedConsistencyUpgrading , PrintStatusNotSupportedPrintAll ,
  PrintStatusBlankPlate , PrintStatusUnsupportedPrinter , PrintStatusRackNozzleMappingWaiting , PrintStatusRackNozzleMappingError ,
  PrintStatusRackReading , PrintStatusFilaSwitcherError , PrintStatusPrinterErrorEnd , PrintStatusFilamentErrorBegin ,
  PrintStatusAmsOnSettingup , PrintStatusAmsMappingInvalid , PrintStatusAmsMappingU0Invalid , PrintStatusAmsMappingMixInvalid ,
  PrintStatusTPUUnsupportAutoCali , PrintStatusHasFilamentInBlackListError , PrintStatusColorQuantityExceed , PrintStatusFilamentErrorEnd ,
  PrintStatusErrorEnd , PrintStatusWarningBegin , PrintStatusPrinterWarningBegin , PrintStatusTimelapseNoSdcard ,
  PrintStatusTimelapseWarning , PrintStatusTimelapseStorageLow , PrintStatusMixAmsAndVtSlotWarning , PrintStatusToolHeadCoolingFanWarning ,
  PrintStatusRackNozzleMappingWarning , PrintStatusFilaSwitcherSlicingNotMatch , PrintStatusRackNozzleNumUnmeetWarning , PrintStatusHasUnreliableNozzleWarning ,
  PrintStatusNozzleDiameterMismatch , PrintStatusOptionalPrinterModel , PrintStatusPrinterWarningEnd , PrintStatusFilamentWarningBegin ,
  PrintStatusWarningKvalueNotUsed , PrintStatusHasFilamentInBlackListWarning , PrintStatusFilamentWarningHighChamberTemp , PrintStatusFilamentWarningHighChamberTempCloseDoor ,
  PrintStatusFilamentWarningHighChamberTempSoft , PrintStatusFilamentWarningUnknownHighChamberTempSoft , PrintStatusWarningExtFilamentNotMatch , PrintStatusFilamentWarningNozzleHRC ,
  PrintStatusFilamentCrossExtruderWarning , PrintStatusTPUUnsupportCaliOn , PrintStatusTPUUnsuggestCali , PrintStatusSmartNozzleBlobNeedAuto ,
  PrintStatusFilamentWarningRemainNotEnough , PrintStatusPrintTimeEstimateWarning , PrintStatusFilamentWarningEnd , PrintStatusWarningEnd ,
  PrintStatusReadingFinished , PrintStatusSendingCanceled , PrintStatusReadyToGo , PrintStatusAmsMappingSuccess ,
  PrintStatusNotOnTheSameLAN , PrintStatusNotSupportedSendToSDCard , PrintStatusPublicInitFailed , PrintStatusPublicUploadFiled
}
enum class  PurgeModeDialogType { MultiNozzle , FastMode }
enum  PrintPageMode { PrintPageModePrepare = 0 , PrintPageModeSending , PrintPageModeFinish }
enum class  CloudTaskNozzleId : int { NOZZLE_RIGHT = 0 , NOZZLE_LEFT = 1 }
enum class  FilamentMapNozzleId : int { NOZZLE_LEFT = 1 , NOZZLE_RIGHT = 2 }
enum class  ConfigNozzleIdx : int { NOZZLE_LEFT = 0 , NOZZLE_RIGHT = 1 }
enum  PrinterState {
  OFFLINE , IDLE , BUSY , LOCK ,
  IN_LAN
}
enum  PrinterBindState { NONE , ALLOW_BIND , ALLOW_UNBIND }
enum class  ShortcutContext : uint8_t {
  Global , Plater , Preview , ObjectList ,
  Painting , Count
}
enum class  Shortcut : uint8_t {
  NewProject , OpenProject , SaveProject , SaveProjectAs ,
  ImportModel , Publish3mf , SlicePlate , ExportSlicedFile ,
  PrintPlate , PrintHostQueue , SelectAll , SelectAllPlates ,
  Undo , Redo , Cut , Copy ,
  Paste , DeleteSelected , DeleteAll , CloneSelected ,
  AddInstance , RemoveInstance , TogglePrintable , ToggleAutoDrop ,
  Arrange , ArrangePlate , Orient , OrientPlate ,
  MoveSelectionLeft , MoveSelectionRight , MoveSelectionUp , MoveSelectionDown ,
  RotateSelectionLeft , RotateSelectionRight , GizmoMove , GizmoRotate ,
  GizmoScale , GizmoFlatten , GizmoCut , GizmoMeshBoolean ,
  GizmoFdmSupports , GizmoSeam , GizmoFuzzySkin , GizmoMmuSegmentation ,
  GizmoEmboss , GizmoMeasure , GizmoAssembly , GizmoBrimEars ,
  GizmoDisplacement , GoToLayer , LayerSliderUp , LayerSliderDown ,
  MovesSliderLeft , MovesSliderRight , MovesSliderStart , MovesSliderEnd ,
  PaintToolCircle , PaintToolSphere , PaintToolFill , PaintToolGapFill ,
  PaintToolTriangle , PaintToolHeightRange , ViewDefault , ViewTop ,
  ViewBottom , ViewFront , ViewRear , ViewLeft ,
  ViewRight , ViewPlate , ZoomIn , ZoomOut ,
  Mouse3DSettings , ShowLabels , ShowCollisionVolumes , ShowWireframe ,
  ToggleGcodeWindow , ToggleOneLayerMode , ToggleBeltRawGcode , Preferences ,
  Search , SwitchView , CollapseSidebar , ReloadDevicePage ,
  KeyboardShortcuts , Quit , SpeedDial , Count
}
enum class  ShortcutSection : uint8_t {
  Project , SlicingAndPrinting , Selection , Editing ,
  Objects , Placement , Gizmos , Sliders ,
  PaintingTools , Camera , Display , Application ,
  SpeedDial , Count
}
enum  CameraRecordingStatus {
  RECORDING_NONE , RECORDING_OFF_NORMAL , RECORDING_OFF_HOVER , RECORDING_ON_NORMAL ,
  RECORDING_ON_HOVER
}
enum  CameraTimelapseStatus {
  TIMELAPSE_NONE , TIMELAPSE_OFF_NORMAL , TIMELAPSE_OFF_HOVER , TIMELAPSE_ON_NORMAL ,
  TIMELAPSE_ON_HOVER
}
enum  PrintingTaskType { PRINGINT , CALIBRATION , NOT_CLEAR }
enum  ExtruderState { FILLED_LOAD , FILLED_UNLOAD , EMPTY_LOAD , EMPTY_UNLOAD }
enum class  TextureImportState { Idle , Computing , Ready , Error }
enum class  TextureAutoMixMode { CMYW , RYBW }
enum class  TextureFilamentKind { ExistingPhysical , ExistingMixed , NewPhysical , NewMixed }
enum class  TextureSource { Shipped , User , Plugin }
enum  ActionButtons {
  TRANSFER = 1 , KEEP = 2 , SAVE = 4 , DONT_SAVE = 8 ,
  REMEMBER_CHOISE = 0x10000
}
enum class  Action { Undef , Transfer , Discard , Save }
enum  FIRMWARE_STASUS { UNKOWN , TESTING , BETA , RELEASE }
enum  AMSModel {
  EXT_AMS = 0 , GENERIC_AMS = 1 , AMS_LITE = 2 , N3F_AMS = 3 ,
  N3S_AMS = 4
}
enum  AMSModelOriginType { GENERIC_EXT , LITE_EXT }
enum  ActionButton { ACTION_BTN_CALI = 0 , ACTION_BTN_LOAD = 1 , ACTION_BTN_UNLOAD = 2 , ACTION_BTN_COUNT = 3 }
enum class  AMSRoadMode : int {
  AMS_ROAD_MODE_LEFT , AMS_ROAD_MODE_LEFT_RIGHT , AMS_ROAD_MODE_END , AMS_ROAD_MODE_END_ONLY ,
  AMS_ROAD_MODE_NONE , AMS_ROAD_MODE_NONE_ANY_ROAD , AMS_ROAD_MODE_VIRTUAL_TRAY
}
enum class  AMSPanelPos : int { SINGLE_PANEL , LEFT_PANEL , RIGHT_PANEL }
enum class  AMSRoadShowMode : int {
  AMS_ROAD_MODE_FOUR , AMS_ROAD_MODE_DOUBLE , AMS_ROAD_MODE_SINGLE , AMS_ROAD_MODE_SINGLE_N3S ,
  AMS_ROAD_MODE_AMS_LITE , AMS_ROAD_MODE_NONE
}
enum class  AMSPassRoadMode : int {
  AMS_ROAD_MODE_NONE , AMS_ROAD_MODE_LEFT , AMS_ROAD_MODE_LEFT_RIGHT , AMS_ROAD_MODE_END_TOP ,
  AMS_ROAD_MODE_END_RIGHT , AMS_ROAD_MODE_END_BOTTOM
}
enum class  AMSAction : int {
  AMS_ACTION_NONE , AMS_ACTION_LOAD , AMS_ACTION_UNLOAD , AMS_ACTION_CALI ,
  AMS_ACTION_PRINTING , AMS_ACTION_NORMAL , AMS_ACTION_NOAMS
}
enum class  AMSPassRoadSTEP : int {
  AMS_ROAD_STEP_NONE = 0 , AMS_ROAD_STEP_1 = 1 , AMS_ROAD_STEP_2 = 2 , AMS_ROAD_STEP_3 = 4 ,
  AMS_ROAD_STEP_COMBO_LOAD_STEP1 , AMS_ROAD_STEP_COMBO_LOAD_STEP2 , AMS_ROAD_STEP_COMBO_LOAD_STEP3
}
enum class  AMSPassRoadType : int { AMS_ROAD_TYPE_NONE , AMS_ROAD_TYPE_LOAD , AMS_ROAD_TYPE_UNLOAD }
enum class  AMSCanType : int {
  AMS_CAN_TYPE_NONE , AMS_CAN_TYPE_BRAND , AMS_CAN_TYPE_THIRDBRAND , AMS_CAN_TYPE_EMPTY ,
  AMS_CAN_TYPE_VIRTUAL
}
enum  FilamentStep {
  STEP_IDLE , STEP_HEAT_NOZZLE , STEP_CUT_FILAMENT , STEP_PULL_CURR_FILAMENT ,
  STEP_PUSH_NEW_FILAMENT , STEP_GRAB_NEW_FILAMENT , STEP_PURGE_OLD_FILAMENT , STEP_CONFIRM_EXTRUDED ,
  STEP_CHECK_POSITION , STEP_COUNT
}
enum  FilamentStepType { STEP_TYPE_LOAD = 0 , STEP_TYPE_UNLOAD = 1 , STEP_TYPE_VT_LOAD = 2 }
enum class  DevExtruderState { FILLED_LOAD , FILLED_UNLOAD , EMPTY_LOAD , EMPTY_UNLOAD }
enum  FanControlType {
  PART_FAN = 0 , AUX_FAN , EXHAUST_FAN , FILTER_FAN ,
  CHAMBER_FAN , TOP_FAN
}
enum class  NewSlicerInstanceType { Slicer , GCodeViewer }

Functions

bool init_model_from_poly (GLModel &model, const ExPolygon &poly, float z)
std::vector< std::string > cap_favourites (const std::vector< std::string > &ids, size_t limit)
nlohmann::json action_json (const AppAction &a)
bool requires_mode_switch (ConfigOptionMode setting_mode, ConfigOptionMode current_mode)
static std::string get_humidity_level_img_path (int humidity_percent)
static std::string get_dry_status_img_path (DevAmsType type, DevAms::DryStatus status, DevAms::DrySubStatus sub_status)
wxString get_cannot_reason_text (DevAms::CannotDryReason reason)
wxString organize_cannot_reasons_text (std::vector< DevAms::CannotDryReason > &reasons)
 wxDEFINE_EVENT (EVT_SET_FINISH_MAPPING, wxCommandEvent)
static wxString s_wrap_mapped_nozzle_str (const wxString &text)
static int s_get_mapped_nozzle_str_line_count (const wxString &text)
static void _DrawRemainArea (const MappingItem *item, const TrayData &dd, bool support_remain_dect, wxDC &dc)
 wxDECLARE_EVENT (EVT_SET_FINISH_MAPPING, wxCommandEvent)
static void _add_containers (const AmsMapingPopup *win, std::list< MappingContainer * > &one_slot_containers, const std::vector< MappingContainer * > &four_slots_containers, wxBoxSizer *target_sizer)
static std::optional< TrayData > sGetTrayData (DevAmsTray *tray, const std::string &ams_id_str, DevAmsType ams_type)
 wxDEFINE_EVENT (EVT_SELECTED_COLOR, wxCommandEvent)
static std::string float_to_string_with_precision (float value, int precision=3)
static std::string colour_to_ams_string (const wxColour &color)
static wxColour mix_colour (const wxColour &left, const wxColour &right, double ratio)
static std::vector< ColorPickerPopup::ColorItem > collect_ams_color_items (DevFilaSystem *fila_system)
static std::vector< ColorPickerPopup::ColorItem > collect_preset_color_items (const std::string &filament_id)
static DevFilaBlacklist::CheckResult sCheckFilamentInfo (PresetBundle *preset_bundle, MachineObject *obj, int ams_id, int slot_id, const std::string &filament_id, std::string &ams_filament_id, std::string &ams_setting_id)
static void _collect_filament_info (const wxString &shown_name, const Preset &filament, std::unordered_map< wxString, wxString > &query_filament_vendors, std::unordered_map< wxString, wxString > &query_filament_types)
 wxDECLARE_EVENT (EVT_SELECTED_COLOR, wxCommandEvent)
std::string aui_pane_layout_entry (const std::string &layout, const std::string &pane_name)
 wxDEFINE_EVENT (EVT_AUXILIARY_IMPORT, wxCommandEvent)
 wxDEFINE_EVENT (EVT_AUXILIARY_UPDATE_COVER, wxCommandEvent)
 wxDEFINE_EVENT (EVT_AUXILIARY_UPDATE_DELETE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_AUXILIARY_UPDATE_RENAME, wxCommandEvent)
 wxDEFINE_EVENT (EVT_AUXILIARY_DONE, wxCommandEvent)
static std::shared_ptr< ModelInfo > ensure_model_info ()
 WX_DEFINE_ARRAY (AuFiles *, AuFilesHash)
 wxDECLARE_EVENT (EVT_AUXILIARY_IMPORT, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AUXILIARY_UPDATE_COVER, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AUXILIARY_UPDATE_DELETE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AUXILIARY_UPDATE_RENAME, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AUXILIARY_DONE, wxCommandEvent)
static std::string get_option_label (BedShape::Parameter param)
bool ensure_belt_purge_tower (Model &model, PartPlateList &partplate_list, ObjectList *obj_list, std::vector< BeltPurgeSignature > &sigs)
wxString get_fail_reason (int code)
static wxBitmap wxImage_to_wxBitmap_with_alpha (wxImage &&image, float scale=1.0f)
static void select_iso_view (Camera &camera)
static ColorRGBA body_palette (int body_idx)
constexpr CadLevel cad_escape_level (const CadInteractionState &s)
uint32_t offer_bit (OfferSel s)
static wxFlexGridSizer * two_col_form ()
static ComboBox * make_combo (wxWindow *parent)
static int combo_append_index (ComboBox *c, const wxString &label, int index)
static wxString en_format (double v, int digits=2)
static bool en_parse (const wxString &text, double &out)
static bool dp_dark ()
static wxColour dp_tok (DpTok t)
static wxColour dp_ribbon_bg ()
static wxColour dp_ribbon_hover ()
static wxColour dp_panel_bg ()
static wxColour dp_sec_text ()
static wxColour dp_ctl_text ()
static wxColour dp_item_text ()
static wxColour dp_item_dim ()
static wxColour dp_retheme (const wxColour &c, bool to_dark)
static StaticBox * make_card (wxWindow *parent)
static void style_sidebar_icon_btn (::Button *b)
::Button * sidebar_icon_btn (wxWindow *parent, const char *icon, const wxString &tip, int px=20)
static std::string commit_icon (bool bodies)
static DesignRowList::Action eye_action (bool shown)
static wxString origin_toggle_text (bool shown)
static wxString bed_toggle_text (bool shown)
static wxString sketch_plane_prompt ()
static wxSpinCtrlDouble * make_spin (wxWindow *parent, double val, double mn=0.1, double mx=1000.0)
static wxWindow * spin_frame (wxWindow *spin)
static SketchPlane plane_from_index (int i)
static int index_from_plane (const SketchPlane &p)
static bool is_base_plane (const SketchPlane &p, const Vec3d &modeling_origin)
static SketchPlane face_plane_inward (const TopoDS_Face &face)
static void run_off_ui_thread (wxWindow *parent, const wxString &message, const std::function< void()> &work)
static Transform3d xf_compose (const Vec3d &t, const Vec3d &axis, const Vec3d &pivot, double deg)
static wxString sketch_step_prompt (DesignSketchTool::Mode m, int step, int picks)
static void offer_trace (const char *fmt,...)
static wxString constraint_reject_text (ConstraintReject reason, SketchConstraintType type)
static void write_plan_value (std::vector< SketchEntityConstraintDef > &defs, double v)
static bool entity_ref_point (const SketchEntity &e, Vec2d &out)
static void translate_entity (SketchEntity &e, const Vec2d &d)
static double point_segment_dist (const Vec2d &p, const Vec2d &a, const Vec2d &b)
static double entity_pick_dist (const Vec2d &p, const SketchEntity &e)
static bool point_in_poly (const Vec2d &q, const std::vector< Vec2d > &poly)
static bool ray_triangle (const Vec3d &ro, const Vec3d &rd, const Vec3d &v0, const Vec3d &v1, const Vec3d &v2, double &t)
static double ray_segment_dist3 (const Vec3d &ro, const Vec3d &rd, const Vec3d &a, const Vec3d &b)
static double ray_axis_proj (const Linef3 &ray, const Vec3d &anchor, const Vec3d &dir)
static wxPoint world_to_screen_px (const Camera &cam, const Vec3d &world)
static Vec2d ellipse_point (const Vec2d &c, double a, double b, double phi, double t)
static double ellipse_param_of (const Vec2d &center, double a, double b, double phi, const Vec2d &q)
static void trace_autoedit (const char *why, size_t n)
static int sketch_endpoint_roles (const SketchEntity &e, SketchPointRole out[2])
static std::vector< Vec2d > circle_polygon (const Vec2d &c, double r, int n=48)
static std::vector< Vec2d > ellipse_polyline (const Vec2d &c, double a, double b, double phi, double t0, double t1, int n=48)
static int bspline_degree (int n)
static std::vector< double > bspline_knots (int n, int p)
static Vec2d bspline_eval (const std::vector< Vec2d > &P, const std::vector< double > &U, int p, double u)
static std::vector< Vec2d > bspline_polyline (const std::vector< Vec2d > &ctrl, int samples=0)
static double wrap_2pi (double a)
static bool circumcircle (const Vec2d &a, const Vec2d &b, const Vec2d &c, Vec2d &center, double &radius)
static SketchEntity make_arc_through (const Vec2d &center, double radius, const Vec2d &start, const Vec2d &end, const Vec2d &through, bool construction)
static void ellipse_axes (const Vec2d &center, const Vec2d &major_end, const Vec2d &minor_pt, double &a, double &b, double &phi)
static void dp_pick_trace (const char *fmt,...)
static bool dp_pick_trace_on ()
static double display_edge_tol (const TopoDS_Shape &shape)
static void render_ribbons (GLModel &model, GLModel::Geometry &&g, const ColorRGBA &colour)
static bool rib_frame (const Vec2d &p0, const Vec2d &p1, double thickness, Vec2d &d, Vec2d &perp, Vec2d &mid, double &half)
std::vector< PlanePiece > planes_back_to_front (const std::vector< SketchPlane > &planes, double half, const Vec3d &eye, const Vec3d &forward, bool perspective)
SketchPlane reference_square (const SketchPlane &plane, int base, double half)
std::array< Vec3d, 4 > reference_label_box (const SketchPlane &square, double half, const std::string &text)
int pick_reference_square (const std::vector< SketchPlane > &squares, double half, const Vec3d &from, const Vec3d &dir)
static Vec3d rv_yaxis (const Vec3d &axis, const Vec3d &ref, bool flip)
static Vec3d dr_yaxis (const Vec3d &axis, const Vec3d &ref)
static double pt_linear_len (double spacing, int count)
static std::vector< std::vector< Vec2d > > dash_polyline (const std::vector< Vec2d > &pts, bool closed, double dash, double gap)
static bool entity_moved (const SketchEntity &a, const SketchEntity &b, double tol)
static void entity_endpoints (const SketchEntity &e, std::vector< Vec2d > &out)
ColorRGBA design_selection_color (float alpha=1.0f)
ColorRGBA design_idle_face_color ()
double reference_square_gap (double half)
static const wxArrayString & font_faces ()
static bool parse_mm (wxString t, double &out)
void start_mcp_control_if_enabled ()
std::vector< InputShaperType > input_shaper_types_for_flavor (GCodeFlavor flavor)
 wxDEFINE_EVENT (EVT_FINISHED_UPDATE_MLIST, wxCommandEvent)
 wxDEFINE_EVENT (EVT_UPDATE_USER_MLIST, wxCommandEvent)
wxString get_calibration_type_name (CalibMode cali_mode)
 wxDEFINE_EVENT (EVT_DEVICE_CHANGED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_CALIBRATION_JOB_FINISHED, wxCommandEvent)
std::map< int, Preset * > get_cached_selected_filament (MachineObject *obj)
std::map< int, TrayInfo > get_cached_selected_filament_for_multi_extruder (MachineObject *obj)
bool is_pa_params_valid (const Calib_Params &params)
static bool get_preset_info (const DynamicConfig &config, const BedType plate_type, int &nozzle_temp, int &bed_temp, float &max_volumetric_speed)
static bool get_flow_ratio (const DynamicConfig &config, float &flow_ratio)
 wxDECLARE_EVENT (EVT_DEVICE_CHANGED, wxCommandEvent)
 wxDECLARE_EVENT (EVT_CALIBRATION_JOB_FINISHED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_CALI_ACTION, wxCommandEvent)
 wxDEFINE_EVENT (EVT_CALI_TRAY_CHANGED, wxCommandEvent)
CalibrationStyle get_cali_style (MachineObject *obj)
wxString get_cali_mode_caption_string (CalibMode mode)
wxString get_calibration_wiki_page (CalibMode cali_mode)
CalibrationFilamentMode get_cali_filament_mode (MachineObject *obj, CalibMode mode)
CalibMode get_obj_calibration_mode (const MachineObject *obj)
CalibMode get_obj_calibration_mode (const MachineObject *obj, int &cali_stage)
CalibMode get_obj_calibration_mode (const MachineObject *obj, CalibrationMethod &method, int &cali_stage)
 wxDECLARE_EVENT (EVT_CALI_ACTION, wxCommandEvent)
 wxDECLARE_EVENT (EVT_CALI_TRAY_CHANGED, wxCommandEvent)
static void select_nozzle_volume (ComboBox *combo, NozzleVolumeType volume_type)
static void fill_nozzle_volume_combo (ComboBox *combo)
static DynamicPrintConfig empty_tray_config ()
static wxString get_default_name (wxString filament_name, CalibMode mode)
static wxString get_tray_name_by_tray_id (int tray_id)
bool support_nozzle_volume (const MachineObject *obj)
static wxString nozzle_id_code_to_string (int code)
static wxString get_preset_name_by_filament_id (std::string filament_id)
 wxIMPLEMENT_CLASS (CameraPopup, PopupWindow)
 wxBEGIN_EVENT_TABLE (CameraPopup, PopupWindow) wxEND_EVENT_TABLE() wxDEFINE_EVENT(EVT_VCAMERA_SWITCH
 wxDEFINE_EVENT (EVT_SDCARD_ABSENT_HINT, wxCommandEvent)
 wxDECLARE_EVENT (EVT_VCAMERA_SWITCH, wxMouseEvent)
 wxDECLARE_EVENT (EVT_SDCARD_ABSENT_HINT, wxCommandEvent)
static const wxColour COLOR_BRAND ("#009688")
static const wxColour COLOR_BORDER_NORMAL ("#EEEEEE")
static const wxColour COLOR_BG_CARD ("#F8F8F8")
static const wxColour COLOR_LABEL_GREY ("#ACACAC")
static const wxColour COLOR_TEXT_DARK ("#262E30")
static const wxColour COLOR_DIVIDER ("#EEEEEE")
static const wxColour CMYW_CYAN (0, 255, 255)
static const wxColour CMYW_MAGENTA (255, 0, 255)
static const wxColour CMYW_YELLOW (255, 255, 0)
static const wxColour CMYW_WHITE (255, 255, 255)
static const wxColour RYBW_RED (255, 0, 0)
static const wxColour RYBW_YELLOW (255, 255, 0)
static const wxColour RYBW_BLUE (0, 0, 255)
static const wxColour RYBW_WHITE (255, 255, 255)
static size_t mode_index (DecomposeMode mode)
static ColorDecomposeRgb wx_colour_to_recipe_rgb (const wxColour &color)
static wxColour hex_to_wx_colour (const std::string &hex, const wxColour &fallback)
static bool same_rgb (const wxColour &lhs, const wxColour &rhs)
static DecomposeBaseColor standard_base_color_from_key (const std::string &key)
static wxColour pure_color_for_base (DecomposeBaseColor base)
static DecomposeBaseColor standard_base_color_for (DecomposeMode mode, const wxColour &color)
static ColorDecomposeResult to_dialog_result (const ColorDecomposeRecipeResult &recipe, const wxColour &fallback)
static wxPanel * create_h_divider (wxWindow *parent, int fixed_width=-1)
static wxStaticText * create_mode_group_label (wxWindow *parent, const wxString &text)
static void match_parent_bg (wxWindow *w, const wxColour &bg)
static bool material_type_matches (const std::string &a, const std::string &b)
static wxPanel * create_color_swatch (wxWindow *parent, const wxColour &color, int size)
std::string decompose_normalize_color_hex (std::string color)
const char * decompose_base_color_en (DecomposeBaseColor color)
wxString decompose_base_color_display (DecomposeBaseColor color)
std::string decompose_basic_type_from_source (size_t source_config_idx, size_t source_physical_idx, const std::vector< std::string > &physical_types)
std::string decompose_basic_filament_id (const std::string &basic_type)
void set_created_standard_component_metadata (size_t config_idx, const DecomposeOfficialComponent &component)
DecomposeOfficialComponent lookup_decompose_official_component (const std::string &basic_type, DecomposeBaseColor base_color, const wxColour &fallback)
std::string find_decompose_standard_preset_name (size_t source_config_idx, const std::string &basic_type)
std::string official_basic_type_from_preset_name (const std::string &preset_name)
std::string filament_type_for_color_decompose (Preset *preset)
int find_existing_decompose_component (const DecomposeOfficialComponent &component, const std::vector< std::string > &physical_colors, const std::vector< size_t > &physical_config_indices, size_t source_config_idx)
bool prepare_decompose_mixed_result (const ColorDecomposeResult &result, size_t source_config_idx, size_t source_physical_idx, const std::vector< std::string > &physical_colors, const std::vector< std::string > &physical_types, const std::vector< size_t > &physical_config_indices, MixedFilamentResult &out_result, std::vector< DecomposeMissingComponent > &missing)
size_t count_decompose_new_physical_filaments (const ColorDecomposeResult &result, const std::vector< std::string > &physical_colors, const std::vector< std::string > &physical_types, size_t source_physical_idx, const std::vector< size_t > *physical_config_indices)
bool confirm_create_decompose_missing_components (wxWindow *parent, const std::vector< DecomposeMissingComponent > &missing)
std::optional< ColorSelection > filament_color_picker_selection (const FilamentColorPickerValue &value)
ColorSelection filament_color_picker_initial (const FilamentColorPickerValue &value)
FilamentColorPickerValue filament_color_picker_result (const ColorSelection &selection)
bool filament_color_picker_changed (const ColorSelection &initial, const std::optional< ColorSelection > &result)
std::string get_pure_opt_key (const std::string &opt_key)
wxString get_string_from_enum (const std::string &opt_key, const DynamicPrintConfig &config, bool is_infill, int idx)
wxString get_full_label (const std::string &opt_key, const DynamicPrintConfig &config)
wxString get_string_value (const std::string &opt_key, const DynamicPrintConfig &config)
 wxDEFINE_EVENT (EVT_PRINTER_PICK, PrinterPickerEvent)
static void focus_event (wxFocusEvent &e, wxTextCtrl *ctrl, double def_value)
 wxDECLARE_EVENT (EVT_INDEX_PAGE, wxCommandEvent)
static std::set< std::string > get_new_added_presets (const std::map< std::string, std::string > &old_data, const std::map< std::string, std::string > &new_data)
static std::string get_first_added_preset (const std::map< std::string, std::string > &old_data, const std::map< std::string, std::string > &new_data)
 wxDEFINE_EVENT (EVT_INDEX_PAGE, wxCommandEvent)
static std::string remove_special_key (const std::string &str)
static bool str_is_all_digit (const std::string &str)
static bool caseInsensitiveCompare (const std::string &a, const std::string &b)
static float my_stof (std::string str)
static bool delete_filament_preset_by_name (std::string delete_preset_name, std::string &selected_preset_name)
static std::string get_curr_time (const char *format="%Y_%m_%d_%H_%M_%S")
static std::string get_curr_timestmp ()
static void get_filament_compatible_printer (Preset *preset, std::vector< std::string > &printers)
static wxBoxSizer * create_checkbox (wxWindow *parent, Preset *preset, wxString &preset_name, std::vector< std::pair<::CheckBox *, Preset * > > &preset_checkbox)
static wxBoxSizer * create_checkbox (wxWindow *parent, std::string &compatible_printer, Preset *preset, std::unordered_map<::CheckBox *, std::pair< std::string, Preset * > > &ptinter_compatible_filament_preset)
static wxBoxSizer * create_checkbox (wxWindow *parent, wxString &preset_name, std::vector< std::pair<::CheckBox *, std::string > > &preset_checkbox)
static wxArrayString get_exist_vendor_choices (VendorMap &vendors)
static std::string get_machine_name (const std::string &preset_name)
static std::string get_filament_name (std::string &preset_name)
static wxBoxSizer * create_preset_tree (wxWindow *parent, std::pair< std::string, std::vector< std::shared_ptr< Preset > > > printer_and_preset)
static std::string get_vendor_name (std::string &preset_name)
static wxBoxSizer * create_select_filament_preset_checkbox (wxWindow *parent, std::string &compatible_printer, std::vector< Preset * > presets, std::unordered_map<::CheckBox *, std::pair< std::string, Preset * > > &machine_filament_preset)
static wxString get_curr_radio_type (std::vector< std::pair< RadioBox *, wxString > > &radio_btns)
static std::string calculate_md5 (const std::string &input)
static void load_filament_id_sources (PresetBundle &temp_preset_bundle)
static std::string get_filament_id (std::string vendor_typr_serial, const PresetBundle &temp_preset_bundle)
static json get_config_json (const Preset *preset)
static char * read_json_file (const std::string &preset_path)
static std::string get_printer_nozzle_diameter (std::string printer_name)
static void adjust_dialog_in_screen (DPIDialog *dialog)
bool has_cjk (const std::string &text)
void register_mac_deep_link_handler ()
 wxDEFINE_EVENT (wxEVT_REFRESH_DATA, wxCommandEvent)
 wxDECLARE_EVENT (wxEVT_REFRESH_DATA, wxCommandEvent)
static wxBitmap SetNozzleBmpColor (const wxBitmap &bmp, const std::string &color_str)
static StateColor s_button_style_gray ()
static void s_update_title (const std::shared_ptr< DevNozzleRack > rack, wgtDeviceNozzleRackTitle *title_label)
static void s_set_bg_style (StaticBox *box, ScalableButton *btn, Label *label_row, Label *label_row_status, const wxColour &clr)
static void s_show_label (Label *label, const wxString &text)
static void s_show_label (Label *label, const wxString &text, const wxColour &text_color)
 wxDEFINE_EVENT (wxEVT_NOZZLE_JUMP_UPGRADE, wxCommandEvent)
 wxDECLARE_EVENT (wxEVT_NOZZLE_JUMP_UPGRADE, wxCommandEvent)
static wxPanel * s_create_title (wxWindow *parent, const wxString &text)
static void s_update_nozzle_info (wgtDeviceNozzleRackNozzleItem *item, std::shared_ptr< DevNozzleRack > rack, const DevNozzle &nozzle_info)
static void s_enable_item_if_match (wgtDeviceNozzleRackNozzleItem *item, const DevNozzle &nozzle_info, const DevNozzle &selected_nozzle)
volatile int sGetNozzlePosId (wgtDeviceNozzleRackNozzleItem *item, wgtDeviceNozzleRackNozzleItem *l_item, wgtDeviceNozzleRackNozzleItem *r_item)
std::string plugin_pane_name (const std::string &plugin_key, const std::string &title)
 wxDEFINE_EVENT (EVT_DWNLDR_FILE_COMPLETE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_DWNLDR_FILE_ERROR, wxCommandEvent)
 wxDEFINE_EVENT (EVT_DWNLDR_FILE_PROGRESS, wxCommandEvent)
 wxDEFINE_EVENT (EVT_DWNLDR_FILE_NAME_CHANGE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_DWNLDR_FILE_PAUSED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_DWNLDR_FILE_CANCELED, wxCommandEvent)
std::string extract_remote_filename (const std::string &str)
 wxDECLARE_EVENT (EVT_DWNLDR_FILE_COMPLETE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_DWNLDR_FILE_PROGRESS, wxCommandEvent)
 wxDECLARE_EVENT (EVT_DWNLDR_FILE_ERROR, wxCommandEvent)
 wxDECLARE_EVENT (EVT_DWNLDR_FILE_NAME_CHANGE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_DWNLDR_FILE_PAUSED, wxCommandEvent)
 wxDECLARE_EVENT (EVT_DWNLDR_FILE_CANCELED, wxCommandEvent)
 wxDEFINE_EVENT (wxEVT_DRAG_DROP_COMPLETED, wxCommandEvent)
wxColor Hex2Color (const std::string &str)
 wxDECLARE_EVENT (wxEVT_DRAG_DROP_COMPLETED, wxCommandEvent)
static ParamType get_type (const std::string &opt_key, const ConfigOptionDef &opt_def)
static void make_bold (wxString &str)
static void highlight (wxString &str)
static std::string get_machine_name (const std::string &preset_name)
static std::string get_filament_name (std::string &preset_name)
static std::string get_vendor_name (std::string &preset_name)
static std::string get_curr_time (const char *format="%Y_%m_%d_%H_%M_%S")
static mz_bool initial_zip_archive (mz_zip_archive &zip_archive, const std::string &file_path)
wxString double_to_string (double const value, const int max_precision)
wxString get_thumbnail_string (const Vec2d &value)
wxString get_thumbnails_string (const std::vector< Vec2d > &values)
ThumbnailErrors validate_thumbnails_string (wxString &str, const wxString &def_ext="PNG")
wxString get_formatted_tooltip_text (const ConfigOptionDef &opt, const t_config_option_key &id)
void switch_window_pools ()
void release_window_pools ()
wxEventFunctor & wxMakeEventFunctor (const int, wxEventFunctorRef func)
static void unbind_events (wxEvtHandler *h)
void free_window (wxWindow *win)
template<class T>
bool is_defined_input_value (wxWindow *win, const ConfigOptionType &type)
static void remove_empty_plugin_values (std::vector< std::string > &values)
bool is_bad_field (const t_field &obj)
 Convenience function, accepts a const reference to t_field and checks to see whether or not both wx pointers are null.
bool is_window_field (const t_field &obj)
 Covenience function to determine whether this field is a valid window field.
bool is_sizer_field (const t_field &obj)
 Covenience function to determine whether this field is a valid sizer field.
double tri_signed_area2 (TriPoint a, TriPoint b, TriPoint c)
bool tri_contains (TriPoint p, TriPoint v0, TriPoint v1, TriPoint v2)
void tri_barycentric (TriPoint p, TriPoint v0, TriPoint v1, TriPoint v2, double &w0, double &w1, double &w2)
TriPoint tri_clamp (TriPoint p, TriPoint v0, TriPoint v1, TriPoint v2)
void fill_gradient_rect_east (wxDC &dc, const wxRect &rect, const wxColour &from, const wxColour &to)
static std::string to_hex (const wxColour &c)
wxColour blend_n_colors (const std::vector< wxColour > &cols, const std::vector< double > &weights)
std::vector< wxColour > sample_gradient_ramp (const wxColour &first, const wxColour &second, const Slic3r::GradientCurve &curve, int steps)
Slic3r::GradientCurve mixed_gradient_curve (const Slic3r::DynamicPrintConfig &cfg, size_t slot)
std::vector< wxColour > mixed_gradient_ramp (const Slic3r::DynamicPrintConfig &cfg, size_t slot, int steps)
void fill_gradient_ramp_rect (wxDC &dc, const wxRect &rect, const std::vector< wxColour > &ramp)
static BitmapDC init_bitmap_dc (const wxSize &size)
wxBitmap create_gradient_ramp_bitmap (const std::vector< wxColour > &ramp, const wxSize &size)
static bool is_transparent_color (const wxColour &color)
static wxBitmap create_transparent_bitmap (const wxSize &size)
static wxBitmap create_single_filament_bitmap (const wxColour &color, const wxSize &size)
static wxBitmap create_dual_filament_bitmap (const wxColour &color1, const wxColour &color2, const wxSize &size)
static wxBitmap create_triple_filament_bitmap (const std::vector< wxColour > &colors, const wxSize &size)
static wxBitmap create_quadruple_filament_bitmap (const std::vector< wxColour > &colors, const wxSize &size)
static wxBitmap create_gradient_filament_bitmap (const std::vector< wxColour > &colors, const wxSize &size)
wxBitmap create_filament_bitmap (const std::vector< wxColour > &colors, const wxSize &size, bool force_gradient)
void recompute_mixed_slot_colors (std::vector< wxColour > &colors, const Slic3r::DynamicPrintConfig &cfg)
wxRect mixed_gradient_plot_rect (const wxSize &sz)
void draw_mixed_gradient_plot (wxDC &raw_dc, const wxSize &canvas, const std::vector< MixedGradientCurve > &curves, const std::vector< wxPoint2DDouble > &anchors, const MixedGradientTheme &theme)
void draw_mixed_ratio_blend_bar (wxDC &dc, const wxRect &rect, const wxColour &first, const wxColour &second, double second_fraction)
void draw_mixed_ratio_segments (wxDC &dc, const wxRect &rect, const std::vector< wxColour > &colours, const std::vector< double > &shares)
std::array< TriPoint, 3 > mixed_triangle_vertices (const wxSize &size, double margin_dip)
void draw_mixed_triangle_picker (wxDC &dc, const wxSize &size, const std::array< wxColour, 3 > &colours, const std::array< double, 3 > &weights, const MixedTriangleTheme &theme)
void draw_mixed_triangle_labels (wxDC &dc, const wxSize &size, const std::array< double, 3 > &weights, const MixedTriangleTheme &theme)
static bool should_pop_up ()
static FilamentMapMode get_prefered_map_mode ()
static void set_prefered_map_mode (FilamentMapMode mode)
bool play_dual_extruder_slice_video ()
bool play_dual_extruder_print_tpu_video ()
bool open_filament_group_wiki ()
static bool get_pop_up_remind_flag ()
static void set_pop_up_remind_flag (bool remind)
static FilamentMapMode get_applied_map_mode (DynamicConfig &proj_config, const Plater *plater_ref, const PartPlate *partplate_ref, const bool sync_plate)
static std::vector< int > get_applied_map (DynamicConfig &proj_config, const Plater *plater_ref, const PartPlate *partplate_ref, const bool sync_plate)
static std::vector< int > get_applied_volume_map (DynamicConfig &proj_config, const Plater *plater_ref, const PartPlate *partplate_ref, const bool sync_plate)
std::string & get_left_extruder_unprintable_text ()
std::string & get_right_extruder_unprintable_text ()
bool try_pop_up_before_slice (bool is_slice_all, Plater *plater_ref, PartPlate *partplate_ref, bool force_pop_up=false)
 Try to pop up the filament map dialog before slicing.
 wxDEFINE_EVENT (wxEVT_INVALID_MANUAL_MAP, wxCommandEvent)
static bool printer_has_multi_nozzle_extruder ()
 wxDECLARE_EVENT (wxEVT_INVALID_MANUAL_MAP, wxCommandEvent)
template<typename... TArgs>
wxString format_wxstr (const char *fmt, TArgs &&... args)
template<typename... TArgs>
wxString format_wxstr (const std::string &fmt, TArgs &&... args)
template<typename... TArgs>
wxString format_wxstr (const wxString &fmt, TArgs &&... args)
template<typename... TArgs>
std::string format (const char *fmt, TArgs &&... args)
template<typename... TArgs>
std::string format (const std::string &fmt, TArgs &&... args)
template<typename... TArgs>
std::string format (const wxString &fmt, TArgs &&... args)
static void add_swatch (ImDrawList *draw_list, const ImVec2 &min, const ImVec2 &max, const ColorRGBA &color)
static std::string get_view_type_string (libvgcode::EViewType view_type)
static const std::vector< std::pair< std::string, libvgcode::EViewType > > & view_type_config_map ()
static int find_close_layer_idx (const std::vector< double > &zs, double &z, double eps)
static std::string format_compact_weight (double value_in_grams, bool imperial_units)
static std::string to_string (libvgcode::EMoveType type)
static std::string to_string (libvgcode::EGCodeExtrusionRole role)
static size_t utf8_offset (const std::string &str, size_t count)
static Transform3d compute_belt_back_transform (const PrintConfig &cfg)
void delete_negative_sign (Vec3d &value)
static ModelVolume * get_model_volume (const Selection &selection, Model &model)
 wxDECLARE_EVENT (wxEVT_THREAD_DONE, wxCommandEvent)
static GLModel::Geometry its_make_line (Vec3f beg_pos, Vec3f end_pos)
static void init_from_circle (GLModel &model, double radius)
 – #ysFIXME those functions bodies are ported from GizmoRotation
static void init_from_scale (GLModel &model, double radius)
static void init_from_snap_radii (GLModel &model, double radius)
static void init_from_angle_arc (GLModel &model, double angle, double radius)
static double get_grabber_mean_size (const BoundingBoxf3 &bb)
static double get_half_size (double size)
static double get_dragging_half_size (double size)
void update_object_cut_id (CutObjectBase &cut_id, ModelObjectCutAttributes attributes, const int dowels_count)
static void check_objects_after_cut (const ModelObjectPtrs &objects)
void synchronize_model_after_cut (Model &model, const CutObjectBase &cut_id)
static void add_row_to_table (std::function< void(void)> col_1=nullptr, std::function< void(void)> col_2=nullptr)
static void add_strings_row_to_table (ImGuiWrapper &imgui, const std::string &col_1, const ImVec4 &col_1_color, const std::string &col_2, const ImVec4 &col_2_color)
static void show_notification_extruders_limit_exceeded ()
static std::vector< int > get_extruder_id_for_volumes (const ModelObject &model_object)
static void render_extruders_combo (const std::string &label, const std::vector< std::string > &extruders, const std::vector< ColorRGBA > &extruders_colors, size_t &selection_idx)
Vec3d GetIntersectionOfRayAndPlane (Vec3d ray_position, Vec3d ray_dir, Vec3d plane_position, Vec3d plane_normal)
static int constraint_id (int grabber_id)
static void call_after_if_active (std::function< void()> fn, GUI_App *app=&wxGetApp())
static ModelVolume * get_model_volume (const Selection &selection, Model &model)
std::string get_name_from_gizmo_etype (GLGizmosManager::EType type)
static void append_paint_patch (GLModel::Geometry &out, const indexed_triangle_set &patch, const std::vector< Vec3f > *displaced)
static double tip_now ()
static void pan_camera (Camera &camera, const Vec2d &screen_delta, const Vec3d &anchor)
std::string & get_object_limited_text ()
std::string & get_object_clashed_text ()
std::string & get_nozzle_filament_incompatible_text ()
std::string & get_filament_mixture_warning_text ()
std::string & get_single_extruder_mixed_filament_warning_text ()
static std::string format_number (float value)
static GCodeProcessorResult::ObjectMass::Sum mass_sum (const MassProperties &solid)
static double marker_scale (const GLCanvas3D &canvas)
 wxDEFINE_EVENT (EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_OBJECT_SELECT, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_PLATE_NAME_CHANGE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_PLATE_SELECT, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_RIGHT_CLICK, RBtnEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_PLATE_RIGHT_CLICK, RBtnPlateEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_REMOVE_OBJECT, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_ARRANGE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_ARRANGE_PARTPLATE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_ORIENT, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_ORIENT_PARTPLATE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_SELECT_CURR_PLATE_ALL, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_SELECT_ALL, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_QUESTION_MARK, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_INCREASE_INSTANCES, Event< int >)
 wxDEFINE_EVENT (EVT_GLCANVAS_INSTANCE_MOVED, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_INSTANCE_ROTATED, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_INSTANCE_SCALED, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_FORCE_UPDATE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_ENABLE_ACTION_BUTTONS, Event< bool >)
 wxDEFINE_EVENT (EVT_GLCANVAS_UPDATE_GEOMETRY, Vec3dsEvent< 2 >)
 wxDEFINE_EVENT (EVT_GLCANVAS_MOUSE_DRAGGING_STARTED, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_MOUSE_DRAGGING_FINISHED, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_UPDATE_BED_SHAPE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_TAB, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_RESETGIZMOS, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_UNDO, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_REDO, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_SWITCH_TO_OBJECT, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_SWITCH_TO_GLOBAL, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_COLLAPSE_SIDEBAR, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_RELOAD_FROM_DISK, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_RENDER_TIMER, wxTimerEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_TOOLBAR_HIGHLIGHTER_TIMER, wxTimerEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_GIZMO_HIGHLIGHTER_TIMER, wxTimerEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_UPDATE, SimpleEvent)
 wxDEFINE_EVENT (EVT_CUSTOMEVT_TICKSCHANGED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_RESET_LAYER_HEIGHT_PROFILE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_ADAPTIVE_LAYER_HEIGHT_PROFILE, Event< float >)
 wxDEFINE_EVENT (EVT_GLCANVAS_SMOOTH_LAYER_HEIGHT_PROFILE, HeightProfileSmoothEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_PRINTABLE, SimpleEvent)
static bool construct_error_string (ObjectFilamentResults &object_result, std::string &error_string)
static std::pair< bool, bool > construct_extruder_unprintable_error (ObjectFilamentResults &object_result, std::string &left_extruder_unprintable_text, std::string &right_extruder_unprintable_text)
static float canvas_corner_height ()
static bool key_repeats (int key)
static void key_released (int key)
static bool string_getter (const bool is_undo, int idx, const char **out_text)
static bool search_string_getter (int idx, const char **label, const char **tooltip)
static void push_plate_toolbar_scrollbar_style (bool is_dark, float scrollbar_size)
static ImVec4 plate_toolbar_hover_color (bool is_dark)
static bool plate_toolbar_keeps_scrollbar (bool shown, float scrollbar_size)
const ModelVolume * get_model_volume (const GLVolume &v, const Model &model)
ModelVolume * get_model_volume (const ObjectID &volume_id, const ModelObjectPtrs &objects)
ModelVolume * get_model_volume (const GLVolume &v, const ModelObject &object)
ModelVolume * get_model_volume (const GLVolume &v, const ModelObjectPtrs &objects)
GLVolume * get_first_hovered_gl_volume (const GLCanvas3D &canvas)
GLVolume * get_selected_gl_volume (const GLCanvas3D &canvas)
ModelObject * get_model_object (const GLVolume &gl_volume, const Model &model)
ModelObject * get_model_object (const GLVolume &gl_volume, const ModelObjectPtrs &objects)
ModelInstance * get_model_instance (const GLVolume &gl_volume, const Model &model)
ModelInstance * get_model_instance (const GLVolume &gl_volume, const ModelObjectPtrs &objects)
ModelInstance * get_model_instance (const GLVolume &gl_volume, const ModelObject &object)
 wxDECLARE_EVENT (EVT_GLCANVAS_OBJECT_SELECT, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_PLATE_NAME_CHANGE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_PLATE_SELECT, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_RIGHT_CLICK, RBtnEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_PLATE_RIGHT_CLICK, RBtnPlateEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_REMOVE_OBJECT, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_ARRANGE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_ARRANGE_PARTPLATE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_ORIENT, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_ORIENT_PARTPLATE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_SELECT_CURR_PLATE_ALL, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_SELECT_ALL, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_QUESTION_MARK, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_INCREASE_INSTANCES, Event< int >)
 wxDECLARE_EVENT (EVT_GLCANVAS_INSTANCE_MOVED, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_FORCE_UPDATE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_INSTANCE_ROTATED, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_INSTANCE_SCALED, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_ENABLE_ACTION_BUTTONS, Event< bool >)
 wxDECLARE_EVENT (EVT_GLCANVAS_UPDATE_GEOMETRY, Vec3dsEvent< 2 >)
 wxDECLARE_EVENT (EVT_GLCANVAS_MOUSE_DRAGGING_STARTED, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_MOUSE_DRAGGING_FINISHED, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_UPDATE_BED_SHAPE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_TAB, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_RESETGIZMOS, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_UNDO, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_REDO, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_SWITCH_TO_OBJECT, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_SWITCH_TO_GLOBAL, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_COLLAPSE_SIDEBAR, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_RELOAD_FROM_DISK, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_RENDER_TIMER, wxTimerEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_TOOLBAR_HIGHLIGHTER_TIMER, wxTimerEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_GIZMO_HIGHLIGHTER_TIMER, wxTimerEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_UPDATE, SimpleEvent)
 wxDECLARE_EVENT (EVT_CUSTOMEVT_TICKSCHANGED, wxCommandEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_RESET_LAYER_HEIGHT_PROFILE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_ADAPTIVE_LAYER_HEIGHT_PROFILE, Event< float >)
 wxDECLARE_EVENT (EVT_GLCANVAS_SMOOTH_LAYER_HEIGHT_PROFILE, HeightProfileSmoothEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_PRINTABLE, SimpleEvent)
static GLenum get_primitive_mode (const GLModel::Geometry::Format &format)
static GLenum get_index_type (const GLModel::Geometry &data)
template<typename Fn>
bool all_vertices_inside (const GLModel::Geometry &geometry, Fn fn)
bool contains (const BuildVolume &volume, const GLModel &model, bool ignore_bottom)
GLModel::Geometry stilized_arrow (unsigned int resolution, float tip_radius, float tip_height, float stem_radius, float stem_height)
GLModel::Geometry circular_arrow (unsigned int resolution, float radius, float tip_height, float tip_width, float stem_width, float thickness)
GLModel::Geometry straight_arrow (float tip_width, float tip_height, float stem_width, float stem_height, float thickness)
GLModel::Geometry diamond (unsigned int resolution)
GLModel::Geometry smooth_sphere (unsigned int resolution, float radius)
GLModel::Geometry smooth_cylinder (unsigned int resolution, float radius, float height)
GLModel::Geometry smooth_torus (unsigned int primary_resolution, unsigned int secondary_resolution, float radius, float thickness)
GLModel::Geometry init_plane_data (const indexed_triangle_set &its, const std::vector< int > &triangle_indices, float normal_offset)
GLModel::Geometry init_torus_data (unsigned int primary_resolution, unsigned int secondary_resolution, const Vec3f &center, float radius, float thickness, const Vec3f &model_axis, const Transform3f &world_trafo)
static bool to_squared_power_of_two (const std::string &filename, int max_size_px, int &w, int &h)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_OPEN_PROJECT, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_SLICE_ALL, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_SLICE_PLATE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_PRINT_ALL, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_PRINT_PLATE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_EXPORT_GCODE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_SEND_GCODE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_UPLOAD_GCODE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_EXPORT_SLICED_FILE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_EXPORT_ALL_SLICED_FILE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_PRINT_SELECT, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_SEND_TO_PRINTER, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_SEND_TO_PRINTER_ALL, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_PRINT_MULTI_MACHINE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_ADD, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_DELETE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_DELETE_ALL, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_ADD_PLATE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_DEL_PLATE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_ORIENT, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_ARRANGE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_CUT, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_COPY, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_PASTE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_LAYERSEDITING, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_CLONE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_MORE, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_FEWER, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_SPLIT_OBJECTS, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_SPLIT_VOLUMES, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_FILLCOLOR, IntEvent)
 wxDEFINE_EVENT (EVT_GLTOOLBAR_SELECT_SLICED_PLATE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_GLVIEWTOOLBAR_3D, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLVIEWTOOLBAR_PREVIEW, SimpleEvent)
 wxDEFINE_EVENT (EVT_GLVIEWTOOLBAR_ASSEMBLE, SimpleEvent)
bool setup_collapse_toolbar (GLToolbar &toolbar, std::function< void()> toggle)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_OPEN_PROJECT, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_SLICE_ALL, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_SLICE_PLATE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_PRINT_ALL, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_PRINT_PLATE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_EXPORT_GCODE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_SEND_GCODE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_UPLOAD_GCODE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_EXPORT_SLICED_FILE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_EXPORT_ALL_SLICED_FILE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_PRINT_SELECT, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_SEND_TO_PRINTER, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_SEND_TO_PRINTER_ALL, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_PRINT_MULTI_MACHINE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_ADD, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_DELETE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_DELETE_ALL, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_ADD_PLATE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_DEL_PLATE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_ORIENT, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_ARRANGE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_CUT, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_COPY, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_PASTE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_LAYERSEDITING, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_CLONE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_MORE, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_FEWER, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_SPLIT_OBJECTS, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_SPLIT_VOLUMES, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_FILLCOLOR, IntEvent)
 wxDECLARE_EVENT (EVT_GLTOOLBAR_SELECT_SLICED_PLATE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_GLVIEWTOOLBAR_3D, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLVIEWTOOLBAR_PREVIEW, SimpleEvent)
 wxDECLARE_EVENT (EVT_GLVIEWTOOLBAR_ASSEMBLE, SimpleEvent)
 wxDEFINE_EVENT (wxEVT_GRADIENT_CURVE_CHANGED, wxCommandEvent)
 wxDECLARE_EVENT (wxEVT_GRADIENT_CURVE_CHANGED, wxCommandEvent)
void disable_screensaver ()
void enable_screensaver ()
bool debugged ()
void break_to_debugger ()
const std::string & shortkey_shift_prefix ()
const std::string & shortkey_ctrl_prefix ()
const std::string & shortkey_alt_prefix ()
void change_opt_value (DynamicPrintConfig &config, const t_config_option_key &opt_key, const boost::any &value, int opt_index)
void show_error (wxWindow *parent, const wxString &message, bool has_code_excerpts)
void show_error (wxWindow *parent, const char *message, bool has_code_excerpts)
void show_error_id (int id, const std::string &message)
void show_info (wxWindow *parent, const wxString &message, const wxString &title)
void show_info (wxWindow *parent, const char *message, const char *title)
void warning_catcher (wxWindow *parent, const wxString &message)
static wxString bold (const wxString &str)
static wxString bold_string (const wxString &str)
static void add_config_substitutions (const ConfigSubstitutions &conf_substitutions, wxString &changes)
static wxString substitution_message (const wxString &changes)
void show_substitutions_info (const PresetsConfigSubstitutions &presets_config_substitutions)
void show_substitutions_info (const ConfigSubstitutions &config_substitutions, const std::string &filename)
void create_combochecklist (wxComboCtrl *comboCtrl, const std::string &text, const std::string &items)
unsigned int combochecklist_get_flags (wxComboCtrl *comboCtrl)
void combochecklist_set_flags (wxComboCtrl *comboCtrl, unsigned int flags)
AppConfig * get_app_config ()
wxString from_u8 (const std::string &str)
std::string into_u8 (const wxString &str)
wxString from_path (const boost::filesystem::path &path)
boost::filesystem::path into_path (const wxString &str)
wxString file_url_from_path (const boost::filesystem::path &path)
void about ()
void desktop_open_datadir_folder ()
void desktop_open_any_folder (const std::string &path)
bool desktop_open_project_attachment (wxWindow *parent, const boost::filesystem::path &path)
void add_menus (wxMenuBar *menu, int event_preferences_changed, int event_language_change)
void show_error (wxWindow *parent, const std::string &message, bool has_code_excerpts=false)
void show_info (wxWindow *parent, const std::string &message, const std::string &title=std::string())
static std::shared_ptr< OrcaCloudServiceAgent > get_orca_cloud_agent (NetworkAgent *agent)
static wxString cloud_page_url (NetworkAgent *agent, const std::string &path)
void start_ping_test ()
wxString file_wildcards (FileType file_type, const std::string &custom_extension)
static std::string libslic3r_translate_callback (const char *s)
static void generic_exception_handle ()
 wxDEFINE_EVENT (EVT_ENTER_FORCE_UPGRADE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_SHOW_NO_NEW_VERSION, wxCommandEvent)
 wxDEFINE_EVENT (EVT_SHOW_DIALOG, wxCommandEvent)
 wxDEFINE_EVENT (EVT_CONNECT_LAN_MODE_PRINT, wxCommandEvent)
 wxDEFINE_EVENT (EVT_UPDATE_PRESET_BUNDLE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_UPDATE_BUNDLE_COMPLETE, wxCommandEvent)
static std::string decode (std::string const &extra, std::string const &path={})
static boost::optional< Semver > parse_semver_from_ini (std::string path)
std::string get_system_info ()
static void update_dark_children_ui (wxWindow *window, bool just_buttons_update=false)
void fatal_error (wxWindow *parent)
Semver get_version (const std::string &str, const std::regex &regexp)
bool is_soluble_filament (int extruder_id)
bool has_filaments (const std::vector< std::string > &model_filaments)
bool is_support_filament (int extruder_id, bool strict_check)
Vec3d build_plate_tilt_up_direction ()
static wxString dots ("...", wxConvUTF8)
 wxDECLARE_EVENT (EVT_CONNECT_LAN_MODE_PRINT, wxCommandEvent)
 wxDECLARE_EVENT (EVT_UPDATE_PRESET_BUNDLE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_UPDATE_BUNDLE_COMPLETE, wxCommandEvent)
static PrinterTechnology printer_technology ()
static int filaments_count ()
static bool is_improper_category (const std::string &category, const int filaments_cnt, const bool is_object_settings=true)
static Plater * plater ()
static ObjectList * obj_list ()
static ObjectDataViewModel * list_model ()
static const Selection & get_selection ()
static void get_full_settings_hierarchy (FullSettingsHierarchy &settings_menu, const bool is_part)
static wxMenu * create_settings_popupmenu (wxMenu *parent_menu, const bool is_object_settings, wxDataViewItem item)
static void create_freq_settings_popupmenu (wxMenu *menu, const bool is_object_settings, wxDataViewItem item)
static void add_volume_with_gizmo (GLGizmosManager::EType gizmo_type, ModelVolumeType type)
static void append_menu_itemm_add_ (const wxString &name, GLGizmosManager::EType gizmo_type, wxMenu *menu, ModelVolumeType type, bool is_submenu_item)
int GUI_Run (GUI_InitParams &params)
 wxDEFINE_EVENT (EVT_OBJ_LIST_OBJECT_SELECT, SimpleEvent)
 wxDEFINE_EVENT (EVT_PARTPLATE_LIST_PLATE_SELECT, IntEvent)
static PrinterTechnology printer_technology ()
static const Selection & scene_selection ()
static DynamicPrintConfig & printer_config ()
static int filaments_count ()
static void take_snapshot (const std::string &snapshot_name)
static std::string get_warning_icon_name (const TriangleMeshStats &stats)
static TriangleMesh create_mesh (const std::string &type_name, const BoundingBoxf3 &bb)
static bool can_add_volumes_to_object (const ModelObject *object)
static void update_selection (wxDataViewItemArray &sels, ObjectList::SELECTION_MODE mode, ObjectDataViewModel *model)
static double get_min_layer_height (const int extruder_idx)
static double get_max_layer_height (const int extruder_idx)
static bool precise_seam_group_changed (ModelVolumeType old_type, ModelVolumeType new_type)
static void move_volume_to_end (ModelObject *obj, ModelVolume *volume)
 wxDECLARE_EVENT (EVT_OBJ_LIST_OBJECT_SELECT, SimpleEvent)
 wxDECLARE_EVENT (EVT_PARTPLATE_LIST_PLATE_SELECT, IntEvent)
 wxBEGIN_EVENT_TABLE (ObjectGrid, wxGrid) wxEND_EVENT_TABLE() bool ObjectGrid
 wxIMPLEMENT_CLASS (ObjectTablePanel, wxPanel)
 wxBEGIN_EVENT_TABLE (ObjectTablePanel, wxPanel) wxEND_EVENT_TABLE() ObjectTablePanel
 wxDEFINE_EVENT (EVT_LOCK_DISABLE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_LOCK_ENABLE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_LOCK_DISABLE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_LOCK_ENABLE, wxCommandEvent)
static int find_close_layer_idx (const std::vector< double > &zs, double &z, double eps)
wxString format_nozzle_diameter (float diameter)
CopyFileResult copy_file_gui (const std::string &from, const std::string &to, std::string &error_message, const bool with_check)
wxTopLevelWindow * find_toplevel_parent (wxWindow *window)
void on_window_geometry (wxTopLevelWindow *tlw, std::function< void()> callback)
bool is_running_in_msix ()
void open_ms_store_product_page ()
int get_dpi_for_window (const wxWindow *window)
wxFont get_default_font_for_dpi (const wxWindow *window, int dpi)
bool check_dark_mode ()
void update_dark_config ()
std::ostream & operator<< (std::ostream &os, const WindowMetrics &metrics)
bool load_image (const std::string &filename, wxImage &image)
bool generate_image (const std::string &filename, wxImage &image, wxSize img_size, int method)
void fit_in_display (wxTopLevelWindow &window, wxSize desired_size)
 Make sure the given window fits inside current display.
int hex_to_int (const char c)
static ColorRGBA decode_color_to_float_array (const std::string color)
wxFont get_default_font (const wxWindow *window)
int hex_digit_to_int (const char c)
void dataview_remove_insets (wxDataViewCtrl *dv)
void staticbox_remove_margin (wxStaticBox *sb)
void set_window_corner_radius (wxWindow *win, int radius)
bool is_debugger_present ()
wxColour convert_to_wxColour (const RGBA &color)
RGBA convert_to_rgba (const wxColour &color)
float calc_color_distance (wxColour c1, wxColour c2)
float calc_color_distance (RGBA c1, RGBA c2)
static int get_utf8_seq_length (const char *seq, size_t size)
static int get_utf8_seq_length (const std::string &text, size_t pos)
int get_hms_info_version (std::string &version)
static void _copy_dir (const fs::path &from_dir, const fs::path &to_dir)
std::string get_hms_wiki_url (std::string error_code)
std::string get_error_message (int error_code)
 wxDEFINE_EVENT (EVT_ALREADY_READ_HMS, wxCommandEvent)
 wxDECLARE_EVENT (EVT_ALREADY_READ_HMS, wxCommandEvent)
std::string url_get_param (const std::string &url, const std::string &key)
wxString L_str (const std::string &str)
void draw (const IconManager::Icon &icon, const ImVec2 &size=ImVec2(0, 0), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1), const ImVec4 &border_col=ImVec4(0, 0, 0, 0))
 Draw imgui image with icon.
bool clickable (const IconManager::Icon &icon, const IconManager::Icon &icon_hover)
 Draw icon which change on hover.
bool button (const IconManager::Icon &activ, const IconManager::Icon &hover, const IconManager::Icon &disable, bool disabled=false)
 Use icon as button with 3 states activ hover and disabled.
static wxPanel * framed_input (wxWindow *parent)
static wxStaticText * page_label (wxStaticText *lbl)
bool get_data_from_svg (const std::string &filename, unsigned int max_size_px, ThumbnailData &thumbnail_data)
bool slider_behavior (ImGuiID id, const ImRect &region, const ImS32 v_min, const ImS32 v_max, ImS32 *out_value, ImRect *out_handle, ImGuiSliderFlags flags, const int fixed_value, const ImVec4 &fixed_rect)
bool button_with_pos (ImTextureID user_texture_id, const ImVec2 &size, const ImVec2 &pos, const ImVec2 &uv0, const ImVec2 &uv1, int frame_padding, const ImVec4 &bg_col, const ImVec4 &tint_col, const ImVec2 &margin)
static bool image_button_ex (ImGuiID id, ImTextureID texture_id, const ImVec2 &size, const ImVec2 &uv0, const ImVec2 &uv1, const ImVec2 &padding, const ImVec4 &bg_col, const ImVec4 &tint_col, ImGuiButtonFlags flags)
static void scroll_up ()
static void scroll_down ()
static void process_mouse_wheel (int &mouse_wheel)
static bool selectable (const char *label, bool selected, ImGuiSelectableFlags flags=0, const ImVec2 &size_arg=ImVec2(0, 0), bool *out_hovered=nullptr)
bool begin_menu (const char *label, bool enabled)
void end_menu ()
bool menu_item_with_icon (const char *label, const char *shortcut, ImVec2 icon_size, ImU32 icon_color, bool selected, bool enabled, bool *hovered)
static void scroll_y (int hover_id)
static void process_key_down (ImGuiKey imgui_key, std::function< void()> f)
static bool drawn_last_frame (const ImGuiWindow *popup)
template<typename T, typename Func>
static bool input_optional (std::optional< T > &v, Func &f, std::function< bool(const T &)> is_default, const T &def_val)
double min_delta_area ()
double miscalculation ()
bool equivalent_areas (const double &bottom_area, const double &top_area)
bool check_color_change (PrintObject *object, size_t frst_layer_id, size_t layers_cnt, bool check_overhangs, std::function< bool(Layer *)> break_condition)
static std::string gcode (Type type)
static std::string short_and_splitted_time (const std::string &time)
constexpr double epsilon ()
 wxDEFINE_EVENT (EVT_LOAD_MODEL_OTHER_INSTANCE, LoadFromOtherInstanceEvent)
 wxDEFINE_EVENT (EVT_START_DOWNLOAD_OTHER_INSTANCE, StartDownloadOtherInstanceEvent)
 wxDEFINE_EVENT (EVT_INSTANCE_GO_TO_FRONT, InstanceGoToFrontEvent)
 wxDECLARE_EVENT (EVT_LOAD_MODEL_OTHER_INSTANCE, LoadFromOtherInstanceEvent)
 wxDECLARE_EVENT (EVT_START_DOWNLOAD_OTHER_INSTANCE, StartDownloadOtherInstanceEvent)
 wxDECLARE_EVENT (EVT_INSTANCE_GO_TO_FRONT, InstanceGoToFrontEvent)
void set_arrange_polygon_bed_exclusion_extruders (ArrangePolygon &polygon, const ModelObject &object, const PartPlate &plate, const DynamicPrintConfig &config)
static void set_arrange_polygon_bed_exclusion_extruders_for_all_plates (ArrangePolygon &polygon, const ModelObject &object, PartPlateList &plate_list, const DynamicPrintConfig &config)
static bool is_belt_purge_prism (const ModelObject *mo)
static WipeTower get_wipe_tower (const Plater &plater, int plate_idx)
arrangement::ArrangePolygon get_wipetower_arrange_poly (WipeTower *tower)
arrangement::ArrangePolygon estimate_wipe_tower_info (int plate_index, std::set< int > &extruder_ids)
static std::string concat_strings (const std::set< std::string > &strings, const std::string &delim="\n")
std::optional< arrangement::ArrangePolygon > get_wipe_tower_arrangepoly (const Plater &plater)
double bed_stride_x (const Plater *plater)
double bed_stride_y (const Plater *plater)
arrangement::ArrangeParams init_arrange_params (Plater *p)
 wxDEFINE_EVENT (EVT_BIND_UPDATE_MESSAGE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_BIND_MACHINE_SUCCESS, wxCommandEvent)
 wxDEFINE_EVENT (EVT_BIND_MACHINE_FAIL, wxCommandEvent)
 wxDECLARE_EVENT (EVT_BIND_UPDATE_MESSAGE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_BIND_MACHINE_SUCCESS, wxCommandEvent)
 wxDECLARE_EVENT (EVT_BIND_MACHINE_FAIL, wxCommandEvent)
 wxDEFINE_EVENT (EVT_OAUTH_COMPLETE_MESSAGE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_OAUTH_COMPLETE_MESSAGE, wxCommandEvent)
static void setMinimalSupportAreaPrams (Slic3r::orientation::OrientParams &out)
 parameters to minimize support area
std::string get_transform_string (int bytes)
TextureDisplacementBakeVolume texture_displacement_bake_volume (const ModelVolume &volume, const std::vector< TextureDisplacementLayer > &layers, const TextureDisplacementOptions &options, const Vec3d &texture_anchor, float resting_drop)
void queue_texture_displacement_bake (std::vector< TextureDisplacementBakeVolume > volumes, const TextureColorSettings &color, std::function< void()> on_finished, bool take_snapshot)
void queue_texture_displacement_debug (const ModelVolume &volume, const TextureColorSettings &color, const TextureDisplacementPrepareParams &prepare_params, const Transform3d &prepare_texture_frame, float resting_drop, bool run_prepare, bool check_topology, std::function< void(std::vector< BakeStageSnapshot >)> on_finished)
void queue_texture_displacement_prepare (TextureDisplacementPrepareInput &&input, std::function< void(TextureDisplacementPrepareOutcome)> on_finished)
 wxDEFINE_EVENT (EVT_UPGRADE_UPDATE_MESSAGE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_UPGRADE_NETWORK_SUCCESS, wxCommandEvent)
 wxDEFINE_EVENT (EVT_DOWNLOAD_NETWORK_FAILED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_INSTALL_NETWORK_FAILED, wxCommandEvent)
 wxDECLARE_EVENT (EVT_UPGRADE_UPDATE_MESSAGE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_UPGRADE_NETWORK_SUCCESS, wxCommandEvent)
 wxDECLARE_EVENT (EVT_DOWNLOAD_NETWORK_FAILED, wxCommandEvent)
 wxDECLARE_EVENT (EVT_INSTALL_NETWORK_FAILED, wxCommandEvent)
template<class ProcessFn, class FinishFn, class = std::enable_if_t<IsProcessFn<ProcessFn>>, class = std::enable_if_t<IsFinishFn<FinishFn>>>
bool queue_job (Worker &w, ProcessFn fn, FinishFn finishfn)
template<class ProcessFn, class = std::enable_if_t<IsProcessFn<ProcessFn>>>
bool queue_job (Worker &w, ProcessFn fn)
bool queue_job (Worker &w, std::shared_ptr< Job > j)
template<class... Args>
bool replace_job (Worker &w, Args &&...args)
bool stop_current_job (Worker &w, unsigned timeout_ms=0)
bool stop_queue (Worker &w, unsigned timeout_ms=0)
void apply_dark_ui_to_lazy_panel (wxWindow *panel)
void mac_ime_set_active (void *ns_view, bool active)
void mac_ime_set_caret (void *ns_view, int x, int y, int height)
bool mac_ime_owns_key (void *ns_view)
 wxDEFINE_EVENT (EVT_SELECT_TAB, wxCommandEvent)
 wxDEFINE_EVENT (EVT_HTTP_ERROR, wxCommandEvent)
 wxDEFINE_EVENT (EVT_USER_LOGIN, wxCommandEvent)
 wxDEFINE_EVENT (EVT_USER_LOGIN_HANDLE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_CHECK_PRIVACY_VER, wxCommandEvent)
 wxDEFINE_EVENT (EVT_CHECK_PRIVACY_SHOW, wxCommandEvent)
 wxDEFINE_EVENT (EVT_SHOW_IP_DIALOG, wxCommandEvent)
 wxDEFINE_EVENT (EVT_UPDATE_MACHINE_LIST, wxCommandEvent)
 wxDEFINE_EVENT (EVT_UPDATE_PRESET_CB, SimpleEvent)
 wxDEFINE_EVENT (EVT_BACKUP_POST, wxCommandEvent)
 wxDEFINE_EVENT (EVT_LOAD_URL, wxCommandEvent)
 wxDEFINE_EVENT (EVT_LOAD_PRINTER_URL, LoadPrinterViewEvent)
static wxIcon main_frame_icon (GUI_App::EAppMode app_mode)
 wxDEFINE_EVENT (EVT_SYNC_CLOUD_PRESET, SimpleEvent)
static void add_common_publish_menu_items (wxMenu *publish_menu, MainFrame *mainFrame)
 wxDECLARE_EVENT (EVT_HTTP_ERROR, wxCommandEvent)
 wxDECLARE_EVENT (EVT_USER_LOGIN, wxCommandEvent)
 wxDECLARE_EVENT (EVT_USER_LOGIN_HANDLE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_CHECK_PRIVACY_VER, wxCommandEvent)
 wxDECLARE_EVENT (EVT_CHECK_PRIVACY_SHOW, wxCommandEvent)
 wxDECLARE_EVENT (EVT_SHOW_IP_DIALOG, wxCommandEvent)
 wxDECLARE_EVENT (EVT_UPDATE_MACHINE_LIST, wxCommandEvent)
 wxDECLARE_EVENT (EVT_UPDATE_PRESET_CB, SimpleEvent)
static std::string url_encode (const std::string &value)
wxString hide_passwd (wxString url, std::vector< wxString > const &passwords)
void refresh_agora_url (char const *device, char const *dev_ver, char const *channel, void *context, void(*callback)(void *context, char const *url))
wxString hide_id_middle_string (wxString const &str, size_t offset=0, size_t length=-1)
static const wxColour COLOR_LABEL_MUTED ("#6B6A6A")
static wxColour blend_colors (const wxColour &a, const wxColour &b, double ratio_a)
static wxBitmap make_alpha_bitmap (int w, int h, const std::function< void(wxDC &dc)> &draw_fn)
static double convert_input (int coord_byte_low, int coord_byte_high, double deadzone)
static bool is_caret_line (const std::string &line)
static std::vector< std::pair< std::string, bool > > classify_code_lines (const std::string &msg)
static std::string format_parser_error_html (const std::string &msg)
static wxSize measure_mixed_text (wxWindow *parent, const std::string &msg, const wxFont &prose_font, const wxFont &code_font)
static void add_msg_content (wxWindow *parent, wxBoxSizer *content_sizer, wxString msg, bool has_code_excerpts=false, bool is_marked_msg=false, const wxString &link_text="", std::function< void(const wxString &)> link_callback=nullptr)
wxString get_wraped_wxString (const wxString &in, size_t line_len)
 WX_DECLARE_HASH_MAP (wxString, MsgButton *, wxStringHash, wxStringEqual, MsgButtonsHash)
 wxDEFINE_EVENT (EVT_MULTI_CLOUD_TASK_SELECTED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_MULTI_LOCAL_TASK_SELECTED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_MULTI_DEVICE_SELECTED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_MULTI_DEVICE_SELECTED_FINHSH, wxCommandEvent)
 wxDEFINE_EVENT (EVT_MULTI_DEVICE_VIEW, wxCommandEvent)
 wxDEFINE_EVENT (EVT_MULTI_REFRESH, wxCommandEvent)
std::vector< DeviceItem * > selected_machines (const std::vector< DeviceItem * > &dev_item_list, std::string search_text)
 wxDECLARE_EVENT (EVT_MULTI_DEVICE_SELECTED, wxCommandEvent)
 wxDECLARE_EVENT (EVT_MULTI_DEVICE_SELECTED_FINHSH, wxCommandEvent)
 wxDECLARE_EVENT (EVT_MULTI_DEVICE_VIEW, wxCommandEvent)
 wxDECLARE_EVENT (EVT_MULTI_CLOUD_TASK_SELECTED, wxCommandEvent)
 wxDECLARE_EVENT (EVT_MULTI_LOCAL_TASK_SELECTED, wxCommandEvent)
 wxDECLARE_EVENT (EVT_MULTI_REFRESH, wxCommandEvent)
wxString network_version_label (const NetworkLibraryVersionInfo &ver)
 wxDECLARE_EVENT (EVT_UPDATE_RESULT, wxCommandEvent)
 wxDEFINE_EVENT (EVT_UPDATE_RESULT, wxCommandEvent)
 wxDEFINE_EVENT (EVT_EJECT_DRIVE_NOTIFICAION_CLICKED, EjectDriveNotificationClickedEvent)
 wxDEFINE_EVENT (EVT_EXPORT_GCODE_NOTIFICAION_CLICKED, ExportGcodeNotificationClickedEvent)
 wxDEFINE_EVENT (EVT_PRESET_UPDATE_AVAILABLE_CLICKED, PresetUpdateAvailableClickedEvent)
 wxDEFINE_EVENT (EVT_PRINTER_CONFIG_UPDATE_AVAILABLE_CLICKED, PrinterConfigUpdateAvailableClickedEvent)
 wxDECLARE_EVENT (EVT_EJECT_DRIVE_NOTIFICAION_CLICKED, EjectDriveNotificationClickedEvent)
 wxDECLARE_EVENT (EVT_EXPORT_GCODE_NOTIFICAION_CLICKED, ExportGcodeNotificationClickedEvent)
 wxDECLARE_EVENT (EVT_PRESET_UPDATE_AVAILABLE_CLICKED, PresetUpdateAvailableClickedEvent)
 wxDECLARE_EVENT (EVT_PRINTER_CONFIG_UPDATE_AVAILABLE_CLICKED, PrinterConfigUpdateAvailableClickedEvent)
 wxDEFINE_EVENT (wxCUSTOMEVT_LAST_VOLUME_IS_DELETED, wxCommandEvent)
static int get_root_idx (ObjectDataViewModelNode *parent_node, const ItemType root_type)
static bool append_root_node (ObjectDataViewModelNode *parent_node, ObjectDataViewModelNode **root_node, const ItemType root_type)
 WX_DEFINE_ARRAY_PTR (ObjectDataViewModelNode *, MyObjectTreeModelNodePtrArray)
 wxDECLARE_EVENT (wxCUSTOMEVT_LAST_VOLUME_IS_DELETED, wxCommandEvent)
static bool is_point_in_rect (const wxPoint &pt, const wxRect &rect)
static wxSize get_bitmap_size (const wxBitmap &bmp)
static void draw_title (wxDC &dc, wxPoint pos, const wxString &text, const wxColour *color, int width)
std::string gl_get_string_safe (GLenum param, const std::string &default_value)
static bool version_greater_or_equal_to (const std::string &version, unsigned int major, unsigned int minor)
std::string option_id_in_map (const t_opt_map &options, const t_config_option_key &opt_key, int &opt_index)
 wxDECLARE_EVENT (EVT_MODIFY_FILAMENT, SimpleEvent)
void get_text_extent (const wxString &msg, wxCoord &w, wxCoord &h, wxFont *font)
wxFont * find_font (const std::string &text_str, int max_size=32)
static bool init_model_from_lines (GLModel &model, const Lines &lines, float z)
static void register_model_for_picking (GLCanvas3D &canvas, PickingModel &model, int id)
static bool init_model_from_lines (GLModel &model, const Lines3 &lines)
static ExPolygon expolygon_from_polygon (const Polygon &polygon)
static void append_expolygon_triangles (GLModel::Geometry &init_data, const ExPolygon &expolygon, float z)
static bool init_model_from_polygons (GLModel &model, const Polygons &polygons, float z)
static bool init_model_from_expolygons (GLModel &model, const ExPolygons &expolygons, float z)
static bool init_exclusion_volume_prism_model (GLModel &model, const std::vector< ExclusionVolumePrismPreview > &prisms)
static void init_raycaster_from_model (PickingModel &model)
static GLint logo_texture_size ()
static bool load_next_part_texture (PartPlateList::BedTextureInfo *infos, size_t count, size_t &next, bool compress_and_filter)
static bool has_importable_texture (const Slic3r::TexturedMesh &textured_mesh)
 wxDEFINE_EVENT (EVT_SCHEDULE_BACKGROUND_PROCESS, SimpleEvent)
 wxDEFINE_EVENT (EVT_SLICING_UPDATE, SlicingStatusEvent)
 wxDEFINE_EVENT (EVT_SLICING_COMPLETED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_PROCESS_COMPLETED, SlicingProcessCompletedEvent)
 wxDEFINE_EVENT (EVT_EXPORT_BEGAN, wxCommandEvent)
 wxDEFINE_EVENT (EVT_EXPORT_FINISHED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_IMPORT_MODEL_ID, wxCommandEvent)
 wxDEFINE_EVENT (EVT_DOWNLOAD_PROJECT, wxCommandEvent)
 wxDEFINE_EVENT (EVT_OPEN_PLATESETTINGSDIALOG, wxCommandEvent)
 wxDEFINE_EVENT (EVT_OPEN_FILAMENT_MAP_SETTINGS_DIALOG, wxCommandEvent)
 wxDEFINE_EVENT (EVT_RESTORE_PROJECT, wxCommandEvent)
 wxDEFINE_EVENT (EVT_PRINT_FINISHED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_SEND_CALIBRATION_FINISHED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_SEND_FINISHED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_REPAIR_MODEL, wxCommandEvent)
 wxDEFINE_EVENT (EVT_FILAMENT_COLOR_CHANGED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_INSTALL_PLUGIN_NETWORKING, wxCommandEvent)
 wxDEFINE_EVENT (EVT_UPDATE_PLUGINS_WHEN_LAUNCH, wxCommandEvent)
 wxDEFINE_EVENT (EVT_INSTALL_PLUGIN_HINT, wxCommandEvent)
 wxDEFINE_EVENT (EVT_PREVIEW_ONLY_MODE_HINT, wxCommandEvent)
 wxDEFINE_EVENT (EVT_GLCANVAS_COLOR_MODE_CHANGED, SimpleEvent)
 wxDEFINE_EVENT (EVT_PRINT_FROM_SDCARD_VIEW, SimpleEvent)
 wxDEFINE_EVENT (EVT_CREATE_FILAMENT, SimpleEvent)
 wxDEFINE_EVENT (EVT_MODIFY_FILAMENT, SimpleEvent)
 wxDEFINE_EVENT (EVT_ADD_FILAMENT, SimpleEvent)
 wxDEFINE_EVENT (EVT_DEL_FILAMENT, SimpleEvent)
 wxDEFINE_EVENT (EVT_ADD_CUSTOM_FILAMENT, ColorEvent)
 wxDEFINE_EVENT (EVT_NOTICE_CHILDE_SIZE_CHANGED, SimpleEvent)
 wxDEFINE_EVENT (EVT_NOTICE_FULL_SCREEN_CHANGED, IntEvent)
static std::string get_diameter_string (float diameter)
template<typename T, typename OptionType>
static void set_config_values (DynamicPrintConfig *config, const std::string &key, T value)
static void zero_pressure_advance_where_disabled (DynamicPrintConfig *filament_config)
static wxColour extruder_group_chip_bg ()
static void use_nozzle_row_font (ComboBox *combo)
std::vector< int > get_min_flush_volumes (const DynamicPrintConfig &full_config, size_t nozzle_id)
static bool has_junction_deviation (const DynamicPrintConfig *printer_config)
static bool is_skip_high_flow_printer (const std::string &printer)
static std::string serialize_nozzle_config (const std::map< int, std::vector< DevNozzle > > &nozzle_cfg_map)
static std::map< int, std::vector< DevNozzle > > deserialize_nozzle_config (const std::string &config_str)
static bool is_same_nozzle_config (const std::map< int, std::vector< DevNozzle > > &config1, const std::map< int, std::vector< DevNozzle > > &config2)
static std::string serialize_nozzle_option (const NozzleOption &option)
static std::optional< NozzleOption > deserialize_nozzle_option (const std::string &option_str)
static std::string 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 serialize_mixed_gradient_curve_if_custom (const MixedFilamentResult &result)
static bool create_mixed_filament_from_result (Sidebar *sidebar, const MixedFilamentResult &result, const std::vector< std::string > &color_strs)
template<typename T>
void setup_dialog_position (T &info)
static std::vector< Search::InputInfo > get_search_inputs (ConfigOptionMode mode)
void read_binary_stl (const std::string &filename, std::string &model_id, std::string &code)
static void log_substitutions (const ConfigSubstitutions &substitutions, const std::string &source)
static void log_substitutions (const PresetsConfigSubstitutions &substitutions, const std::string &source)
static void sync_loaded_project_filament_config (DynamicConfig &proj_cfg)
static std::vector< BoundingBoxf3 > free_print_volumes (const BoundingBoxf3 &bed, const std::vector< BoundingBoxf3 > &excludes)
static std::vector< wxString > collect_imex_warnings (PartPlate *plate)
static void get_position (wxWindowBase *child, wxWindowBase *until_parent, int &x, int &y)
LoadType determine_load_type (std::string filename, std::string override_setting="")
static bool belt_calib_rotation_params (double &angle_rad, Vec3d &axis)
static void belt_calib_flip_ringing_tower (Model &model)
void adjust_settings_for_flowrate_calib (ModelObjectPtrs &objects, bool linear, int pass, InfillPattern pattern)
static std::string belt_temp_tower_asset (const Calib_Params &params)
static long GetNumberFromUser (const wxString &msg, const wxString &prompt, const wxString &title, long value, long min, long max, wxWindow *parent)
Preset * get_printer_preset (const MachineObject *obj)
wxString get_view_type_string (Camera::ViewAngleType type)
wxArrayString get_all_camera_view_type ()
 wxDECLARE_EVENT (EVT_SLICING_UPDATE, Slic3r::SlicingStatusEvent)
 wxDECLARE_EVENT (EVT_OPEN_PLATESETTINGSDIALOG, wxCommandEvent)
 wxDECLARE_EVENT (EVT_OPEN_FILAMENT_MAP_SETTINGS_DIALOG, wxCommandEvent)
 wxDECLARE_EVENT (EVT_REPAIR_MODEL, wxCommandEvent)
 wxDECLARE_EVENT (EVT_FILAMENT_COLOR_CHANGED, wxCommandEvent)
 wxDECLARE_EVENT (EVT_INSTALL_PLUGIN_NETWORKING, wxCommandEvent)
 wxDECLARE_EVENT (EVT_INSTALL_PLUGIN_HINT, wxCommandEvent)
 wxDECLARE_EVENT (EVT_UPDATE_PLUGINS_WHEN_LAUNCH, wxCommandEvent)
 wxDECLARE_EVENT (EVT_PREVIEW_ONLY_MODE_HINT, wxCommandEvent)
 wxDECLARE_EVENT (EVT_GLCANVAS_COLOR_MODE_CHANGED, SimpleEvent)
 wxDECLARE_EVENT (EVT_PRINT_FROM_SDCARD_VIEW, SimpleEvent)
 wxDECLARE_EVENT (EVT_CREATE_FILAMENT, SimpleEvent)
 wxDECLARE_EVENT (EVT_ADD_FILAMENT, SimpleEvent)
 wxDECLARE_EVENT (EVT_DEL_FILAMENT, SimpleEvent)
 wxDECLARE_EVENT (EVT_NOTICE_CHILDE_SIZE_CHANGED, SimpleEvent)
 wxDECLARE_EVENT (EVT_NOTICE_FULL_SCREEN_CHANGED, IntEvent)
 wxDECLARE_EVENT (EVT_ADD_CUSTOM_FILAMENT, ColorEvent)
 wxDEFINE_EVENT (EVT_SET_BED_TYPE_CONFIRM, wxCommandEvent)
 wxDEFINE_EVENT (EVT_NEED_RESORT_LAYERS, wxCommandEvent)
 wxDECLARE_EVENT (EVT_SET_BED_TYPE_CONFIRM, wxCommandEvent)
 wxDECLARE_EVENT (EVT_NEED_RESORT_LAYERS, wxCommandEvent)
void refresh_plugin_metadata_blocking (bool fetch_cloud)
void open_plugin_hub ()
bool install_local_plugin_package (const boost::filesystem::path &package_file, wxWindow *parent, wxString &message)
std::string to_string (PluginSortKey sort_key)
std::string to_string (PluginSortOrder sort_order)
PluginSortKey plugin_sort_key_from_string (const std::string &sort_key, PluginSortKey fallback)
PluginSortOrder plugin_sort_order_from_string (const std::string &sort_order, PluginSortOrder fallback)
int compare_ascii_case_insensitive_natural (const std::string &lhs, const std::string &rhs)
template<class PluginItem>
int compare_plugin_base_order (const PluginItem &lhs, const PluginItem &rhs)
int compare_plugin_version (const std::string &lhs, const std::string &rhs)
template<class PluginItem>
int compare_plugin_sort_key (const PluginItem &lhs, const PluginItem &rhs, PluginSortKey sort_key)
template<class PluginItem>
void sort_plugin_items_for_dialog (std::vector< PluginItem > &items, PluginSortKey sort_key, PluginSortOrder sort_order)
std::string to_string (PluginSource source)
std::string to_string (PluginStatus status)
PluginStatus resolve_plugin_status (bool loading, bool has_error, bool is_loaded)
static wxColour _GetLabelColour (const prePrintInfo &info)
static FilamentColorPickerValue filament_color_picker_value (const DynamicPrintConfig &config, std::size_t index)
static void run_wizard (ConfigWizard::StartPage sp)
static void add_page_strings (wxWebView *webView)
static PrintHostType active_host_type ()
std::unique_ptr< PrinterWebViewHandler > create_printer_webview_handler (PrinterWebView &owner)
 wxDEFINE_EVENT (EVT_PRINTHOST_PROGRESS, PrintHostQueueDialog::Event)
 wxDEFINE_EVENT (EVT_PRINTHOST_ERROR, PrintHostQueueDialog::Event)
 wxDEFINE_EVENT (EVT_PRINTHOST_CANCEL, PrintHostQueueDialog::Event)
 wxDEFINE_EVENT (EVT_PRINTHOST_INFO, PrintHostQueueDialog::Event)
 wxDECLARE_EVENT (EVT_PRINTHOST_PROGRESS, PrintHostQueueDialog::Event)
 wxDECLARE_EVENT (EVT_PRINTHOST_ERROR, PrintHostQueueDialog::Event)
 wxDECLARE_EVENT (EVT_PRINTHOST_CANCEL, PrintHostQueueDialog::Event)
 wxDECLARE_EVENT (EVT_PRINTHOST_INFO, PrintHostQueueDialog::Event)
 wxDEFINE_EVENT (EVT_PRIVACY_UPDATE_CONFIRM, wxCommandEvent)
 wxDEFINE_EVENT (EVT_PRIVACY_UPDATE_CANCEL, wxCommandEvent)
static std::string url_encode (const std::string &value)
 wxDECLARE_EVENT (EVT_PRIVACY_UPDATE_CONFIRM, wxCommandEvent)
 wxDECLARE_EVENT (EVT_PRIVACY_UPDATE_CANCEL, wxCommandEvent)
 wxDEFINE_EVENT (EVT_PROJECT_RELOAD, wxCommandEvent)
static json project_page_strings ()
static std::string convert_newlines_to_br (const std::string &text)
 wxDECLARE_EVENT (EVT_PROJECT_RELOAD, wxCommandEvent)
 wxDEFINE_EVENT (EVT_SECONDARY_CHECK_CONFIRM, wxCommandEvent)
 wxDEFINE_EVENT (EVT_SECONDARY_CHECK_CANCEL, wxCommandEvent)
 wxDEFINE_EVENT (EVT_SECONDARY_CHECK_DONE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_SECONDARY_CHECK_RESUME, wxCommandEvent)
 wxDEFINE_EVENT (EVT_CHECKBOX_CHANGE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_ENTER_IP_ADDRESS, wxCommandEvent)
 wxDEFINE_EVENT (EVT_CLOSE_IPADDRESS_DLG, wxCommandEvent)
 wxDEFINE_EVENT (EVT_CHECK_IP_ADDRESS_FAILED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_CHECK_IP_ADDRESS_LAYOUT, wxCommandEvent)
 wxDEFINE_EVENT (EVT_SECONDARY_CHECK_RETRY, wxCommandEvent)
 wxDEFINE_EVENT (EVT_UPDATE_NOZZLE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_UPDATE_TEXT_MSG, wxCommandEvent)
 wxDEFINE_EVENT (EVT_ERROR_DIALOG_BTN_CLICKED, wxCommandEvent)
static std::string url_encode (const std::string &value)
static void nop_deleter (InputIpAddressDialog *)
 wxDECLARE_EVENT (EVT_SECONDARY_CHECK_CONFIRM, wxCommandEvent)
 wxDECLARE_EVENT (EVT_SECONDARY_CHECK_CANCEL, wxCommandEvent)
 wxDECLARE_EVENT (EVT_SECONDARY_CHECK_RETRY, wxCommandEvent)
 wxDECLARE_EVENT (EVT_SECONDARY_CHECK_DONE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_SECONDARY_CHECK_RESUME, wxCommandEvent)
 wxDECLARE_EVENT (EVT_UPDATE_NOZZLE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_UPDATE_TEXT_MSG, wxCommandEvent)
 wxDECLARE_EVENT (EVT_ERROR_DIALOG_BTN_CLICKED, wxCommandEvent)
 wxDECLARE_EVENT (EVT_CLOSE_IPADDRESS_DLG, wxCommandEvent)
 wxDECLARE_EVENT (EVT_CHECKBOX_CHANGE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_ENTER_IP_ADDRESS, wxCommandEvent)
 wxDECLARE_EVENT (EVT_CHECK_IP_ADDRESS_FAILED, wxCommandEvent)
 wxDECLARE_EVENT (EVT_CHECK_IP_ADDRESS_LAYOUT, wxCommandEvent)
 wxDEFINE_EVENT (EVT_REMOVABLE_DRIVE_EJECTED, RemovableDriveEjectEvent)
 wxDEFINE_EVENT (EVT_REMOVABLE_DRIVES_CHANGED, RemovableDrivesChangedEvent)
bool operator< (const DriveData &lhs, const DriveData &rhs)
bool operator> (const DriveData &lhs, const DriveData &rhs)
bool operator== (const DriveData &lhs, const DriveData &rhs)
 wxDECLARE_EVENT (EVT_REMOVABLE_DRIVE_EJECTED, RemovableDriveEjectEvent)
 wxDECLARE_EVENT (EVT_REMOVABLE_DRIVES_CHANGED, RemovableDrivesChangedEvent)
FrameTimeStats frame_time_stats (std::vector< double > frame_ms)
void run_scene_benchmark ()
static ColorRGBA get_color (Axis axis)
static bool is_left_handed (const Transform3d::ConstLinearPart &m)
static bool is_left_handed (const Transform3d &m)
static bool is_rotation_xy_synchronized (const Transform3d &rot_xyz_from, const Transform3d &rot_xyz_to)
static void verify_instances_rotation_synchronized (const Model &model, const GLVolumePtrs &volumes)
ModelVolume * get_selected_volume (const Selection &selection)
const GLVolume * get_selected_gl_volume (const Selection &selection)
ModelVolume * get_selected_volume (const ObjectID &volume_id, const Selection &selection)
ModelVolume * get_volume (const ObjectID &volume_id, const Selection &selection)
 wxDEFINE_EVENT (EVT_SWITCH_PRINT_OPTION, wxCommandEvent)
 wxDEFINE_EVENT (EVT_UPDATE_USER_MACHINE_LIST, wxCommandEvent)
 wxDEFINE_EVENT (EVT_PRINT_JOB_CANCEL, wxCommandEvent)
 wxDEFINE_EVENT (EVT_CLEAR_IPADDRESS, wxCommandEvent)
std::string get_nozzle_volume_type_cloud_string (NozzleVolumeType nozzle_volume_type)
void print_ams_mapping_result (std::vector< FilamentInfo > &result)
static std::unordered_set< int > _get_used_nozzle_idxes ()
static bool _is_rack_managed_nozzle (const MachineObject *obj, int nozzle_idx)
static bool _HasExt (const std::vector< FilamentInfo > &ams_mapping_result)
static bool _HasAms (const std::vector< FilamentInfo > &ams_mapping_result)
static bool _compare_obj_names (MachineObject *obj1, MachineObject *obj2)
static void _collect_sorted_machines (Slic3r::DeviceManager *dev_manager, std::vector< MachineObject * > &sorted_machine_objs)
static wxString _check_kval_not_default (const MachineObject *obj, const std::vector< FilamentInfo > &mapping_result)
static wxString _get_nozzle_name (int total_ext_count, int ext_id)
static std::unordered_multimap< int, NozzleDef > s_get_slicing_extuder_nozzles ()
static wxString _get_ext_loc_str (const std::unordered_set< int > &extruders, int total_ext_num)
static wxString _get_tips (MachineObject *obj_)
static int get_brightness_value (wxImage image)
 wxDECLARE_EVENT (EVT_SWITCH_PRINT_OPTION, wxCommandEvent)
 wxDEFINE_EVENT (EVT_UPDATE_WINDOWS_POSITION, wxCommandEvent)
 wxDEFINE_EVENT (EVT_FINISHED_UPDATE_MACHINE_LIST, wxCommandEvent)
 wxDEFINE_EVENT (EVT_BIND_MACHINE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_UNBIND_MACHINE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_DISSMISS_MACHINE_LIST, wxCommandEvent)
 wxDEFINE_EVENT (EVT_CONNECT_LAN_PRINT, wxCommandEvent)
 wxDEFINE_EVENT (EVT_EDIT_PRINT_NAME, wxCommandEvent)
 wxDECLARE_EVENT (EVT_FINISHED_UPDATE_MACHINE_LIST, wxCommandEvent)
 wxDECLARE_EVENT (EVT_WILL_DISMISS_MACHINE_LIST, wxCommandEvent)
 wxDECLARE_EVENT (EVT_UPDATE_WINDOWS_POSITION, wxCommandEvent)
 wxDECLARE_EVENT (EVT_DISSMISS_MACHINE_LIST, wxCommandEvent)
 wxDECLARE_EVENT (EVT_CONNECT_LAN_PRINT, wxCommandEvent)
 wxDECLARE_EVENT (EVT_EDIT_PRINT_NAME, wxCommandEvent)
 wxDECLARE_EVENT (EVT_UNBIND_MACHINE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_BIND_MACHINE, wxCommandEvent)
 WX_DEFINE_LIST (AmsRadioSelectorList)
 WX_DECLARE_LIST (AmsRadioSelector, AmsRadioSelectorList)
static bool should_dialog_be_shown ()
static void save_version ()
static std::map< std::string, std::string > parse_lscpu_etc (const std::string &name, char delimiter)
static std::string get_unique_id ()
static std::string generate_system_info_json ()
void show_send_system_info_dialog_if_needed ()
 wxDEFINE_EVENT (EVT_SEND_JOB_SUCCESS, wxCommandEvent)
static wxString ParseErrorCode (int errorcde)
 wxDECLARE_EVENT (EVT_CLEAR_IPADDRESS, wxCommandEvent)
void sort_sequential_clearance_instances (std::vector< SequentialClearanceInstance >::iterator first, std::vector< SequentialClearanceInstance >::iterator last, const std::map< ObjectID, int > &print_order)
std::vector< std::pair< Polygon, float > > sequential_clearance_height_polygons (const std::vector< SequentialClearanceInstance > &instances, double printable_height, double height_to_lid, double height_to_rod)
const ShortcutInfo & shortcut_info (Shortcut shortcut)
ShortcutSection shortcut_section (Shortcut shortcut)
const char * section_name (ShortcutSection section)
std::vector< Shortcut > shortcuts_in (ShortcutContext context)
constexpr uint8_t context_bit (ShortcutContext context)
void DrawRoundedRect (float x, float y, float width, float height, float radius, const ColorRGB &color, int segments=16)
 wxIMPLEMENT_CLASS (SliceInfoPopup, PopupWindow)
 wxBEGIN_EVENT_TABLE (SliceInfoPopup, PopupWindow) wxEND_EVENT_TABLE() static wxColour BUTTON_BORDER_COL
float calc_gray (wxColour color)
static wxColour decode_color (const std::string &color)
static void market_model_scoring_page (int design_id)
static std::optional< double > calc_scale (const Matrix3d &from, const Matrix3d &to, const Vec3d &dir)
bool on_mouse_surface_drag (const wxMouseEvent &mouse_event, const Camera &camera, std::optional< SurfaceDrag > &surface_drag, GLCanvas3D &canvas, RaycastManager &raycast_manager, const std::optional< double > &up_limit={})
 Mouse event handler, when move(drag&drop) volume over model surface NOTE: Dragged volume has to be selected. And also has to be hovered on start of dragging.
std::optional< Vec3d > calc_surface_offset (const Selection &selection, RaycastManager &raycast_manager)
 Calculate translation of volume onto surface of model.
std::optional< float > calc_distance (const GLVolume &gl_volume, RaycastManager &raycaster, GLCanvas3D &canvas)
 Calculate distance by ray to surface of object in emboss direction.
std::optional< float > calc_distance (const GLVolume &gl_volume, const RaycastManager &raycaster, const RaycastManager::ISkip *condition, const std::optional< Slic3r::Transform3d > &fix)
std::optional< float > calc_angle (const Selection &selection)
 Calculate up vector angle.
Transform3d world_matrix_fixed (const GLVolume &gl_volume, const ModelObjectPtrs &objects)
 Get transformation to world.
Transform3d world_matrix_fixed (const Selection &selection)
 Get transformation to world.
void selection_transform (Selection &selection, const std::function< void()> &selection_transformation_fnc)
 Wrap function around selection transformation to apply fix transformation Fix transformation is needed because of (store/load) volume (to/from) 3mf.
bool face_selected_volume_to_camera (const Camera &camera, GLCanvas3D &canvas, const std::optional< double > &wanted_up_limit={})
 Apply camera direction for emboss direction.
void do_local_z_rotate (Selection &selection, double relative_angle)
 Rotation around z Axis(emboss direction).
void do_local_z_move (Selection &selection, double relative_move)
 Translation along local z Axis (emboss direction).
TransformationType get_drag_transformation_type (const Selection &selection)
 Distiguish between object and volume Differ in possible transformation type.
void dragging_rotate_gizmo (double gizmo_angle, std::optional< float > &current_angle, std::optional< float > &start_angle, Selection &selection)
 On dragging rotate gizmo func Transform GLVolume from selection.
static void UpdatePositionAlignment (wxWindow *w, wxPoint base_position, bool align_right)
static void validate_custom_gcode_cb (Tab *tab, const wxString &title, const t_config_option_key &opt_key, const boost::any &value)
template<class T>
void add_correct_opts_to_options_list (const std::string &opt_key, std::map< std::string, int > &map, Tab *tab, const int &value)
static void drop_unchanged_added_entries (std::vector< std::string > &options, const DynamicPrintConfig &current, const Preset *reference)
static const std::vector< std::string > & preset_type_options (Preset::Type type)
static const char * preset_type_name (Preset::Type type)
static wxString support_combo_value_for_config (const DynamicPrintConfig &config, bool is_fff)
static wxString pad_combo_value_for_config (const DynamicPrintConfig &config)
static void update_all_extruder_variants (int extruder_idx=-1)
static std::vector< std::string > intersect (std::vector< std::string > const &l, std::vector< std::string > const &r)
static std::vector< std::string > concat (std::vector< std::string > const &l, std::vector< std::string > const &r)
static std::vector< std::string > substruct (std::vector< std::string > const &l, std::vector< std::string > const &r)
static std::vector< std::string > variant_keys (DynamicPrintConfig const &config)
static void validate_custom_gcode_cb (Tab *tab, ConfigOptionsGroupShp opt_group, const t_config_option_key &opt_key, const boost::any &value)
static wxString custom_gcode_group_title (const Page *page, const t_config_option_key &opt_key)
static void imex_grid_shape (const DynamicPrintConfig *cfg, int &n_cols, int &n_rows, int &layout)
static wxString short_nozzle_volume_name (const std::string &volume_name)
 wxDEFINE_EVENT (EVT_TEXTURE_COMPUTE_DONE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_TEXTURE_COMPUTE_PROGRESS, wxCommandEvent)
 wxDEFINE_EVENT (EVT_TEXTURE_COMPUTE_ERROR, wxCommandEvent)
 wxDEFINE_EVENT (EVT_TEXTURE_MESH_REPAIR_DECISION, wxCommandEvent)
static std::array< float, 4 > parse_color_string (const std::string &hex)
static wxString rgb_to_hex (const std::array< std::size_t, 3 > &c)
static wxString filament_name_to_wx_string (const std::string &name)
static std::string texture_normalize_color_hex (std::string hex)
static std::string texture_rgba_to_hex (const std::array< float, 4 > &rgba)
static bool texture_entry_is_physical (TextureFilamentKind kind)
static bool texture_entry_is_mixed (TextureFilamentKind kind)
static bool texture_entry_is_pla_basic (const TextureFilamentEntry &entry)
static bool texture_entry_official_basic (const TextureFilamentEntry &entry)
static Slic3r::ColorDecomposeRecipeMode texture_recipe_mode (TextureAutoMixMode mode)
static bool starts_with_preset_name (const std::string &name, const char *prefix)
static std::string resolve_default_virtual_filament_preset_name ()
static wxString auto_mix_mode_label (TextureAutoMixMode mode)
static void convert_face_colors (const std::vector< std::array< std::size_t, 3 > > &src, std::vector< std::array< float, 3 > > &dst)
 wxBEGIN_EVENT_TABLE (TextureImportDialog, DPIDialog) wxEND_EVENT_TABLE() TextureImportDialog
 wxDECLARE_EVENT (EVT_TEXTURE_COMPUTE_DONE, wxCommandEvent)
 wxDECLARE_EVENT (EVT_TEXTURE_COMPUTE_PROGRESS, wxCommandEvent)
 wxDECLARE_EVENT (EVT_TEXTURE_COMPUTE_ERROR, wxCommandEvent)
 wxDECLARE_EVENT (EVT_TEXTURE_MESH_REPAIR_DECISION, wxCommandEvent)
uint64_t texture_library_generation ()
void bump_texture_library_generation ()
std::string user_texture_dir ()
const std::vector< TextureLibraryEntry > & texture_library (bool force_rescan)
void touch_user_texture (const std::string &path)
bool remove_user_texture (const std::string &path, std::string &error)
std::optional< TextureLibraryEntry > import_texture_to_library (const std::string &source_path, std::string &error)
std::shared_ptr< std::vector< unsigned char > > load_texture_image_data (const std::string &path, std::string &error)
std::optional< TextureLibraryEntry > save_texture_to_library (const DecodedHeightTexture &image, const std::string &stem, std::string &error)
 wxDEFINE_EVENT (EVT_DIFF_DIALOG_TRANSFER, SimpleEvent)
static std::string get_icon_name (Preset::Type type, PrinterTechnology pt)
static std::string def_text_color ()
static void color_string (wxString &str, const std::string &color)
static void make_string_bold (wxString &str)
static void update_children (ModelNode *parent)
static void update_parents (ModelNode *node)
static void rescale_children (ModelNode *parent)
static PresetCollection * get_preset_collection (Preset::Type type, PresetBundle *preset_bundle=nullptr)
static std::string get_selection (PresetComboBox *preset_combo)
 wxDECLARE_EVENT (EVT_DIFF_DIALOG_TRANSFER, SimpleEvent)
static const std::string CONFIG_UPDATE_WIKI_URL ("")
 WX_DEFINE_ARRAY (AmsPanel *, AmsPanelHash)
static json guide_strings ()
static wxString update_custom_filaments ()
static std::set< std::string > get_new_added_presets (const std::map< std::string, std::string > &old_data, const std::map< std::string, std::string > &new_data)
static std::string get_first_added_preset (const std::map< std::string, std::string > &old_data, const std::map< std::string, std::string > &new_data)
void StringReplace (std::string &strBase, std::string strSrc, std::string strDes)
 wxDECLARE_EVENT (EVT_RESPONSE_MESSAGE, wxCommandEvent)
 wxDEFINE_EVENT (EVT_RESPONSE_MESSAGE, wxCommandEvent)
static json home_page_strings ()
static wxString http_origin_of (const wxString &url)
static bool cloud_navigation_is_top_level (const wxWebViewEvent &evt)
static void open_cloud_url_externally (const wxString &url)
 wxDEFINE_EVENT (EVT_AMS_EXTRUSION_CALI, wxCommandEvent)
 wxDEFINE_EVENT (EVT_AMS_LOAD, SimpleEvent)
 wxDEFINE_EVENT (EVT_AMS_UNLOAD, SimpleEvent)
 wxDEFINE_EVENT (EVT_AMS_SETTINGS, SimpleEvent)
 wxDEFINE_EVENT (EVT_AMS_FILAMENT_BACKUP, SimpleEvent)
 wxDEFINE_EVENT (EVT_AMS_REFRESH_RFID, wxCommandEvent)
 wxDEFINE_EVENT (EVT_AMS_ON_SELECTED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_AMS_ON_FILAMENT_EDIT, wxCommandEvent)
 wxDEFINE_EVENT (EVT_VAMS_ON_FILAMENT_EDIT, wxCommandEvent)
 wxDEFINE_EVENT (EVT_AMS_CLIBRATION_AGAIN, wxCommandEvent)
 wxDEFINE_EVENT (EVT_AMS_CLIBRATION_CANCEL, wxCommandEvent)
 wxDEFINE_EVENT (EVT_AMS_GUIDE_WIKI, wxCommandEvent)
 wxDEFINE_EVENT (EVT_AMS_RETRY, wxCommandEvent)
 wxDEFINE_EVENT (EVT_AMS_SHOW_HUMIDITY_TIPS, wxCommandEvent)
 wxDEFINE_EVENT (EVT_AMS_UNSELETED_VAMS, wxCommandEvent)
 wxDEFINE_EVENT (EVT_AMS_SWITCH, SimpleEvent)
static wxColour _get_diff_clr (wxWindow *win, wxColour pen_clr)
 wxDECLARE_EVENT (EVT_AMS_EXTRUSION_CALI, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AMS_LOAD, SimpleEvent)
 wxDECLARE_EVENT (EVT_AMS_UNLOAD, SimpleEvent)
 wxDECLARE_EVENT (EVT_AMS_SETTINGS, SimpleEvent)
 wxDECLARE_EVENT (EVT_AMS_FILAMENT_BACKUP, SimpleEvent)
 wxDECLARE_EVENT (EVT_AMS_REFRESH_RFID, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AMS_ON_SELECTED, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AMS_ON_FILAMENT_EDIT, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AMS_CLIBRATION_AGAIN, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AMS_CLIBRATION_CANCEL, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AMS_GUIDE_WIKI, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AMS_RETRY, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AMS_SHOW_HUMIDITY_TIPS, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AMS_UNSELETED_VAMS, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AMS_UNSELETED_AMS, wxCommandEvent)
 wxDECLARE_EVENT (EVT_VAMS_ON_FILAMENT_EDIT, wxCommandEvent)
 wxDECLARE_EVENT (EVT_AMS_SWITCH, SimpleEvent)
 wxDEFINE_EVENT (EVT_FAN_SWITCH_ON, wxCommandEvent)
 wxDEFINE_EVENT (EVT_FAN_SWITCH_OFF, wxCommandEvent)
 wxDEFINE_EVENT (EVT_FAN_ADD, wxCommandEvent)
 wxDEFINE_EVENT (EVT_FAN_DEC, wxCommandEvent)
 wxDEFINE_EVENT (EVT_FAN_CHANGED, wxCommandEvent)
static void nop_deleter_fan_control (FanControlNew *)
static void nop_deleter_fan_control_popup (FanControlPopupNew *)
 wxDEFINE_EVENT (EVT_FANCTRL_SWITCH, wxCommandEvent)
 wxDECLARE_EVENT (EVT_FANCTRL_SWITCH, wxCommandEvent)
 wxDECLARE_EVENT (EVT_FAN_SWITCH_ON, wxCommandEvent)
 wxDECLARE_EVENT (EVT_FAN_SWITCH_OFF, wxCommandEvent)
 wxDECLARE_EVENT (EVT_FAN_ADD, wxCommandEvent)
 wxDECLARE_EVENT (EVT_FAN_DEC, wxCommandEvent)
 wxDECLARE_EVENT (EVT_FAN_CHANGED, wxCommandEvent)
 wxDEFINE_EVENT (EVT_NOZZLE_SELECTED, wxCommandEvent)
int getExtruderNozzleCount (PresetBundle *preset_bundle, int extruder_id, NozzleVolumeType volume_type)
int getExtruderNozzleCountTotal (PresetBundle *preset_bundle, int extruder_id)
void setNozzleStatsFromMachine (bool from_machine)
void setExtruderNozzleCount (PresetBundle *preset_bundle, int extruder_id, NozzleVolumeType volume_type, int nozzle_count, bool clear_all)
bool nozzle_diameter_supports_tpu_high_flow (double nozzle_diameter)
bool extruder_supports_tpu_high_flow (PresetBundle *preset_bundle, int extruder_id)
void updateNozzleCountDisplay (PresetBundle *preset_bundle, int extruder_id, NozzleVolumeType volume_type)
void seedExtruderNozzleStats (PresetBundle *preset_bundle)
void onNozzleVolumeTypeSwitch (PresetBundle *preset_bundle, int extruder_id, NozzleVolumeType type)
void manuallySetNozzleCount (int extruder_id)
std::optional< NozzleOption > tryPopUpMultiNozzleDialog (MachineObject *obj)
 wxDECLARE_EVENT (EVT_NOZZLE_SELECTED, wxCommandEvent)
static const std::string & calib_temp_dir ()
static std::string calib_temp_file (const std::string &name)
void get_default_k_n_value (const std::string &filament_id, float &k, float &n)
wxString get_nozzle_volume_type_name (NozzleVolumeType type)
void update_speed_parameter (const std::string &key)
std::vector< double > generate_max_speed_parameter_value (const std::string &key, const float line_width, const float layer_height, const bool linear, const int pass)
static int get_physical_extruder_idx (std::vector< int > physical_extruder_maps, int extruder_id)
void get_tray_ams_and_slot_id (MachineObject *obj, int in_tray_id, int &ams_id, int &slot_id, int &tray_id)
std::string get_calib_mode_name (CalibMode cali_mode, int stage)
static wxString to_wstring_name (std::string name)
static bool is_same_nozzle_type (const DynamicPrintConfig &full_config, const MachineObject *obj, wxString &error_msg)
static bool check_nozzle_diameter_and_type (const DynamicPrintConfig &full_config, wxString &error_msg)
static void init_multi_extruder_params_for_cali (DynamicPrintConfig &config, const CalibInfo &calib_info)
static void cut_model (Model &model, double z, ModelObjectCutAttributes attributes)
static void read_model_from_file (const std::string &input_file, Model &model)
std::array< Vec3d, 4 > get_cut_plane_points (const BoundingBoxf3 &bbox, const double &cut_height)
bool mac_dark_mode ()
double mac_max_scaling_factor ()
void set_miniaturizable (void *window)
void set_tag_when_enter_full_screen (bool isfullscreen)
void set_title_colour_after_set_title (void *window)
void WKWebView_evaluateJavaScript (void *web, wxString const &script, void(*callback)(wxString const &))
void WKWebView_setTransparentBackground (void *web)
void WKWebView_force_display (void *web)
void openFolderForFile (wxString const &file)
void initGestures (void *view, wxEvtHandler *handler)
static void start_new_slicer_or_gcodeviewer (const NewSlicerInstanceType instance_type, const std::vector< wxString > paths_to_open, bool single_instance)
static void start_new_slicer_or_gcodeviewer (const NewSlicerInstanceType instance_type, const wxString *path_to_open, bool single_instance)
void start_new_slicer (const wxString *path_to_open, bool single_instance)
void start_new_slicer (const std::vector< wxString > &files, bool single_instance)
void start_new_gcodeviewer (const wxString *path_to_open)
void start_new_gcodeviewer_open_file (wxWindow *parent)
RaycastManager::Meshes create_meshes (GLCanvas3D &canvas, const RaycastManager::AllowVolumes &condition)
 Use scene Raycasters and prepare data for actualize RaycasterManager.
std::optional< RaycastManager::Hit > ray_from_camera (const RaycastManager &raycaster, const Vec2d &mouse_pos, const Camera &camera, const RaycastManager::ISkip *skip)
 Unproject on mesh by Mesh raycasters.
RaycastManager::AllowVolumes create_condition (const ModelVolumePtrs &volumes, const ObjectID &disallowed_volume_id)
 Create condition to allowe only parts from volumes without one given.

Variables

constexpr const char * kOrcaSourceKey = "orca"
constexpr const char * kOrcaSourceName = "OrcaSlicer"
const int AMS_DRY_STATUS_IMAGE_SIZE = 96
const int LEFT_OFFSET = 2
static constexpr size_t MAPPED_NOZZLE_STR_MAX_CHARS_PER_LINE = 7
static const char * AMS_FAVORITE_FILAMENT_IDS_KEY = "ams_favorite_filament_ids"
const std::vector< std::string > license_list
const char *const build_commit_hash = GIT_COMMIT_HASH
const char *const build_commit_label = GIT_COMMIT_HASH GIT_COMMIT_SUFFIX
constexpr int kCadRightClickDriftPx = 3
static const char *const kOfferRowNames []
static const int kOfferRowCount = 9
static const bool kOfferRowFlat []
static const OfferVerb kOfferVerbs []
static const int kOfferVerbCount = 93
static constexpr double MESH_IMPORT_TOLERANCE = 0.01
static constexpr double MESH_IMPORT_MERGE_ANGLE_DEG = 5.0
static constexpr size_t MESH_IMPORT_TRIANGLE_WARN = 50000
static const DpToken kDpTokens [TokCount]
static constexpr int kOriginRow = 0
static constexpr int kBedRow = 1
static std::atomic< int > s_doc_worker_busy {0}
static constexpr int kIconPx = 16
static constexpr int kCellDip = 20
static constexpr int kPadDip = 4
static constexpr int kGapDip = 6
static constexpr int kArcFacets = 24
static const Vec2d kBearOutline []
static const Vec2d kBearChin []
static const Vec3d kBearMarks []
static const double kBearPlateZ = +0.0360
static const Vec2d kBearSnoutBase []
static const Vec3d kBearCrest []
static const char * kFontKey = "cad_text_font"
static const char * kHeightKey = "cad_text_height"
static const wxString NA_STR = _L("N/A")
static const float MIN_PA_K_VALUE_STEP = 0.001
static const int MAX_PA_HISTORY_RESULTS_NUMS = 16
static const wxString NA_STR = _L("N/A")
static int PA_LINE = 0
static int PA_PATTERN = 1
float nozzle_diameter_list [NOZZLE_LIST_COUNT] = {0.2, 0.4, 0.6, 0.8 }
 wxMouseEvent
const wxColour TEXT_COL = wxColour(43, 52, 54)
static const wxColour BgNormalColor = wxColour("#FFFFFF")
static const wxColour BgSelectColor = wxColour("#E5F0EE")
static const wxColour TextNormalColor = wxColour("#262E30")
static const wxColour TextSelectColor = wxColour("#262E30")
static const wxColour BorderNormalColor = wxColour("#CECECE")
static const wxColour BorderSelectColor = wxColour("#009688")
constexpr const char * kDecomposePlaBasicType = "PLA Basic"
constexpr const char * kDecomposePetgBasicType = "PETG Basic"
constexpr const char * kDecomposePlaShortType = "PLA"
constexpr const char * kDecomposePetgShortType = "PETG"
constexpr const char * kDecomposePlaFilamentId = "GFA00"
constexpr const char * kDecomposePetgFilamentId = "GFG00"
constexpr const char * kDecomposeBambuPresetPrefix = "Bambu "
constexpr std::size_t COLOR_PICKER_MAX_GRADIENT_COLORS = 7
static const std::unordered_map< std::string, std::pair< std::string, std::string > > legacy_preset_map
static const std::vector< std::string > filament_vendors
static const std::vector< std::string > filament_types
static const std::vector< std::string > printer_vendors
static const std::unordered_map< std::string, std::vector< std::string > > printer_model_map
static std::vector< std::string > nozzle_diameter_vec = {"0.4", "0.15", "0.2", "0.25", "0.3", "0.35", "0.5", "0.6", "0.75", "0.8", "1.0", "1.2", "1.75"}
static std::unordered_map< std::string, float > nozzle_diameter_map
static std::set< int > cannot_input_key = {9, 10, 13, 33, 35, 36, 37, 38, 40, 41, 42, 44, 46, 47, 59, 60, 62, 63, 64, 92, 94, 95, 124, 126}
static std::set< char > special_key = {'\n', '\t', '\r', '\v', '@', ';'}
static std::string last_directory = ""
static std::unordered_set< std::string > message_containing_retry
static const std::unordered_set< std::string > s_jump_liveview_error_codes = { "0300-8003", "0300-8002", "0300-800A"}
const size_t DOWNLOAD_MAX_CHUNK_SIZE = 10 * 1024 * 1024
const size_t DOWNLOAD_SIZE_LIMIT = 1024 * 1024 * 1024
static const wxColour CANVAS_BORDER_COLOR = wxColour(0xCECECE)
const std::map< ParamType, std::string > ParamsInfo
std::vector< std::deque< wxWindow * > ** > spools
std::vector< std::deque< wxWindow * > * > spools2
static std::map< std::string, DynamicList * > dynamic_lists
static const wxColour LabelEnableColor = wxColour("#262E30")
static const wxColour LabelDisableColor = wxColour("#ACACAC")
static const wxColour GreyColor = wxColour("#6B6B6B")
static const wxColour BackGroundColor = wxColour("#FFFFFF")
static const wxColour BgNormalColor = wxColour("#FFFFFF")
static const wxColour BgSelectColor = wxColour("#E5F0EE")
static const wxColour BgDisableColor = wxColour("#CECECE")
static const wxColour BorderNormalColor = wxColour("#CECECE")
static const wxColour BorderSelectedColor = wxColour("#009688")
static const wxColour BorderDisableColor = wxColour("#EEEEEE")
static const wxColour TextNormalBlackColor = wxColour("#262E30")
static const wxColour TextNormalGreyColor = wxColour("#6B6B6B")
static const wxColour TextDisableColor = wxColour("#CECECE")
static const wxColour TextErrorColor = wxColour("#E14747")
static const float GCODE_VIEWER_SLIDER_SCALE = 0.6f
static const float SLIDER_DEFAULT_RIGHT_MARGIN = 10.0f
static const float SLIDER_DEFAULT_BOTTOM_MARGIN = 10.0f
static const float SLIDER_RIGHT_MARGIN = IMSlider::vertical_slider_window_width()
static const float SLIDER_BOTTOM_MARGIN = 64.0f
static const char * label_values [3][3]
static const char * label_scale_values [2][3]
static const ColorRGBA DEF_COLOR = {0.7f, 0.7f, 0.7f, 1.f}
static const ColorRGBA SELECTED_COLOR = {0.0f, 0.5f, 0.5f, 1.0f}
static const ColorRGBA ERR_COLOR = {1.0f, 0.3f, 0.3f, 0.5f}
static const ColorRGBA HOVER_COLOR = {0.7f, 0.7f, 0.7f, 0.5f}
static constexpr float BRIM_EAR_RADIUS_MIN = 0.1f
static constexpr float BRIM_EAR_RADIUS_MAX = 100.f
static const ColorRGBA GRABBER_COLOR = ColorRGBA::YELLOW()
static const ColorRGBA UPPER_PART_COLOR = ColorRGBA::CYAN()
static const ColorRGBA LOWER_PART_COLOR = ColorRGBA::MAGENTA()
static const ColorRGBA MODIFIER_COLOR = ColorRGBA(0.75f, 0.75f, 0.75f, 0.5f)
static const ColorRGBA PLAG_COLOR = ColorRGBA::YELLOW()
static const ColorRGBA DOWEL_COLOR = ColorRGBA::DARK_YELLOW()
static const ColorRGBA HOVERED_PLAG_COLOR = ColorRGBA::CYAN()
static const ColorRGBA HOVERED_DOWEL_COLOR = ColorRGBA(0.0f, 0.5f, 0.5f, 1.0f)
static const ColorRGBA SELECTED_PLAG_COLOR = ColorRGBA::GRAY()
static const ColorRGBA SELECTED_DOWEL_COLOR = ColorRGBA::DARK_GRAY()
static const ColorRGBA CONNECTOR_DEF_COLOR = ColorRGBA(1.0f, 1.0f, 1.0f, 0.5f)
static const ColorRGBA CONNECTOR_ERR_COLOR = ColorRGBA(1.0f, 0.3f, 0.3f, 0.5f)
static const ColorRGBA HOVERED_ERR_COLOR = ColorRGBA(1.0f, 0.3f, 0.3f, 1.0f)
static const ColorRGBA CUT_PLANE_DEF_COLOR = ColorRGBA(0.9f, 0.9f, 0.9f, 0.5f)
static const ColorRGBA CUT_PLANE_ERR_COLOR = ColorRGBA(1.0f, 0.8f, 0.8f, 0.5f)
const unsigned int AngleResolution = 64
const unsigned int ScaleStepsCount = 72
const float ScaleStepRad = 2.0f * float(PI) / ScaleStepsCount
const unsigned int ScaleLongEvery = 2
const float ScaleLongTooth = 0.1f
const unsigned int SnapRegionsCount = 8
const float UndefFloat = -999.f
const std::string UndefLabel = " "
const float MEASURE_PLNE_NORMAL_OFFSET = 0.05
static const Slic3r::ColorRGBA SELECTED_1ST_COLOR = {0.25f, 0.75f, 0.75f, 1.0f}
static const Slic3r::ColorRGBA SELECTED_2ND_COLOR = {0.75f, 0.25f, 0.75f, 1.0f}
static const Slic3r::ColorRGBA NEUTRAL_COLOR = {0.5f, 0.5f, 0.5f, 1.0f}
static const Slic3r::ColorRGBA HOVER_COLOR = ColorRGBA::GREEN()
static const int POINT_ID = 100
static const int EDGE_ID = 200
static const int CIRCLE_ID = 300
static const int PLANE_ID = 400
static const int SEL_SPHERE_1_ID = 501
static const int SEL_SPHERE_2_ID = 502
static const float TRIANGLE_BASE = 10.0f
static const float TRIANGLE_HEIGHT = TRIANGLE_BASE * 1.618033f
static const std::string CTRL_STR
static const std::string warning_text = _u8L("Unable to perform boolean operation on selected parts")
static constexpr double TIP_DELAY = 0.45
static constexpr double TIP_DELAY_AGAIN = 0.10
static constexpr double TIP_STICKY = 0.70
static constexpr float STD_REMESH_EDGE_MM = 1.0f
static constexpr float STD_REMESH_SHARP_DEG = 40.f
static constexpr float STD_SUBDIV_MAX_EDGE_MM = 20.f
static constexpr float STD_SUBDIV_DETAIL_MM = 0.02f
static constexpr float STD_SUBDIV_MIN_EDGE_MM = 0.1f
static constexpr float STD_SUBDIV_BORDER_MM = 0.4f
static constexpr float STD_SUBDIV_COLOR_MM = 0.25f
wxString filament_printable_error_msg
static constexpr std::array< double, 4 > marker_radii { 9., 7., 6., 5. }
static constexpr float NAVIGATOR_SIZE = 128.f
static constexpr float CANVAS_TOOLBAR_MARGIN = 10.f
static constexpr float CANVAS_TOOLBAR_PADDING = 2.f
static constexpr float CANVAS_TOOLBAR_BUTTON = 36.f
static constexpr float CANVAS_TOOLBAR_SPACING = 6.f
static std::set< int > s_keys_down
static const float cameraProjection [16] = {1.f, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f, 0.f, 0.f, 0.f, 1.f}
static const Vec3d STATIC_LIGHT_DIR = Vec3d(-0.4, -0.6, 1.0).normalized()
static constexpr float PLATE_TOOLBAR_SCROLLBAR = 14.f
static const FileWildcards file_wildcards_by_type [FT_SIZE]
static std::mutex conflict_ids_mutex
static std::mutex mutex_delete_cache_presets
static SettingsFactory::Bundle FREQ_SETTINGS_BUNDLE_FFF
static SettingsFactory::Bundle FREQ_SETTINGS_BUNDLE_SLA
static const constexpr std::array< std::pair< const char *, const char * >, 11 > ADD_VOLUME_MENU_ITEMS
static const constexpr std::array< std::pair< const char *, const char * >, 3 > TEXT_VOLUME_ICONS
static const constexpr std::array< std::pair< const char *, const char * >, 3 > SVG_VOLUME_ICONS
static const int grid_cell_border_width = 2
static const int grid_cell_border_height = 2
static const int grid_cell_checkbox_size = 16
static const int g_min_row_count = 16
static const int g_overflow_row_count = 50
static const int g_min_row_size = 36
static const int g_extra_height = 64
static const int g_min_setting_width = 464
static const int g_vscroll_width = 48
static int g_dialog_width = 0
static int g_dialog_height = 0
static int g_dialog_max_width = 0
static int g_dialog_max_height = 0
static wxSize g_max_size_from_parent
std::deque< wxDialog * > dialogStack
const std::string BOLD_MARKER_START = "<b>"
const std::string BOLD_MARKER_END = "</b>"
const std::string HYPERTEXT_MARKER_START = "<a>"
const std::string HYPERTEXT_MARKER_END = "</a>"
static constexpr int SHADOW_WIDTH = 3
static constexpr wchar_t const * TIME_FORMATS [] = {_T("%Y-%m-%d"), _T("%Y-%m"), _T("%Y")}
static constexpr int kImexIconPx = 20
static constexpr int kNameColPx = 176
static const std::map< const wchar_t, std::string > font_icons
static const std::map< const wchar_t, std::string > font_icons_large
static const std::map< const wchar_t, std::string > font_icons_extra_large
static const ImWchar ranges_language_independent []
static bool m_is_dark_mode = false
static const float LEFT_MARGIN = 13.0f + 100.0f
static const float HORIZONTAL_SLIDER_WINDOW_HEIGHT = 64.0f
static const float VERTICAL_SLIDER_WINDOW_WIDTH = 164.0f
static const float GROOVE_WIDTH = 12.0f
static const ImVec2 ONE_LAYER_MARGIN = ImVec2(20.0f, 20.0f)
static const ImVec2 ONE_LAYER_BUTTON_SIZE = ImVec2(56.0f, 56.0f)
static const ImU32 BACKGROUND_COLOR_DARK = IM_COL32(65, 65, 71, 255)
static const ImU32 BACKGROUND_COLOR_LIGHT = IM_COL32(255, 255, 255, 255)
static const ImU32 GROOVE_COLOR_DARK = IM_COL32(45, 45, 49, 255)
static const ImU32 GROOVE_COLOR_LIGHT = IM_COL32(206, 206, 206, 255)
static const ImU32 BRAND_COLOR = IM_COL32(0, 150, 136, 255)
static int m_tick_value = -1
static ImVec4 m_tick_rect
static const constexpr double LOGICAL_BED_GAP = 1. / 5.
static auto waiting_auth_str = _u8L("Logging in")
static auto login_failed_str = _u8L("Login failed")
constexpr int ABORT_WAIT_MAX_MS = 10000
static auto check_gcode_failed_str = _u8L("Abnormal print file data: please slice again.")
static auto printjob_cancel_str = _u8L("Task canceled.")
static auto timeout_to_upload_str = _u8L("Upload task timed out. Please check the network status and try again.")
static auto failed_in_cloud_service_str = _u8L("Cloud service connection failed. Please try again.")
static auto file_is_not_exists_str = _u8L("Print file not found; please slice again.")
static auto file_over_size_str = _u8L("The print file exceeds the maximum allowable size (1GB). Please simplify the model and slice again.")
static auto print_canceled_str = _u8L("Task canceled.")
static auto send_print_failed_str = _u8L("Failed to send the print job. Please try again.")
static auto upload_ftp_failed_str = _u8L("Failed to upload file to ftp. Please try again.")
static auto desc_network_error = _u8L("Check the current status of the Bambu Lab server by clicking on the link above.")
static auto desc_file_too_large = _u8L("The size of the print file is too large. Please adjust the file size and try again.")
static auto desc_fail_not_exist = _u8L("Print file not found; please slice it again and send it for printing.")
static auto desc_upload_ftp_failed = _u8L("Failed to upload print file via FTP. Please check the network status and try again.")
static auto sending_over_lan_str = _u8L("Sending print job over LAN")
static auto sending_over_cloud_str = _u8L("Sending print job through cloud service")
static wxString wait_sending_finish = _L("Print task sending times out.")
static auto check_gcode_failed_str = _u8L("Abnormal print file data: please slice again.")
static auto printjob_cancel_str = _u8L("Task canceled.")
static auto timeout_to_upload_str = _u8L("Upload task timed out. Please check the network status and try again.")
static auto failed_in_cloud_service_str = _u8L("Cloud service connection failed. Please try again.")
static auto file_is_not_exists_str = _u8L("Print file not found; please slice again.")
static auto file_over_size_str = _u8L("The print file exceeds the maximum allowable size (1GB). Please simplify the model and slice again.")
static auto print_canceled_str = _u8L("Task canceled.")
static auto send_print_failed_str = _u8L("Failed to send the print job. Please try again.")
static auto upload_ftp_failed_str = _u8L("Failed to upload file to ftp. Please try again.")
static auto desc_network_error = _u8L("Check the current status of the Bambu Lab server by clicking on the link above.")
static auto desc_file_too_large = _u8L("The size of the print file is too large. Please adjust the file size and try again.")
static auto desc_fail_not_exist = _u8L("Print file not found; please slice it again and send it for printing.")
static auto desc_upload_ftp_failed = _u8L("Failed to upload print file via FTP. Please check the network status and try again.")
static auto sending_over_lan_str = _u8L("Sending print job over LAN")
static auto sending_over_cloud_str = _u8L("Sending print job through cloud service")
template<class Fn>
constexpr bool IsProcessFn = std::is_invocable_v<Fn, Job::Ctl&>
template<class Fn>
constexpr bool IsFinishFn = std::is_invocable_v<Fn, bool, std::exception_ptr&>
static const wxString sep = "\t"
static constexpr int MAX_COMPONENTS = 3
static constexpr int MIN_COMPONENT_RATIO = 10
static wxString NA_STR = _L("N/A")
BitmapCache * m_bitmap_cache = nullptr
static constexpr char LayerRootIcon [] = "height_range_modifier"
static constexpr char LayerIcon [] = "height_range_layer"
static constexpr char WarningIcon [] = "obj_warning"
static constexpr char WarningManifoldIcon [] = "obj_warning"
static constexpr char LockIcon [] = "cut_"
const std::map< InfoItemType, InfoItemAtributes > INFO_ITEMS
constexpr int titleWidth = 20
constexpr int ctrlWidth = 50
static const char *const SCENE_CANVAS_NAME = "OrcaSceneCanvas"
static constexpr float IMEX_GHOST_ALPHA = 0.55f
StateColor percent_bg (std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Disabled), std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Pressed), std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Hovered), std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Enabled), std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Normal))
static StateColor zoom_bg (std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Disabled), std::pair< wxColour, int >(wxColour(206, 206, 206), StateColor::Pressed), std::pair< wxColour, int >(wxColour(238, 238, 238), StateColor::Hovered), std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Enabled), std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Normal))
static StateColor zoom_bd (std::pair< wxColour, int >(wxColour(144, 144, 144), StateColor::Disabled), std::pair< wxColour, int >(wxColour(38, 46, 48), StateColor::Enabled))
static StateColor zoom_text (std::pair< wxColour, int >(wxColour(144, 144, 144), StateColor::Disabled), std::pair< wxColour, int >(wxColour(38, 46, 48), StateColor::Enabled))
static std::map< BedType, std::string > bed_type_thumbnails
static wxString temp_dir
static DynamicFilamentList dynamic_filament_list
static DynamicFilamentList dynamic_physical_filament_list (true)
static std::map< std::string, std::string > printer_thumbnails = {}
constexpr int kSidebarContextMenuFilamentId = -2
const wxString DEFAULT_PROJECT_NAME = L("Untitled")
static constexpr int MIN_LAYER_VALUE = 2
static constexpr int MAX_LAYER_VALUE = INT_MAX - 1
static const char * CONFIG_KEY_PATH = "printhost_path"
static const char * CONFIG_KEY_GROUP = "printhost_group"
static const char * CONFIG_KEY_STORAGE = "printhost_storage"
static StateColor btn_bg_green (std::pair< wxColour, int >(wxColour(206, 206, 206), StateColor::Disabled), std::pair< wxColour, int >(wxColour(0, 137, 123), StateColor::Pressed), std::pair< wxColour, int >(wxColour(38, 166, 154), StateColor::Hovered), std::pair< wxColour, int >(wxColour(0, 150, 136), StateColor::Normal))
static const wxColour BgNormalColor = wxColour("#FFFFFF")
static const wxColour BgSelectColor = wxColour("#E5F0EE")
static const wxColour BorderNormalColor = wxColour("#CECECE")
static const wxColour BorderSelectedColor = wxColour("#009688")
static const wxColour TextNormalBlackColor = wxColour("#262E30")
static const wxColour TextNormalGreyColor = wxColour("#6B6B6B")
static StateColor btn_bg_green (std::pair< wxColour, int >(wxColour(194, 194, 194), StateColor::Disabled), std::pair< wxColour, int >(wxColour(27, 136, 68), StateColor::Pressed), std::pair< wxColour, int >(wxColour(61, 203, 115), StateColor::Hovered), std::pair< wxColour, int >(wxColour(0, 177, 66), StateColor::Normal))
static wxString task_canceled_text = _L("Task canceled")
static int s_nozzle_mapping_last_request_time = 0
static const std::string SEND_SYSTEM_INFO_DOMAIN = "bambu-lab.com"
static const std::string SEND_SYSTEM_INFO_URL = "https://files." + SEND_SYSTEM_INFO_DOMAIN + "/wp-json/v1/ps"
constexpr int timeout_period = 200000
static const std::map< int, std::string > error_messages
static const wxString NA_STR = _L("N/A")
static const wxString TEMP_BLANK_STR = wxString("_")
static const wxFont SWITCH_FONT = Label::Body_10
static const int bed_temp_range [2] = {20, 120}
static const int default_champer_temp_min = 20
static const int default_champer_temp_max = 60
static const wxColour STATUS_PANEL_BG = wxColour(238, 238, 238)
static const wxColour STATUS_TITLE_BG = wxColour(248, 248, 248)
static const wxColour STATIC_BOX_LINE_COL = wxColour(238, 238, 238)
static const wxColour BUTTON_NORMAL1_COL = wxColour(238, 238, 238)
static const wxColour BUTTON_NORMAL2_COL = wxColour(206, 206, 206)
static const wxColour BUTTON_PRESS_COL = wxColour(172, 172, 172)
static const wxColour BUTTON_HOVER_COL = wxColour(0, 150, 136)
static const wxColour DISCONNECT_TEXT_COL = wxColour(171, 172, 172)
static const wxColour NORMAL_TEXT_COL = wxColour(48,58,60)
static const wxColour NORMAL_FAN_TEXT_COL = wxColour(107, 107, 107)
static const wxColour WARNING_INFO_BG_COL = wxColour(255, 111, 0)
static const wxColour STAGE_TEXT_COL = wxColour(0, 150, 136)
static const wxColour GROUP_STATIC_LINE_COL = wxColour(206, 206, 206)
static const wxFont PAGE_TITLE_FONT = Label::Body_14
static wxColour PAGE_TITLE_FONT_COL = wxColour(107, 107, 107)
static wxColour GROUP_TITLE_FONT_COL = wxColour(172, 172, 172)
static wxColour TEXT_LIGHT_FONT_COL = wxColour(107, 107, 107)
static wxImage fail_image
constexpr double UP_LIMIT = 0.9
static const std::vector< std::string > plate_keys = { "curr_bed_type", "skirt_start_angle", "first_layer_print_sequence", "first_layer_sequence_choice", "other_layers_print_sequence", "other_layers_sequence_choice", "print_sequence", "spiral_mode"}
static std::pair< std::string, std::string > extruder_variant_keys []
static std::string layer_height = "layer_height"
static std::unordered_set< std::string > s_filament_temp_pair_warning_suppressed_for_session
static const std::map< Preset::Type, std::string > type_icon_names
static std::string grey = "#808080"
static std::string orange = "#ed6b21"
static std::string none {"none"}
static const char * URL_CHANGELOG = "%1%"
static const char * URL_DOWNLOAD = "%1%"
static const char * URL_DEV = "%1%"
static const wxColour TEXT_NORMAL_CLR = wxColour(0, 150, 136)
static const wxColour TEXT_FAILED_CLR = wxColour(255, 111, 0)
static const std::unordered_map< wxString, wxString > ACCESSORY_DISPLAY_STR
static const char *const kCloudUrl = "https://cloud.orcaslicer.com"
static const int kLeftNavWidth = 220 + 1
static const wxColour AMS_TRAY_DEFAULT_COL = wxColour(255, 255, 255)
constexpr int time_out = 6
static bool not_show_fan_speed_warning_dlg = false
static const int LeftExtruderIdx = 0
static const int RightExtruderIdx = 1
static bool s_nozzle_stats_from_machine = false
const double MIN_PA_K_VALUE = 0.0
const double MAX_PA_K_VALUE = 2.0
static const std::string gcode_filename = "temp.gcode"
static const std::string model_filename = "test.3mf"
static const std::string config_filename = "test_config.3mf"
static std::string MachineBedTypeString [7]
static wxString nozzle_not_set_text = _L("The printer nozzle information has not been set.\nPlease configure it before proceeding with the calibration.")
static wxString nozzle_volume_type_not_match_text = _L("The nozzle type does not match the actual printer nozzle type.\nPlease click the Sync button above and restart the calibration.")
std::vector< std::string > not_support_auto_pa_cali_filaments
NSTextField * mainframe_text_field = nil
bool is_in_full_screen_mode = false

Class Documentation

◆ Slic3r::GUI::AppActionId

struct Slic3r::GUI::AppActionId
Collaboration diagram for Slic3r::GUI::AppActionId:
Class Members
string id

◆ Slic3r::GUI::DryingPreset

struct Slic3r::GUI::DryingPreset
Class Members
DryCtrDev dev
int dry_temp
int dry_time
DryCtrState state

◆ Slic3r::GUI::TrayData

struct Slic3r::GUI::TrayData
Collaboration diagram for Slic3r::GUI::TrayData:
Class Members
int ams_id = 0
wxColour colour
int ctype = 0
string filament_type
int id
vector< wxColour > material_cols = std::vector<wxColour>()
string name
int remain = MAPPING_ITEM_INVALID_REMAIN
int slot_id = 0
TrayType type

◆ Slic3r::GUI::AuFiles

class Slic3r::GUI::AuFiles
Collaboration diagram for Slic3r::GUI::AuFiles:
Class Members
AuFile * file
wxString path

◆ Slic3r::GUI::MemoryStruct

struct Slic3r::GUI::MemoryStruct
Class Members
char * memory
size_t read_pos
size_t size

◆ Slic3r::GUI::CadInteractionState

struct Slic3r::GUI::CadInteractionState
Class Members
bool gesture_active {false}
bool has_selection {false}
bool tool_armed {false}
bool value_field_open {false}

◆ Slic3r::GUI::OfferVerb

struct Slic3r::GUI::OfferVerb
Class Members
uint32_t accepts
const char * action
const char * family
const char * hint
const char * icon
const char * id
const char * key
const char * name
int need_bodies
bool need_sheet
int need_sketches
const char * refusal
int row
bool sketch_mode

◆ Slic3r::GUI::DpToken

struct Slic3r::GUI::DpToken
Class Members
wxColour dark
wxColour light

◆ Slic3r::GUI::PlanePiece

struct Slic3r::GUI::PlanePiece
Collaboration diagram for Slic3r::GUI::PlanePiece:
Class Members
vector< Vec3d > corners
int plane

◆ Slic3r::GUI::MPanel

class Slic3r::GUI::MPanel
Collaboration diagram for Slic3r::GUI::MPanel:
Class Members
wxString mIndex
MObjectPanel * mPanel

◆ Slic3r::GUI::TrayInfo

struct Slic3r::GUI::TrayInfo
Collaboration diagram for Slic3r::GUI::TrayInfo:
Class Members
int extruder_id
NozzleVolumeType nozzle_volume_type
Preset * preset

◆ Slic3r::GUI::ConfigIndexValue

struct Slic3r::GUI::ConfigIndexValue
Class Members
int index {0}
float value {0}

◆ Slic3r::GUI::DecomposeComponent

struct Slic3r::GUI::DecomposeComponent
Class Members
DecomposeBaseColor base_color {DecomposeBaseColor::None}
wxColour colour
int filament_index {-1}
int ratio {50}

◆ Slic3r::GUI::ColorDecomposeResult

struct Slic3r::GUI::ColorDecomposeResult
Collaboration diagram for Slic3r::GUI::ColorDecomposeResult:
Class Members
vector< DecomposeComponent > components
wxColour matched_color
DecomposeMode mode {DecomposeMode::MaterialList}

◆ Slic3r::GUI::DecomposeOfficialComponent

struct Slic3r::GUI::DecomposeOfficialComponent
Collaboration diagram for Slic3r::GUI::DecomposeOfficialComponent:
Class Members
DecomposeBaseColor base_color {DecomposeBaseColor::None}
string color_hex
string filament_id

◆ Slic3r::GUI::DecomposeMissingComponent

struct Slic3r::GUI::DecomposeMissingComponent
Collaboration diagram for Slic3r::GUI::DecomposeMissingComponent:
Class Members
size_t component_idx {0}
wxString display_name
DecomposeOfficialComponent official_component
string preset_name

◆ Slic3r::GUI::ColorPickerOptions

struct Slic3r::GUI::ColorPickerOptions
Class Members
bool allow_alpha = false
bool allow_gradient = false

◆ Slic3r::GUI::FilamentColorPickerValue

struct Slic3r::GUI::FilamentColorPickerValue
Collaboration diagram for Slic3r::GUI::FilamentColorPickerValue:
Class Members
vector< string > colors
bool gradient = false
string primary

◆ Slic3r::GUI::DailyTipsData

struct Slic3r::GUI::DailyTipsData
Collaboration diagram for Slic3r::GUI::DailyTipsData:
Class Members
string additional_text
string hyper_text
function< void(void)> hypertext_callback
string img_url
string main_text
string wiki_url

◆ Slic3r::GUI::DataAmsSlotInfo

struct Slic3r::GUI::DataAmsSlotInfo
Collaboration diagram for Slic3r::GUI::DataAmsSlotInfo:
Class Members
wxString amsName
double colourFactor
vector< wxColour > colours
wxString name
double scaleFactor
DataStatusType status

◆ Slic3r::GUI::DataStatusParam

struct Slic3r::GUI::DataStatusParam
Collaboration diagram for Slic3r::GUI::DataStatusParam:
Class Members
int height = 0
vector< DataAmsSlotInfo > slots
int width = 0

◆ Slic3r::GUI::uiAmsHumidityInfo

struct Slic3r::GUI::uiAmsHumidityInfo
Collaboration diagram for Slic3r::GUI::uiAmsHumidityInfo:
Class Members
string ams_id
AMSModel ams_type
float current_temperature
int humidity_display_idx = -1
int humidity_percent = -1
int left_dry_time = -1

◆ Slic3r::GUI::CustomData

struct Slic3r::GUI::CustomData
Class Members
unsigned char a
unsigned char b
int filament_id
unsigned char g
unsigned char r
char type[64]

◆ Slic3r::GUI::wxEventFunctorRef

struct Slic3r::GUI::wxEventFunctorRef
Class Members
wxEventFunctor * func

◆ Slic3r::GUI::TriPoint

struct Slic3r::GUI::TriPoint
Class Members
double x
double y

◆ Slic3r::GUI::MixedGradientCurve

struct Slic3r::GUI::MixedGradientCurve
Collaboration diagram for Slic3r::GUI::MixedGradientCurve:
Class Members
wxColour colour
vector< wxPoint2DDouble > points
int stroke_dip

◆ Slic3r::GUI::MixedGradientTheme

struct Slic3r::GUI::MixedGradientTheme
Class Members
wxColour axis
wxColour background
wxColour grid
wxColour label
wxColour label_strong
wxColour outline
wxColour point_fill

◆ Slic3r::GUI::MixedTriangleTheme

struct Slic3r::GUI::MixedTriangleTheme
Class Members
wxColour background
wxColour label
wxColour outline
wxColour ring

◆ Slic3r::GUI::Texture

struct Slic3r::GUI::Texture
Class Members
unsigned height {0}
unsigned id {0}
unsigned width {0}

◆ Slic3r::GUI::BackgroundTexture

struct Slic3r::GUI::BackgroundTexture
Collaboration diagram for Slic3r::GUI::BackgroundTexture:
Class Members
Metadata metadata
GLTexture texture

◆ Slic3r::GUI::FileWildcards

struct Slic3r::GUI::FileWildcards
Collaboration diagram for Slic3r::GUI::FileWildcards:
Class Members
vector< string_view > file_extensions
const char * title_id

◆ Slic3r::GUI::SimpleSettingData

struct Slic3r::GUI::SimpleSettingData
Collaboration diagram for Slic3r::GUI::SimpleSettingData:
Class Members
string label
string name
int priority

◆ Slic3r::GUI::GUI_InitParams

struct Slic3r::GUI::GUI_InitParams
Collaboration diagram for Slic3r::GUI::GUI_InitParams:
Class Members
int argc
char ** argv
DynamicPrintConfig extra_config
vector< string > input_files
bool input_gcode { false }
vector< string > load_configs
bool opengl_compatibility_profile { false }
bool opengl_debug { false }
pair< int, int > opengl_version { 0, 0 }
PresetsConfigSubstitutions preset_substitutions

◆ Slic3r::GUI::ObjectVolumeID

struct Slic3r::GUI::ObjectVolumeID
Collaboration diagram for Slic3r::GUI::ObjectVolumeID:
Class Members
ModelObject * object { nullptr }
ModelVolume * volume { nullptr }

◆ Slic3r::GUI::MeshErrorsInfo

struct Slic3r::GUI::MeshErrorsInfo
Collaboration diagram for Slic3r::GUI::MeshErrorsInfo:
Class Members
wxString tooltip
string warning_icon_name

◆ Slic3r::GUI::HintData

struct Slic3r::GUI::HintData
Collaboration diagram for Slic3r::GUI::HintData:
Class Members
function< void(void)> callback { nullptr }
string disabled_tags
string documentation_link
string enabled_tags
string follow_text
string hypertext
string id_string
string image_url
bool runtime_disable
string text
bool was_displayed
size_t weight

◆ Slic3r::GUI::FontImageData

struct Slic3r::GUI::FontImageData

Keep data for rasterization of text by font face.

Collaboration diagram for Slic3r::GUI::FontImageData:
Class Members
shared_ptr< atomic< bool > > cancel = nullptr
unsigned int * count_opened_font_files = nullptr
wxFontEncoding encoding
wxString font_name
GLenum format = GL_ALPHA
unsigned char gray_level = 5
size_t index
shared_ptr< bool > is_created = nullptr
GLint level = 0
Vec2i32 size
string text
GLuint texture_id
GLenum type = GL_UNSIGNED_BYTE

◆ Slic3r::GUI::OAuthParams

struct Slic3r::GUI::OAuthParams
Collaboration diagram for Slic3r::GUI::OAuthParams:
Class Members
string auth_fail_redirect_url
string auth_success_redirect_url
port_type callback_port
string callback_url
string client_id
string login_url
string response_type
string scope
string state
string token_url
string verification_code

◆ Slic3r::GUI::OAuthResult

struct Slic3r::GUI::OAuthResult
Collaboration diagram for Slic3r::GUI::OAuthResult:
Class Members
string access_token {""}
string error_message {""}
string refresh_token {""}
bool success {false}

◆ Slic3r::GUI::OAuthData

struct Slic3r::GUI::OAuthData
Collaboration diagram for Slic3r::GUI::OAuthData:
Class Members
OAuthParams params
shared_ptr< OAuthResult > result

◆ Slic3r::GUI::PlateListData

class Slic3r::GUI::PlateListData
Class Members
BedType bed_type = BedType::btDefault
int cur_plate_index = 0
bool is_valid = false
int plate_count = 0

◆ Slic3r::GUI::TextureDisplacementBakeVolume

struct Slic3r::GUI::TextureDisplacementBakeVolume
Collaboration diagram for Slic3r::GUI::TextureDisplacementBakeVolume:
Class Members
indexed_triangle_set base_mesh
TextureDisplacementFacetsData facets_data
vector< TextureDisplacementLayer > layers
vector< Vec2f > model_uv
TextureDisplacementOptions options
float resting_drop = 0.f
Vec3d texture_anchor = Vec3d::Zero()
ObjectID volume_id
Transform3d volume_to_world = Transform3d::Identity()

◆ Slic3r::GUI::TextureDisplacementBakeInput

struct Slic3r::GUI::TextureDisplacementBakeInput
Collaboration diagram for Slic3r::GUI::TextureDisplacementBakeInput:
Class Members
TextureColorSettings color
bool take_snapshot = true
vector< TextureDisplacementBakeVolume > volumes

◆ Slic3r::GUI::TextureDisplacementDebugInput

struct Slic3r::GUI::TextureDisplacementDebugInput
Collaboration diagram for Slic3r::GUI::TextureDisplacementDebugInput:
Class Members
indexed_triangle_set base_mesh
bool check_topology = true
TextureColorSettings color
TextureDisplacementFacetsData facets_data
vector< TextureDisplacementLayer > layers
size_t mesh_cap = 4'000'000
vector< Vec2f > model_uv
TextureDisplacementOptions options
TextureDisplacementPrepareParams prepare_params
Transform3d prepare_texture_frame = Transform3d::Identity()
float resting_drop = 0.f
bool run_prepare = true
ObjectID volume_id
Transform3d volume_to_world = Transform3d::Identity()

◆ Slic3r::GUI::TextureDisplacementPrepareVolume

struct Slic3r::GUI::TextureDisplacementPrepareVolume
Collaboration diagram for Slic3r::GUI::TextureDisplacementPrepareVolume:
Class Members
indexed_triangle_set base_mesh
vector< TextureDisplacementLayer > layers
TextureDisplacementFacetsData masks
vector< Vec2f > model_uv
Transform3d texture_frame = Transform3d::Identity()
ObjectID volume_id

◆ Slic3r::GUI::TextureDisplacementPrepareInput

struct Slic3r::GUI::TextureDisplacementPrepareInput
Collaboration diagram for Slic3r::GUI::TextureDisplacementPrepareInput:
Class Members
TextureColorSettings color
TextureDisplacementPrepareParams params
string snapshot_name
vector< TextureDisplacementPrepareVolume > volumes

◆ Slic3r::GUI::TextureDisplacementPreviewVolume

struct Slic3r::GUI::TextureDisplacementPreviewVolume
Collaboration diagram for Slic3r::GUI::TextureDisplacementPreviewVolume:
Class Members
indexed_triangle_set base_mesh
TextureDisplacementFacetsData facets_data
vector< TextureDisplacementLayer > layers
vector< Vec2f > model_uv
TextureDisplacementOptions options
float resting_drop = 0.f
Vec3d texture_anchor = Vec3d::Zero()
Transform3d volume_to_world = Transform3d::Identity()

◆ Slic3r::GUI::TextureDisplacementPreviewInput

struct Slic3r::GUI::TextureDisplacementPreviewInput
Collaboration diagram for Slic3r::GUI::TextureDisplacementPreviewInput:
Class Members
TextureColorSettings color
vector< TextureDisplacementPreviewVolume > volumes

◆ Slic3r::GUI::TextureDisplacementPreviewResult

struct Slic3r::GUI::TextureDisplacementPreviewResult
Collaboration diagram for Slic3r::GUI::TextureDisplacementPreviewResult:
Class Members
indexed_triangle_set mesh
vector< uint8_t > triangle_color

◆ Slic3r::GUI::BlockingWait

struct Slic3r::GUI::BlockingWait
Collaboration diagram for Slic3r::GUI::BlockingWait:
Class Members
atomic< bool > * pop_flag = nullptr
unsigned timeout_ms = 0

◆ Slic3r::GUI::PresetTab

struct Slic3r::GUI::PresetTab
Collaboration diagram for Slic3r::GUI::PresetTab:
Class Members
string name
Tab * panel
PrinterTechnology technology

◆ Slic3r::GUI::MixedFilamentResult

struct Slic3r::GUI::MixedFilamentResult
Collaboration diagram for Slic3r::GUI::MixedFilamentResult:
Class Members
vector< unsigned int > components
vector< GradientAnchor > gradient_curve
int gradient_direction = 0
bool gradient_enabled = false
bool per_part_gradient = false
vector< int > ratios

◆ Slic3r::GUI::ButtonData

struct Slic3r::GUI::ButtonData
Collaboration diagram for Slic3r::GUI::ButtonData:
Class Members
Button * button
ButtonSizeType type

◆ Slic3r::GUI::MsgButton

class Slic3r::GUI::MsgButton
Collaboration diagram for Slic3r::GUI::MsgButton:
Class Members
ButtonData * buttondata
wxString id

◆ Slic3r::GUI::FilamentWarningInfo

struct Slic3r::GUI::FilamentWarningInfo
Class Members
wxString info_msg
wxString wiki_url

◆ Slic3r::GUI::ObjState

struct Slic3r::GUI::ObjState
Collaboration diagram for Slic3r::GUI::ObjState:
Class Members
string dev_id
string state_dev_name
int state_device { 0 }

◆ Slic3r::GUI::NativeCommand

struct Slic3r::GUI::NativeCommand
Collaboration diagram for Slic3r::GUI::NativeCommand:
Class Members
string group
string icon
string input
string key
function< AppActionRunResult(const string &param)> runner
string title

◆ Slic3r::GUI::JumpTo

struct Slic3r::GUI::JumpTo
Collaboration diagram for Slic3r::GUI::JumpTo:
Class Members
string opt
Type opt_type
string text

◆ Slic3r::GUI::InfoItemAtributes

struct Slic3r::GUI::InfoItemAtributes
Collaboration diagram for Slic3r::GUI::InfoItemAtributes:
Class Members
string bmp_name
string name

◆ Slic3r::GUI::ExclusionVolumePrismPreview

struct Slic3r::GUI::ExclusionVolumePrismPreview
Collaboration diagram for Slic3r::GUI::ExclusionVolumePrismPreview:
Class Members
Polygon footprint
double z_max { 0.0 }
double z_min { 0.0 }

◆ Slic3r::GUI::WipeTowerRelocation

struct Slic3r::GUI::WipeTowerRelocation
Class Members
bool moved = false
bool overlaps_objects = false

◆ Slic3r::GUI::project_file

struct Slic3r::GUI::project_file
Collaboration diagram for Slic3r::GUI::project_file:
Class Members
string filename
string filepath
string size

◆ Slic3r::GUI::PublishMaterialIdentity

struct Slic3r::GUI::PublishMaterialIdentity
Collaboration diagram for Slic3r::GUI::PublishMaterialIdentity:
Class Members
string id
string type
string vendor

◆ Slic3r::GUI::FrameTimeStats

struct Slic3r::GUI::FrameTimeStats
Class Members
double average_ms { 0.0 }
double fps { 0.0 }
double max_ms { 0.0 }
double median_ms { 0.0 }
double p95_ms { 0.0 }
double p99_ms { 0.0 }

◆ Slic3r::GUI::Material

class Slic3r::GUI::Material
Collaboration diagram for Slic3r::GUI::Material:
Class Members
int id
MaterialItem * item

◆ Slic3r::GUI::MachinePanel

class Slic3r::GUI::MachinePanel
Collaboration diagram for Slic3r::GUI::MachinePanel:
Class Members
wxString mIndex
MachineObjectPanel * mPanel

◆ Slic3r::GUI::AmsRadioSelector

class Slic3r::GUI::AmsRadioSelector
Collaboration diagram for Slic3r::GUI::AmsRadioSelector:
Class Members
int m_groupid
wxString m_param_name
RadioBox * m_radiobox
bool m_selected = false

◆ Slic3r::GUI::SequentialClearanceInstance

struct Slic3r::GUI::SequentialClearanceInstance
Collaboration diagram for Slic3r::GUI::SequentialClearanceInstance:
Class Members
BoundingBox bounding_box
Polygon hull_polygon
double instance_height
ObjectID instance_id

◆ Slic3r::GUI::ShortcutInfo

struct Slic3r::GUI::ShortcutInfo
Collaboration diagram for Slic3r::GUI::ShortcutInfo:
Class Members
uint8_t contexts
KeyChord default_chord
Shortcut id
const char * key
bool modifier_variants
const char * name
bool repeatable

◆ Slic3r::GUI::ObjectInfo

struct Slic3r::GUI::ObjectInfo
Collaboration diagram for Slic3r::GUI::ObjectInfo:
Class Members
int identify_id {-1}
string name {""}
PartState state {psUnCheck}

◆ Slic3r::GUI::PlateInfo

struct Slic3r::GUI::PlateInfo
Collaboration diagram for Slic3r::GUI::PlateInfo:
Class Members
int index {-1}
bool label_object_enabled = false
vector< ObjectInfo > objects

◆ Slic3r::GUI::ScoreData

struct Slic3r::GUI::ScoreData
Collaboration diagram for Slic3r::GUI::ScoreData:
Class Members
wxString comment_text
int design_id
vector< string > image_url_paths
vector< pair< wxString, string > > local_to_url_image
string model_id
set< wxString > need_upload_images
int profile_id
int rating_id
int star_count
bool success_printed

◆ Slic3r::GUI::SurfaceDrag

struct Slic3r::GUI::SurfaceDrag
Collaboration diagram for Slic3r::GUI::SurfaceDrag:
Class Members
AllowVolumes condition
bool exist_hit = true
GLVolume * gl_volume
Transform3d instance_inv
Vec2d mouse_offset
Vec2d mouse_offset_without_sla_shift
optional< float > start_angle
optional< float > start_distance
Transform3d world

◆ Slic3r::GUI::TextureFilamentEntry

struct Slic3r::GUI::TextureFilamentEntry
Collaboration diagram for Slic3r::GUI::TextureFilamentEntry:
Class Members
string color_hex
int dialog_index {-1}
TextureFilamentKind kind {TextureFilamentKind::ExistingPhysical}
vector< unsigned int > mixed_components
vector< int > mixed_ratios
string name
string preset_name
size_t project_config_index {size_t(-1)}
string type

◆ Slic3r::GUI::TextureNewMixedFilament

struct Slic3r::GUI::TextureNewMixedFilament
Collaboration diagram for Slic3r::GUI::TextureNewMixedFilament:
Class Members
string color_hex
vector< int > component_dialog_indices
int dialog_index {-1}
vector< int > ratios

◆ Slic3r::GUI::FilamentMappingRow

struct Slic3r::GUI::FilamentMappingRow
Collaboration diagram for Slic3r::GUI::FilamentMappingRow:
Class Members
int cluster_id = -1
array< size_t, 3 > source_color = {0, 0, 0}
string source_hex
wxPanel * source_panel = nullptr
int target_filament_idx = 0
wxPanel * target_panel = nullptr

◆ Slic3r::GUI::TextureLibraryEntry

struct Slic3r::GUI::TextureLibraryEntry
Collaboration diagram for Slic3r::GUI::TextureLibraryEntry:
Class Members
string name
string pack_name
string path
TextureSource source

◆ Slic3r::GUI::PresetItem

struct Slic3r::GUI::PresetItem
Collaboration diagram for Slic3r::GUI::PresetItem:
Class Members
wxString category_name
wxString group_name
wxString new_value
wxString old_value
string opt_key
wxString option_name
Type type

◆ Slic3r::GUI::RotateOffSet

struct Slic3r::GUI::RotateOffSet
Class Members
wxPoint offset
float rotate

◆ Slic3r::GUI::NozzleOption

struct Slic3r::GUI::NozzleOption
Collaboration diagram for Slic3r::GUI::NozzleOption:
Class Members
string diameter
unordered_map< int, pair< NozzleVolumeType, int > > extruder_nozzle_stats

◆ Slic3r::GUI::CalibInfo

class Slic3r::GUI::CalibInfo
Collaboration diagram for Slic3r::GUI::CalibInfo:
Class Members
int ams_id = 0
BedType bed_type
string dev_id
int extruder_id = 0
ExtruderType extruder_type {ExtruderType::etDirectDrive}
string filament_color
Preset * filament_prest
int index = -1
float nozzle_diameter = 0.0f
NozzleVolumeType nozzle_volume_type
Calib_Params params
Preset * print_prest
Preset * printer_prest
shared_ptr< ProgressIndicator > process_bar
string select_ams
int slot_id = 0

Typedef Documentation

◆ ArrangePolygon

◆ CancelFn

using Slic3r::GUI::CancelFn = std::function<void()>

◆ choice_ctrl

◆ ColorEvent

using Slic3r::GUI::ColorEvent = Event<wxColour>

◆ ColorGradient

using Slic3r::GUI::ColorGradient = std::vector<ColorRGBA>

◆ ColorSelection

◆ column_t

using Slic3r::GUI::column_t = std::function<wxWindow*(wxWindow* parent, const Line&)>

◆ ConfigOptionsGroupShp

typedef std::shared_ptr< ConfigOptionsGroup > Slic3r::GUI::ConfigOptionsGroupShp = std::shared_ptr<ConfigOptionsGroup>

◆ ConfigOptionsGroupWkp

◆ Coord

using Slic3r::GUI::Coord = float

◆ coordf_t

typedef double Slic3r::GUI::coordf_t

◆ DecomposeMode

◆ DPIFrame

typedef DPIAware<wxFrame> Slic3r::GUI::DPIFrame

◆ EjectDriveNotificationClickedEvent

◆ ExportGcodeNotificationClickedEvent

◆ FilamentComboBoxList

◆ FloatPoint

using Slic3r::GUI::FloatPoint = std::array<Coord, 2>

◆ FullSettingsHierarchy

typedef std::map< std::string, std::vector< std::pair<std::string, std::string> > > Slic3r::GUI::FullSettingsHierarchy

◆ GCodeResult

◆ HeightProfileSmoothEvent

◆ InstallProgressFn

typedef std::function<void(int status, int percent, bool& cancel)> Slic3r::GUI::InstallProgressFn

◆ InstanceGoToFrontEvent

◆ LoadFromOtherInstanceEvent

using Slic3r::GUI::LoadFromOtherInstanceEvent = Event<std::vector<boost::filesystem::path>>

◆ MaterialHash

using Slic3r::GUI::MaterialHash = std::map<int, Material *>

◆ ModelFilter

typedef std::function<bool(const VendorProfile::PrinterModel&)> Slic3r::GUI::ModelFilter

◆ ModelNodePtrArray

using Slic3r::GUI::ModelNodePtrArray = std::vector<std::unique_ptr<ModelNode>>

◆ ObjectSettingEvent

◆ OnGetSubTaskFn

typedef std::function<void(BBLModelTask* subtask)> Slic3r::GUI::OnGetSubTaskFn

◆ OnUpdateStatusFn

typedef std::function<void(int status, int code, std::string msg)> Slic3r::GUI::OnUpdateStatusFn

◆ Pages3rdparty

typedef std::map<std::string , std::pair<PagePrinters* , PagePrinters* > > Slic3r::GUI::Pages3rdparty

◆ PageShp

using Slic3r::GUI::PageShp = std::shared_ptr<Page>

◆ ParamsNodePtrArray

using Slic3r::GUI::ParamsNodePtrArray = std::vector<std::unique_ptr<ParamsNode>>

◆ PartsInfo

typedef std::vector<std::pair<int, PartState> > Slic3r::GUI::PartsInfo

◆ PresetAliases

typedef std::map<std::string, std::set<std::string> > Slic3r::GUI::PresetAliases

◆ PresetList

typedef DataList<wxCheckListBox, std::string> Slic3r::GUI::PresetList

◆ PresetUpdateAvailableClickedEvent

◆ PrinterConfigUpdateAvailableClickedEvent

◆ RBtnEvent

using Slic3r::GUI::RBtnEvent = Event<std::pair<Vec2d, bool>>

◆ RBtnPlateEvent

using Slic3r::GUI::RBtnPlateEvent = Event<std::pair<Vec2d, int>>

◆ RemovableDriveEjectEvent

◆ RemovableDrivesChangedEvent

◆ StartDownloadOtherInstanceEvent

using Slic3r::GUI::StartDownloadOtherInstanceEvent = Event<std::vector<std::string>>

◆ StringList

typedef DataList<wxListBox, std::string> Slic3r::GUI::StringList

◆ t_back_to_init

using Slic3r::GUI::t_back_to_init = std::function<void(const std::string&)>

◆ t_change

using Slic3r::GUI::t_change = std::function<void(const t_config_option_key&, const boost::any&)>

◆ t_field

using Slic3r::GUI::t_field = std::unique_ptr<Field>

◆ t_kill_focus

using Slic3r::GUI::t_kill_focus = std::function<void(const std::string&)>

◆ t_layer_height_range

◆ t_opt_map

using Slic3r::GUI::t_opt_map = std::map< std::string, std::pair<std::string, int> >

◆ t_optionfield_map

◆ Vec3dsEvent

template<size_t N>
using Slic3r::GUI::Vec3dsEvent = ArrayEvent<Vec3d, N>

◆ WasCancelledFn

typedef std::function<bool()> Slic3r::GUI::WasCancelledFn

◆ widget_t

using Slic3r::GUI::widget_t = std::function<wxSizer*(wxWindow*)>

Widget type describes a function object that returns a wxWindow (our widget) and accepts a wxWidget (parent window).

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
WRAP_WIDTH 
MODEL_MIN_WRAP 
DIALOG_MARGIN 
INDEX_MARGIN 
BTN_SPACING 
INDENT_SPACING 
VERTICAL_SPACING 
MAX_COLS 
ROW_SPACING 
49 {
50 WRAP_WIDTH = 500,
51 MODEL_MIN_WRAP = 150,
52
53 DIALOG_MARGIN = 15,
54 INDEX_MARGIN = 40,
55 BTN_SPACING = 10,
56 INDENT_SPACING = 30,
58
59 MAX_COLS = 4,
60 ROW_SPACING = 75,
61};
@ MODEL_MIN_WRAP
Definition ConfigWizard_private.hpp:51
@ BTN_SPACING
Definition ConfigWizard_private.hpp:55
@ ROW_SPACING
Definition ConfigWizard_private.hpp:60
@ MAX_COLS
Definition ConfigWizard_private.hpp:59
@ INDENT_SPACING
Definition ConfigWizard_private.hpp:56
@ DIALOG_MARGIN
Definition ConfigWizard_private.hpp:53
@ VERTICAL_SPACING
Definition ConfigWizard_private.hpp:57
@ INDEX_MARGIN
Definition ConfigWizard_private.hpp:54
@ WRAP_WIDTH
Definition ConfigWizard_private.hpp:50

◆ anonymous enum

anonymous enum
Enumerator
DPI_DEFAULT 
92{ DPI_DEFAULT = 96 };
@ DPI_DEFAULT
Definition GUI_Utils.hpp:92

◆ Action

enum class Slic3r::GUI::Action
strong
Enumerator
Undef 
Transfer 
Discard 
Save 
258 {
259 Undef,
260 Transfer,
261 Discard,
262 Save
263};
@ Undef
Definition CustomGCode.hpp:55
@ Transfer
Definition UnsavedChangesDialog.hpp:260
@ Discard
Definition UnsavedChangesDialog.hpp:261
@ Save
Definition calib.hpp:39

◆ ActionButton

Enumerator
ACTION_BTN_CALI 
ACTION_BTN_LOAD 
ACTION_BTN_UNLOAD 
ACTION_BTN_COUNT 
70 {
75};
@ ACTION_BTN_LOAD
Definition AMSItem.hpp:72
@ ACTION_BTN_COUNT
Definition AMSItem.hpp:74
@ ACTION_BTN_CALI
Definition AMSItem.hpp:71
@ ACTION_BTN_UNLOAD
Definition AMSItem.hpp:73

◆ ActionButtons

Enumerator
TRANSFER 
KEEP 
SAVE 
DONT_SAVE 
REMEMBER_CHOISE 
250 {
251 TRANSFER = 1,
252 KEEP = 2,
253 SAVE = 4,
254 DONT_SAVE = 8,
255 REMEMBER_CHOISE = 0x10000
256};
@ KEEP
Definition UnsavedChangesDialog.hpp:252
@ DONT_SAVE
Definition UnsavedChangesDialog.hpp:254
@ SAVE
Definition UnsavedChangesDialog.hpp:253
@ TRANSFER
Definition UnsavedChangesDialog.hpp:251
@ REMEMBER_CHOISE
Definition UnsavedChangesDialog.hpp:255

◆ ActionButtonType

enum class Slic3r::GUI::ActionButtonType : int
strong
Enumerator
abReslice 
abExport 
abSendGCode 
602 : int {
603 abReslice,
604 abExport,
606};
@ abReslice
Definition Plater.cpp:603
@ abSendGCode
Definition Plater.cpp:605
@ abExport
Definition Plater.cpp:604

◆ ActionChange

enum class Slic3r::GUI::ActionChange
strong
Enumerator
Added 
Removed 
22{ Added, Removed };
@ Removed
Definition ActionRegistry.hpp:22
@ Added
Definition ActionRegistry.hpp:22

◆ AMSAction

enum class Slic3r::GUI::AMSAction : int
strong
Enumerator
AMS_ACTION_NONE 
AMS_ACTION_LOAD 
AMS_ACTION_UNLOAD 
AMS_ACTION_CALI 
AMS_ACTION_PRINTING 
AMS_ACTION_NORMAL 
AMS_ACTION_NOAMS 
111 : int {
119};
@ AMS_ACTION_NOAMS
Definition AMSItem.hpp:118
@ AMS_ACTION_NORMAL
Definition AMSItem.hpp:117
@ AMS_ACTION_CALI
Definition AMSItem.hpp:115
@ AMS_ACTION_UNLOAD
Definition AMSItem.hpp:114
@ AMS_ACTION_NONE
Definition AMSItem.hpp:112
@ AMS_ACTION_LOAD
Definition AMSItem.hpp:113
@ AMS_ACTION_PRINTING
Definition AMSItem.hpp:116

◆ AMSCanType

enum class Slic3r::GUI::AMSCanType : int
strong
Enumerator
AMS_CAN_TYPE_NONE 
AMS_CAN_TYPE_BRAND 
AMS_CAN_TYPE_THIRDBRAND 
AMS_CAN_TYPE_EMPTY 
AMS_CAN_TYPE_VIRTUAL 
138 : int {
144};
@ AMS_CAN_TYPE_NONE
Definition AMSItem.hpp:139
@ AMS_CAN_TYPE_BRAND
Definition AMSItem.hpp:140
@ AMS_CAN_TYPE_THIRDBRAND
Definition AMSItem.hpp:141
@ AMS_CAN_TYPE_VIRTUAL
Definition AMSItem.hpp:143
@ AMS_CAN_TYPE_EMPTY
Definition AMSItem.hpp:142

◆ AMSModel

Enumerator
EXT_AMS 
GENERIC_AMS 
AMS_LITE 
N3F_AMS 
N3S_AMS 
57 {
58 EXT_AMS = 0, //ext
59 GENERIC_AMS = 1,
60 AMS_LITE = 2, //ams-lite
61 N3F_AMS = 3,
62 N3S_AMS = 4 //n3s single_ams
63};
@ EXT_AMS
Definition AMSItem.hpp:58
@ N3S_AMS
Definition AMSItem.hpp:62
@ GENERIC_AMS
Definition AMSItem.hpp:59
@ N3F_AMS
Definition AMSItem.hpp:61
@ AMS_LITE
Definition AMSItem.hpp:60

◆ AMSModelOriginType

Enumerator
GENERIC_EXT 
LITE_EXT 
65 {
68};
@ LITE_EXT
Definition AMSItem.hpp:67
@ GENERIC_EXT
Definition AMSItem.hpp:66

◆ AMSPanelPos

enum class Slic3r::GUI::AMSPanelPos : int
strong
Enumerator
SINGLE_PANEL 
LEFT_PANEL 
RIGHT_PANEL 
87 : int {
91};
@ RIGHT_PANEL
Definition AMSItem.hpp:90
@ LEFT_PANEL
Definition AMSItem.hpp:89
@ SINGLE_PANEL
Definition AMSItem.hpp:88

◆ AMSPassRoadMode

enum class Slic3r::GUI::AMSPassRoadMode : int
strong
Enumerator
AMS_ROAD_MODE_NONE 
AMS_ROAD_MODE_LEFT 
AMS_ROAD_MODE_LEFT_RIGHT 
AMS_ROAD_MODE_END_TOP 
AMS_ROAD_MODE_END_RIGHT 
AMS_ROAD_MODE_END_BOTTOM 
102 : int {
109};
@ AMS_ROAD_MODE_END_TOP
Definition AMSItem.hpp:106
@ AMS_ROAD_MODE_END_BOTTOM
Definition AMSItem.hpp:108
@ AMS_ROAD_MODE_END_RIGHT
Definition AMSItem.hpp:107
@ AMS_ROAD_MODE_LEFT_RIGHT
Definition AMSItem.hpp:79
@ AMS_ROAD_MODE_NONE
Definition AMSItem.hpp:82
@ AMS_ROAD_MODE_LEFT
Definition AMSItem.hpp:78

◆ AMSPassRoadSTEP

enum class Slic3r::GUI::AMSPassRoadSTEP : int
strong
Enumerator
AMS_ROAD_STEP_NONE 
AMS_ROAD_STEP_1 
AMS_ROAD_STEP_2 
AMS_ROAD_STEP_3 
AMS_ROAD_STEP_COMBO_LOAD_STEP1 
AMS_ROAD_STEP_COMBO_LOAD_STEP2 
AMS_ROAD_STEP_COMBO_LOAD_STEP3 
121 : int {
123 AMS_ROAD_STEP_1 = 1, // lib -> extrusion
124 AMS_ROAD_STEP_2 = 2, // extrusion->buffer
125 AMS_ROAD_STEP_3 = 4, // extrusion
126
130};
@ AMS_ROAD_STEP_NONE
Definition AMSItem.hpp:122
@ AMS_ROAD_STEP_1
Definition AMSItem.hpp:123
@ AMS_ROAD_STEP_COMBO_LOAD_STEP2
Definition AMSItem.hpp:128
@ AMS_ROAD_STEP_2
Definition AMSItem.hpp:124
@ AMS_ROAD_STEP_COMBO_LOAD_STEP1
Definition AMSItem.hpp:127
@ AMS_ROAD_STEP_3
Definition AMSItem.hpp:125
@ AMS_ROAD_STEP_COMBO_LOAD_STEP3
Definition AMSItem.hpp:129

◆ AMSPassRoadType

enum class Slic3r::GUI::AMSPassRoadType : int
strong
Enumerator
AMS_ROAD_TYPE_NONE 
AMS_ROAD_TYPE_LOAD 
AMS_ROAD_TYPE_UNLOAD 
132 : int {
136};
@ AMS_ROAD_TYPE_LOAD
Definition AMSItem.hpp:134
@ AMS_ROAD_TYPE_NONE
Definition AMSItem.hpp:133
@ AMS_ROAD_TYPE_UNLOAD
Definition AMSItem.hpp:135

◆ AMSRoadMode

enum class Slic3r::GUI::AMSRoadMode : int
strong
Enumerator
AMS_ROAD_MODE_LEFT 
AMS_ROAD_MODE_LEFT_RIGHT 
AMS_ROAD_MODE_END 
AMS_ROAD_MODE_END_ONLY 
AMS_ROAD_MODE_NONE 
AMS_ROAD_MODE_NONE_ANY_ROAD 
AMS_ROAD_MODE_VIRTUAL_TRAY 
77 : int {
85};
@ AMS_ROAD_MODE_VIRTUAL_TRAY
Definition AMSItem.hpp:84
@ AMS_ROAD_MODE_END_ONLY
Definition AMSItem.hpp:81
@ AMS_ROAD_MODE_NONE_ANY_ROAD
Definition AMSItem.hpp:83
@ AMS_ROAD_MODE_END
Definition AMSItem.hpp:80

◆ AMSRoadShowMode

enum class Slic3r::GUI::AMSRoadShowMode : int
strong
Enumerator
AMS_ROAD_MODE_FOUR 
AMS_ROAD_MODE_DOUBLE 
AMS_ROAD_MODE_SINGLE 
AMS_ROAD_MODE_SINGLE_N3S 
AMS_ROAD_MODE_AMS_LITE 
AMS_ROAD_MODE_NONE 
93 : int {
100};
@ AMS_ROAD_MODE_SINGLE
Definition AMSItem.hpp:96
@ AMS_ROAD_MODE_FOUR
Definition AMSItem.hpp:94
@ AMS_ROAD_MODE_AMS_LITE
Definition AMSItem.hpp:98
@ AMS_ROAD_MODE_DOUBLE
Definition AMSItem.hpp:95
@ AMS_ROAD_MODE_SINGLE_N3S
Definition AMSItem.hpp:97

◆ AppActionKind

enum class Slic3r::GUI::AppActionKind
strong
Enumerator
Plugin 
Command 
25{ Plugin, Command };
@ Plugin
Definition ActionRegistry.hpp:25
@ Command
Definition SerialMessageType.hpp:6

◆ AssemblyMode

enum class Slic3r::GUI::AssemblyMode : unsigned char
strong
Enumerator
FACE_FACE 
POINT_POINT 
37 : unsigned char {
40};
@ FACE_FACE
Definition GLGizmoMeasure.hpp:38
@ POINT_POINT
Definition GLGizmoMeasure.hpp:39

◆ CadLevel

enum class Slic3r::GUI::CadLevel : int
strong
Enumerator
Idle 
Tool 
Gesture 
Transient 
18 : int {
19 Idle = 0, // nothing transient is up: Esc clears the selection
20 Tool = 1, // a feature card / armed sketch tool / constrain session: Esc exits it
21 Gesture = 2, // an uncommitted delta (entity being drawn, body being dragged): Esc reverts it
22 Transient = 3, // a value field or a popup menu: Esc closes just that
23};
@ Gesture
Definition DesignInteraction.hpp:21
@ Transient
Definition DesignInteraction.hpp:22
@ Idle
Definition DesignInteraction.hpp:19
@ Tool
Definition Types.hpp:111

◆ CalibKind

enum class Slic3r::GUI::CalibKind : int
strong
Enumerator
Temperature 
MaxVolumetric 
PressureAdvance 
FlowRatio 
Retraction 
Cornering 
InputShapingFreq 
InputShapingDamp 
VFA 
134{
138 FlowRatio,
140 Cornering,
143 VFA
144};
@ Cornering
Definition MainFrame.hpp:140
@ MaxVolumetric
Definition MainFrame.hpp:136
@ VFA
Definition MainFrame.hpp:143
@ InputShapingFreq
Definition MainFrame.hpp:141
@ InputShapingDamp
Definition MainFrame.hpp:142
@ Retraction
Definition MainFrame.hpp:139
@ FlowRatio
Definition CalibrationWizardSavePage.cpp:125
@ PressureAdvance
Definition Types.hpp:106
@ Temperature
Definition Types.hpp:104

◆ CalibrationFilamentMode

Enumerator
CALI_MODEL_SINGLE 
CALI_MODEL_MULITI 
56 {
57 /* calibration single filament at once */
59 /* calibration multi filament at once */
61};
@ CALI_MODEL_MULITI
Definition CalibrationWizardPage.hpp:60
@ CALI_MODEL_SINGLE
Definition CalibrationWizardPage.hpp:58

◆ CalibrationMethod

Enumerator
CALI_METHOD_MANUAL 
CALI_METHOD_AUTO 
CALI_METHOD_NEW_AUTO 
CALI_METHOD_NONE 
63 {
68};
@ CALI_METHOD_NONE
Definition CalibrationWizardPage.hpp:67
@ CALI_METHOD_AUTO
Definition CalibrationWizardPage.hpp:65
@ CALI_METHOD_MANUAL
Definition CalibrationWizardPage.hpp:64
@ CALI_METHOD_NEW_AUTO
Definition CalibrationWizardPage.hpp:66

◆ CalibrationStyle

enum class Slic3r::GUI::CalibrationStyle : int
strong
Enumerator
CALI_STYLE_DEFAULT 
CALI_STYLE_X1 
CALI_STYLE_P1P 
46{
50};
@ CALI_STYLE_X1
Definition CalibrationWizardPage.hpp:48
@ CALI_STYLE_DEFAULT
Definition CalibrationWizardPage.hpp:47
@ CALI_STYLE_P1P
Definition CalibrationWizardPage.hpp:49

◆ CaliColumnType

Enumerator
Cali_Name 
Cali_Filament 
Cali_Nozzle_ID 
Cali_Nozzle 
Cali_K_Value 
Cali_Delete 
Cali_Edit 
Cali_Type_Count 
60 : int {
61 Cali_Name = 0,
69};
@ Cali_Type_Count
Definition CaliHistoryDialog.cpp:68
@ Cali_Nozzle
Definition CaliHistoryDialog.cpp:64
@ Cali_K_Value
Definition CaliHistoryDialog.cpp:65
@ Cali_Filament
Definition CaliHistoryDialog.cpp:62
@ Cali_Delete
Definition CaliHistoryDialog.cpp:66
@ Cali_Nozzle_ID
Definition CaliHistoryDialog.cpp:63
@ Cali_Name
Definition CaliHistoryDialog.cpp:61
@ Cali_Edit
Definition CaliHistoryDialog.cpp:67

◆ CaliPageActionType

enum class Slic3r::GUI::CaliPageActionType : int
strong
Enumerator
CALI_ACTION_MANAGE_RESULT 
CALI_ACTION_MANUAL_CALI 
CALI_ACTION_AUTO_CALI 
CALI_ACTION_START 
CALI_ACTION_CALI 
CALI_ACTION_FLOW_CALI_STAGE_2 
CALI_ACTION_RECALI 
CALI_ACTION_PREV 
CALI_ACTION_NEXT 
CALI_ACTION_CALI_NEXT 
CALI_ACTION_PA_SAVE 
CALI_ACTION_FLOW_SAVE 
CALI_ACTION_FLOW_COARSE_SAVE 
CALI_ACTION_FLOW_FINE_SAVE 
CALI_ACTION_COMMON_SAVE 
CALI_ACTION_GO_HOME 
CALI_ACTION_COUNT 
222{
240};
@ CALI_ACTION_COUNT
Definition CalibrationWizardPage.hpp:239
@ CALI_ACTION_NEXT
Definition CalibrationWizardPage.hpp:231
@ CALI_ACTION_FLOW_FINE_SAVE
Definition CalibrationWizardPage.hpp:236
@ CALI_ACTION_PA_SAVE
Definition CalibrationWizardPage.hpp:233
@ CALI_ACTION_AUTO_CALI
Definition CalibrationWizardPage.hpp:225
@ CALI_ACTION_PREV
Definition CalibrationWizardPage.hpp:230
@ CALI_ACTION_MANUAL_CALI
Definition CalibrationWizardPage.hpp:224
@ CALI_ACTION_MANAGE_RESULT
Definition CalibrationWizardPage.hpp:223
@ CALI_ACTION_GO_HOME
Definition CalibrationWizardPage.hpp:238
@ CALI_ACTION_CALI_NEXT
Definition CalibrationWizardPage.hpp:232
@ CALI_ACTION_FLOW_COARSE_SAVE
Definition CalibrationWizardPage.hpp:235
@ CALI_ACTION_CALI
Definition CalibrationWizardPage.hpp:227
@ CALI_ACTION_START
Definition CalibrationWizardPage.hpp:226
@ CALI_ACTION_COMMON_SAVE
Definition CalibrationWizardPage.hpp:237
@ CALI_ACTION_RECALI
Definition CalibrationWizardPage.hpp:229
@ CALI_ACTION_FLOW_SAVE
Definition CalibrationWizardPage.hpp:234
@ CALI_ACTION_FLOW_CALI_STAGE_2
Definition CalibrationWizardPage.hpp:228

◆ CaliPageType

enum class Slic3r::GUI::CaliPageType
strong
Enumerator
CALI_PAGE_START 
CALI_PAGE_PRESET 
CALI_PAGE_CALI 
CALI_PAGE_COARSE_SAVE 
CALI_PAGE_FINE_CALI 
CALI_PAGE_FINE_SAVE 
CALI_PAGE_PA_SAVE 
CALI_PAGE_FLOW_SAVE 
CALI_PAGE_COMMON_SAVE 
81 {
91};
@ CALI_PAGE_FINE_CALI
Definition CalibrationWizardPage.hpp:86
@ CALI_PAGE_FINE_SAVE
Definition CalibrationWizardPage.hpp:87
@ CALI_PAGE_COARSE_SAVE
Definition CalibrationWizardPage.hpp:85
@ CALI_PAGE_FLOW_SAVE
Definition CalibrationWizardPage.hpp:89
@ CALI_PAGE_PRESET
Definition CalibrationWizardPage.hpp:83
@ CALI_PAGE_COMMON_SAVE
Definition CalibrationWizardPage.hpp:90
@ CALI_PAGE_START
Definition CalibrationWizardPage.hpp:82
@ CALI_PAGE_CALI
Definition CalibrationWizardPage.hpp:84
@ CALI_PAGE_PA_SAVE
Definition CalibrationWizardPage.hpp:88

◆ CaliPresetPageStatus

Enumerator
CaliPresetStatusInit 
CaliPresetStatusNormal 
CaliPresetStatusNoUserLogin 
CaliPresetStatusInvalidPrinter 
CaliPresetStatusConnectingServer 
CaliPresetStatusInUpgrading 
CaliPresetStatusInSystemPrinting 
CaliPresetStatusInPrinting 
CaliPresetStatusLanModeNoSdcard 
CaliPresetStatusNoSdcard 
CaliPresetStatusNeedForceUpgrading 
CaliPresetStatusNeedConsistencyUpgrading 
CaliPresetStatusUnsupportedPrinter 
CaliPresetStatusInConnecting 
CaliPresetStatusFilamentIncompatible 
CaliPresetStatusLanModeSDcardNotAvailable 
CaliPresetStatusDifferentNozzleDiameters 
CaliPresetStatusOptionalPrinterModel 
162{
181};
@ CaliPresetStatusDifferentNozzleDiameters
Definition CalibrationWizardPresetPage.hpp:179
@ CaliPresetStatusLanModeSDcardNotAvailable
Definition CalibrationWizardPresetPage.hpp:178
@ CaliPresetStatusNeedConsistencyUpgrading
Definition CalibrationWizardPresetPage.hpp:174
@ CaliPresetStatusInPrinting
Definition CalibrationWizardPresetPage.hpp:170
@ CaliPresetStatusLanModeNoSdcard
Definition CalibrationWizardPresetPage.hpp:171
@ CaliPresetStatusNormal
Definition CalibrationWizardPresetPage.hpp:164
@ CaliPresetStatusConnectingServer
Definition CalibrationWizardPresetPage.hpp:167
@ CaliPresetStatusNoUserLogin
Definition CalibrationWizardPresetPage.hpp:165
@ CaliPresetStatusOptionalPrinterModel
Definition CalibrationWizardPresetPage.hpp:180
@ CaliPresetStatusInSystemPrinting
Definition CalibrationWizardPresetPage.hpp:169
@ CaliPresetStatusUnsupportedPrinter
Definition CalibrationWizardPresetPage.hpp:175
@ CaliPresetStatusInConnecting
Definition CalibrationWizardPresetPage.hpp:176
@ CaliPresetStatusNeedForceUpgrading
Definition CalibrationWizardPresetPage.hpp:173
@ CaliPresetStatusFilamentIncompatible
Definition CalibrationWizardPresetPage.hpp:177
@ CaliPresetStatusInit
Definition CalibrationWizardPresetPage.hpp:163
@ CaliPresetStatusInvalidPrinter
Definition CalibrationWizardPresetPage.hpp:166
@ CaliPresetStatusInUpgrading
Definition CalibrationWizardPresetPage.hpp:168
@ CaliPresetStatusNoSdcard
Definition CalibrationWizardPresetPage.hpp:172

◆ CaliPresetStage

Enumerator
CALI_MANULA_STAGE_NONE 
CALI_MANUAL_STAGE_1 
CALI_MANUAL_STAGE_2 
32 {
36};
@ CALI_MANULA_STAGE_NONE
Definition CalibrationWizardPresetPage.hpp:33
@ CALI_MANUAL_STAGE_2
Definition CalibrationWizardPresetPage.hpp:35
@ CALI_MANUAL_STAGE_1
Definition CalibrationWizardPresetPage.hpp:34

◆ CaliSaveStyle

Enumerator
CALI_SAVE_P1P_STYLE 
CALI_SAVE_X1_STYLE 
27 {
30};
@ CALI_SAVE_P1P_STYLE
Definition CalibrationWizardSavePage.hpp:28
@ CALI_SAVE_X1_STYLE
Definition CalibrationWizardSavePage.hpp:29

◆ CameraMenuIDs

Enumerator
wxID_CAMERA_PERSPECTIVE 
wxID_CAMERA_ORTHOGONAL 
wxID_CAMERA_COUNT 
166 {
170};
@ wxID_CAMERA_COUNT
Definition GUI_App.hpp:169
@ wxID_CAMERA_ORTHOGONAL
Definition GUI_App.hpp:168
@ wxID_CAMERA_PERSPECTIVE
Definition GUI_App.hpp:167

◆ CameraRecordingStatus

Enumerator
RECORDING_NONE 
RECORDING_OFF_NORMAL 
RECORDING_OFF_HOVER 
RECORDING_ON_NORMAL 
RECORDING_ON_HOVER 
82 {
88};
@ RECORDING_ON_HOVER
Definition StatusPanel.hpp:87
@ RECORDING_ON_NORMAL
Definition StatusPanel.hpp:86
@ RECORDING_OFF_HOVER
Definition StatusPanel.hpp:85
@ RECORDING_OFF_NORMAL
Definition StatusPanel.hpp:84
@ RECORDING_NONE
Definition StatusPanel.hpp:83

◆ CameraTimelapseStatus

Enumerator
TIMELAPSE_NONE 
TIMELAPSE_OFF_NORMAL 
TIMELAPSE_OFF_HOVER 
TIMELAPSE_ON_NORMAL 
TIMELAPSE_ON_HOVER 
90 {
96};
@ TIMELAPSE_ON_NORMAL
Definition StatusPanel.hpp:94
@ TIMELAPSE_OFF_HOVER
Definition StatusPanel.hpp:93
@ TIMELAPSE_ON_HOVER
Definition StatusPanel.hpp:95
@ TIMELAPSE_OFF_NORMAL
Definition StatusPanel.hpp:92
@ TIMELAPSE_NONE
Definition StatusPanel.hpp:91

◆ CloudTaskNozzleId

enum class Slic3r::GUI::CloudTaskNozzleId : int
strong
Enumerator
NOZZLE_RIGHT 
NOZZLE_LEFT 
104{
105 NOZZLE_RIGHT = 0,
106 NOZZLE_LEFT = 1,
107};
@ NOZZLE_LEFT
Definition SelectMachine.hpp:106
@ NOZZLE_RIGHT
Definition SelectMachine.hpp:105

◆ CollapseSide

enum class Slic3r::GUI::CollapseSide
strong
Enumerator
None 
Left 
Right 
462{ None, Left, Right };
@ Right
Definition GLToolbar.hpp:462
@ Left
Definition GLToolbar.hpp:462
@ None
Definition SketchEngine.hpp:180

◆ ColumnNumber

Enumerator
colName 
colHeight 
colPrint 
colFilament 
colSupportPaint 
colColorPaint 
colSinking 
colEditing 
colCount 
48{
49 colName = 0, // item name
50 colHeight , // variable height
51 colPrint , // printable property
52 colFilament , // extruder selection
53 // BBS
57 colEditing , // item editing
58 colCount ,
59};
@ colSinking
Definition ObjectDataViewModel.hpp:56
@ colColorPaint
Definition ObjectDataViewModel.hpp:55
@ colSupportPaint
Definition ObjectDataViewModel.hpp:54
@ colEditing
Definition ObjectDataViewModel.hpp:57
@ colHeight
Definition ObjectDataViewModel.hpp:50
@ colName
Definition ObjectDataViewModel.hpp:49
@ colFilament
Definition ObjectDataViewModel.hpp:52
@ colPrint
Definition ObjectDataViewModel.hpp:51
@ colCount
Definition ObjectDataViewModel.hpp:58

◆ CommonGizmosDataID

Enumerator
None 
SelectionInfo 
InstancesHider 
Raycaster 
ObjectClipper 
72 {
73 None = 0,
74 SelectionInfo = 1 << 0,
75 InstancesHider = 1 << 1,
76 Raycaster = 1 << 3,
77 ObjectClipper = 1 << 4,
78
79};
@ SelectionInfo
Definition GLGizmosCommon.hpp:74
@ Raycaster
Definition GLGizmosCommon.hpp:76
@ InstancesHider
Definition GLGizmosCommon.hpp:75
@ ObjectClipper
Definition GLGizmosCommon.hpp:77

◆ ConfigMenuIDs

Enumerator
ConfigMenuPreferences 
ConfigMenuPrinter 
ConfigMenuCnt 
146 {
147 //ConfigMenuWizard,
148 //ConfigMenuSnapshots,
149 //ConfigMenuTakeSnapshot,
150 //ConfigMenuUpdate,
151 //ConfigMenuDesktopIntegration,
154 //ConfigMenuModeSimple,
155 //ConfigMenuModeAdvanced,
156 //ConfigMenuLanguage,
157 //ConfigMenuFlashFirmware,
159};
@ ConfigMenuCnt
Definition GUI_App.hpp:158
@ ConfigMenuPreferences
Definition GUI_App.hpp:152
@ ConfigMenuPrinter
Definition GUI_App.hpp:153

◆ ConfigNozzleIdx

enum class Slic3r::GUI::ConfigNozzleIdx : int
strong
Enumerator
NOZZLE_LEFT 
NOZZLE_RIGHT 
116{
117 NOZZLE_LEFT = 0,
118 NOZZLE_RIGHT = 1,
119};

◆ DailyTipsLayout

enum class Slic3r::GUI::DailyTipsLayout
strong
Enumerator
Horizontal 
Vertical 
15 {
18};
@ Vertical
Definition SketchEngine.hpp:101
@ Horizontal
Definition SketchEngine.hpp:101

◆ DataStatusType

Enumerator
ADJUST 
OK 
UNMATCHED 
119 {
120 ADJUST,
121 OK,
123};
@ OK
Definition uiAMSBestPositionPopup.hpp:121
@ ADJUST
Definition uiAMSBestPositionPopup.hpp:120
@ UNMATCHED
Definition uiAMSBestPositionPopup.hpp:122

◆ DecomposeBaseColor

Enumerator
None 
Cyan 
Magenta 
Yellow 
White 
Red 
Green 
Blue 
29 {
30 None,
31 Cyan,
32 Magenta,
33 Yellow,
34 White,
35 Red,
36 Green,
37 Blue
38};
@ Cyan
Definition ColorDecomposeDialog.hpp:31
@ White
Definition ColorDecomposeDialog.hpp:34
@ Yellow
Definition ColorDecomposeDialog.hpp:33
@ Blue
Definition ColorDecomposeDialog.hpp:37
@ Magenta
Definition ColorDecomposeDialog.hpp:32
@ Green
Definition ColorDecomposeDialog.hpp:36
@ Red
Definition ColorDecomposeDialog.hpp:35

◆ DevExtruderState

enum class Slic3r::GUI::DevExtruderState
strong
Enumerator
FILLED_LOAD 
FILLED_UNLOAD 
EMPTY_LOAD 
EMPTY_UNLOAD 
897 {
902};
@ FILLED_UNLOAD
Definition StatusPanel.hpp:106
@ EMPTY_LOAD
Definition StatusPanel.hpp:107
@ EMPTY_UNLOAD
Definition StatusPanel.hpp:108
@ FILLED_LOAD
Definition StatusPanel.hpp:105

◆ DownloaderUserAction

Enumerator
DownloadUserCanceled 
DownloadUserPaused 
DownloadUserContinued 
DownloadUserOpenedFolder 
31{
36};
@ DownloadUserContinued
Definition Downloader.hpp:34
@ DownloadUserCanceled
Definition Downloader.hpp:32
@ DownloadUserPaused
Definition Downloader.hpp:33
@ DownloadUserOpenedFolder
Definition Downloader.hpp:35

◆ DownloadState

Enumerator
DownloadPending 
DownloadOngoing 
DownloadStopped 
DownloadDone 
DownloadError 
DownloadPaused 
DownloadStateUnknown 
20{
28};
@ DownloadDone
Definition Downloader.hpp:24
@ DownloadStopped
Definition Downloader.hpp:23
@ DownloadOngoing
Definition Downloader.hpp:22
@ DownloadStateUnknown
Definition Downloader.hpp:27
@ DownloadPaused
Definition Downloader.hpp:26
@ DownloadError
Definition Downloader.hpp:25
@ DownloadPending
Definition Downloader.hpp:21

◆ DpTok

Enumerator
TokRibbonBg 
TokRibbonHover 
TokPanelBg 
TokSecText 
TokCtlText 
TokItemText 
TokItemDim 
TokBorder 
TokCount 
@ TokRibbonHover
Definition DesignPanel.cpp:195
@ TokPanelBg
Definition DesignPanel.cpp:195
@ TokCtlText
Definition DesignPanel.cpp:195
@ TokBorder
Definition DesignPanel.cpp:196
@ TokItemDim
Definition DesignPanel.cpp:195
@ TokCount
Definition DesignPanel.cpp:196
@ TokItemText
Definition DesignPanel.cpp:195
@ TokSecText
Definition DesignPanel.cpp:195
@ TokRibbonBg
Definition DesignPanel.cpp:195

◆ DragMode

enum class Slic3r::GUI::DragMode
strong
Enumerator
NONE 
DRAGGING 
46 {
47 NONE,
49};
@ NONE
Definition SideTools.hpp:27
@ DRAGGING
Definition DragCanvas.hpp:48

◆ DrawMode

Enumerator
dmRegular 
dmSlaPrint 
dmSequentialFffPrint 
dmSequentialGCodeView 
48{
53};
@ dmSequentialFffPrint
Definition IMSlider.hpp:51
@ dmSequentialGCodeView
Definition IMSlider.hpp:52
@ dmSlaPrint
Definition IMSlider.hpp:50
@ dmRegular
Definition IMSlider.hpp:49

◆ DryCtrDev

enum class Slic3r::GUI::DryCtrDev
strong
Enumerator
N3S 
N3F 
UNKNOWN 
48 {
49 N3S,
50 N3F,
52};
@ UNKNOWN
Definition AMSDryControl.hpp:45
@ N3F
Definition DevDefs.h:62
@ N3S
Definition DevDefs.h:63

◆ DryCtrState

enum class Slic3r::GUI::DryCtrState
strong
Enumerator
IDLE 
DRY_WHEN_PRINT 
UNKNOWN 
42 {
43 IDLE,
46};
@ IDLE
Definition SelectMachinePop.hpp:54
@ DRY_WHEN_PRINT
Definition AMSDryControl.hpp:44

◆ ECoordinatesType

enum class Slic3r::GUI::ECoordinatesType : unsigned char
strong
Enumerator
World 
Instance 
Local 
8{
9 World = 0,
11 Local
12};
@ Instance
Definition GUI_Geometry.hpp:10
@ World
Definition GUI_Geometry.hpp:9
@ Local
Definition PresetBundle.hpp:113

◆ EditorType

Enumerator
etUndef 
etMinZ 
etMaxZ 
etLayerHeight 
32{
33 etUndef = 0,
34 etMinZ = 1,
35 etMaxZ = 2,
36 etLayerHeight = 4,
37};
@ etMaxZ
Definition GUI_ObjectLayers.hpp:35
@ etMinZ
Definition GUI_ObjectLayers.hpp:34
@ etUndef
Definition GUI_ObjectLayers.hpp:33
@ etLayerHeight
Definition GUI_ObjectLayers.hpp:36

◆ EMeasureMode

enum class Slic3r::GUI::EMeasureMode : unsigned char
strong
Enumerator
ONLY_MEASURE 
ONLY_ASSEMBLY 
33 : unsigned char {
36};
@ ONLY_ASSEMBLY
Definition GLGizmoMeasure.hpp:35
@ ONLY_MEASURE
Definition GLGizmoMeasure.hpp:34

◆ ERescaleTarget

enum class Slic3r::GUI::ERescaleTarget
strong
Enumerator
Mainframe 
SettingsDialog 
183{
184 Mainframe,
186};
@ SettingsDialog
Definition MainFrame.cpp:185
@ Mainframe
Definition MainFrame.cpp:184

◆ ExportCase

Enumerator
INITIALIZE_FAIL 
ADD_FILE_FAIL 
ADD_BUNDLE_STRUCTURE_FAIL 
FINALIZE_FAIL 
OPEN_ZIP_WRITTEN_FILE 
EXPORT_CANCEL 
EXPORT_SUCCESS 
CASE_COUNT 
38 {
47};
@ EXPORT_CANCEL
Definition ExportPresetBundleDialog.hpp:44
@ OPEN_ZIP_WRITTEN_FILE
Definition ExportPresetBundleDialog.hpp:43
@ ADD_FILE_FAIL
Definition ExportPresetBundleDialog.hpp:40
@ EXPORT_SUCCESS
Definition ExportPresetBundleDialog.hpp:45
@ INITIALIZE_FAIL
Definition ExportPresetBundleDialog.hpp:39
@ FINALIZE_FAIL
Definition ExportPresetBundleDialog.hpp:42
@ ADD_BUNDLE_STRUCTURE_FAIL
Definition ExportPresetBundleDialog.hpp:41
@ CASE_COUNT
Definition ExportPresetBundleDialog.hpp:46

◆ ExportingStatus

Enumerator
NOT_EXPORTING 
EXPORTING_TO_REMOVABLE 
EXPORTING_TO_LOCAL 
7164 {
7168};
@ EXPORTING_TO_REMOVABLE
Definition Plater.cpp:7166
@ EXPORTING_TO_LOCAL
Definition Plater.cpp:7167
@ NOT_EXPORTING
Definition Plater.cpp:7165

◆ ExtruderState

Enumerator
FILLED_LOAD 
FILLED_UNLOAD 
EMPTY_LOAD 
EMPTY_UNLOAD 
104 {
109};

◆ FanControlType

Enumerator
PART_FAN 
AUX_FAN 
EXHAUST_FAN 
FILTER_FAN 
CHAMBER_FAN 
TOP_FAN 
46{
47 PART_FAN = 0,
48 AUX_FAN,
53};
@ EXHAUST_FAN
Definition FanControl.hpp:49
@ PART_FAN
Definition FanControl.hpp:47
@ FILTER_FAN
Definition FanControl.hpp:50
@ CHAMBER_FAN
Definition FanControl.hpp:51
@ AUX_FAN
Definition FanControl.hpp:48
@ TOP_FAN
Definition FanControl.hpp:52

◆ FILAMENT_TYPE

Enumerator
tPLA 
tABS_ASA 
tPETG 
tPCTG 
tTPU 
tTPU_AMS 
tPA_CF 
tPET_CF 
tCustom 
422{
423 tPLA = 0,
424 tABS_ASA,
425 tPETG,
426 tPCTG,
427 tTPU,
428 tTPU_AMS,
429 tPA_CF,
430 tPET_CF,
431 tCustom
432};
@ tPETG
Definition calib_dlg.cpp:425
@ tPCTG
Definition calib_dlg.cpp:426
@ tPA_CF
Definition calib_dlg.cpp:429
@ tPET_CF
Definition calib_dlg.cpp:430
@ tTPU_AMS
Definition calib_dlg.cpp:428
@ tCustom
Definition calib_dlg.cpp:431
@ tABS_ASA
Definition calib_dlg.cpp:424
@ tTPU
Definition calib_dlg.cpp:427
@ tPLA
Definition calib_dlg.cpp:423

◆ FilamentMapNozzleId

enum class Slic3r::GUI::FilamentMapNozzleId : int
strong
Enumerator
NOZZLE_LEFT 
NOZZLE_RIGHT 
110{
111 NOZZLE_LEFT = 1,
112 NOZZLE_RIGHT = 2,
113};

◆ FilamentRenderMode

Enumerator
Single 
Dual 
Triple 
Quadruple 
Gradient 
35 {
36 Single,
37 Dual,
38 Triple,
41};
@ Triple
Definition FilamentBitmapUtils.hpp:38
@ Gradient
Definition FilamentBitmapUtils.hpp:40
@ Single
Definition FilamentBitmapUtils.hpp:36
@ Quadruple
Definition FilamentBitmapUtils.hpp:39
@ Dual
Definition FilamentBitmapUtils.hpp:37

◆ FilamentStep

Enumerator
STEP_IDLE 
STEP_HEAT_NOZZLE 
STEP_CUT_FILAMENT 
STEP_PULL_CURR_FILAMENT 
STEP_PUSH_NEW_FILAMENT 
STEP_GRAB_NEW_FILAMENT 
STEP_PURGE_OLD_FILAMENT 
STEP_CONFIRM_EXTRUDED 
STEP_CHECK_POSITION 
STEP_COUNT 
146 {
147 STEP_IDLE,
157};
@ STEP_PURGE_OLD_FILAMENT
Definition AMSItem.hpp:153
@ STEP_CUT_FILAMENT
Definition AMSItem.hpp:149
@ STEP_CHECK_POSITION
Definition AMSItem.hpp:155
@ STEP_CONFIRM_EXTRUDED
Definition AMSItem.hpp:154
@ STEP_PUSH_NEW_FILAMENT
Definition AMSItem.hpp:151
@ STEP_IDLE
Definition AMSItem.hpp:147
@ STEP_COUNT
Definition AMSItem.hpp:156
@ STEP_GRAB_NEW_FILAMENT
Definition AMSItem.hpp:152
@ STEP_HEAT_NOZZLE
Definition AMSItem.hpp:148
@ STEP_PULL_CURR_FILAMENT
Definition AMSItem.hpp:150

◆ FilamentStepType

Enumerator
STEP_TYPE_LOAD 
STEP_TYPE_UNLOAD 
STEP_TYPE_VT_LOAD 
160 {
161 STEP_TYPE_LOAD = 0,
164};
@ STEP_TYPE_VT_LOAD
Definition AMSItem.hpp:163
@ STEP_TYPE_LOAD
Definition AMSItem.hpp:161
@ STEP_TYPE_UNLOAD
Definition AMSItem.hpp:162

◆ FileType

Enumerator
FT_STEP 
FT_STL 
FT_OBJ 
FT_AMF 
FT_3MF 
FT_GCODE_3MF 
FT_GCODE 
FT_MODEL 
FT_ZIP 
FT_PROJECT 
FT_GALLERY 
FT_INI 
FT_SVG 
FT_TEX 
FT_SL1 
FT_DRC 
FT_SIZE 
119{
120 FT_STEP,
121 FT_STL,
122 FT_OBJ,
123 FT_AMF,
124 FT_3MF,
126 FT_GCODE,
127 FT_MODEL,
128 FT_ZIP,
131
132 FT_INI,
133 FT_SVG,
134
135 FT_TEX,
136
137 FT_SL1,
138
139 FT_DRC,
140
141 FT_SIZE,
142};
@ FT_ZIP
Definition GUI_App.hpp:128
@ FT_PROJECT
Definition GUI_App.hpp:129
@ FT_GALLERY
Definition GUI_App.hpp:130
@ FT_MODEL
Definition GUI_App.hpp:127
@ FT_DRC
Definition GUI_App.hpp:139
@ FT_TEX
Definition GUI_App.hpp:135
@ FT_SL1
Definition GUI_App.hpp:137
@ FT_STEP
Definition GUI_App.hpp:120
@ FT_3MF
Definition GUI_App.hpp:124
@ FT_INI
Definition GUI_App.hpp:132
@ FT_STL
Definition GUI_App.hpp:121
@ FT_GCODE_3MF
Definition GUI_App.hpp:125
@ FT_AMF
Definition GUI_App.hpp:123
@ FT_SVG
Definition GUI_App.hpp:133
@ FT_SIZE
Definition GUI_App.hpp:141
@ FT_OBJ
Definition GUI_App.hpp:122
@ FT_GCODE
Definition GUI_App.hpp:126

◆ FIRMWARE_STASUS

Enumerator
UNKOWN 
TESTING 
BETA 
RELEASE 
56{
57 UNKOWN,
58 TESTING,
59 BETA,
60 RELEASE,
61};
@ TESTING
Definition UpgradePanel.cpp:58
@ UNKOWN
Definition UpgradePanel.cpp:57
@ RELEASE
Definition UpgradePanel.cpp:60
@ BETA
Definition UpgradePanel.cpp:59

◆ FlowRatioCaliSource

Enumerator
FROM_PRESET_PAGE 
FROM_COARSE_PAGE 
38 {
41};
@ FROM_COARSE_PAGE
Definition CalibrationWizardPresetPage.hpp:40
@ FROM_PRESET_PAGE
Definition CalibrationWizardPresetPage.hpp:39

◆ GridTextInputType

enum class Slic3r::GUI::GridTextInputType
strong
Enumerator
K 
N 
FlowRatio 
Name 
122 {
123 K,
124 N,
125 FlowRatio,
126 Name
127};
@ Name
Definition CalibrationWizardSavePage.cpp:126
@ N
Definition CalibrationWizardSavePage.cpp:124
CGAL::Simple_cartesian< double > K
Definition VoronoiUtilsCgal.cpp:49

◆ HintDataNavigation

Enumerator
Curr 
Prev 
Next 
Random 
34 {
35 Curr,
36 Prev,
37 Next,
38 Random,
39};
@ Next
Definition HintNotification.hpp:37
@ Prev
Definition HintNotification.hpp:36
@ Curr
Definition HintNotification.hpp:35
@ Random
Definition HintNotification.hpp:38

◆ InfoItemType

enum class Slic3r::GUI::InfoItemType
strong
Enumerator
Undef 
CustomSupports 
MmSegmentation 
FuzzySkin 
CutConnectors 
75{
76 Undef,
78 //CustomSeam,
81 //Sinking
83};
@ CustomSupports
Definition ObjectDataViewModel.hpp:77
@ MmSegmentation
Definition ObjectDataViewModel.hpp:79
@ FuzzySkin
Definition ObjectDataViewModel.hpp:80
std::vector< CutConnector > CutConnectors
Definition Model.hpp:351

◆ ItemType

Enumerator
itUndef 
itPlate 
itObject 
itVolume 
itInstanceRoot 
itInstance 
itSettings 
itLayerRoot 
itLayer 
itInfo 
34 {
35 itUndef = 0,
36 itPlate = 1,
37 itObject = 2,
38 itVolume = 4,
40 itInstance = 16,
41 itSettings = 32,
42 itLayerRoot = 64,
43 itLayer = 128,
44 itInfo = 256,
45};
@ itInfo
Definition ObjectDataViewModel.hpp:44
@ itObject
Definition ObjectDataViewModel.hpp:37
@ itUndef
Definition ObjectDataViewModel.hpp:35
@ itPlate
Definition ObjectDataViewModel.hpp:36
@ itSettings
Definition ObjectDataViewModel.hpp:41
@ itLayer
Definition ObjectDataViewModel.hpp:43
@ itInstanceRoot
Definition ObjectDataViewModel.hpp:39
@ itInstance
Definition ObjectDataViewModel.hpp:40
@ itLayerRoot
Definition ObjectDataViewModel.hpp:42
@ itVolume
Definition ObjectDataViewModel.hpp:38

◆ LabelType

Enumerator
ltHeightWithLayer 
ltHeight 
ltEstimatedTime 
56{
60};
@ ltHeight
Definition IMSlider.hpp:58
@ ltHeightWithLayer
Definition IMSlider.hpp:57
@ ltEstimatedTime
Definition IMSlider.hpp:59

◆ LoadFilesType

enum class Slic3r::GUI::LoadFilesType
strong
Enumerator
NoFile 
Single3MF 
SingleOther 
Multiple3MF 
MultipleOther 
Multiple3MFOther 
474 {
475 NoFile,
476 Single3MF,
481};
@ Single3MF
Definition Plater.cpp:476
@ NoFile
Definition Plater.cpp:475
@ MultipleOther
Definition Plater.cpp:479
@ SingleOther
Definition Plater.cpp:477
@ Multiple3MFOther
Definition Plater.cpp:480
@ Multiple3MF
Definition Plater.cpp:478

◆ LoadType

enum class Slic3r::GUI::LoadType : unsigned char
strong
Enumerator
Unknown 
OpenProject 
LoadGeometry 
LoadConfig 
484{
485 Unknown,
489};
@ Unknown
Definition PresetBundle.hpp:42
@ OpenProject
Definition Plater.cpp:486
@ LoadGeometry
Definition Plater.cpp:487
@ LoadConfig
Definition bbs_3mf.hpp:223

◆ MeshBooleanOperation

Enumerator
Undef 
Union 
Difference 
Intersection 
24 {
25 Undef,
26 Union,
29};
@ Difference
Definition CSGMesh.hpp:24
@ Intersection
Definition CSGMesh.hpp:24
@ Union
Definition CSGMesh.hpp:24

◆ MeshBooleanSelectingState

Enumerator
Undef 
SelectSource 
SelectTool 
18 {
19 Undef,
22
23};
@ SelectSource
Definition GLGizmoMeshBoolean.hpp:20
@ SelectTool
Definition GLGizmoMeshBoolean.hpp:21

◆ NewSlicerInstanceType

Enumerator
Slicer 
GCodeViewer 
36 {
37 Slicer,
39};
@ Slicer
Definition Process.cpp:37
@ GCodeViewer
Definition Process.cpp:38

◆ NotificationType

enum class Slic3r::GUI::NotificationType
strong
Enumerator
CustomNotification 
ExportFinished 
Mouse3dDisconnected 
NewAppAvailable 
NewAlphaAvailable 
NewBetaAvailable 
PresetUpdateAvailable 
PresetUpdateFinished 
ValidateError 
ValidateWarning 
SlicingError 
SlicingSeriousWarning 
SlicingWarning 
BBLGeneralError 
PlaterError 
LeftExtruderUnprintableError 
RightExtruderUnprintableError 
PlaterWarning 
ProgressBar 
PrintHostUpload 
SlicingProgress 
EmptyColorChangeCode 
CustomSupportsAndSeamRemovedAfterRepair 
EmptyAutoColorChange 
SignDetected 
QuitSLAManualMode 
DesktopIntegrationSuccess 
DesktopIntegrationFail 
UndoDesktopIntegrationSuccess 
UndoDesktopIntegrationFail 
MmSegmentationExceededExtrudersLimit 
DidYouKnowHint 
UpdatedItemsInfo 
ProgressIndicator 
SimplifySuggestion 
UnknownFont 
CgalFinished 
ExportOngoing 
URLDownload 
ArrangeOngoing 
BBLPlateInfo 
BBL3MFInfo 
BBLObjectInfo 
BBLSliceEmptyLayer 
BBLNeedSupportON 
BBLGcodeOverlap 
BBLSeqPrintInfo 
BBLPluginInstallHint 
BBLFlushingVolumeZero 
BBLMixedFilamentBroken 
BBLPluginUpdateAvailable 
BBLPreviewOnlyMode 
BBLPrinterConfigUpdateAvailable 
BBLUserPresetExceedLimit 
BBLFilamentPrintableError 
BBLSliceLimitError 
BBLSliceMultiExtruderHeightOutside 
BBLBedFilamentIncompatible 
BBLMixUsePLAAndPETG 
BBLNozzleFilamentIncompatible 
BBLSingleExtruderMixedFilamentRisk 
OrcaSharedProfilesAvailable 
OrcaCloudAPIError 
OrcaSyncConflict 
OrcaLocalPluginMissingError 
OrcaCloudPluginMissingError 
OrcaPluginInactiveError 
OrcaPluginCapabilityUnavailableError 
NotificationTypeCount 
65{
67 // SlicingNotPossible,
68 // Notification on end of export to a removable media, with hyperling to eject the external media.
69 // Obsolete by ExportFinished
70// ExportToRemovableFinished,
71 // Notification on end of export, with hyperling to see folder and eject if export was to external media.
72 // Own subclass.
74 // Works on OSX only.
75 //FIXME Do we want to have it on Linux and Windows? Is it possible to get the Disconnect event on Windows?
77// Mouse3dConnected,
78// NewPresetsAviable,
79 // Notification on the start of PrusaSlicer, when a new PrusaSlicer version is published.
80 // Contains a hyperlink to open a web browser pointing to the PrusaSlicer download location.
82 // Like NewAppAvailable but with text and link for alpha / bet release
85 // Notification on the start of PrusaSlicer, when updates of system profiles are detected.
86 // Contains a hyperlink to execute installation of the new system profiles.
89// LoadingFailed,
90 // Errors emmited by Print::validate
91 // difference from Slicing error is that they disappear not grey out at update_background_process
93 // Notification emitted by Print::validate
95 // Slicing error produced by BackgroundSlicingProcess::validate() or by the BackgroundSlicingProcess background
96 // thread thowing a SlicingError exception.
98 //Gcode conflict generates slicing severe warning
100 // Slicing warnings, issued by the slicing process.
101 // Slicing warnings are registered for a particular Print milestone or a PrintObject and its milestone.
103 // BBL: general error
105 // Object partially outside the print volume. Cannot slice.
109 // Object fully outside the print volume, or extrusion outside the print volume. Slicing is not disabled.
111 // Progress bar instead of text.
113 // Progress bar with info from Print Host Upload Queue dialog.
115 // Progress bar with cancel button, cannot be closed
116 // On end of slicing and G-code processing (the full G-code preview is available),
117 // contains a hyperlink to export the G-code to a removable media or hdd.
119 // Notification, when Color Change G-code is empty and user try to add color change on DoubleSlider.
121 // Notification that custom supports/seams were deleted after mesh repair.
123 // Notification that auto adding of color changes is impossible
125 // Notification about detected sign
127 // Notification telling user to quit SLA supports manual editing
129 // Desktop integration basic info
134 // Notification that a printer has more extruders than are supported by MM Gizmo/segmentation.
136 // Did you know Notification appearing on startup with arrows to change hint
138 // Shows when ObjectList::update_info_items finds information that should be stressed to the user
139 // Might contain logo taken from gizmos
141 // Progress bar notification with methods to replace ProgressIndicator class.
143 // Give user advice to simplify object with big amount of triangles
144 // Contains ObjectID for closing when object is deleted
146 // Change of text will change font to similar one on.
148 // information about cgal is finished repairing model (blocking process)
150 // Short meesage to fill space between start and finish of export
152 // Progressbar of download from prusaslicer://url
154 // BBS: Short meesage to fill space between start and finish of arranging
156 // BBL: Plate Info ,Design For @YangLeDuo
158 // BBL: 3MF warnings
160 // BBL: Some Objects Info, Design For @YangLeDuo
162 // BBL: Objects have empty layer when Slicing
164 // BBL: model need support
166 // BBL: Gcode overlap
168 //BBL: sequence print info
170 //BBL: plugin install hint
173 // A mixed-color filament references a deleted component, or its components disagree in type.
185 // A mixed-color filament is printed on a single-nozzle printer (frequent changes and purging).
190 // Active preset requires plugin capabilities that are not installed/loadable. Persistent,
191 // non-modal; offers install (cloud) / OrcaCloud search (local) and blocks slicing.
194 // Active preset references capabilities that are installed but not active (plugin not loaded, or
195 // capability disabled). Resolved locally by activating them; persistent, blocks slicing.
197 // Active preset references a capability the installed+loaded plugin does not provide (outdated
198 // plugin). Informational; cannot be auto-resolved; persistent, blocks slicing.
201
202};
@ BBLSingleExtruderMixedFilamentRisk
Definition NotificationManager.hpp:186
@ RightExtruderUnprintableError
Definition NotificationManager.hpp:108
@ SlicingSeriousWarning
Definition NotificationManager.hpp:99
@ OrcaPluginCapabilityUnavailableError
Definition NotificationManager.hpp:199
@ CustomNotification
Definition NotificationManager.hpp:66
@ ProgressBar
Definition NotificationManager.hpp:112
@ BBLPreviewOnlyMode
Definition NotificationManager.hpp:176
@ BBLPrinterConfigUpdateAvailable
Definition NotificationManager.hpp:177
@ BBLPlateInfo
Definition NotificationManager.hpp:157
@ NewAppAvailable
Definition NotificationManager.hpp:81
@ CgalFinished
Definition NotificationManager.hpp:149
@ NewAlphaAvailable
Definition NotificationManager.hpp:83
@ BBLSliceEmptyLayer
Definition NotificationManager.hpp:163
@ BBLFlushingVolumeZero
Definition NotificationManager.hpp:172
@ Mouse3dDisconnected
Definition NotificationManager.hpp:76
@ BBLBedFilamentIncompatible
Definition NotificationManager.hpp:182
@ OrcaCloudPluginMissingError
Definition NotificationManager.hpp:193
@ BBLUserPresetExceedLimit
Definition NotificationManager.hpp:178
@ PlaterError
Definition NotificationManager.hpp:106
@ OrcaLocalPluginMissingError
Definition NotificationManager.hpp:192
@ NotificationTypeCount
Definition NotificationManager.hpp:200
@ ValidateWarning
Definition NotificationManager.hpp:94
@ LeftExtruderUnprintableError
Definition NotificationManager.hpp:107
@ BBLSliceLimitError
Definition NotificationManager.hpp:180
@ URLDownload
Definition NotificationManager.hpp:153
@ OrcaSyncConflict
Definition NotificationManager.hpp:189
@ PresetUpdateAvailable
Definition NotificationManager.hpp:87
@ ValidateError
Definition NotificationManager.hpp:92
@ SignDetected
Definition NotificationManager.hpp:126
@ BBLPluginInstallHint
Definition NotificationManager.hpp:171
@ UpdatedItemsInfo
Definition NotificationManager.hpp:140
@ SlicingWarning
Definition NotificationManager.hpp:102
@ MmSegmentationExceededExtrudersLimit
Definition NotificationManager.hpp:135
@ DesktopIntegrationFail
Definition NotificationManager.hpp:131
@ OrcaSharedProfilesAvailable
Definition NotificationManager.hpp:187
@ BBLMixUsePLAAndPETG
Definition NotificationManager.hpp:183
@ BBLPluginUpdateAvailable
Definition NotificationManager.hpp:175
@ DesktopIntegrationSuccess
Definition NotificationManager.hpp:130
@ ArrangeOngoing
Definition NotificationManager.hpp:155
@ ExportOngoing
Definition NotificationManager.hpp:151
@ PresetUpdateFinished
Definition NotificationManager.hpp:88
@ BBLGcodeOverlap
Definition NotificationManager.hpp:167
@ BBLNeedSupportON
Definition NotificationManager.hpp:165
@ BBLFilamentPrintableError
Definition NotificationManager.hpp:179
@ BBLObjectInfo
Definition NotificationManager.hpp:161
@ BBLNozzleFilamentIncompatible
Definition NotificationManager.hpp:184
@ BBLSliceMultiExtruderHeightOutside
Definition NotificationManager.hpp:181
@ UnknownFont
Definition NotificationManager.hpp:147
@ DidYouKnowHint
Definition NotificationManager.hpp:137
@ QuitSLAManualMode
Definition NotificationManager.hpp:128
@ CustomSupportsAndSeamRemovedAfterRepair
Definition NotificationManager.hpp:122
@ PrintHostUpload
Definition NotificationManager.hpp:114
@ BBLGeneralError
Definition NotificationManager.hpp:104
@ BBLMixedFilamentBroken
Definition NotificationManager.hpp:174
@ OrcaPluginInactiveError
Definition NotificationManager.hpp:196
@ UndoDesktopIntegrationSuccess
Definition NotificationManager.hpp:132
@ NewBetaAvailable
Definition NotificationManager.hpp:84
@ SlicingProgress
Definition NotificationManager.hpp:118
@ PlaterWarning
Definition NotificationManager.hpp:110
@ EmptyColorChangeCode
Definition NotificationManager.hpp:120
@ SlicingError
Definition NotificationManager.hpp:97
@ BBLSeqPrintInfo
Definition NotificationManager.hpp:169
@ BBL3MFInfo
Definition NotificationManager.hpp:159
@ UndoDesktopIntegrationFail
Definition NotificationManager.hpp:133
@ ProgressIndicator
Definition NotificationManager.hpp:142
@ ExportFinished
Definition NotificationManager.hpp:73
@ OrcaCloudAPIError
Definition NotificationManager.hpp:188
@ SimplifySuggestion
Definition NotificationManager.hpp:145
@ EmptyAutoColorChange
Definition NotificationManager.hpp:124

◆ OfferSel

enum class Slic3r::GUI::OfferSel : int
strong
Enumerator
None 
FacePlanar 
FaceCyl 
FaceOther 
EdgeStr 
EdgeCirc 
Vertex 
BodySolid 
BodySheet 
Bodies2 
DatumPlane 
DatumAxis 
CoordSys 
Art 
SkLoop 
SkNone 
SkLine 
SkArc 
SkPoint 
Sk2Ent 
Count 
24 : int {
25 None = 0,
26 FacePlanar = 1,
27 FaceCyl = 2,
28 FaceOther = 3,
29 EdgeStr = 4,
30 EdgeCirc = 5,
31 Vertex = 6,
32 BodySolid = 7,
33 BodySheet = 8,
34 Bodies2 = 9,
35 DatumPlane = 10,
36 DatumAxis = 11,
37 CoordSys = 12,
38 Art = 13,
39 SkLoop = 14,
40 SkNone = 15,
41 SkLine = 16,
42 SkArc = 17,
43 SkPoint = 18,
44 Sk2Ent = 19,
45 Count = 20
46};
@ BodySolid
Definition DesignOffer.hpp:32
@ Bodies2
Definition DesignOffer.hpp:34
@ DatumAxis
Definition DesignOffer.hpp:36
@ EdgeStr
Definition DesignOffer.hpp:29
@ EdgeCirc
Definition DesignOffer.hpp:30
@ FacePlanar
Definition DesignOffer.hpp:26
@ SkPoint
Definition DesignOffer.hpp:43
@ SkLine
Definition DesignOffer.hpp:41
@ SkNone
Definition DesignOffer.hpp:40
@ Art
Definition DesignOffer.hpp:38
@ DatumPlane
Definition DesignOffer.hpp:35
@ SkArc
Definition DesignOffer.hpp:42
@ BodySheet
Definition DesignOffer.hpp:33
@ FaceCyl
Definition DesignOffer.hpp:27
@ Sk2Ent
Definition DesignOffer.hpp:44
@ FaceOther
Definition DesignOffer.hpp:28
@ SkLoop
Definition DesignOffer.hpp:39
Mesh::Vertex_index Vertex
Definition MeshRepair.cpp:84
@ Count
Definition ArcFitter.hpp:18
@ CoordSys
Definition CadDocument.hpp:26

◆ OrcaSlicerMenuIDs

Enumerator
OrcaSlicerMenuAbout 
OrcaSlicerMenuPreferences 
161 {
164};
@ OrcaSlicerMenuPreferences
Definition GUI_App.hpp:163
@ OrcaSlicerMenuAbout
Definition GUI_App.hpp:162

◆ PainterGizmoType

enum class Slic3r::GUI::PainterGizmoType
strong
Enumerator
FDM_SUPPORTS 
SEAM 
MM_SEGMENTATION 
FUZZY_SKIN 
TEXTURE_DISPLACEMENT 
36 {
38 SEAM,
42};
@ MM_SEGMENTATION
Definition GLGizmoPainterBase.hpp:39
@ FDM_SUPPORTS
Definition GLGizmoPainterBase.hpp:37
@ SEAM
Definition GLGizmoPainterBase.hpp:38
@ TEXTURE_DISPLACEMENT
Definition GLGizmoPainterBase.hpp:41
@ FUZZY_SKIN
Definition TriangleSelector.hpp:30

◆ ParamType

enum class Slic3r::GUI::ParamType
strong
Enumerator
Undef 
Scalar 
Vector 
FilamentVector 
86 {
87 Undef,
88 Scalar,
89 Vector,
91};
@ FilamentVector
Definition EditGCodeDialog.hpp:90
Kernel::Vector_3 Vector
Definition MeshRepair.cpp:82
typename Traits< remove_cvref_t< L > >::Scalar Scalar
Definition Line.hpp:39

◆ PartState

Enumerator
psUnCheck 
psChecked 
psSkipped 
9 {
13};
@ psChecked
Definition PartSkipCommon.hpp:11
@ psSkipped
Definition PartSkipCommon.hpp:12
@ psUnCheck
Definition PartSkipCommon.hpp:10

◆ PluginInstallStatus

Enumerator
InstallStatusNormal 
InstallStatusDownloadFailed 
InstallStatusDownloadCompleted 
InstallStatusUnzipFailed 
InstallStatusInstallCompleted 
18 {
24};
@ InstallStatusInstallCompleted
Definition UpgradeNetworkJob.hpp:23
@ InstallStatusDownloadCompleted
Definition UpgradeNetworkJob.hpp:21
@ InstallStatusUnzipFailed
Definition UpgradeNetworkJob.hpp:22
@ InstallStatusDownloadFailed
Definition UpgradeNetworkJob.hpp:20
@ InstallStatusNormal
Definition UpgradeNetworkJob.hpp:19

◆ PluginSortKey

enum class Slic3r::GUI::PluginSortKey
strong
Enumerator
Status 
Name 
Source 
Version 
None 
18 {
19 Status,
20 Name,
21 Source,
22 Version,
23 // why: neutral "no column selected" state - clearing a header sort returns here and the
24 // list falls to compare_plugin_base_order only. Header UI reaches it via the asc/desc/clear cycle.
25 None
26 };
@ Version
Definition PluginSort.hpp:22
@ Status
Definition PluginSort.hpp:19
@ Source
Definition PluginSort.hpp:21

◆ PluginSortOrder

enum class Slic3r::GUI::PluginSortOrder
strong
Enumerator
Asc 
Desc 
29 {
30 Asc,
31 Desc
32 };
@ Desc
Definition PluginSort.hpp:31
@ Asc
Definition PluginSort.hpp:30

◆ PluginSource

enum class Slic3r::GUI::PluginSource
strong
Enumerator
Mine 
Subscribed 
Orphaned 
Local 
10 {
11 // IMPORTANT: ordinal order is the Plugins dialog Source sort priority.
12 Mine,
15 Local
16 };
@ Orphaned
Definition PluginSource.hpp:14
@ Mine
Definition PluginSource.hpp:12
@ Subscribed
Definition PresetBundle.hpp:114

◆ PluginStatus

enum class Slic3r::GUI::PluginStatus
strong
Enumerator
Activated 
Error 
RuntimeError 
Inactive 
Loading 
10 {
11 // IMPORTANT: ordinal order is the Plugins dialog Status sort priority.
13 Error,
17 };
@ Loading
Definition PluginStatus.hpp:16
@ Inactive
Definition PluginStatus.hpp:15
@ RuntimeError
Definition PluginStatus.hpp:14
@ Activated
Definition PluginStatus.hpp:12
@ Error
Definition PrePrintChecker.hpp:17

◆ PreferencesTab

enum class Slic3r::GUI::PreferencesTab
strong
Enumerator
General 
Control 
Graphics 
Online 
@ General
Definition Preferences.hpp:40
@ Online
Definition Preferences.hpp:40
@ Control
Definition Preferences.hpp:40
@ Graphics
Definition Preferences.hpp:40

◆ prePrintInfoLevel

Enumerator
Normal 
Warning 
Error 
14 {
15 Normal,
16 Warning,
17 Error
18};
@ Normal
Definition PrePrintChecker.hpp:15
@ Warning
Definition PrePrintChecker.hpp:16

◆ prePrintInfoType

Enumerator
Printer 
Filament 
20 {
21 Printer,
23};
@ Filament
Definition PrePrintChecker.hpp:22
@ Printer
Definition PrePrintChecker.hpp:21

◆ PrintDialogStatus

enum Slic3r::GUI::PrintDialogStatus : unsigned int
Enumerator
PrintStatusErrorBegin 
PrintStatusPrinterErrorBegin 
PrintStatusInit 
PrintStatusNoUserLogin 
PrintStatusInvalidPrinter 
PrintStatusConnectingServer 
PrintStatusReadingTimeout 
PrintStatusReading 
PrintStatusConnecting 
PrintStatusReconnecting 
PrintStatusInUpgrading 
PrintStatusFirmwareNotSupportTpuAtLeft 
PrintStatusModeNotFDM 
PrintStatusInSystemPrinting 
PrintStatusInPrinting 
PrintStatusNozzleMatchInvalid 
PrintStatusNozzleDataInvalid 
PrintStatusNozzleTypeMismatch 
PrintStatusNozzleNoMatchedHotends 
PrintStatusNozzleRackMaximumInstalled 
PrintStatusRefreshingMachineList 
PrintStatusSending 
PrintStatusLanModeNoSdcard 
PrintStatusNoSdcard 
PrintStatusLanModeSDcardNotAvailable 
PrintStatusNeedForceUpgrading 
PrintStatusNeedConsistencyUpgrading 
PrintStatusNotSupportedPrintAll 
PrintStatusBlankPlate 
PrintStatusUnsupportedPrinter 
PrintStatusRackNozzleMappingWaiting 
PrintStatusRackNozzleMappingError 
PrintStatusRackReading 
PrintStatusFilaSwitcherError 
PrintStatusPrinterErrorEnd 
PrintStatusFilamentErrorBegin 
PrintStatusAmsOnSettingup 
PrintStatusAmsMappingInvalid 
PrintStatusAmsMappingU0Invalid 
PrintStatusAmsMappingMixInvalid 
PrintStatusTPUUnsupportAutoCali 
PrintStatusHasFilamentInBlackListError 
PrintStatusColorQuantityExceed 
PrintStatusFilamentErrorEnd 
PrintStatusErrorEnd 
PrintStatusWarningBegin 
PrintStatusPrinterWarningBegin 
PrintStatusTimelapseNoSdcard 
PrintStatusTimelapseWarning 
PrintStatusTimelapseStorageLow 
PrintStatusMixAmsAndVtSlotWarning 
PrintStatusToolHeadCoolingFanWarning 
PrintStatusRackNozzleMappingWarning 
PrintStatusFilaSwitcherSlicingNotMatch 
PrintStatusRackNozzleNumUnmeetWarning 
PrintStatusHasUnreliableNozzleWarning 
PrintStatusNozzleDiameterMismatch 
PrintStatusOptionalPrinterModel 
PrintStatusPrinterWarningEnd 
PrintStatusFilamentWarningBegin 
PrintStatusWarningKvalueNotUsed 
PrintStatusHasFilamentInBlackListWarning 
PrintStatusFilamentWarningHighChamberTemp 
PrintStatusFilamentWarningHighChamberTempCloseDoor 
PrintStatusFilamentWarningHighChamberTempSoft 
PrintStatusFilamentWarningUnknownHighChamberTempSoft 
PrintStatusWarningExtFilamentNotMatch 
PrintStatusFilamentWarningNozzleHRC 
PrintStatusFilamentCrossExtruderWarning 
PrintStatusTPUUnsupportCaliOn 
PrintStatusTPUUnsuggestCali 
PrintStatusSmartNozzleBlobNeedAuto 
PrintStatusFilamentWarningRemainNotEnough 
PrintStatusPrintTimeEstimateWarning 
PrintStatusFilamentWarningEnd 
PrintStatusWarningEnd 
PrintStatusReadingFinished 
PrintStatusSendingCanceled 
PrintStatusReadyToGo 
PrintStatusAmsMappingSuccess 
PrintStatusNotOnTheSameLAN 
PrintStatusNotSupportedSendToSDCard 
PrintStatusPublicInitFailed 
PrintStatusPublicUploadFiled 
50 : unsigned int {
51
52 PrintStatusErrorBegin,//->start error<-
53
54 // Errors for printer, Block Print
89
90 // Errors for filament, Block Print
100
101 PrintStatusErrorEnd,//->end error<-
102
103
104 PrintStatusWarningBegin,//->start warning<-
105
106 // Warnings for printer
117 // Orca: a nozzle diameter that differs from the one the printer remembers is a warning,
118 // not an error, so non-standard nozzles can still be printed with.
122
123 // Warnings for filament
134 // Non-blocking advisories. FilamentWarningRemainNotEnough is declared but not wired (missing
135 // device-model surface); PrintTimeEstimateWarning has no call site or message and is kept only
136 // to match the reference enum table.
143
144 PrintStatusWarningEnd,//->end error<-
145
146 /*success*/
147 // printer
151
152 // filament
154
155 /*Other, SendToPrinterDialog*/
160};
@ PrintStatusPublicUploadFiled
Definition PrePrintChecker.hpp:159
@ PrintStatusPublicInitFailed
Definition PrePrintChecker.hpp:158
@ PrintStatusNeedForceUpgrading
Definition PrePrintChecker.hpp:79
@ PrintStatusFilaSwitcherSlicingNotMatch
Definition PrePrintChecker.hpp:114
@ PrintStatusReadingTimeout
Definition PrePrintChecker.hpp:60
@ PrintStatusNozzleTypeMismatch
Definition PrePrintChecker.hpp:71
@ PrintStatusTPUUnsupportAutoCali
Definition PrePrintChecker.hpp:96
@ PrintStatusFilamentWarningHighChamberTempSoft
Definition PrePrintChecker.hpp:129
@ PrintStatusWarningExtFilamentNotMatch
Definition PrePrintChecker.hpp:131
@ PrintStatusFilamentErrorBegin
Definition PrePrintChecker.hpp:91
@ PrintStatusErrorBegin
Definition PrePrintChecker.hpp:52
@ PrintStatusInSystemPrinting
Definition PrePrintChecker.hpp:67
@ PrintStatusTPUUnsuggestCali
Definition PrePrintChecker.hpp:138
@ PrintStatusToolHeadCoolingFanWarning
Definition PrePrintChecker.hpp:112
@ PrintStatusConnecting
Definition PrePrintChecker.hpp:62
@ PrintStatusAmsMappingMixInvalid
Definition PrePrintChecker.hpp:95
@ PrintStatusReadingFinished
Definition PrePrintChecker.hpp:148
@ PrintStatusAmsMappingInvalid
Definition PrePrintChecker.hpp:93
@ PrintStatusInvalidPrinter
Definition PrePrintChecker.hpp:58
@ PrintStatusUnsupportedPrinter
Definition PrePrintChecker.hpp:83
@ PrintStatusFilamentErrorEnd
Definition PrePrintChecker.hpp:99
@ PrintStatusSmartNozzleBlobNeedAuto
Definition PrePrintChecker.hpp:139
@ PrintStatusRackNozzleMappingError
Definition PrePrintChecker.hpp:85
@ PrintStatusErrorEnd
Definition PrePrintChecker.hpp:101
@ PrintStatusWarningBegin
Definition PrePrintChecker.hpp:104
@ PrintStatusHasFilamentInBlackListWarning
Definition PrePrintChecker.hpp:126
@ PrintStatusNozzleMatchInvalid
Definition PrePrintChecker.hpp:69
@ PrintStatusNozzleDataInvalid
Definition PrePrintChecker.hpp:70
@ PrintStatusInit
Definition PrePrintChecker.hpp:56
@ PrintStatusRefreshingMachineList
Definition PrePrintChecker.hpp:74
@ PrintStatusPrintTimeEstimateWarning
Definition PrePrintChecker.hpp:141
@ PrintStatusFilamentWarningEnd
Definition PrePrintChecker.hpp:142
@ PrintStatusNoSdcard
Definition PrePrintChecker.hpp:77
@ PrintStatusFilamentWarningRemainNotEnough
Definition PrePrintChecker.hpp:140
@ PrintStatusFilamentWarningHighChamberTemp
Definition PrePrintChecker.hpp:127
@ PrintStatusTimelapseStorageLow
Definition PrePrintChecker.hpp:110
@ PrintStatusMixAmsAndVtSlotWarning
Definition PrePrintChecker.hpp:111
@ PrintStatusPrinterWarningEnd
Definition PrePrintChecker.hpp:121
@ PrintStatusBlankPlate
Definition PrePrintChecker.hpp:82
@ PrintStatusFilamentWarningBegin
Definition PrePrintChecker.hpp:124
@ PrintStatusLanModeNoSdcard
Definition PrePrintChecker.hpp:76
@ PrintStatusReadyToGo
Definition PrePrintChecker.hpp:150
@ PrintStatusWarningEnd
Definition PrePrintChecker.hpp:144
@ PrintStatusNozzleRackMaximumInstalled
Definition PrePrintChecker.hpp:73
@ PrintStatusInPrinting
Definition PrePrintChecker.hpp:68
@ PrintStatusRackNozzleMappingWaiting
Definition PrePrintChecker.hpp:84
@ PrintStatusNotSupportedSendToSDCard
Definition PrePrintChecker.hpp:157
@ PrintStatusTimelapseWarning
Definition PrePrintChecker.hpp:109
@ PrintStatusNozzleNoMatchedHotends
Definition PrePrintChecker.hpp:72
@ PrintStatusFirmwareNotSupportTpuAtLeft
Definition PrePrintChecker.hpp:65
@ PrintStatusColorQuantityExceed
Definition PrePrintChecker.hpp:98
@ PrintStatusConnectingServer
Definition PrePrintChecker.hpp:59
@ PrintStatusAmsMappingSuccess
Definition PrePrintChecker.hpp:153
@ PrintStatusSendingCanceled
Definition PrePrintChecker.hpp:149
@ PrintStatusAmsOnSettingup
Definition PrePrintChecker.hpp:92
@ PrintStatusFilamentCrossExtruderWarning
Definition PrePrintChecker.hpp:133
@ PrintStatusPrinterErrorBegin
Definition PrePrintChecker.hpp:55
@ PrintStatusSending
Definition PrePrintChecker.hpp:75
@ PrintStatusPrinterErrorEnd
Definition PrePrintChecker.hpp:88
@ PrintStatusReconnecting
Definition PrePrintChecker.hpp:63
@ PrintStatusRackNozzleNumUnmeetWarning
Definition PrePrintChecker.hpp:115
@ PrintStatusAmsMappingU0Invalid
Definition PrePrintChecker.hpp:94
@ PrintStatusReading
Definition PrePrintChecker.hpp:61
@ PrintStatusWarningKvalueNotUsed
Definition PrePrintChecker.hpp:125
@ PrintStatusNeedConsistencyUpgrading
Definition PrePrintChecker.hpp:80
@ PrintStatusHasUnreliableNozzleWarning
Definition PrePrintChecker.hpp:116
@ PrintStatusTimelapseNoSdcard
Definition PrePrintChecker.hpp:108
@ PrintStatusHasFilamentInBlackListError
Definition PrePrintChecker.hpp:97
@ PrintStatusNotOnTheSameLAN
Definition PrePrintChecker.hpp:156
@ PrintStatusFilamentWarningNozzleHRC
Definition PrePrintChecker.hpp:132
@ PrintStatusModeNotFDM
Definition PrePrintChecker.hpp:66
@ PrintStatusLanModeSDcardNotAvailable
Definition PrePrintChecker.hpp:78
@ PrintStatusNotSupportedPrintAll
Definition PrePrintChecker.hpp:81
@ PrintStatusFilamentWarningUnknownHighChamberTempSoft
Definition PrePrintChecker.hpp:130
@ PrintStatusFilaSwitcherError
Definition PrePrintChecker.hpp:87
@ PrintStatusPrinterWarningBegin
Definition PrePrintChecker.hpp:107
@ PrintStatusNozzleDiameterMismatch
Definition PrePrintChecker.hpp:119
@ PrintStatusOptionalPrinterModel
Definition PrePrintChecker.hpp:120
@ PrintStatusRackReading
Definition PrePrintChecker.hpp:86
@ PrintStatusTPUUnsupportCaliOn
Definition PrePrintChecker.hpp:137
@ PrintStatusFilamentWarningHighChamberTempCloseDoor
Definition PrePrintChecker.hpp:128
@ PrintStatusRackNozzleMappingWarning
Definition PrePrintChecker.hpp:113
@ PrintStatusNoUserLogin
Definition PrePrintChecker.hpp:57
@ PrintStatusInUpgrading
Definition PrePrintChecker.hpp:64

◆ PrinterBindState

Enumerator
NONE 
ALLOW_BIND 
ALLOW_UNBIND 
60 {
61 NONE,
64};
@ ALLOW_UNBIND
Definition SelectMachinePop.hpp:63
@ NONE
Definition SelectMachinePop.hpp:61
@ ALLOW_BIND
Definition SelectMachinePop.hpp:62

◆ PrinterState

Enumerator
OFFLINE 
IDLE 
BUSY 
LOCK 
IN_LAN 
52 {
53 OFFLINE,
54 IDLE,
55 BUSY,
56 LOCK,
57 IN_LAN
58};
@ BUSY
Definition SelectMachinePop.hpp:55
@ IN_LAN
Definition SelectMachinePop.hpp:57
@ OFFLINE
Definition SelectMachinePop.hpp:53
@ LOCK
Definition SelectMachinePop.hpp:56

◆ PrintFromType

Enumerator
FROM_NORMAL 
FROM_SDCARD_VIEW 
172{
175};
@ FROM_SDCARD_VIEW
Definition DevDefs.h:174
@ FROM_NORMAL
Definition DevDefs.h:173

◆ PrintIndicator

Enumerator
piUndef 
piPrintable 
piUnprintable 
62{
63 piUndef = 0, // no print indicator
64 piPrintable , // printable
65 piUnprintable , // unprintable
66};
@ piUnprintable
Definition ObjectDataViewModel.hpp:65
@ piPrintable
Definition ObjectDataViewModel.hpp:64
@ piUndef
Definition ObjectDataViewModel.hpp:63

◆ PrintingTaskType

Enumerator
PRINGINT 
CALIBRATION 
NOT_CLEAR 
98 {
102};
@ CALIBRATION
Definition StatusPanel.hpp:100
@ NOT_CLEAR
Definition StatusPanel.hpp:101
@ PRINGINT
Definition StatusPanel.hpp:99

◆ PrintPageMode

Enumerator
PrintPageModePrepare 
PrintPageModeSending 
PrintPageModeFinish 
88 {
92};
@ PrintPageModeFinish
Definition SelectMachine.hpp:91
@ PrintPageModePrepare
Definition SelectMachine.hpp:89
@ PrintPageModeSending
Definition SelectMachine.hpp:90

◆ PurgeModeDialogType

Enumerator
MultiNozzle 
FastMode 
46 {
49};
@ FastMode
Definition PurgeModeDialog.hpp:48
@ MultiNozzle
Definition PurgeModeDialog.hpp:47

◆ QuickSlice

Enumerator
qsUndef 
qsReslice 
qsSaveAs 
qsExportSVG 
qsExportPNG 
98{
99 qsUndef = 0,
100 qsReslice = 1,
101 qsSaveAs = 2,
102 qsExportSVG = 4,
103 qsExportPNG = 8
104};
@ qsExportSVG
Definition MainFrame.hpp:102
@ qsExportPNG
Definition MainFrame.hpp:103
@ qsReslice
Definition MainFrame.hpp:100
@ qsSaveAs
Definition MainFrame.hpp:101
@ qsUndef
Definition MainFrame.hpp:99

◆ RowAction

Enumerator
RowEdit 
RowMove 
RowVisibility 
RowDelete 
RowZoom 
@ RowMove
Definition DesignPanel.cpp:279
@ RowZoom
Definition DesignPanel.cpp:279
@ RowEdit
Definition DesignPanel.cpp:279
@ RowDelete
Definition DesignPanel.cpp:279
@ RowVisibility
Definition DesignPanel.cpp:279

◆ SelectedSlider

Enumerator
ssUndef 
ssLower 
ssHigher 
41 {
42 ssUndef = 0,
43 ssLower = 1,
44 ssHigher = 2
45};
@ ssLower
Definition IMSlider.hpp:43
@ ssUndef
Definition IMSlider.hpp:42
@ ssHigher
Definition IMSlider.hpp:44

◆ Shortcut

enum class Slic3r::GUI::Shortcut : uint8_t
strong
Enumerator
NewProject 
OpenProject 
SaveProject 
SaveProjectAs 
ImportModel 
Publish3mf 
SlicePlate 
ExportSlicedFile 
PrintPlate 
PrintHostQueue 
SelectAll 
SelectAllPlates 
Undo 
Redo 
Cut 
Copy 
Paste 
DeleteSelected 
DeleteAll 
CloneSelected 
AddInstance 
RemoveInstance 
TogglePrintable 
ToggleAutoDrop 
Arrange 
ArrangePlate 
Orient 
OrientPlate 
MoveSelectionLeft 
MoveSelectionRight 
MoveSelectionUp 
MoveSelectionDown 
RotateSelectionLeft 
RotateSelectionRight 
GizmoMove 
GizmoRotate 
GizmoScale 
GizmoFlatten 
GizmoCut 
GizmoMeshBoolean 
GizmoFdmSupports 
GizmoSeam 
GizmoFuzzySkin 
GizmoMmuSegmentation 
GizmoEmboss 
GizmoMeasure 
GizmoAssembly 
GizmoBrimEars 
GizmoDisplacement 
GoToLayer 
LayerSliderUp 
LayerSliderDown 
MovesSliderLeft 
MovesSliderRight 
MovesSliderStart 
MovesSliderEnd 
PaintToolCircle 
PaintToolSphere 
PaintToolFill 
PaintToolGapFill 
PaintToolTriangle 
PaintToolHeightRange 
ViewDefault 
ViewTop 
ViewBottom 
ViewFront 
ViewRear 
ViewLeft 
ViewRight 
ViewPlate 
ZoomIn 
ZoomOut 
Mouse3DSettings 
ShowLabels 
ShowCollisionVolumes 
ShowWireframe 
ToggleGcodeWindow 
ToggleOneLayerMode 
ToggleBeltRawGcode 
Preferences 
Search 
SwitchView 
CollapseSidebar 
ReloadDevicePage 
KeyboardShortcuts 
Quit 
SpeedDial 
Count 
25 : uint8_t {
26 // Project
28 // Slicing and printing
30 // Selection
32 // Editing
34 // Objects
36 // Placement
39 // Gizmos
42 // Sliders
44 // Painting tools
46 // Camera
48 // Display
50 // Application
52 // Speed Dial
54 Count
55};
@ SelectAll
Definition GLGizmosCommon.hpp:35
@ LayerSliderUp
Definition Shortcuts.hpp:43
@ GizmoFdmSupports
Definition Shortcuts.hpp:40
@ MoveSelectionLeft
Definition Shortcuts.hpp:38
@ MovesSliderLeft
Definition Shortcuts.hpp:43
@ GizmoMeshBoolean
Definition Shortcuts.hpp:40
@ GizmoAssembly
Definition Shortcuts.hpp:41
@ GizmoFlatten
Definition Shortcuts.hpp:40
@ Quit
Definition Shortcuts.hpp:51
@ Search
Definition Shortcuts.hpp:51
@ RemoveInstance
Definition Shortcuts.hpp:35
@ GizmoFuzzySkin
Definition Shortcuts.hpp:40
@ GizmoSeam
Definition Shortcuts.hpp:40
@ PaintToolCircle
Definition Shortcuts.hpp:45
@ GizmoMmuSegmentation
Definition Shortcuts.hpp:41
@ GizmoDisplacement
Definition Shortcuts.hpp:41
@ MoveSelectionDown
Definition Shortcuts.hpp:38
@ ViewLeft
Definition Shortcuts.hpp:47
@ ViewRear
Definition Shortcuts.hpp:47
@ LayerSliderDown
Definition Shortcuts.hpp:43
@ PaintToolGapFill
Definition Shortcuts.hpp:45
@ Undo
Definition Shortcuts.hpp:33
@ PaintToolFill
Definition Shortcuts.hpp:45
@ ViewPlate
Definition Shortcuts.hpp:47
@ ShowLabels
Definition Shortcuts.hpp:49
@ ViewDefault
Definition Shortcuts.hpp:47
@ ViewBottom
Definition Shortcuts.hpp:47
@ ZoomOut
Definition Shortcuts.hpp:47
@ ImportModel
Definition Shortcuts.hpp:27
@ Paste
Definition Shortcuts.hpp:33
@ ToggleAutoDrop
Definition Shortcuts.hpp:35
@ SelectAllPlates
Definition Shortcuts.hpp:31
@ Mouse3DSettings
Definition Shortcuts.hpp:47
@ ViewFront
Definition Shortcuts.hpp:47
@ ExportSlicedFile
Definition Shortcuts.hpp:29
@ RotateSelectionRight
Definition Shortcuts.hpp:38
@ OrientPlate
Definition Shortcuts.hpp:37
@ PrintPlate
Definition Shortcuts.hpp:29
@ SlicePlate
Definition Shortcuts.hpp:29
@ CollapseSidebar
Definition Shortcuts.hpp:51
@ ZoomIn
Definition Shortcuts.hpp:47
@ Redo
Definition Shortcuts.hpp:33
@ DeleteAll
Definition Shortcuts.hpp:33
@ ArrangePlate
Definition Shortcuts.hpp:37
@ MoveSelectionUp
Definition Shortcuts.hpp:38
@ RotateSelectionLeft
Definition Shortcuts.hpp:38
@ ReloadDevicePage
Definition Shortcuts.hpp:51
@ SpeedDial
Definition Shortcuts.hpp:53
@ PaintToolSphere
Definition Shortcuts.hpp:45
@ ViewRight
Definition Shortcuts.hpp:47
@ TogglePrintable
Definition Shortcuts.hpp:35
@ MovesSliderEnd
Definition Shortcuts.hpp:43
@ PaintToolHeightRange
Definition Shortcuts.hpp:45
@ Publish3mf
Definition Shortcuts.hpp:27
@ DeleteSelected
Definition Shortcuts.hpp:33
@ ToggleOneLayerMode
Definition Shortcuts.hpp:49
@ SwitchView
Definition Shortcuts.hpp:51
@ GizmoCut
Definition Shortcuts.hpp:40
@ MovesSliderStart
Definition Shortcuts.hpp:43
@ Arrange
Definition Shortcuts.hpp:37
@ MovesSliderRight
Definition Shortcuts.hpp:43
@ CloneSelected
Definition Shortcuts.hpp:33
@ GoToLayer
Definition Shortcuts.hpp:43
@ GizmoScale
Definition Shortcuts.hpp:40
@ ToggleGcodeWindow
Definition Shortcuts.hpp:49
@ ShowCollisionVolumes
Definition Shortcuts.hpp:49
@ GizmoEmboss
Definition Shortcuts.hpp:41
@ ViewTop
Definition Shortcuts.hpp:47
@ SaveProject
Definition Shortcuts.hpp:27
@ Preferences
Definition Shortcuts.hpp:51
@ MoveSelectionRight
Definition Shortcuts.hpp:38
@ SaveProjectAs
Definition Shortcuts.hpp:27
@ GizmoBrimEars
Definition Shortcuts.hpp:41
@ PaintToolTriangle
Definition Shortcuts.hpp:45
@ GizmoMove
Definition Shortcuts.hpp:40
@ PrintHostQueue
Definition Shortcuts.hpp:29
@ AddInstance
Definition Shortcuts.hpp:35
@ GizmoRotate
Definition Shortcuts.hpp:40
@ GizmoMeasure
Definition Shortcuts.hpp:41
@ KeyboardShortcuts
Definition Shortcuts.hpp:51
@ Orient
Definition Shortcuts.hpp:37
@ ShowWireframe
Definition Shortcuts.hpp:49
@ ToggleBeltRawGcode
Definition Shortcuts.hpp:49
@ Copy
Definition IMEXHelpers.hpp:345
@ NewProject
Definition LifecycleEvents.hpp:21
@ Cut
Definition CadDocument.hpp:26

◆ ShortcutContext

enum class Slic3r::GUI::ShortcutContext : uint8_t
strong
Enumerator
Global 
Plater 
Preview 
ObjectList 
Painting 
Count 
21: uint8_t { Global, Plater, Preview, ObjectList, Painting, Count };
@ Painting
Definition Shortcuts.hpp:21
@ Preview
Definition Shortcuts.hpp:21
@ ObjectList
Definition Shortcuts.hpp:21
@ Global
Definition Shortcuts.hpp:21
@ Plater
Definition Shortcuts.hpp:21

◆ ShortcutSection

enum class Slic3r::GUI::ShortcutSection : uint8_t
strong
Enumerator
Project 
SlicingAndPrinting 
Selection 
Editing 
Objects 
Placement 
Gizmos 
Sliders 
PaintingTools 
Camera 
Display 
Application 
SpeedDial 
Count 
71 : uint8_t {
73 Count
74};
@ PaintingTools
Definition Shortcuts.hpp:72
@ SlicingAndPrinting
Definition Shortcuts.hpp:72
@ Selection
Definition Shortcuts.hpp:72
@ Camera
Definition Shortcuts.hpp:72
@ Sliders
Definition Shortcuts.hpp:72
@ Placement
Definition Shortcuts.hpp:72
@ Editing
Definition Shortcuts.hpp:72
@ Display
Definition Shortcuts.hpp:72
@ Objects
Definition Shortcuts.hpp:72
@ Gizmos
Definition Shortcuts.hpp:72
@ Application
Definition Shortcuts.hpp:72
Emboss::IProjection Project
Definition CutSurface.cpp:75

◆ ShowType

Enumerator
LEFT 
RIGHT 
LEFT_AND_RIGHT 
LEFT_AND_RIGHT_DYNAMIC 
77 {
78 LEFT, // only show left ams and left ext
79 RIGHT, //only show right ams and right ext
80 LEFT_AND_RIGHT, //show left and right ams at the same time
81 LEFT_AND_RIGHT_DYNAMIC //show all left and right at one panel when use_dynamic_switch
82};
@ LEFT
Definition AmsMappingPopup.hpp:78
@ LEFT_AND_RIGHT_DYNAMIC
Definition AmsMappingPopup.hpp:81
@ RIGHT
Definition AmsMappingPopup.hpp:79
@ LEFT_AND_RIGHT
Definition AmsMappingPopup.hpp:80

◆ SLAGizmoEventType

enum class Slic3r::GUI::SLAGizmoEventType : unsigned char
strong
Enumerator
LeftDown 
LeftUp 
RightDown 
RightUp 
Dragging 
Delete 
SelectAll 
CtrlDown 
CtrlUp 
ShiftDown 
ShiftUp 
AltUp 
Escape 
ApplyChanges 
DiscardChanges 
AutomaticGeneration 
ManualEditing 
MouseWheelUp 
MouseWheelDown 
ResetClippingPlane 
Moving 
28 : unsigned char {
29 LeftDown = 1,
30 LeftUp,
32 RightUp,
34 Delete,
37 CtrlUp,
39 ShiftUp,
40 AltUp,
41 Escape,
49 Moving
50};
@ Escape
Definition GLGizmosCommon.hpp:41
@ LeftUp
Definition GLGizmosCommon.hpp:30
@ ResetClippingPlane
Definition GLGizmosCommon.hpp:48
@ MouseWheelUp
Definition GLGizmosCommon.hpp:46
@ CtrlDown
Definition GLGizmosCommon.hpp:36
@ MouseWheelDown
Definition GLGizmosCommon.hpp:47
@ RightUp
Definition GLGizmosCommon.hpp:32
@ AutomaticGeneration
Definition GLGizmosCommon.hpp:44
@ ShiftUp
Definition GLGizmosCommon.hpp:39
@ Dragging
Definition GLGizmosCommon.hpp:33
@ CtrlUp
Definition GLGizmosCommon.hpp:37
@ ShiftDown
Definition GLGizmosCommon.hpp:38
@ LeftDown
Definition GLGizmosCommon.hpp:29
@ RightDown
Definition GLGizmosCommon.hpp:31
@ AltUp
Definition GLGizmosCommon.hpp:40
@ ManualEditing
Definition GLGizmosCommon.hpp:45
@ Moving
Definition GLGizmosCommon.hpp:49
@ DiscardChanges
Definition GLGizmosCommon.hpp:43
@ Delete
Definition GLGizmosCommon.hpp:34
@ ApplyChanges
Definition GLGizmosCommon.hpp:42

◆ SlicedInfoIdx

Enumerator
siFilament_m 
siFilament_mm3 
siFilament_g 
siMateril_unit 
siCost 
siEstimatedTime 
siWTNumbetOfToolchanges 
siCount 
463{
468 siCost,
471 siCount
472};
@ siFilament_g
Definition Plater.cpp:466
@ siFilament_mm3
Definition Plater.cpp:465
@ siMateril_unit
Definition Plater.cpp:467
@ siCost
Definition Plater.cpp:468
@ siCount
Definition Plater.cpp:471
@ siFilament_m
Definition Plater.cpp:464
@ siWTNumbetOfToolchanges
Definition Plater.cpp:470
@ siEstimatedTime
Definition Plater.cpp:469

◆ SuccessType

Enumerator
PRINTER 
FILAMENT 
227 {
228 PRINTER = 0,
230};
@ FILAMENT
Definition CreatePresetsDialog.hpp:229
@ PRINTER
Definition CreatePresetsDialog.hpp:228

◆ Technology

Enumerator
T_FFF 
T_SLA 
T_ANY 
67 {
68 // Bitflag equivalent of PrinterTechnology
69 T_FFF = 0x1,
70 T_SLA = 0x2,
71 T_ANY = ~0,
72};
@ T_SLA
Definition ConfigWizard_private.hpp:70
@ T_FFF
Definition ConfigWizard_private.hpp:69
@ T_ANY
Definition ConfigWizard_private.hpp:71

◆ TestJob

Enumerator
TEST_BING_JOB 
TEST_ORCA_JOB 
TEST_PING_JOB 
TEST_JOB_MAX 
43 {
44 TEST_BING_JOB = 0,
45 TEST_ORCA_JOB = 1,
48};
@ TEST_JOB_MAX
Definition NetworkTestDialog.hpp:47
@ TEST_ORCA_JOB
Definition NetworkTestDialog.hpp:45
@ TEST_PING_JOB
Definition NetworkTestDialog.hpp:46
@ TEST_BING_JOB
Definition NetworkTestDialog.hpp:44

◆ TextureAutoMixMode

Enumerator
CMYW 
RYBW 
49 {
50 CMYW,
51 RYBW
52};
@ RYBW
Definition ColorDecomposeRecipe.hpp:12
@ CMYW
Definition ColorDecomposeRecipe.hpp:11

◆ TextureDisplacementPrepareOutcome

Enumerator
Committed 
Unchanged 
PaintLost 
Failed 
33{
34 Committed, // the parts now carry the prepared mesh and the paint carried onto it
35 Unchanged, // nothing needed doing - the meshes already met the criteria; the model was not touched
36 PaintLost, // a remesh landed but no layer's paint survived it, so nothing was committed
37 Failed, // cancelled, threw, or the volumes went away while the job ran
38};
@ Unchanged
Definition TextureDisplacementPrepareJob.hpp:35
@ PaintLost
Definition TextureDisplacementPrepareJob.hpp:36
@ Committed
Definition TextureDisplacementPrepareJob.hpp:34

◆ TextureFilamentKind

Enumerator
ExistingPhysical 
ExistingMixed 
NewPhysical 
NewMixed 
54 {
59};
@ NewMixed
Definition TextureImportDialog.hpp:58
@ ExistingMixed
Definition TextureImportDialog.hpp:56
@ NewPhysical
Definition TextureImportDialog.hpp:57
@ ExistingPhysical
Definition TextureImportDialog.hpp:55

◆ TextureImportState

Enumerator
Idle 
Computing 
Ready 
Error 
42 {
43 Idle,
45 Ready,
46 Error
47};
@ Computing
Definition TextureImportDialog.hpp:44
@ Ready
Definition TextureImportDialog.hpp:45

◆ TextureSource

enum class Slic3r::GUI::TextureSource
strong
Enumerator
Shipped 
User 
Plugin 
15{ Shipped, User, Plugin };
@ Shipped
Definition TextureLibrary.hpp:15
@ User
Definition TextureLibrary.hpp:15

◆ TrayType

Enumerator
NORMAL 
THIRD 
EMPTY 
71 {
72 NORMAL,
73 THIRD,
74 EMPTY
75};
@ NORMAL
Definition AmsMappingPopup.hpp:72
@ THIRD
Definition AmsMappingPopup.hpp:73
@ EMPTY
Definition AmsMappingPopup.hpp:74

◆ URL_STATE

Enumerator
URL_TCP 
URL_TUTK 
43 {
44 URL_TCP,
46};
@ URL_TCP
Definition PartSkipDialog.hpp:44
@ URL_TUTK
Definition PartSkipDialog.hpp:45

◆ VaryHeightIndicator

Enumerator
hiUnVariable 
hiVariable 
69{
70 hiUnVariable, // unvariable height
71 hiVariable, // variable height
72};
@ hiVariable
Definition ObjectDataViewModel.hpp:71
@ hiUnVariable
Definition ObjectDataViewModel.hpp:70

Function Documentation

◆ _add_containers()

void Slic3r::GUI::_add_containers ( const AmsMapingPopup * win,
std::list< MappingContainer * > & one_slot_containers,
const std::vector< MappingContainer * > & four_slots_containers,
wxBoxSizer * target_sizer )
static
65{
66 for (auto container : four_slots_containers) { target_sizer->Add(container, 0, wxTOP, win->FromDIP(5)); }
67
68 while (!one_slot_containers.empty()) {
69 wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
70 for (int i = 0; i < 3; i++) {
71 if (one_slot_containers.empty()) { break; }
72
73 sizer->Add(one_slot_containers.front(), 0, wxLEFT, (i == 0) ? 0 : win->FromDIP(5));
74 one_slot_containers.pop_front();
75 }
76
77 target_sizer->Add(sizer, 0, wxTOP, win->FromDIP(5));
78 }
79}

Referenced by Slic3r::GUI::AmsMapingPopup::update_ams_data_multi_machines(), and Slic3r::GUI::AmsMapingPopup::update_mapping_items().

Here is the caller graph for this function:

◆ _check_kval_not_default()

wxString Slic3r::GUI::_check_kval_not_default ( const MachineObject * obj,
const std::vector< FilamentInfo > & mapping_result )
static
4373{
4374 if (!obj) { return wxEmptyString;}
4375
4376 wxString ams_names;
4377 for (const auto& info : mapping_result) {
4378 if (!obj->contains_tray(info.ams_id, std::to_string(info.tray_id))) { continue; }
4379 if (obj->get_tray(info.ams_id, std::to_string(info.tray_id)).cali_idx == -1) { continue; } /*-1 means default*/
4380
4381 wxString ams_name;
4382 if (info.tray_id == VIRTUAL_TRAY_MAIN_ID) {
4383 ams_name = _L("Right-Ext");
4384 } else if (info.tray_id == VIRTUAL_TRAY_DEPUTY_ID) {
4385 ams_name = _L("Left-Ext");
4386 } else {
4387 ams_name = wxGetApp().transition_tridid(info.tray_id);
4388 }
4389
4390 if (!ams_names.empty()) { ams_names += ", ";}
4391 ams_names += ams_name;
4392 }
4393
4394 return ams_names;
4395}
#define VIRTUAL_TRAY_DEPUTY_ID
Definition DevDefs.h:90
#define VIRTUAL_TRAY_MAIN_ID
Definition DevDefs.h:89
#define _L(s)
Definition OBJ.cpp:34
int cali_idx
Definition DevFilaSystem.h:80
DevAmsTray get_tray(const std::string &ams_id, const std::string &tray_id) const
Definition DeviceManager.cpp:5295
bool contains_tray(const std::string &ams_id, const std::string &tray_id) const
Definition DeviceManager.cpp:5281

References _L, Slic3r::DevAmsTray::cali_idx, Slic3r::MachineObject::contains_tray(), Slic3r::MachineObject::get_tray(), VIRTUAL_TRAY_DEPUTY_ID, and VIRTUAL_TRAY_MAIN_ID.

Referenced by Slic3r::GUI::SelectMachineDialog::update_show_status().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _collect_filament_info()

void Slic3r::GUI::_collect_filament_info ( const wxString & shown_name,
const Preset & filament,
std::unordered_map< wxString, wxString > & query_filament_vendors,
std::unordered_map< wxString, wxString > & query_filament_types )
static
1132{
1133 query_filament_vendors[shown_name] = filament.config.get_filament_vendor();
1134 query_filament_types[shown_name] = filament.config.get_filament_type();
1135}
std::string get_filament_vendor() const
Definition PrintConfig.cpp:11580
std::string get_filament_type(std::string &displayed_filament_type, int id=0)
Definition PrintConfig.cpp:10725
DynamicPrintConfig config
Definition Preset.hpp:300

References Slic3r::Preset::config, Slic3r::DynamicPrintConfig::get_filament_type(), and Slic3r::DynamicPrintConfig::get_filament_vendor().

Referenced by Slic3r::GUI::AMSMaterialsSetting::Popup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _collect_sorted_machines()

void Slic3r::GUI::_collect_sorted_machines ( Slic3r::DeviceManager * dev_manager,
std::vector< MachineObject * > & sorted_machine_objs )
static
3992{
3993 sorted_machine_objs.clear();
3994 if (!dev_manager)
3995 {
3996 return;
3997 }
3998
3999 /* Step 1 :Collect the target and compatible types*/
4000 PresetBundle* preset_bundle = wxGetApp().preset_bundle;
4001 const std::string& printer_type = preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle);
4002 const auto& compatible_types_list = DevPrinterConfigUtil::get_compatible_machine(printer_type);
4003 std::set<std::string> compatible_types_set(compatible_types_list.begin(), compatible_types_list.end());
4004
4005 /* Step 2: collect different machine list*/
4006 MachineObject* cur_selected_obj = dev_manager->get_selected_machine();
4007 std::vector<MachineObject*> match_avaliable_list; // match and availiable machines
4008 std::vector<MachineObject*> match_inavaliable_list;// match but inavaliable machines
4009 std::vector<MachineObject*> other_list;// other bound machines
4010 auto _collect_machine = [&](MachineObject* obj)
4011 {
4012 if (obj == cur_selected_obj)
4013 {
4014 return;
4015 }
4016
4017 if (obj->printer_type == printer_type)
4018 {
4019 obj->is_avaliable() ? match_avaliable_list.push_back(obj) : match_inavaliable_list.push_back(obj);
4020 }
4021 else
4022 {
4023 other_list.push_back(obj);
4024 }
4025 };
4026
4027 // collect from user machine list
4028 const auto& user_machine_list = dev_manager->get_my_machine_list(dev_manager->get_current_printer_agent_id());// user machine list
4029 for (const auto& elem : user_machine_list)
4030 {
4031 MachineObject* mobj = elem.second;
4032 if (mobj && (mobj->is_online() || mobj->is_connected()))
4033 {
4034 _collect_machine(mobj);
4035 }
4036 }
4037
4038 /* Step 2: Sort the lists*/
4039 std::sort(match_avaliable_list.begin(), match_avaliable_list.end(), _compare_obj_names);
4040 std::sort(match_inavaliable_list.begin(), match_inavaliable_list.end(), _compare_obj_names);
4041 std::sort(other_list.begin(), other_list.end(), _compare_obj_names);
4042
4043 /* Step 3: Get the sorted objects*/
4044 auto _collect_sorted_objs = [](const std::vector<MachineObject*>& obj_list,
4045 std::vector<MachineObject*>& sorted_machine_objs)
4046 {
4047 for (auto obj : obj_list)
4048 {
4049 sorted_machine_objs.push_back(obj);
4050 }
4051 };
4052
4053 // the shown list, STUDIO-8235
4054 if (cur_selected_obj)
4055 {
4056 std::vector<MachineObject*> cur_selected_obj_list{ cur_selected_obj };
4057 _collect_sorted_objs(cur_selected_obj_list, sorted_machine_objs);
4058 }
4059 _collect_sorted_objs(match_avaliable_list, sorted_machine_objs);
4060 _collect_sorted_objs(match_inavaliable_list, sorted_machine_objs);
4061 _collect_sorted_objs(other_list, sorted_machine_objs);
4062}
static std::vector< std::string > get_compatible_machine(std::string type_str)
Definition DevConfigUtil.h:83
std::map< std::string, MachineObject * > get_my_machine_list(const std::string &agent_id="")
Definition DevManager.cpp:824
MachineObject * get_selected_machine()
Definition DevManager.cpp:747
std::string get_current_printer_agent_id() const
Definition DevManager.cpp:192
Definition DeviceManager.hpp:111
Definition PresetBundle.hpp:210
PrinterPresetCollection printers
Definition PresetBundle.hpp:503
Preset & get_edited_preset()
Definition Preset.hpp:756
std::string get_printer_type(PresetBundle *preset_bundle)
Definition Preset.cpp:1003
static ObjectList * obj_list()
Definition GUI_Factories.cpp:405
static bool _compare_obj_names(MachineObject *obj1, MachineObject *obj2)
Definition SelectMachine.cpp:3978

References _compare_obj_names(), Slic3r::DevPrinterConfigUtil::get_compatible_machine(), Slic3r::DeviceManager::get_current_printer_agent_id(), Slic3r::PresetCollection::get_edited_preset(), Slic3r::DeviceManager::get_my_machine_list(), Slic3r::Preset::get_printer_type(), Slic3r::DeviceManager::get_selected_machine(), Slic3r::MachineObject::is_connected(), Slic3r::MachineObject::is_online(), obj_list(), and Slic3r::PresetBundle::printers.

Referenced by Slic3r::GUI::SelectMachineDialog::update_user_printer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _compare_obj_names()

bool Slic3r::GUI::_compare_obj_names ( MachineObject * obj1,
MachineObject * obj2 )
static
3979{
3980 return obj1->get_dev_name() < obj2->get_dev_name();
3981}
std::string get_dev_name() const
Definition DeviceManager.hpp:200

References Slic3r::MachineObject::get_dev_name().

Referenced by _collect_sorted_machines().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _copy_dir()

void Slic3r::GUI::_copy_dir ( const fs::path & from_dir,
const fs::path & to_dir )
static
169{
170 try
171 {
172 if (!fs::exists(from_dir))
173 {
174 return;
175 }
176
177 if (!fs::exists(to_dir))
178 {
179 fs::create_directory(to_dir);
180 }
181
182 for (const auto &entry : fs::directory_iterator(from_dir))
183 {
184 const fs::path &source_path = entry.path();
185 const fs::path &relative_path = fs::relative(source_path, from_dir);
186 const fs::path &dest_path = to_dir / relative_path;
187
188 if (fs::is_regular_file(source_path))
189 {
190 if (fs::exists(dest_path))
191 {
192 fs::remove(dest_path);
193 }
194
195 copy_file(source_path, dest_path);
196 }
197 else if (fs::is_directory(source_path))
198 {
199 _copy_dir(source_path, dest_path);
200 }
201 }
202 }
203 catch (...)
204 {
205
206 }
207}
static void _copy_dir(const fs::path &from_dir, const fs::path &to_dir)
Definition HMS.cpp:168
CopyFileResult copy_file(const std::string &from, const std::string &to, std::string &error_message, const bool with_check)
Definition utils.cpp:1071

References _copy_dir(), and Slic3r::copy_file().

Referenced by _copy_dir(), and Slic3r::GUI::HMSQuery::copy_from_data_dir_to_local().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _DrawRemainArea()

void Slic3r::GUI::_DrawRemainArea ( const MappingItem * item,
const TrayData & dd,
bool support_remain_dect,
wxDC & dc )
static
1401{
1402 int to_paint_remain = dd.remain;
1403
1404 /*paint invalid data as 100*/
1405 if (!support_remain_dect) { to_paint_remain = 100;}
1406 if (0 > to_paint_remain || to_paint_remain > 100) { to_paint_remain = 100; }
1407
1408 wxSize size = item->GetSize();
1409 int x_margin = item->FromDIP(4);
1410 int y_margin = item->FromDIP(2);
1411 int full_range_width = size.x;
1412
1413 /*range background*/
1414 dc.SetPen(wxColour("#E4E4E4"));
1415 dc.SetBrush(wxColour("#E4E4E4"));
1416 int bg_height = item->FromDIP(6);
1417 int bg_width = full_range_width - (2 * x_margin);
1418 dc.DrawRoundedRectangle(x_margin, y_margin, bg_width, bg_height, item->FromDIP(2));
1419
1420 /*remain fill*/
1421 if (!dd.name.empty())
1422 {
1423 dc.SetPen(dd.colour);
1424 dc.SetBrush(dd.colour);
1425 int border = item->FromDIP(1);
1426 int remain_width = (bg_width - (2 * border)) * to_paint_remain / 100;
1427 int remain_height = bg_height - (2 * border);
1428 dc.DrawRoundedRectangle(x_margin + border, y_margin + border, remain_width, remain_height, item->FromDIP(2));
1429 }
1430}
wxColour colour
Definition AmsMappingPopup.hpp:92
int remain
Definition AmsMappingPopup.hpp:89
std::string name
Definition AmsMappingPopup.hpp:90

References Slic3r::GUI::TrayData::colour, Slic3r::GUI::TrayData::name, and Slic3r::GUI::TrayData::remain.

Referenced by Slic3r::GUI::MappingItem::render().

Here is the caller graph for this function:

◆ _get_diff_clr()

wxColour Slic3r::GUI::_get_diff_clr ( wxWindow * win,
wxColour pen_clr )
static
2209{
2210 if (!wxGetApp().dark_mode())
2211 {
2212 if (pen_clr.GetRGB() == wxWHITE->GetRGB())
2213 {
2214 static int default_distance = 20;
2215 pen_clr.Set(pen_clr.Red() - default_distance, pen_clr.Green() - default_distance, pen_clr.Blue() - default_distance, pen_clr.Alpha());
2216 }
2217 }
2218
2219 if (pen_clr.Alpha() == 0)/*STUDIO-10249 Make the color visible*/
2220 {
2221 pen_clr.Set(pen_clr.Red(), pen_clr.Green(), pen_clr.Blue(), 150);
2222 }
2223
2224 return pen_clr;
2225}

Referenced by Slic3r::GUI::AMSRoadDownPart::doRender(), and Slic3r::GUI::AMSRoadUpPart::doRender().

Here is the caller graph for this function:

◆ _get_ext_loc_str()

wxString Slic3r::GUI::_get_ext_loc_str ( const std::unordered_set< int > & extruders,
int total_ext_num )
static
4719{
4720 assert(!extruders.empty());
4721 if (total_ext_num == 1)
4722 {
4723 return _L("extruder");
4724 }
4725 else if (total_ext_num == 2)
4726 {
4727 if (extruders.size() == 2)
4728 {
4729 return _L("both extruders");
4730 }
4731 else if (extruders.size() == 1)
4732 {
4733 auto iter = extruders.begin();
4734 if (*iter == MAIN_EXTRUDER_ID)
4735 {
4736 return _L("right extruder");
4737 }
4738 else
4739 {
4740 return _L("left extruder");
4741 }
4742 }
4743 }
4744
4745 return wxEmptyString;
4746}
#define MAIN_EXTRUDER_ID
Definition DevDefs.h:101

References _L, and MAIN_EXTRUDER_ID.

Referenced by Slic3r::GUI::SelectMachineDialog::update_show_status().

Here is the caller graph for this function:

◆ _get_nozzle_name()

wxString Slic3r::GUI::_get_nozzle_name ( int total_ext_count,
int ext_id )
static
4398{
4399 if (total_ext_count == 2) {
4400 if (ext_id == MAIN_EXTRUDER_ID) {
4401 return _L("right nozzle");
4402 } else {
4403 return _L("left nozzle");
4404 }
4405 }
4406
4407 return _L("nozzle");
4408}

References _L, and MAIN_EXTRUDER_ID.

Referenced by Slic3r::GUI::SelectMachineDialog::CheckErrorExtruderNozzleWithSlicing(), and Slic3r::GUI::SelectMachineDialog::update_show_status().

Here is the caller graph for this function:

◆ _get_tips()

wxString Slic3r::GUI::_get_tips ( MachineObject * obj_)
static
7039{
7040 wxString tips;
7041 tips = obj_->get_printer_type_display_str();
7042
7043 wxString ext_diameter;
7044 if (obj_->GetExtderSystem()->GetTotalExtderCount() == 1) {
7045 ext_diameter += format_nozzle_diameter(obj_->GetExtderSystem()->GetNozzleDiameter(0));
7046 } else if (obj_->GetExtderSystem()->GetTotalExtderCount() == 2) {
7047 ext_diameter += format_nozzle_diameter(obj_->GetExtderSystem()->GetNozzleDiameter(1));//Left
7048 ext_diameter += "/";
7049 ext_diameter += format_nozzle_diameter(obj_->GetExtderSystem()->GetNozzleDiameter(0));
7050 } else {
7051 assert(0);
7052 }
7053
7054 if (!ext_diameter.empty()) {
7055 tips += " ";
7056 tips += ext_diameter;
7057 }
7058
7059 return tips;
7060}
float GetNozzleDiameter(int extder_id) const
Definition DevExtruderSystem.h:155
int GetTotalExtderCount() const
Definition DevExtruderSystem.h:132
DevExtderSystem * GetExtderSystem() const
Definition DeviceManager.hpp:379
wxString get_printer_type_display_str() const
Definition DeviceManager.cpp:437
wxString format_nozzle_diameter(float diameter)
Definition GUI_Utils.cpp:62

References format_nozzle_diameter(), Slic3r::MachineObject::get_printer_type_display_str(), Slic3r::MachineObject::GetExtderSystem(), Slic3r::DevExtderSystem::GetNozzleDiameter(), and Slic3r::DevExtderSystem::GetTotalExtderCount().

Referenced by Slic3r::GUI::PrinterInfoBox::SetPrinters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _get_used_nozzle_idxes()

std::unordered_set< int > Slic3r::GUI::_get_used_nozzle_idxes ( )
static
2623{
2624 std::unordered_set<int> used_nozzle_idxes;
2625
2626 DeviceManager *dev = Slic3r::GUI::wxGetApp().getDeviceManager();
2627 if (dev) {
2628 MachineObject *obj_ = dev->get_selected_machine();
2629 if (obj_) {
2630 try {
2631 PresetBundle *preset_bundle = wxGetApp().preset_bundle;
2632 PartPlate *cur_plate = wxGetApp().plater()->get_partplate_list().get_curr_plate();
2633 auto used_filament_idxs = cur_plate->get_used_filaments(); /*the index is started from 1*/
2634 for (int used_filament_idx : used_filament_idxs) {
2635 int used_nozzle_idx = cur_plate->get_physical_extruder_by_filament_id(preset_bundle->full_config(), used_filament_idx);
2636 used_nozzle_idxes.insert(used_nozzle_idx);
2637 }
2638 } catch (const std::exception &) {}
2639 }
2640 }
2641
2642 return used_nozzle_idxes;
2643}
Definition DevManager.h:26
Definition PartPlate.hpp:108
int get_physical_extruder_by_filament_id(const DynamicConfig &g_config, int idx) const
Definition PartPlate.cpp:3511
std::vector< int > get_used_filaments()
Definition PartPlate.cpp:3656
DynamicPrintConfig full_config(bool apply_extruder=true, std::optional< std::vector< int > >filament_maps=std::nullopt, std::optional< std::vector< int > > filament_volume_maps=std::nullopt) const
Definition PresetBundle.cpp:5427

References Slic3r::PresetBundle::full_config(), Slic3r::GUI::PartPlate::get_physical_extruder_by_filament_id(), Slic3r::DeviceManager::get_selected_machine(), and Slic3r::GUI::PartPlate::get_used_filaments().

Referenced by Slic3r::GUI::SelectMachineDialog::update_show_status().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _GetLabelColour()

wxColour Slic3r::GUI::_GetLabelColour ( const prePrintInfo & info)
static
317{
318 if (info.level == Error)
319 {
320 return wxColour("#D01B1B");
321 }
322 else if (info.level == Warning)
323 {
324 return wxColour("#FF6F00");
325 }
326
327 return *wxBLACK; // Default colour for normal messages
328}
@ Warning
Definition Auxiliary.hpp:87
prePrintInfoLevel level
Definition PrePrintChecker.hpp:27

References Error, Slic3r::GUI::prePrintInfo::level, and Warning.

Referenced by Slic3r::GUI::PrinterMsgPanel::UpdateInfos().

Here is the caller graph for this function:

◆ _HasAms()

bool Slic3r::GUI::_HasAms ( const std::vector< FilamentInfo > & ams_mapping_result)
static
3170 {
3171 for (const auto &info : ams_mapping_result) {
3172 if (info.ams_id != VIRTUAL_AMS_MAIN_ID_STR && info.ams_id != VIRTUAL_AMS_DEPUTY_ID_STR && !info.ams_id.empty()) {
3173 return true;
3174 }
3175 }
3176
3177 return false;
3178}
#define VIRTUAL_AMS_DEPUTY_ID_STR
Definition DevDefs.h:93
#define VIRTUAL_AMS_MAIN_ID_STR
Definition DevDefs.h:92

References VIRTUAL_AMS_DEPUTY_ID_STR, and VIRTUAL_AMS_MAIN_ID_STR.

Referenced by Slic3r::GUI::SelectMachineDialog::on_send_print(), Slic3r::GUI::SelectMachineDialog::on_timer(), and Slic3r::GUI::SelectMachineDialog::update_show_status().

Here is the caller graph for this function:

◆ _HasExt()

bool Slic3r::GUI::_HasExt ( const std::vector< FilamentInfo > & ams_mapping_result)
static
3156 {
3157 if (ams_mapping_result.empty()) {
3158 return true;
3159 };
3160
3161 for (const auto &info : ams_mapping_result) {
3162 if (info.ams_id == VIRTUAL_AMS_MAIN_ID_STR || (info.ams_id == VIRTUAL_AMS_DEPUTY_ID_STR && !info.ams_id.empty())) {
3163 return true;
3164 }
3165 }
3166
3167 return false;
3168}

References VIRTUAL_AMS_DEPUTY_ID_STR, and VIRTUAL_AMS_MAIN_ID_STR.

Referenced by Slic3r::GUI::SelectMachineDialog::on_send_print(), and Slic3r::GUI::SelectMachineDialog::update_show_status().

Here is the caller graph for this function:

◆ _is_rack_managed_nozzle()

bool Slic3r::GUI::_is_rack_managed_nozzle ( const MachineObject * obj,
int nozzle_idx )
static
2650{
2651 if (nozzle_idx != MAIN_EXTRUDER_ID)
2652 return false;
2653
2654 const DevNozzleSystem* nozzle_sys = obj ? obj->GetNozzleSystem() : nullptr;
2655 return nozzle_sys && nozzle_sys->GetNozzleRack() && nozzle_sys->GetNozzleRack()->IsSupported();
2656}
Definition DevNozzleSystem.h:113
std::shared_ptr< DevNozzleRack > GetNozzleRack() const
Definition DevNozzleSystem.h:140
DevNozzleSystem * GetNozzleSystem() const
Definition DeviceManager.hpp:382

References Slic3r::DevNozzleSystem::GetNozzleRack(), Slic3r::MachineObject::GetNozzleSystem(), and MAIN_EXTRUDER_ID.

Referenced by Slic3r::GUI::SelectMachineDialog::update_show_status().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ about()

void Slic3r::GUI::about ( )
575{
576 AboutDialog dlg;
577 dlg.ShowModal();
578}
Definition AboutDialog.hpp:69
int ShowModal()
Definition GUI_Utils.hpp:216

References Slic3r::GUI::DPIAware< P >::ShowModal().

Referenced by Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::build_command_catalog(), Slic3r::GUI::MainFrame::generate_help_menu(), and Slic3r::GUI::MainFrame::init_menubar_as_editor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ action_json()

nlohmann::json Slic3r::GUI::action_json ( const AppAction & a)
444{
445 nlohmann::json j({{"id", a.id()},
446 {"title", a.title()},
447 {"full_label", a.full_label},
448 {"source", a.source_name()},
449 {"group", a.group},
450 {"kind", a.kind == AppActionKind::Plugin ? "plugin" : "command"},
451 {"input", a.input},
452 {"icon", a.icon},
453 {"mode", mode_key(a.required_mode)},
454 {"desc", a.tooltip},
455 {"wiki", !a.help_url.empty()}});
456 auto add_alias = [&j](const char* key, const std::string& english, const std::string& local) {
457 if (!english.empty() && english != local)
458 j[key] = english;
459 };
460 add_alias("title_en", a.title_en, a.title());
461 add_alias("group_en", a.group_en, a.group);
462 add_alias("source_en", a.source_en, a.source_name());
463 add_alias("full_label_en", a.full_label_en, a.full_label);
464 return j;
465}
const char * mode_key(ConfigOptionMode mode)
Definition ActionRegistry.cpp:319
@ local
Definition Time.hpp:13
std::string source_en
Definition ActionRegistry.hpp:97
std::string full_label
Definition ActionRegistry.hpp:90
std::string group_en
Definition ActionRegistry.hpp:96
std::string input
Definition ActionRegistry.hpp:79
std::string group
Definition ActionRegistry.hpp:76
AppActionKind kind
Definition ActionRegistry.hpp:75
const std::string & title() const
Definition ActionRegistry.hpp:53
const std::string & source_name() const
Definition ActionRegistry.hpp:55
std::string title_en
Definition ActionRegistry.hpp:95
std::string tooltip
Definition ActionRegistry.hpp:87
std::string full_label_en
Definition ActionRegistry.hpp:98
ConfigOptionMode required_mode
Definition ActionRegistry.hpp:85
std::string icon
Definition ActionRegistry.hpp:82
std::string help_url
Definition ActionRegistry.hpp:100
const std::string & id() const
Definition ActionRegistry.hpp:52

References Slic3r::GUI::AppAction::full_label, Slic3r::GUI::AppAction::full_label_en, Slic3r::GUI::AppAction::group, Slic3r::GUI::AppAction::group_en, Slic3r::GUI::AppAction::help_url, Slic3r::GUI::AppAction::icon, Slic3r::GUI::AppAction::id(), Slic3r::GUI::AppAction::input, Slic3r::GUI::AppAction::kind, Plugin, Slic3r::GUI::AppAction::required_mode, Slic3r::GUI::AppAction::source_en, Slic3r::GUI::AppAction::source_name(), Slic3r::GUI::AppAction::title(), Slic3r::GUI::AppAction::title_en, and Slic3r::GUI::AppAction::tooltip.

Referenced by Slic3r::GUI::DeviceErrorDialog::set_action_json(), and Slic3r::GUI::ActionRegistry::snapshot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ active_host_type()

PrintHostType Slic3r::GUI::active_host_type ( )
static
219{
220 if (wxGetApp().preset_bundle == nullptr)
221 return htOctoPrint;
222 return wxGetApp().preset_bundle->printers.get_edited_preset().config.option<ConfigOptionEnum<PrintHostType>>("host_type")->value;
223}
Definition Config.hpp:2076
@ htOctoPrint
Definition PrintConfig.hpp:119

References Slic3r::htOctoPrint.

Referenced by Slic3r::GUI::PrinterWebView::load_url().

Here is the caller graph for this function:

◆ add_common_publish_menu_items()

void Slic3r::GUI::add_common_publish_menu_items ( wxMenu * publish_menu,
MainFrame * mainFrame )
static
2916{
2917#ifndef __WINDOWS__
2918 append_menu_item(publish_menu, wxID_ANY, _L("Upload Models"), _L("Upload Models"),
2919 [](wxCommandEvent&) {
2920 if (!wxGetApp().getAgent()) {
2921 BOOST_LOG_TRIVIAL(info) << "publish: no agent";
2922 return;
2923 }
2924
2925 json j;
2926 NetworkAgent* agent = GUI::wxGetApp().getAgent();
2927
2928 //if (GUI::wxGetApp().plater()->model().objects.empty()) return;
2929 wxGetApp().open_publish_page_dialog();
2930 });
2931
2932 append_menu_item(publish_menu, wxID_ANY, _L("Download Models"), _L("Download Models"),
2933 [](wxCommandEvent&) {
2934 if (!wxGetApp().getAgent()) {
2935 BOOST_LOG_TRIVIAL(info) << "publish: no agent";
2936 return;
2937}
2938
2939 //if (GUI::wxGetApp().plater()->model().objects.empty()) return;
2940 wxGetApp().open_mall_page_dialog();
2941 });
2942#endif
2943}
Definition NetworkAgent.hpp:29
nlohmann::json json
Definition AssembleList.cpp:42
wxMenuItem * append_menu_item(wxMenu *menu, int id, const wxString &string, const wxString &description, std::function< void(wxCommandEvent &event)> cb, const wxBitmap &icon, wxEvtHandler *event_handler, std::function< bool()> const cb_condition, wxWindow *parent, int insert_pos)
Definition wxExtensions.cpp:89

References _L, and append_menu_item().

Here is the call graph for this function:

◆ add_config_substitutions()

void Slic3r::GUI::add_config_substitutions ( const ConfigSubstitutions & conf_substitutions,
wxString & changes )
static
346{
347 changes += "<table>";
348 for (const ConfigSubstitution& conf_substitution : conf_substitutions) {
349 wxString new_val;
350 const ConfigOptionDef* def = conf_substitution.opt_def;
351 if (!def)
352 continue;
353 switch (def->type) {
354 case coEnum:
355 {
356 const std::vector<std::string>& labels = def->enum_labels;
357 const std::vector<std::string>& values = def->enum_values;
358 int val = conf_substitution.new_value->getInt();
359
360 bool is_infill = def->opt_key == "top_surface_pattern" ||
361 def->opt_key == "bottom_surface_pattern" ||
362 def->opt_key == "internal_solid_infill_pattern" ||
363 def->opt_key == "support_base_pattern" ||
364 def->opt_key == "support_interface_pattern" ||
365 def->opt_key == "ironing_pattern" ||
366 def->opt_key == "support_ironing_pattern" ||
367 def->opt_key == "sparse_infill_pattern";
368
369 // Each infill doesn't use all list of infill declared in PrintConfig.hpp.
370 // So we should "convert" val to the correct one
371 if (is_infill) {
372 for (const auto& key_val : *def->enum_keys_map)
373 if ((int)key_val.second == val) {
374 auto it = std::find(values.begin(), values.end(), key_val.first);
375 if (it == values.end())
376 break;
377 auto idx = it - values.begin();
378 new_val = wxString("\"") + values[idx] + "\"" + " (" + from_u8(_utf8(labels[idx])) + ")";
379 break;
380 }
381 if (new_val.IsEmpty()) {
382 assert(false);
383 new_val = _L("Undefined");
384 }
385 }
386 else
387 new_val = wxString("\"") + values[val] + "\"" + " (" + from_u8(_utf8(labels[val])) + ")";
388 break;
389 }
390 case coEnums:
391 {
392 const std::vector<std::string>& labels = def->enum_labels;
393 const std::vector<std::string>& values = def->enum_values;
394 std::string val = conf_substitution.new_value->serialize();
395 new_val = wxString("\"") + from_u8(_utf8(val)) + "\"";
396 break;
397 }
398 case coBool:
399 new_val = conf_substitution.new_value->getBool() ? "true" : "false";
400 break;
401 case coBools:
402 if (conf_substitution.new_value->nullable())
403 for (const char v : static_cast<const ConfigOptionBoolsNullable*>(conf_substitution.new_value.get())->values)
404 new_val += std::string(v == ConfigOptionBoolsNullable::nil_value() ? "nil" : v ? "true" : "false") + ", ";
405 else
406 for (const char v : static_cast<const ConfigOptionBools*>(conf_substitution.new_value.get())->values)
407 new_val += std::string(v ? "true" : "false") + ", ";
408 if (! new_val.empty())
409 new_val.erase(new_val.begin() + new_val.size() - 2, new_val.end());
410 break;
411 default:
412 assert(false);
413 }
414
415 changes += format_wxstr("<tr><td><b>\"%1%\" (%2%)</b></td><td>: ", def->opt_key, _(def->label)) +
416 format_wxstr(_L("%1% was replaced with %2%"), bold_string(conf_substitution.old_value), bold(new_val)) +
417 "</td></tr>";
418 }
419 changes += "</table>";
420}
#define _(s)
Definition 3mf.cpp:306
static unsigned char nil_value()
Definition Config.hpp:1976
Definition Config.hpp:2316
t_config_option_key opt_key
Definition Config.hpp:2342
ConfigOptionType type
Definition Config.hpp:2344
std::vector< std::string > enum_labels
Definition Config.hpp:2616
std::string label
Definition Config.hpp:2566
const t_config_enum_values * enum_keys_map
Definition Config.hpp:2619
std::vector< std::string > enum_values
Definition Config.hpp:2615
std::vector< unsigned char > values
Definition Config.hpp:418
wxString format_wxstr(const char *fmt, TArgs &&... args)
Definition format.hpp:22
static wxString bold(const wxString &str)
Definition GUI.cpp:335
static wxString bold_string(const wxString &str)
Definition GUI.cpp:340
wxString from_u8(const std::string &str)
Definition GUI.cpp:544
ConfigOptionBoolsTempl< true > ConfigOptionBoolsNullable
Definition Config.hpp:2067
bool is_infill(ExtrusionRole role)
Definition ExtrusionEntity.hpp:79
ConfigOptionBoolsTempl< false > ConfigOptionBools
Definition Config.hpp:2066
@ coBools
Definition Config.hpp:212
@ coEnum
Definition Config.hpp:214
@ coBool
Definition Config.hpp:210
@ coEnums
Definition Config.hpp:216
Definition Config.hpp:263
#define _utf8(s)
Definition I18N.hpp:10

References _, _L, _utf8, bold(), bold_string(), Slic3r::coBool, Slic3r::coBools, Slic3r::coEnum, Slic3r::coEnums, Slic3r::ConfigOptionDef::enum_keys_map, Slic3r::ConfigOptionDef::enum_labels, Slic3r::ConfigOptionDef::enum_values, format_wxstr(), from_u8(), Slic3r::is_infill(), Slic3r::ConfigOptionDef::label, Slic3r::ConfigOptionBoolsTempl< true >::nil_value(), Slic3r::ConfigOptionDef::opt_key, and Slic3r::ConfigOptionDef::type.

Referenced by show_substitutions_info(), and show_substitutions_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_correct_opts_to_options_list()

template<class T>
void Slic3r::GUI::add_correct_opts_to_options_list ( const std::string & opt_key,
std::map< std::string, int > & map,
Tab * tab,
const int & value )
1156{
1157 map.emplace(opt_key + "#0", value);
1158}

◆ add_menus()

void Slic3r::GUI::add_menus ( wxMenuBar * menu,
int event_preferences_changed,
int event_language_change )
extern

◆ add_msg_content()

void Slic3r::GUI::add_msg_content ( wxWindow * parent,
wxBoxSizer * content_sizer,
wxString msg,
bool has_code_excerpts = false,
bool is_marked_msg = false,
const wxString & link_text = "",
std::function< void(const wxString &)> link_callback = nullptr )
static
345{
346 wxHtmlWindow* html = new wxHtmlWindow(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO);
347 html->SetBackgroundColour(StateColor::darkModeColorFor(*wxWHITE));
348
349 // count lines in the message
350 int msg_lines = 0;
351 if (!has_code_excerpts) {
352 int line_len = 55;// count of symbols in one line
353 int start_line = 0;
354 for (auto i = msg.begin(); i != msg.end(); ++i) {
355 if (*i == '\n') {
356 int cur_line_len = i - msg.begin() - start_line;
357 start_line = i - msg.begin();
358 if (cur_line_len == 0 || line_len > cur_line_len)
359 msg_lines++;
360 else
361 msg_lines += std::lround((double)(cur_line_len) / line_len);
362 }
363 }
364 msg_lines++;
365 }
366
367 wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
368 wxFont monospace = wxGetApp().code_font();
369 wxColour text_clr = wxGetApp().get_label_clr_default();
370 wxColour bgr_clr = parent->GetBackgroundColour();
371 auto text_clr_str = encode_color(ColorRGB(text_clr.Red(), text_clr.Green(), text_clr.Blue()));
372 auto bgr_clr_str = encode_color(ColorRGB(bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue()));
373 const int font_size = font.GetPointSize();
374 int size[] = { font_size, font_size, font_size, font_size, font_size, font_size, font_size };
375 html->SetFonts(font.GetFaceName(), monospace.GetFaceName(), size);
376 html->SetBorders(2);
377
378 // calculate html page size from text
379 wxSize page_size;
380 int em = wxGetApp().em_unit();
381 if (!wxGetApp().mainframe) {
382 // If mainframe is nullptr, it means that GUI_App::on_init_inner() isn't completed
383 // (We just show information dialog about configuration version now)
384 // And as a result the em_unit value wasn't created yet
385 // So, calculate it from the scale factor of Dialog
386#if defined(__WXGTK__)
387 // Linux specific issue : get_dpi_for_window(this) still doesn't responce to the Display's scale in new wxWidgets(3.1.3).
388 // So, initialize default width_unit according to the width of the one symbol ("m") of the currently active font of this window.
389 em = std::max<size_t>(10, parent->GetTextExtent("m").x - 1);
390#else
391 double scale_factor = (double)get_dpi_for_window(parent) / (double)DPI_DEFAULT;
392 em = std::max<size_t>(10, 10.0f * scale_factor);
393#endif // __WXGTK__
394 }
395 auto info_width = 68 * em;
396 // if message containes the table
397 if (msg.Contains("<tr>")) {
398 int lines = msg.Freq('\n') + 1;
399 int pos = 0;
400 while (pos < (int)msg.Len() && pos != wxNOT_FOUND) {
401 pos = msg.find("<tr>", pos + 1);
402 lines += 2;
403 }
404 int page_height = std::min(int(font.GetPixelSize().y + 2) * lines, info_width);
405 page_size = wxSize(info_width, page_height);
406 }
407 else {
408 wxSize msg_sz;
409 if (has_code_excerpts) {
410 msg_sz = measure_mixed_text(parent, msg.ToUTF8().data(), font, monospace);
411 } else {
412 wxClientDC dc(parent);
413 dc.SetFont(font); // ORCA without this it calculates bigger size
414 msg_sz = dc.GetMultiLineTextExtent(msg);
415 }
416 msg_sz += parent->FromDIP(wxSize(10,5)); // added extra spacing to prevent wrapping
417
418 int page_height = msg_sz.GetY();
419 // Reserve the horizontal scrollbar's height, or it clips the last line.
420 if (msg_sz.GetX() > info_width)
421 page_height += wxSystemSettings::GetMetric(wxSYS_HSCROLL_Y, parent);
422 page_size = wxSize(std::min(msg_sz.GetX(), info_width), std::min(page_height, info_width));
423 // Extra line breaks in message dialog
424 if (link_text.IsEmpty() && !link_callback && is_marked_msg == false && !has_code_excerpts) {//for common text
425 html->Destroy();
426 if (msg_sz.GetX() < info_width) {//No need for line breaks
427 info_width = msg_sz.GetX();
428 }
429 wxScrolledWindow *scrolledWindow = new wxScrolledWindow(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL);
430 scrolledWindow->SetBackgroundColour(*wxWHITE);
431 scrolledWindow->SetScrollRate(0, scrolledWindow->FromDIP(20));
432 scrolledWindow->EnableScrolling(false, true);
433 wxBoxSizer *sizer_scrolled = new wxBoxSizer(wxHORIZONTAL);
434 Label *wrapped_text = new Label(scrolledWindow, font, msg, LB_AUTO_WRAP, wxSize(info_width, -1));
435 wrapped_text->SetMinSize(wxSize(info_width, -1));
436 wrapped_text->SetMaxSize(wxSize(info_width, -1));
437 wrapped_text->Wrap(info_width);
438 sizer_scrolled->Add(wrapped_text, wxALIGN_LEFT ,0);
439 sizer_scrolled->AddSpacer(5);
440 sizer_scrolled->AddStretchSpacer();
441 scrolledWindow->SetSizer(sizer_scrolled);
442 auto info_height = 48 * em;
443 if (sizer_scrolled->GetMinSize().GetHeight() < info_height) {
444 info_height = sizer_scrolled->GetMinSize().GetHeight();
445 }
446 scrolledWindow->SetMinSize(wxSize(info_width, info_height));
447 scrolledWindow->SetMaxSize(wxSize(info_width, info_height));
448 scrolledWindow->FitInside();
449 content_sizer->Add(scrolledWindow, 1, wxEXPAND | wxRIGHT, 8);
450 return;
451 }
452 }
453 html->SetMinSize(page_size);
454
455 std::string msg_escaped;
456 if (has_code_excerpts) {
457 html->GetParser()->AddTagHandler(new CodeExcerptTagHandler());
458 msg_escaped = format_parser_error_html(msg.ToUTF8().data());
459 } else {
460 msg_escaped = xml_escape(msg.ToUTF8().data(), is_marked_msg);
461 boost::replace_all(msg_escaped, "\r\n", "<br>");
462 boost::replace_all(msg_escaped, "\n", "<br>");
463 }
464
465 if (!link_text.IsEmpty() && link_callback) {
466 msg_escaped += " <span><a href=\"#\" style=\"color:rgb(0, 150, 136); text-decoration:underline;\">" + std::string(link_text.ToUTF8().data()) + "</a></span>";
467 }
468
469 html->SetPage("<html><body bgcolor=\"" + bgr_clr_str + "\"><font color=\"" + text_clr_str + "\">" + wxString::FromUTF8(msg_escaped.data()) + "</font></body></html>");
470 content_sizer->Add(html, 1, wxEXPAND|wxRIGHT, 8);
471 wxGetApp().UpdateDarkUIWin(html);
472
473 html->Bind(wxEVT_HTML_LINK_CLICKED, [=](wxHtmlLinkEvent& event) {
474 if (link_callback)
475 link_callback(event.GetLinkInfo().GetHref());
476 });
477}
#define LB_AUTO_WRAP
Definition Label.hpp:12
void Wrap(int width)
Definition Label.cpp:366
Definition MsgDialog.cpp:296
static wxColour darkModeColorFor(wxColour const &color)
Definition StateColor.cpp:219
int get_dpi_for_window(const wxWindow *window)
Definition GUI_Utils.cpp:234
static wxSize measure_mixed_text(wxWindow *parent, const std::string &msg, const wxFont &prose_font, const wxFont &code_font)
Definition MsgDialog.cpp:325
static std::string format_parser_error_html(const std::string &msg)
Definition MsgDialog.cpp:310
Vec3d pos(const Pt &p)
Definition ReprojectPointsOnMesh.hpp:16
std::string encode_color(const ColorRGB &color)
Definition Color.cpp:397
std::string xml_escape(std::string text, bool is_marked)
Definition utils.cpp:1586

References StateColor::darkModeColorFor(), DPI_DEFAULT, Slic3r::encode_color(), format_parser_error_html(), get_dpi_for_window(), LB_AUTO_WRAP, measure_mixed_text(), Label::Wrap(), and Slic3r::xml_escape().

Referenced by Slic3r::GUI::ErrorDialog::ErrorDialog(), Slic3r::GUI::InfoDialog::InfoDialog(), Slic3r::GUI::MessageDialog::MessageDialog(), Slic3r::GUI::RichMessageDialog::RichMessageDialog(), Slic3r::GUI::WarningDialog::WarningDialog(), and Slic3r::GUI::DownloadDialog::SetExtendedMessage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_page_strings()

void Slic3r::GUI::add_page_strings ( wxWebView * webView)
static
123{
124 const nlohmann::json strings = {
125 {"printer_connection", _u8L("Printer Connection")},
126 {"printer_connection_setup", _u8L("Please set up your printer connection to view the device.")},
127 };
128 webView->AddUserScript(wxString::FromUTF8(WebViewHostDialog::localized_strings_script(strings)));
129}
static std::string localized_strings_script(const nlohmann::json &strings)
Definition WebViewHostDialog.cpp:156
#define _u8L(s)
Definition I18N.hpp:11

References _u8L, and Slic3r::GUI::WebViewHostDialog::localized_strings_script().

Referenced by Slic3r::GUI::PrinterWebView::create_browser().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_row_to_table()

void Slic3r::GUI::add_row_to_table ( std::function< void(void)> col_1 = nullptr,
std::function< void(void)> col_2 = nullptr )
static
1781{
1782 assert(col_1 != nullptr && col_2 != nullptr);
1783 ImGui::TableNextRow();
1784 ImGui::TableSetColumnIndex(0);
1785 col_1();
1786 ImGui::TableSetColumnIndex(1);
1787 col_2();
1788}

Referenced by add_strings_row_to_table().

Here is the caller graph for this function:

◆ add_strings_row_to_table()

void Slic3r::GUI::add_strings_row_to_table ( ImGuiWrapper & imgui,
const std::string & col_1,
const ImVec4 & col_1_color,
const std::string & col_2,
const ImVec4 & col_2_color )
static
1791{
1792 add_row_to_table([&]() { imgui.text_colored(col_1_color, col_1); }, [&]() { imgui.text_colored(col_2_color, col_2); });
1793};
static void text_colored(const ImVec4 &color, const char *label)
Definition ImGuiWrapper.cpp:1157
static void add_row_to_table(std::function< void(void)> col_1=nullptr, std::function< void(void)> col_2=nullptr)
Definition GLGizmoMeasure.cpp:1780

References add_row_to_table(), and Slic3r::GUI::ImGuiWrapper::text_colored().

Referenced by Slic3r::GUI::GLCanvas3D::_picking_pass().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_swatch()

void Slic3r::GUI::add_swatch ( ImDrawList * draw_list,
const ImVec2 & min,
const ImVec2 & max,
const ColorRGBA & color )
static
131{
132 if (color.is_transparent()) {
133 for (int i = 0; i < 4; ++i)
134 for (int j = 0; j < 4; ++j)
135 draw_list->AddRectFilled(ImLerp(min, max, ImVec2(0.25f * i, 0.25f * j)), ImLerp(min, max, ImVec2(0.25f * (i + 1), 0.25f * (j + 1))),
136 (i + j) % 2 == 0 ? IM_COL32_WHITE : IM_COL32(217, 217, 217, 255));
137 }
138 draw_list->AddRectFilled(min, max, ImGuiWrapper::to_ImU32(color));
139}
bool is_transparent() const
Definition Color.hpp:125
static ImU32 to_ImU32(const ColorRGBA &color)
Definition ImGuiWrapper.cpp:2239

References Slic3r::ColorRGBA::is_transparent(), and Slic3r::GUI::ImGuiWrapper::to_ImU32().

Referenced by Slic3r::GUI::GCodeViewer::render_all_plates_stats(), and Slic3r::GUI::GCodeViewer::render_legend().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_volume_with_gizmo()

void Slic3r::GUI::add_volume_with_gizmo ( GLGizmosManager::EType gizmo_type,
ModelVolumeType type )
static
715{
716 Plater* pl = plater();
717 if (!pl)
718 return;
719 const GLCanvas3D* canvas = pl->canvas3D();
720 if (!canvas)
721 return;
722 GLGizmoBase* gizmo_base = canvas->get_gizmos_manager().get_gizmo(gizmo_type);
723 if (!gizmo_base)
724 return;
725
726 ModelVolumeType volume_type = type;
727 // no selected object means create new object
728 if (volume_type == ModelVolumeType::INVALID)
729 volume_type = ModelVolumeType::MODEL_PART;
730
731 auto screen_position = canvas->get_popup_menu_position();
732 if (gizmo_type == GLGizmosManager::Emboss) {
733 auto* emboss = dynamic_cast<GLGizmoEmboss*>(gizmo_base);
734 if (emboss == nullptr)
735 return;
736 if (screen_position.has_value())
737 emboss->create_volume(volume_type, *screen_position);
738 else
739 emboss->create_volume(volume_type);
740 } else if (gizmo_type == GLGizmosManager::Svg) {
741 auto* svg = dynamic_cast<GLGizmoSVG*>(gizmo_base);
742 if (svg == nullptr)
743 return;
744 if (screen_position.has_value())
745 svg->create_volume(volume_type, *screen_position);
746 else
747 svg->create_volume(volume_type);
748 }
749}
Definition GLCanvas3D.hpp:239
const std::optional< Vec2d > & get_popup_menu_position() const
Definition GLCanvas3D.hpp:1310
const GLGizmosManager & get_gizmos_manager() const
Definition GLCanvas3D.hpp:1031
Definition GLGizmoBase.hpp:47
Definition GLGizmoEmboss.hpp:40
bool create_volume(ModelVolumeType volume_type, const Vec2d &mouse_pos)
Create new embossed text volume by type on position of mouse.
Definition GLGizmoEmboss.cpp:370
@ Emboss
Definition GLGizmosManager.hpp:99
@ Svg
Definition GLGizmosManager.hpp:100
GLGizmoBase * get_gizmo(GLGizmosManager::EType type) const
Definition GLGizmosManager.cpp:1393
Definition Plater.hpp:337
GLCanvas3D * canvas3D()
Definition Plater.cpp:22070
static Plater * plater()
Definition GUI_Factories.cpp:400
ModelVolumeType
Definition Model.hpp:355
@ MODEL_PART
Definition Model.hpp:357
@ INVALID
Definition Model.hpp:356

References add_volume_with_gizmo(), Slic3r::GUI::Plater::canvas3D(), Slic3r::GUI::GLGizmoEmboss::create_volume(), Slic3r::GUI::GLGizmoSVG::create_volume(), Slic3r::GUI::GLGizmosManager::Emboss, Slic3r::GUI::GLGizmosManager::get_gizmo(), Slic3r::GUI::GLCanvas3D::get_gizmos_manager(), Slic3r::GUI::GLCanvas3D::get_popup_menu_position(), Slic3r::INVALID, Slic3r::MODEL_PART, plater(), and Slic3r::GUI::GLGizmosManager::Svg.

Referenced by Slic3r::GUI::MenuFactory::add_svg_volume(), Slic3r::GUI::MenuFactory::add_text_volume(), add_volume_with_gizmo(), and append_menu_itemm_add_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ adjust_dialog_in_screen()

void Slic3r::GUI::adjust_dialog_in_screen ( DPIDialog * dialog)
static
698 {
699 wxSize screen_size = wxGetDisplaySize();
700 int pos_x, pos_y, size_x, size_y, screen_width, screen_height, dialog_x, dialog_y;
701 pos_x = dialog->GetPosition().x;
702 pos_y = dialog->GetPosition().y;
703 size_x = dialog->GetSize().x;
704 size_y = dialog->GetSize().y;
705 screen_width = screen_size.GetWidth();
706 screen_height = screen_size.GetHeight();
707 dialog_x = pos_x;
708 dialog_y = pos_y;
709 if (pos_x + size_x > screen_width) {
710 int exceed_x = pos_x + size_x - screen_width;
711 dialog_x -= exceed_x;
712 }
713 if (pos_y + size_y > screen_height - 50) {
714 int exceed_y = pos_y + size_y - screen_height + 50;
715 dialog_y -= exceed_y;
716 }
717 if (pos_x != dialog_x || pos_y != dialog_y) { dialog->SetPosition(wxPoint(dialog_x, dialog_y)); }
718}

Referenced by Slic3r::GUI::ExportConfigsDialog::select_curr_radiobox(), Slic3r::GUI::CreateFilamentPresetDialog::update_dialog_size(), Slic3r::GUI::CreatePrinterPresetDialog::update_preset_list_size(), and Slic3r::GUI::EditFilamentPresetDialog::update_preset_tree().

Here is the caller graph for this function:

◆ adjust_settings_for_flowrate_calib()

void Slic3r::GUI::adjust_settings_for_flowrate_calib ( ModelObjectPtrs & objects,
bool linear,
int pass,
InfillPattern pattern )

– scale –

17207{
17208 auto print_config = &wxGetApp().preset_bundle->prints.get_edited_preset().config;
17209 auto printer_config = &wxGetApp().preset_bundle->printers.get_edited_preset().config;
17210 auto filament_config = &wxGetApp().preset_bundle->filaments.get_edited_preset().config;
17211
17213 // model is created for a 0.4 nozzle, scale z with nozzle size.
17214 const ConfigOptionFloats* nozzle_diameter_config = printer_config->option<ConfigOptionFloats>("nozzle_diameter");
17215 std::vector<int> extruder_types = printer_config->option<ConfigOptionEnumsGeneric>("extruder_type")->values;
17216 std::vector<int> nozzle_volume_types = wxGetApp().preset_bundle->project_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type")->values;
17217
17218 assert(nozzle_diameter_config->values.size() > 0);
17219 float nozzle_diameter = nozzle_diameter_config->values[0];
17220 float xyScale = nozzle_diameter / 0.6;
17221 //scale z to have 10 layers
17222 // 2 bottom, 5 top, 3 sparse infill
17223 double first_layer_height = print_config->option<ConfigOptionFloat>("initial_layer_print_height")->value;
17224 double layer_height = nozzle_diameter / 2.0; // prefer 0.2 layer height for 0.4 nozzle
17225 first_layer_height = std::max(first_layer_height, layer_height);
17226
17227 const auto canvas = wxGetApp().plater()->canvas3D();
17228 auto& selection = canvas->get_selection();
17229 selection.setup_cache();
17230 TransformationType transformation_type;
17231 transformation_type.set_relative();
17232 float zscale = (first_layer_height + 9 * layer_height) / 2;
17233 // only enlarge
17234 if (xyScale > 1.2) {
17235 selection.scale({xyScale, xyScale, zscale}, transformation_type);
17236 } else {
17237 selection.scale({1, 1, zscale}, transformation_type);
17238 }
17239 canvas->do_scale("");
17240
17241 auto cur_flowrate = filament_config->option<ConfigOptionFloats>("filament_flow_ratio")->get_at(0); // TODO: per-filament param
17242 // Cap the speeds for the extrusion the test prints, not the profile's line width and layer height
17243 const float infill_line_width = nozzle_diameter * 1.2f;
17244 std::vector<double> internal_solid_speeds = generate_max_speed_parameter_value("internal_solid_infill_speed", infill_line_width, layer_height, linear, pass);
17245 std::vector<double> top_surface_speeds = generate_max_speed_parameter_value("top_surface_speed", infill_line_width, layer_height, linear, pass);
17246
17247 // adjust parameters
17248 for (auto _obj : objects) {
17249 _obj->ensure_on_bed();
17250 _obj->config.set_key_value("wall_loops", new ConfigOptionInt(1));
17251 _obj->config.set_key_value("only_one_wall_top", new ConfigOptionBool(true));
17252 _obj->config.set_key_value("thick_internal_bridges", new ConfigOptionBool(false));
17253 _obj->config.set_key_value("enable_extra_bridge_layer", new ConfigOptionEnum<EnableExtraBridgeLayer>(eblDisabled));
17254 _obj->config.set_key_value("internal_bridge_density", new ConfigOptionPercent(100));
17255 _obj->config.set_key_value("sparse_infill_density", new ConfigOptionPercent(35));
17256 _obj->config.set_key_value("min_width_top_surface", new ConfigOptionFloatOrPercent(100,true));
17257 _obj->config.set_key_value("bottom_shell_layers", new ConfigOptionInt(2));
17258 _obj->config.set_key_value("top_shell_layers", new ConfigOptionInt(5));
17259 _obj->config.set_key_value("top_shell_thickness", new ConfigOptionFloat(0));
17260 _obj->config.set_key_value("bottom_shell_thickness", new ConfigOptionFloat(0));
17261 _obj->config.set_key_value("detect_thin_wall", new ConfigOptionBool(true));
17262 _obj->config.set_key_value("filter_out_gap_fill", new ConfigOptionFloat(0));
17263 _obj->config.set_key_value("sparse_infill_pattern", new ConfigOptionEnum<InfillPattern>(ipRectilinear));
17264 _obj->config.set_key_value("top_surface_line_width", new ConfigOptionFloatOrPercent(infill_line_width, false));
17265 _obj->config.set_key_value("internal_solid_infill_line_width", new ConfigOptionFloatOrPercent(infill_line_width, false));
17266 // ORCA: use the pattern parameter
17267 _obj->config.set_key_value("top_surface_pattern", new ConfigOptionEnum<InfillPattern>(pattern));
17268 const auto *top_solid_flow = dynamic_cast<const ConfigOptionFloatsNullable *>(_obj->config.option("top_solid_infill_flow_ratio"));
17269 _obj->config.set_key_value("top_solid_infill_flow_ratio",
17270 new ConfigOptionFloatsNullable(top_solid_flow ? top_solid_flow->size() : 1, 1.0f));
17271 _obj->config.set_key_value("infill_direction", new ConfigOptionFloat(45));
17272 _obj->config.set_key_value("solid_infill_direction", new ConfigOptionFloat(135));
17273 _obj->config.set_key_value("center_of_surface_pattern", new ConfigOptionEnum<CenterOfSurfacePattern>(CenterOfSurfacePattern::Each_Surface));
17274 _obj->config.set_key_value("separated_infills", new ConfigOptionBool(false));
17275 _obj->config.set_key_value("align_infill_direction_to_model", new ConfigOptionBool(true));
17276 _obj->config.set_key_value("ironing_type", new ConfigOptionEnum<IroningType>(IroningType::NoIroning));
17277 _obj->config.set_key_value("internal_solid_infill_speed", new ConfigOptionFloatsNullable(internal_solid_speeds));
17278 _obj->config.set_key_value("top_surface_speed", new ConfigOptionFloatsNullable(top_surface_speeds));
17279 _obj->config.set_key_value("seam_slope_type", new ConfigOptionEnum<SeamScarfType>(SeamScarfType::None));
17280 _obj->config.set_key_value("gap_fill_target", new ConfigOptionEnum<GapFillTarget>(GapFillTarget::gftNowhere));
17281 print_config->set_key_value("max_volumetric_extrusion_rate_slope", new ConfigOptionFloat(0));
17282 // ORCA: request the calibration's special toolpath order (chords first, center spiral
17283 // last and inside-out) so opposing directions collide into the tactile lip the test
17284 // reads. The special order only applies while the fill order is Default, so reset the
17285 // profile's fill order on the calibration objects; changing the setting on the object
17286 // afterwards deliberately overrides the special order.
17287 _obj->config.set_key_value("calib_flowrate_topinfill_special_order", new ConfigOptionBool(true));
17288 _obj->config.set_key_value("top_surface_fill_order", new ConfigOptionEnum<SurfaceFillOrder>(SurfaceFillOrder::Default));
17289
17290 // extract flowrate from name, filename format: flowrate_xxx
17291 std::string obj_name = _obj->name;
17292 assert(obj_name.length() > 9);
17293 obj_name = obj_name.substr(9);
17294 if (obj_name[0] == 'm')
17295 obj_name[0] = '-';
17296 // Orca: force set locale to C to avoid parsing error
17297 const std::string _loc = std::setlocale(LC_NUMERIC, nullptr);
17298 std::setlocale(LC_NUMERIC,"C");
17299 auto modifier = 1.0f;
17300 try {
17301 modifier = stof(obj_name);
17302 } catch (...) {
17303 }
17304 // restore locale
17305 std::setlocale(LC_NUMERIC, _loc.c_str());
17306
17307 if(linear)
17308 _obj->config.set_key_value("print_flow_ratio", new ConfigOptionFloat((cur_flowrate + modifier)/cur_flowrate));
17309 else
17310 _obj->config.set_key_value("print_flow_ratio", new ConfigOptionFloat(1.0f + modifier/100.f));
17311
17312 }
17313
17314 print_config->set_key_value("layer_height", new ConfigOptionFloat(layer_height));
17315 print_config->set_key_value("alternate_extra_wall", new ConfigOptionBool(false));
17316 print_config->set_key_value("initial_layer_print_height", new ConfigOptionFloat(first_layer_height));
17317 print_config->set_key_value("reduce_crossing_wall", new ConfigOptionBool(true));
17318 print_config->set_key_value("enable_wrapping_detection", new ConfigOptionBool(false));
17319
17320 wxGetApp().get_tab(Preset::TYPE_PRINT)->update_dirty();
17321 wxGetApp().get_tab(Preset::TYPE_FILAMENT)->update_dirty();
17322 wxGetApp().get_tab(Preset::TYPE_PRINTER)->update_dirty();
17323 wxGetApp().get_tab(Preset::TYPE_PRINT)->reload_config();
17324 wxGetApp().get_tab(Preset::TYPE_FILAMENT)->reload_config();
17325 wxGetApp().get_tab(Preset::TYPE_PRINTER)->reload_config();
17326}
Definition Config.hpp:825
Definition GUI_Geometry.hpp:15
void set_relative()
Definition GUI_Geometry.hpp:56
@ TYPE_PRINTER
Definition Preset.hpp:250
@ TYPE_PRINT
Definition Preset.hpp:246
@ TYPE_FILAMENT
Definition Preset.hpp:248
static std::string layer_height
Definition Tab.cpp:4294
static DynamicPrintConfig & printer_config()
Definition GUI_ObjectList.cpp:131
std::vector< double > generate_max_speed_parameter_value(const std::string &key, const float line_width, const float layer_height, const bool linear, const int pass)
Definition CalibUtils.cpp:185
zaa_minimize_perimeter_height ConfigOptionFloat
Definition PrintConfig.hpp:1954
@ ipRectilinear
Definition PrintConfig.hpp:128
zaa_minimize_perimeter_height nozzle_diameter((ConfigOptionBool, reduce_infill_retraction))((ConfigOptionBool
ConfigOptionEnumsGenericTempl< false > ConfigOptionEnumsGeneric
Definition Config.hpp:2311
@ gftNowhere
Definition PrintConfig.hpp:425
ConfigOptionFloatsTempl< true > ConfigOptionFloatsNullable
Definition Config.hpp:1016
@ eblDisabled
Definition PrintConfig.hpp:420
@ Each_Surface
Definition PrintConfig.hpp:99
@ Default
Definition PrintConfig.hpp:283
@ NoIroning
Definition PrintConfig.hpp:203
@ None
Definition PrintConfig.hpp:400
ConfigOptionFloatsTempl< false > ConfigOptionFloats
Definition Config.hpp:1015

References Slic3r::ConfigOptionFloat, Slic3r::Default, Slic3r::Each_Surface, Slic3r::eblDisabled, generate_max_speed_parameter_value(), Slic3r::gftNowhere, Slic3r::ipRectilinear, layer_height, Slic3r::NoIroning, Slic3r::None, Slic3r::nozzle_diameter(), printer_config(), Slic3r::GUI::Selection::scale(), Slic3r::GUI::TransformationType::set_relative(), Slic3r::GUI::Selection::setup_cache(), Slic3r::Preset::TYPE_FILAMENT, Slic3r::Preset::TYPE_PRINT, Slic3r::Preset::TYPE_PRINTER, and Slic3r::ConfigOptionVector< double >::values.

Referenced by Slic3r::GUI::Plater::calib_flowrate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ all_vertices_inside()

template<typename Fn>
bool Slic3r::GUI::all_vertices_inside ( const GLModel::Geometry & geometry,
Fn fn )
inline
861{
862 const size_t position_stride_floats = geometry.position_stride_floats(geometry.format);
863 const size_t position_offset_floats = geometry.position_offset_floats(geometry.format);
864 assert(position_stride_floats == 3);
865 if (geometry.vertices.empty() || position_stride_floats != 3)
866 return false;
867
868 for (auto it = geometry.vertices.begin(); it != geometry.vertices.end(); ) {
869 it += position_offset_floats;
870 if (!fn({ *it, *(it + 1), *(it + 2) }))
871 return false;
872 it += (geometry.vertex_stride_floats(geometry.format) - position_offset_floats - position_stride_floats);
873 }
874 return true;
875}
static size_t position_offset_floats(const Format &format)
Definition GLModel.cpp:283
static size_t vertex_stride_floats(const Format &format)
Definition GLModel.cpp:253
std::vector< float > vertices
Definition GLModel.hpp:65
static size_t position_stride_floats(const Format &format)
Definition GLModel.cpp:268
Format format
Definition GLModel.hpp:64

References Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::Geometry::position_offset_floats(), Slic3r::GUI::GLModel::Geometry::position_stride_floats(), Slic3r::GUI::GLModel::Geometry::vertex_stride_floats(), and Slic3r::GUI::GLModel::Geometry::vertices.

Referenced by contains().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ append_expolygon_triangles()

void Slic3r::GUI::append_expolygon_triangles ( GLModel::Geometry & init_data,
const ExPolygon & expolygon,
float z )
static
1482{
1483 const std::vector<Vec2f> triangles = triangulate_expolygon_2f(expolygon, NORMALS_UP);
1484 if (triangles.empty() || triangles.size() % 3 != 0)
1485 return;
1486
1487 Vec2f min = triangles.front();
1488 Vec2f max = min;
1489 for (const Vec2f &v : triangles) {
1490 min = min.cwiseMin(v).eval();
1491 max = max.cwiseMax(v).eval();
1492 }
1493
1494 const Vec2f size = max - min;
1495 if (size.x() <= 0.0f || size.y() <= 0.0f)
1496 return;
1497
1498 Vec2f inv_size = size.cwiseInverse();
1499 inv_size.y() *= -1.0f;
1500
1501 init_data.reserve_vertices(init_data.vertices_count() + triangles.size());
1502 init_data.reserve_indices(init_data.indices_count() + triangles.size());
1503 for (const Vec2f &v : triangles) {
1504 init_data.add_vertex(Vec3f(v.x(), v.y(), z), (Vec2f)(v - min).cwiseProduct(inv_size).eval());
1505 const unsigned int vertices_counter = (unsigned int)init_data.vertices_count();
1506 if (vertices_counter % 3 == 0)
1507 init_data.add_triangle(vertices_counter - 3, vertices_counter - 2, vertices_counter - 1);
1508 }
1509}
const bool constexpr NORMALS_UP
Definition Tesselate.hpp:14
Eigen::Matrix< float, 3, 1, Eigen::DontAlign > Vec3f
Definition Point.hpp:65
std::vector< Vec2f > triangulate_expolygon_2f(const ExPolygon &poly, bool flip)
Definition Tesselate.cpp:238
Eigen::Matrix< float, 2, 1, Eigen::DontAlign > Vec2f
Definition Point.hpp:64
void add_triangle(unsigned int id1, unsigned int id2, unsigned int id3)
Definition GLModel.cpp:121
void reserve_indices(size_t indices_count)
Definition GLModel.hpp:71
size_t indices_count() const
Definition GLModel.hpp:101
void reserve_vertices(size_t vertices_count)
Definition GLModel.hpp:70
size_t vertices_count() const
Definition GLModel.hpp:100
void add_vertex(const Vec2f &position)
Definition GLModel.cpp:43

References Slic3r::GUI::GLModel::Geometry::add_triangle(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::GUI::GLModel::Geometry::indices_count(), Slic3r::NORMALS_UP, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), Slic3r::triangulate_expolygon_2f(), and Slic3r::GUI::GLModel::Geometry::vertices_count().

Referenced by init_model_from_expolygons(), and init_model_from_polygons().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ append_menu_itemm_add_()

void Slic3r::GUI::append_menu_itemm_add_ ( const wxString & name,
GLGizmosManager::EType gizmo_type,
wxMenu * menu,
ModelVolumeType type,
bool is_submenu_item )
static
754 {
755 auto add_ = [type, gizmo_type](const wxCommandEvent & /*unnamed*/) { add_volume_with_gizmo(gizmo_type, type); };
756
758 type == ModelVolumeType::INVALID // cannot use gizmo without selected object
759 ) {
760 wxString item_name = wxString(is_submenu_item ? "" : _(ADD_VOLUME_MENU_ITEMS[int(type)].first) + ": ") + name;
761 menu->AppendSeparator();
762 auto def_icon_name = (gizmo_type == GLGizmosManager::Emboss) ? "menu_obj_text" : "menu_obj_svg";
763 const std::string icon_name = is_submenu_item ? def_icon_name : ADD_VOLUME_MENU_ITEMS[int(type)].second;
764 append_menu_item(menu, wxID_ANY, item_name, "", add_, icon_name, menu);
765 }
766}
static const constexpr std::array< std::pair< const char *, const char * >, 11 > ADD_VOLUME_MENU_ITEMS
Definition GUI_Factories.cpp:370
static void add_volume_with_gizmo(GLGizmosManager::EType gizmo_type, ModelVolumeType type)
Definition GUI_Factories.cpp:714
@ PARAMETER_MODIFIER
Definition Model.hpp:359
@ NEGATIVE_VOLUME
Definition Model.hpp:358

References _, ADD_VOLUME_MENU_ITEMS, add_volume_with_gizmo(), append_menu_item(), append_menu_itemm_add_(), Slic3r::GUI::GLGizmosManager::Emboss, Slic3r::INVALID, Slic3r::MODEL_PART, Slic3r::NEGATIVE_VOLUME, and Slic3r::PARAMETER_MODIFIER.

Referenced by Slic3r::GUI::MenuFactory::append_menu_item_add_svg(), Slic3r::GUI::MenuFactory::append_menu_item_add_text(), and append_menu_itemm_add_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ append_paint_patch()

void Slic3r::GUI::append_paint_patch ( GLModel::Geometry & out,
const indexed_triangle_set & patch,
const std::vector< Vec3f > * displaced )
static
1799{
1800 unsigned n = unsigned(out.vertices_count());
1801 for (const stl_triangle_vertex_indices &tri : patch.indices) {
1802 for (int i = 0; i < 3; ++i) {
1803 const size_t idx = size_t(tri[i]);
1804 out.add_vertex((displaced != nullptr && idx < displaced->size()) ? (*displaced)[idx] : patch.vertices[idx]);
1805 }
1806 out.add_triangle(n, n + 1, n + 2);
1807 n += 3;
1808 }
1809}

References Slic3r::GUI::GLModel::Geometry::add_triangle(), Slic3r::GUI::GLModel::Geometry::add_vertex(), and Slic3r::GUI::GLModel::Geometry::vertices_count().

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::rebuild_other_paint_overlay(), and Slic3r::GUI::GLGizmoTextureDisplacement::rebuild_paint_overlay().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ append_root_node()

bool Slic3r::GUI::append_root_node ( ObjectDataViewModelNode * parent_node,
ObjectDataViewModelNode ** root_node,
const ItemType root_type )
static
775{
776 const int inst_root_id = get_root_idx(parent_node, root_type);
777
778 *root_node = inst_root_id < 0 ?
779 new ObjectDataViewModelNode(parent_node, root_type) :
780 parent_node->GetNthChild(inst_root_id);
781
782 if (inst_root_id < 0) {
783 if ((root_type&itInstanceRoot) ||
784 ( (root_type&itLayerRoot) && get_root_idx(parent_node, itInstanceRoot)<0) )
785 parent_node->Append(*root_node);
786 else if (root_type&itLayerRoot)
787 parent_node->Insert(*root_node, static_cast<unsigned int>(get_root_idx(parent_node, itInstanceRoot)));
788 return true;
789 }
790
791 return false;
792}
Definition ObjectDataViewModel.hpp:89
void Insert(ObjectDataViewModelNode *child, unsigned int n)
Definition ObjectDataViewModel.hpp:216
void Append(ObjectDataViewModelNode *child)
Definition ObjectDataViewModel.hpp:222
static int get_root_idx(ObjectDataViewModelNode *parent_node, const ItemType root_type)
Definition ObjectDataViewModel.cpp:462

References Slic3r::GUI::ObjectDataViewModelNode::Append(), get_root_idx(), Slic3r::GUI::ObjectDataViewModelNode::GetNthChild(), Slic3r::GUI::ObjectDataViewModelNode::Insert(), itInstanceRoot, and itLayerRoot.

Referenced by Slic3r::GUI::ObjectDataViewModel::AddRoot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ apply_dark_ui_to_lazy_panel()

void Slic3r::GUI::apply_dark_ui_to_lazy_panel ( wxWindow * panel)
8{
9#ifdef _MSW_DARK_MODE
10 wxGetApp().UpdateDarkUIWin(panel);
11#endif
12}

◆ aui_pane_layout_entry()

std::string Slic3r::GUI::aui_pane_layout_entry ( const std::string & layout,
const std::string & pane_name )
8{
9 // Panes are separated by '|'; SavePerspective() escapes a '|' inside a caption as "\|".
10 const std::string prefix = "name=" + pane_name + ";";
11 size_t begin = 0;
12 for (size_t i = 0; i <= layout.size(); ++i) {
13 if (i < layout.size() && (layout[i] != '|' || (i > 0 && layout[i - 1] == '\\')))
14 continue;
15 if (layout.compare(begin, prefix.size(), prefix) == 0)
16 return layout.substr(begin, i - begin);
17 begin = i + 1;
18 }
19 return {};
20}

Referenced by Slic3r::GUI::Plater::priv::add_dock_pane().

Here is the caller graph for this function:

◆ auto_mix_mode_label()

wxString Slic3r::GUI::auto_mix_mode_label ( TextureAutoMixMode mode)
static
484{
485 return mode == TextureAutoMixMode::CMYW ? _L("One-click CMYW auto-mix") :
486 _L("One-click RYBW auto-mix");
487}
@ CMYW
Definition TextureImportDialog.hpp:50

References _L, and CMYW.

Referenced by Slic3r::GUI::TextureImportDialog::build_mapping_panel(), Slic3r::GUI::AutoMixSelectPopup::create_item_row(), and Slic3r::GUI::TextureImportDialog::set_auto_mix_mode().

Here is the caller graph for this function:

◆ bed_stride_x()

double Slic3r::GUI::bed_stride_x ( const Plater * plater)
978 {
979 double bedwidth = plater->build_volume().bounding_box().size().x();
980 return (1. + LOGICAL_BED_GAP) * bedwidth;
981}
static const constexpr double LOGICAL_BED_GAP
Definition ArrangeJob.hpp:108

References LOGICAL_BED_GAP, and plater().

Referenced by Slic3r::GUI::FillBedJob::finalize(), and Slic3r::GUI::FillBedJob::prepare().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bed_stride_y()

double Slic3r::GUI::bed_stride_y ( const Plater * plater)
983 {
984 double beddepth = plater->build_volume().bounding_box().size().y();
985 return (1. + LOGICAL_BED_GAP) * beddepth;
986}

References LOGICAL_BED_GAP, and plater().

Referenced by Slic3r::GUI::FillBedJob::finalize(), and Slic3r::GUI::FillBedJob::prepare().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bed_toggle_text()

wxString Slic3r::GUI::bed_toggle_text ( bool shown)
static
297{
298 return shown ? _L("Hide the printer bed and its plate grid")
299 : _L("Show the printer bed and its plate grid");
300}

References _L.

Referenced by Slic3r::GUI::DesignPanel::DesignPanel(), and Slic3r::GUI::DesignPanel::refresh_pinned().

Here is the caller graph for this function:

◆ begin_menu()

bool Slic3r::GUI::begin_menu ( const char * label,
bool enabled )
1640{
1641 ImGuiWindow *window = ImGui::GetCurrentWindow();
1642 if (window->SkipItems) return false;
1643
1644 ImGuiContext & g = *GImGui;
1645 const ImGuiStyle &style = g.Style;
1646 const ImGuiID id = window->GetID(label);
1647 bool menu_is_open = ImGui::IsPopupOpen(id, ImGuiPopupFlags_None);
1648
1649 // Sub-menus are ChildWindow so that mouse can be hovering across them (otherwise top-most popup menu would steal focus and not allow hovering on parent menu)
1650 ImGuiWindowFlags flags = ImGuiWindowFlags_ChildMenu | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoTitleBar |
1651 ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoNavFocus;
1652 if (window->Flags & (ImGuiWindowFlags_Popup | ImGuiWindowFlags_ChildMenu)) flags |= ImGuiWindowFlags_ChildWindow;
1653
1654 // If a menu with same the ID was already submitted, we will append to it, matching the behavior of Begin().
1655 // We are relying on a O(N) search - so O(N log N) over the frame - which seems like the most efficient for the expected small amount of BeginMenu() calls per frame.
1656 // If somehow this is ever becoming a problem we can switch to use e.g. ImGuiStorage mapping key to last frame used.
1657 if (g.MenusIdSubmittedThisFrame.contains(id)) {
1658 if (menu_is_open)
1659 menu_is_open = ImGui::BeginPopupEx(id, flags); // menu_is_open can be 'false' when the popup is completely clipped (e.g. zero size display)
1660 else
1661 g.NextWindowData.ClearFlags(); // we behave like Begin() and need to consume those values
1662 return menu_is_open;
1663 }
1664
1665 // Tag menu as used. Next time BeginMenu() with same ID is called it will append to existing menu
1666 g.MenusIdSubmittedThisFrame.push_back(id);
1667
1668 ImVec2 label_size = ImGui::CalcTextSize(label, NULL, true);
1669 bool pressed;
1670 bool menuset_is_open = !(window->Flags & ImGuiWindowFlags_Popup) &&
1671 (g.OpenPopupStack.Size > g.BeginPopupStack.Size && g.OpenPopupStack[g.BeginPopupStack.Size].OpenParentId == window->IDStack.back());
1672 ImGuiWindow *backed_nav_window = g.NavWindow;
1673 if (menuset_is_open) g.NavWindow = window; // Odd hack to allow hovering across menus of a same menu-set (otherwise we wouldn't be able to hover parent)
1674
1675 // The reference position stored in popup_pos will be used by Begin() to find a suitable position for the child menu,
1676 // However the final position is going to be different! It is chosen by FindBestWindowPosForPopup().
1677 // e.g. Menus tend to overlap each other horizontally to amplify relative Z-ordering.
1678 ImVec2 popup_pos, pos = window->DC.CursorPos;
1679 if (window->DC.LayoutType == ImGuiLayoutType_Horizontal) {
1680 // Menu inside an horizontal menu bar
1681 // Selectable extend their highlight by half ItemSpacing in each direction.
1682 // For ChildMenu, the popup position will be overwritten by the call to FindBestWindowPosForPopup() in Begin()
1683 popup_pos = ImVec2(pos.x - 1.0f - IM_FLOOR(style.ItemSpacing.x * 0.5f), pos.y - style.FramePadding.y + window->MenuBarHeight());
1684 window->DC.CursorPos.x += IM_FLOOR(style.ItemSpacing.x * 0.5f);
1685 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(style.ItemSpacing.x * 2.0f, style.ItemSpacing.y));
1686 float w = label_size.x;
1687 pressed = selectable(label, menu_is_open,
1688 ImGuiSelectableFlags_NoHoldingActiveID | ImGuiSelectableFlags_SelectOnClick | ImGuiSelectableFlags_DontClosePopups |
1689 (!enabled ? ImGuiSelectableFlags_Disabled : 0),
1690 ImVec2(w, 0.0f));
1691 ImGui::PopStyleVar();
1692 window->DC.CursorPos.x += IM_FLOOR(
1693 style.ItemSpacing.x *
1694 (-1.0f +
1695 0.5f)); // -1 spacing to compensate the spacing added when Selectable() did a SameLine(). It would also work to call SameLine() ourselves after the PopStyleVar().
1696 } else {
1697 // Menu inside a menu
1698 // (In a typical menu window where all items are BeginMenu() or MenuItem() calls, extra_w will always be 0.0f.
1699 // Only when they are other items sticking out we're going to add spacing, yet only register minimum width into the layout system.
1700 popup_pos = ImVec2(pos.x, pos.y - style.WindowPadding.y);
1701 float min_w = window->DC.MenuColumns.DeclColumns(label_size.x, 0.0f, IM_FLOOR(g.FontSize * 1.20f)); // Feedback to next frame
1702 float extra_w = ImMax(0.0f, ImGui::GetContentRegionAvail().x - min_w);
1703 pressed = selectable(label, menu_is_open,
1704 ImGuiSelectableFlags_NoHoldingActiveID | ImGuiSelectableFlags_SelectOnClick | ImGuiSelectableFlags_DontClosePopups |
1705 ImGuiSelectableFlags_SpanAvailWidth | (!enabled ? ImGuiSelectableFlags_Disabled : 0),
1706 ImVec2(min_w, 0.0f));
1707 ImU32 text_col = ImGui::GetColorU32(enabled ? ImGuiCol_Text : ImGuiCol_TextDisabled);
1708 ImGui::RenderArrow(window->DrawList, pos + ImVec2(window->DC.MenuColumns.Pos[2] + extra_w + g.FontSize * 0.30f, 0.0f), text_col, ImGuiDir_Right);
1709 }
1710
1711 const bool hovered = enabled && ImGui::ItemHoverable(window->DC.LastItemRect, id);
1712 if (menuset_is_open) g.NavWindow = backed_nav_window;
1713
1714 bool want_open = false;
1715 bool want_close = false;
1716 if (window->DC.LayoutType == ImGuiLayoutType_Vertical) // (window->Flags & (ImGuiWindowFlags_Popup|ImGuiWindowFlags_ChildMenu))
1717 {
1718 // Close menu when not hovering it anymore unless we are moving roughly in the direction of the menu
1719 // Implement http://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown to avoid using timers, so menus feels more reactive.
1720 bool moving_toward_other_child_menu = false;
1721
1722 ImGuiWindow *child_menu_window = (g.BeginPopupStack.Size < g.OpenPopupStack.Size && g.OpenPopupStack[g.BeginPopupStack.Size].SourceWindow == window) ?
1723 g.OpenPopupStack[g.BeginPopupStack.Size].Window :
1724 NULL;
1725 if (g.HoveredWindow == window && child_menu_window != NULL && !(window->Flags & ImGuiWindowFlags_MenuBar)) {
1726 // FIXME-DPI: Values should be derived from a master "scale" factor.
1727 ImRect next_window_rect = child_menu_window->Rect();
1728 ImVec2 ta = g.IO.MousePos - g.IO.MouseDelta;
1729 ImVec2 tb = (window->Pos.x < child_menu_window->Pos.x) ? next_window_rect.GetTL() : next_window_rect.GetTR();
1730 ImVec2 tc = (window->Pos.x < child_menu_window->Pos.x) ? next_window_rect.GetBL() : next_window_rect.GetBR();
1731 float extra = ImClamp(ImFabs(ta.x - tb.x) * 0.30f, 5.0f, 30.0f); // add a bit of extra slack.
1732 ta.x += (window->Pos.x < child_menu_window->Pos.x) ? -0.5f : +0.5f; // to avoid numerical issues
1733 tb.y = ta.y +
1734 ImMax((tb.y - extra) - ta.y, -100.0f); // triangle is maximum 200 high to limit the slope and the bias toward large sub-menus // FIXME: Multiply by fb_scale?
1735 tc.y = ta.y + ImMin((tc.y + extra) - ta.y, +100.0f);
1736 moving_toward_other_child_menu = ImTriangleContainsPoint(ta, tb, tc, g.IO.MousePos);
1737 // GetForegroundDrawList()->AddTriangleFilled(ta, tb, tc, moving_within_opened_triangle ? IM_COL32(0,128,0,128) : IM_COL32(128,0,0,128)); // [DEBUG]
1738 }
1739 if (menu_is_open && !hovered && g.HoveredWindow == window && g.HoveredIdPreviousFrame != 0 && g.HoveredIdPreviousFrame != id && !moving_toward_other_child_menu)
1740 want_close = true;
1741
1742 if (!menu_is_open && hovered && pressed) // Click to open
1743 want_open = true;
1744 else if (!menu_is_open && hovered && !moving_toward_other_child_menu) // Hover to open
1745 want_open = true;
1746
1747 if (g.NavActivateId == id) {
1748 want_close = menu_is_open;
1749 want_open = !menu_is_open;
1750 }
1751 if (g.NavId == id && g.NavMoveRequest && g.NavMoveDir == ImGuiDir_Right) // Nav-Right to open
1752 {
1753 want_open = true;
1754 ImGui::NavMoveRequestCancel();
1755 }
1756 } else {
1757 // Menu bar
1758 if (menu_is_open && pressed && menuset_is_open) // Click an open menu again to close it
1759 {
1760 want_close = true;
1761 want_open = menu_is_open = false;
1762 } else if (pressed || (hovered && menuset_is_open && !menu_is_open)) // First click to open, then hover to open others
1763 {
1764 want_open = true;
1765 } else if (g.NavId == id && g.NavMoveRequest && g.NavMoveDir == ImGuiDir_Down) // Nav-Down to open
1766 {
1767 want_open = true;
1768 ImGui::NavMoveRequestCancel();
1769 }
1770 }
1771
1772 if (!enabled) // explicitly close if an open menu becomes disabled, facilitate users code a lot in pattern such as 'if (BeginMenu("options", has_object)) { ..use object.. }'
1773 want_close = true;
1774 if (want_close && ImGui::IsPopupOpen(id, ImGuiPopupFlags_None)) ImGui::ClosePopupToLevel(g.BeginPopupStack.Size, true);
1775
1776 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags | ImGuiItemStatusFlags_Openable | (menu_is_open ? ImGuiItemStatusFlags_Opened : 0));
1777
1778 if (!menu_is_open && want_open && g.OpenPopupStack.Size > g.BeginPopupStack.Size) {
1779 // Don't recycle same menu level in the same frame, first close the other menu and yield for a frame.
1780 ImGui::OpenPopup(label);
1781 return false;
1782 }
1783
1784 menu_is_open |= want_open;
1785 if (want_open) ImGui::OpenPopup(label);
1786
1787 if (menu_is_open) {
1788 ImGui::SetNextWindowPos(popup_pos,
1789 ImGuiCond_Always); // Note: this is super misleading! The value will serve as reference for FindBestWindowPosForPopup(), not actual pos.
1790 menu_is_open = ImGui::BeginPopupEx(id, flags); // menu_is_open can be 'false' when the popup is completely clipped (e.g. zero size display)
1791 } else {
1792 g.NextWindowData.ClearFlags(); // We behave like Begin() and need to consume those values
1793 }
1794
1795 return menu_is_open;
1796}
struct IMGUI_API ImRect
Definition IMSlider.hpp:19
#define style
Definition WipeTowerDialog.cpp:101
static bool selectable(const char *label, bool selected, ImGuiSelectableFlags flags=0, const ImVec2 &size_arg=ImVec2(0, 0), bool *out_hovered=nullptr)
Definition ImGuiWrapper.cpp:1484
@ hovered
Definition GLGizmoEmboss.cpp:223

References ImRect, selectable(), and style.

Referenced by Slic3r::GUI::IMSlider::render_add_menu(), and Slic3r::GUI::IMSlider::render_edit_menu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ belt_calib_flip_ringing_tower()

void Slic3r::GUI::belt_calib_flip_ringing_tower ( Model & model)
static
16735{
16736 double angle_rad = 0.;
16737 Vec3d axis = Vec3d::UnitX();
16738 if (belt_calib_rotation_params(angle_rad, axis) && !model.objects.empty())
16739 model.objects.front()->rotate(M_PI, Vec3d::UnitZ());
16740}
#define M_PI
Definition ExtrusionSimulator.cpp:31
ModelObjectPtrs objects
Definition Model.hpp:1702
static bool belt_calib_rotation_params(double &angle_rad, Vec3d &axis)
Definition Plater.cpp:16710
Eigen::Matrix< double, 3, 1, Eigen::DontAlign > Vec3d
Definition Point.hpp:68

References belt_calib_rotation_params(), M_PI, Slic3r::GUI::Plater::model(), and Slic3r::Model::objects.

Referenced by Slic3r::GUI::Plater::Calib_Cornering(), Slic3r::GUI::Plater::calib_input_shaping_damp(), and Slic3r::GUI::Plater::calib_input_shaping_freq().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ belt_calib_rotation_params()

bool Slic3r::GUI::belt_calib_rotation_params ( double & angle_rad,
Vec3d & axis )
static
16711{
16712 const auto& printer_config = wxGetApp().preset_bundle->printers.get_edited_preset().config;
16713 const auto* belt_opt = printer_config.option<ConfigOptionBool>("belt_printer");
16714 if (belt_opt == nullptr || !belt_opt->value)
16715 return false;
16716 const auto* axis_opt = printer_config.option<ConfigOptionEnum<BeltRotationAxis>>("belt_slice_rotation");
16717 const auto* angle_opt = printer_config.option<ConfigOptionFloat>("belt_slice_rotation_angle");
16718 if (axis_opt == nullptr || angle_opt == nullptr)
16719 return false;
16720 switch (axis_opt->value) {
16721 case BeltRotationAxis::X: axis = Vec3d::UnitX(); break;
16722 case BeltRotationAxis::Y: axis = Vec3d::UnitY(); break;
16723 // Z rotation is an in-plane spin and None means no tilt; objects already
16724 // slice upright in those cases and need no special handling.
16725 default: return false;
16726 }
16727 angle_rad = -Geometry::deg2rad(angle_opt->value);
16728 return std::abs(angle_rad) > EPSILON;
16729}
#define EPSILON
Definition ColorUtils.cpp:64
Definition Config.hpp:1908
T value
Definition Config.hpp:329
constexpr T deg2rad(const T angle)
Definition Geometry.hpp:312
@ X
Definition PrintConfig.hpp:343
@ Y
Definition PrintConfig.hpp:344

References Slic3r::Geometry::deg2rad(), EPSILON, printer_config(), Slic3r::ConfigOptionSingle< T >::value, Slic3r::X, and Slic3r::Y.

Referenced by Slic3r::GUI::Plater::_calib_apply_belt_mode(), belt_calib_flip_ringing_tower(), Slic3r::GUI::Plater::calib_pa(), and Slic3r::GUI::Plater::calib_temp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ belt_temp_tower_asset()

std::string Slic3r::GUI::belt_temp_tower_asset ( const Calib_Params & params)
static
17376{
17377 const int t_start = (int) lround(params.start);
17378 const int t_end = (int) lround(params.end);
17379 return Slic3r::resources_dir() + "/calib/temperature_tower/belt_temp_tower_" +
17380 std::to_string(t_start) + "_" + std::to_string(t_end) + ".stl";
17381}
const std::string & resources_dir()
Definition utils.cpp:296
double end
Definition calib.hpp:45
double start
Definition calib.hpp:45

References Slic3r::Calib_Params::end, Slic3r::resources_dir(), and Slic3r::Calib_Params::start.

Referenced by Slic3r::GUI::Plater::calib_temp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ blend_colors()

wxColour Slic3r::GUI::blend_colors ( const wxColour & a,
const wxColour & b,
double ratio_a )
static
131{
132 unsigned char r, g, bl;
133 Slic3r::filament_mixer_lerp(a.Red(), a.Green(), a.Blue(),
134 b.Red(), b.Green(), b.Blue(),
135 static_cast<float>(1.0 - ratio_a),
136 &r, &g, &bl);
137 return wxColour(r, g, bl);
138}
void filament_mixer_lerp(unsigned char r1, unsigned char g1, unsigned char b1, unsigned char r2, unsigned char g2, unsigned char b2, float t, unsigned char *out_r, unsigned char *out_g, unsigned char *out_b)
Definition FilamentMixer.cpp:58

References Slic3r::filament_mixer_lerp().

Referenced by Slic3r::GUI::MixedFilamentDialog::rebuild_recommendation_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ blend_mixed_color()

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
4318{
4319 std::vector<std::string> hex_colors;
4320 hex_colors.reserve(comp_ids.size());
4321 for (unsigned int id : comp_ids)
4322 hex_colors.push_back((id >= 1 && id <= color_strs.size()) ? color_strs[id - 1] : "#808080");
4323 return Slic3r::blend_color_multi(hex_colors, ratios);
4324}
std::string blend_color_multi(const std::vector< std::string > &hex_colors, const std::vector< int > &weights)
Definition FilamentMixer.cpp:124

References Slic3r::blend_color_multi().

Referenced by create_mixed_filament_from_result(), Slic3r::GUI::Sidebar::edit_mixed_filament(), and Slic3r::GUI::Sidebar::update_mixed_filament_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ blend_n_colors()

wxColour Slic3r::GUI::blend_n_colors ( const std::vector< wxColour > & cols,
const std::vector< double > & weights )
102{
103 const size_t n = std::min(cols.size(), weights.size());
104 std::vector<std::string> hex_colors;
105 std::vector<int> int_weights;
106 hex_colors.reserve(n);
107 int_weights.reserve(n);
108 for (size_t i = 0; i < n; ++i) {
109 hex_colors.push_back(to_hex(cols[i]));
110 // Scale double weights (e.g. 0.5) to int (5000) for blend_color_multi;
111 // only relative magnitude matters.
112 int_weights.push_back(static_cast<int>(std::lround(weights[i] * 10000.0)));
113 }
114 wxColour blended(Slic3r::blend_color_multi(hex_colors, int_weights));
115 return blended.IsOk() ? blended : wxColour(128, 128, 128);
116}
static std::string to_hex(const wxColour &c)
Definition FilamentBitmapUtils.cpp:96

References Slic3r::blend_color_multi(), and to_hex().

Referenced by Slic3r::GUI::MixedFilamentDialog::create_preview_panel(), Slic3r::GUI::MixedFilamentDialog::rebuild_recommendation_items(), and sample_gradient_ramp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ body_palette()

ColorRGBA Slic3r::GUI::body_palette ( int body_idx)
static
268{
269 static const ColorRGBA kPalette[] = {
270 ColorRGBA(0.86f, 0.66f, 0.20f, 1.0f), // gold
271 ColorRGBA(0.84f, 0.42f, 0.66f, 1.0f), // rose
272 ColorRGBA(0.45f, 0.78f, 0.42f, 1.0f), // green
273 ColorRGBA(0.86f, 0.45f, 0.40f, 1.0f), // coral
274 ColorRGBA(0.70f, 0.52f, 0.86f, 1.0f), // violet
275 ColorRGBA(0.90f, 0.70f, 0.35f, 1.0f), // amber
276 };
277 const int n = int(sizeof(kPalette) / sizeof(kPalette[0]));
278 return kPalette[((body_idx % n) + n) % n];
279}
Definition Color.hpp:80

Referenced by Slic3r::GUI::DesignCanvas::body_color().

Here is the caller graph for this function:

◆ bold()

wxString Slic3r::GUI::bold ( const wxString & str)
static
336{
337 return wxString::Format("<b>%s</b>", str);
338};

Referenced by add_config_substitutions(), and Slic3r::GUI::PublishSettingsDialog::set_row_bold().

Here is the caller graph for this function:

◆ bold_string()

wxString Slic3r::GUI::bold_string ( const wxString & str)
static
341{
342 return wxString::Format("<b>\"%s\"</b>", str);
343};

Referenced by add_config_substitutions(), and show_substitutions_info().

Here is the caller graph for this function:

◆ break_to_debugger()

void Slic3r::GUI::break_to_debugger ( )
102{
103 #ifdef _WIN32
104 if (IsDebuggerPresent())
105 DebugBreak();
106 #endif /* _WIN32 */
107}

◆ bspline_degree()

int Slic3r::GUI::bspline_degree ( int n)
static
2837{ return n >= 4 ? 3 : (n >= 2 ? n - 1 : 0); }

References bspline_degree().

Referenced by bspline_degree(), and bspline_polyline().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bspline_eval()

Vec2d Slic3r::GUI::bspline_eval ( const std::vector< Vec2d > & P,
const std::vector< double > & U,
int p,
double u )
static
2851{
2852 const int n = int(P.size());
2853 if (u <= U[p]) return P.front();
2854 if (u >= U[n]) return P.back(); // U[n] == domain max (clamped)
2855 int k = p;
2856 while (k < n - 1 && U[k + 1] <= u) ++k; // span: U[k] <= u < U[k+1]
2857 std::vector<Vec2d> d(p + 1);
2858 for (int j = 0; j <= p; ++j) d[j] = P[j + k - p];
2859 for (int r = 1; r <= p; ++r)
2860 for (int j = p; j >= r; --j) {
2861 const double denom = U[j + 1 + k - r] - U[j + k - p];
2862 const double a = denom > 1e-12 ? (u - U[j + k - p]) / denom : 0.0;
2863 d[j] = (1.0 - a) * d[j - 1] + a * d[j];
2864 }
2865 return d[p];
2866}
@ P
Definition libslic3r.h:149

References bspline_eval(), and Slic3r::P.

Referenced by bspline_eval(), and bspline_polyline().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bspline_knots()

std::vector< double > Slic3r::GUI::bspline_knots ( int n,
int p )
static
2840{
2841 std::vector<double> U; // full knot vector, length n+p+1
2842 const int interior = n - p - 1;
2843 for (int i = 0; i <= p; ++i) U.push_back(0.0);
2844 for (int i = 1; i <= interior; ++i) U.push_back(double(i));
2845 const double last = double(interior + 1);
2846 for (int i = 0; i <= p; ++i) U.push_back(last);
2847 return U;
2848}

References bspline_knots().

Referenced by bspline_knots(), and bspline_polyline().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bspline_polyline()

std::vector< Vec2d > Slic3r::GUI::bspline_polyline ( const std::vector< Vec2d > & ctrl,
int samples = 0 )
static
2869{
2870 const int n = int(ctrl.size());
2871 if (n < 2) return ctrl;
2872 const int p = bspline_degree(n);
2873 const std::vector<double> U = bspline_knots(n, p);
2874 const double umax = double(n - p);
2875 if (samples <= 0) samples = std::max(24, 14 * (n - 1));
2876 std::vector<Vec2d> out; out.reserve(samples + 1);
2877 for (int i = 0; i <= samples; ++i)
2878 out.push_back(bspline_eval(ctrl, U, p, umax * double(i) / double(samples)));
2879 return out;
2880}
static std::vector< double > bspline_knots(int n, int p)
Definition DesignSketchTool.cpp:2839
static Vec2d bspline_eval(const std::vector< Vec2d > &P, const std::vector< double > &U, int p, double u)
Definition DesignSketchTool.cpp:2850
static int bspline_degree(int n)
Definition DesignSketchTool.cpp:2837

References bspline_degree(), bspline_eval(), bspline_knots(), and bspline_polyline().

Referenced by bspline_polyline(), entity_pick_dist(), Slic3r::GUI::DesignSketchTool::entity_polyline(), and Slic3r::GUI::DesignSketchTool::render().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_plate_tilt_up_direction()

Vec3d Slic3r::GUI::build_plate_tilt_up_direction ( )
10520{
10521 const DynamicPrintConfig &cfg = wxGetApp().preset_bundle->printers.get_edited_preset().config;
10522 const auto *opt_x = cfg.option<ConfigOptionFloat>("build_plate_tilt_x");
10523 const auto *opt_y = cfg.option<ConfigOptionFloat>("build_plate_tilt_y");
10524 const double tilt_x = opt_x != nullptr ? opt_x->value : 0.;
10525 const double tilt_y = opt_y != nullptr ? opt_y->value : 0.;
10526 if (tilt_x == 0. && tilt_y == 0.)
10527 return Vec3d::UnitZ();
10528 return Vec3d(std::tan(Geometry::deg2rad(tilt_y)), std::tan(Geometry::deg2rad(tilt_x)), 1.).normalized();
10529}
ConfigOption * option(const t_config_option_key &opt_key, bool create=false)
Definition Config.hpp:2768
Definition PrintConfig.hpp:915

References build_plate_tilt_up_direction(), Slic3r::Geometry::deg2rad(), Slic3r::ConfigBase::option(), and Slic3r::ConfigOptionSingle< T >::value.

Referenced by build_plate_tilt_up_direction(), Slic3r::GUI::GLGizmoPainterBase::get_tilt_up_direction(), Slic3r::GLVolumeCollection::render(), Slic3r::GUI::Bed3D::render_gravity_arrow(), Slic3r::GUI::GLGizmoFdmSupports::select_facets_by_angle(), and wxDECLARE_EVENT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bump_texture_library_generation()

void Slic3r::GUI::bump_texture_library_generation ( )
357{
358 g_library_generation.fetch_add(1);
359}

Referenced by Slic3r::GUI::GUI_App::init_plugin_gui_wiring().

Here is the caller graph for this function:

◆ button()

bool Slic3r::GUI::button ( const IconManager::Icon & activ,
const IconManager::Icon & hover,
const IconManager::Icon & disable,
bool disabled = false )

Use icon as button with 3 states activ hover and disabled.

Parameters
activNot disabled not hovered image
hoverHovered image
disableDisabled image
Returns
True when click on enabled, otherwise False
419{
420 if (disabled) {
421 draw(disable);
422 return false;
423 }
424 return clickable(activ, hover);
425}
void draw(const IconManager::Icon &icon, const ImVec2 &size, const ImVec4 &tint_col, const ImVec4 &border_col)
Draw imgui image with icon.
Definition IconManager.cpp:373
bool clickable(const IconManager::Icon &icon, const IconManager::Icon &icon_hover)
Draw icon which change on hover.
Definition IconManager.cpp:399

References clickable(), and draw().

Referenced by Slic3r::GUI::ColourPicker::BUILD(), Slic3r::GUI::AMSDryCtrWin::create_button(), Slic3r::GUI::KBShortcutsDialog::create_page(), Slic3r::GUI::GLGizmoEmboss::draw_advanced(), anonymous_namespace{GLGizmoEmboss.cpp}::draw_button(), Slic3r::GUI::GLGizmoEmboss::draw_font_list_line(), Slic3r::GUI::GLGizmoSVG::draw_rotation(), Slic3r::GUI::GLGizmoSVG::draw_size(), Slic3r::GUI::HistoryWindow::enbale_action_buttons(), Slic3r::GUI::KBShortcutsDialog::fill_pages(), RammingPanel::get_parameters(), Slic3r::GUI::ObjectLayers::msw_rescale(), Slic3r::GUI::FilamentPickerDialog::OnButtonPaint(), Slic3r::GUI::GLGizmoEmboss::revertible(), Slic3r::GUI::MediaFilePanel::SwitchStorage(), Slic3r::GUI::ObjectLayers::sys_color_changed(), and Slic3r::GUI::AMSDryCtrWin::update_button_size().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ button_with_pos()

bool Slic3r::GUI::button_with_pos ( ImTextureID user_texture_id,
const ImVec2 & size,
const ImVec2 & pos,
const ImVec2 & uv0,
const ImVec2 & uv1,
int frame_padding,
const ImVec4 & bg_col,
const ImVec4 & tint_col,
const ImVec2 & margin )
343{
344
345 ImGuiContext &g = *GImGui;
346 ImGuiWindow * window = g.CurrentWindow;
347 if (window->SkipItems) return false;
348
349 // Default to using texture ID as ID. User can still push string/integer prefixes.
350 ImGui::PushID((void *) (intptr_t) user_texture_id);
351 const ImGuiID id = window->GetID("#image");
352 ImGui::PopID();
353
354 const ImVec2 padding = (frame_padding >= 0) ? ImVec2((float) frame_padding, (float) frame_padding) : g.Style.FramePadding;
355
356 const ImRect bb(pos, pos + size + padding * 2 + margin * 2);
357
358 bool hovered, held;
359 bool pressed = ImGui::ButtonBehavior(bb, id, &hovered, &held);
360
361 // Render
362 const ImU32 col = ImGui::GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
363 ImGui::RenderNavHighlight(bb, id);
364
365 const float border_size = g.Style.FrameBorderSize;
366 if (border_size > 0.0f) {
367 window->DrawList->AddRect(bb.Min + ImVec2(1, 1), bb.Max + ImVec2(1, 1), col, g.Style.FrameRounding, 0, border_size);
368 window->DrawList->AddRect(bb.Min, bb.Max, col, g.Style.FrameRounding, 0, border_size);
369 }
370
371 if (bg_col.w > 0.0f) window->DrawList->AddRectFilled(bb.Min + padding, bb.Max - padding, ImGui::GetColorU32(bg_col));
372 window->DrawList->AddImage(user_texture_id, bb.Min + padding + margin, bb.Max - padding - margin, uv0, uv1, ImGui::GetColorU32(tint_col));
373
374 return pressed;
375}

References ImRect.

Referenced by Slic3r::GUI::IMSlider::draw_ticks().

Here is the caller graph for this function:

◆ cad_escape_level()

CadLevel Slic3r::GUI::cad_escape_level ( const CadInteractionState & s)
constexpr
37{
40 if (s.tool_armed) return CadLevel::Tool;
41 return CadLevel::Idle;
42}
@ Tool
Definition DesignInteraction.hpp:20
bool tool_armed
Definition DesignInteraction.hpp:31
bool value_field_open
Definition DesignInteraction.hpp:29
bool gesture_active
Definition DesignInteraction.hpp:30

References Gesture, Slic3r::GUI::CadInteractionState::gesture_active, Idle, Tool, Slic3r::GUI::CadInteractionState::tool_armed, Transient, and Slic3r::GUI::CadInteractionState::value_field_open.

Referenced by Slic3r::GUI::DesignPanel::escape_level().

Here is the caller graph for this function:

◆ calc_angle()

std::optional< float > Slic3r::GUI::calc_angle ( const Selection & selection)

Calculate up vector angle.

Parameters
selectionCalculation of angle is for selected one volume
Returns
260{
261 const GLVolume *gl_volume = selection.get_first_volume();
262 assert(gl_volume != nullptr);
263 if (gl_volume == nullptr)
264 return {};
265
266 Transform3d to_world = gl_volume->world_matrix();
267 const ModelVolume *volume = get_model_volume(*gl_volume, selection.get_model()->objects);
268 assert(volume != nullptr);
269 assert(volume->emboss_shape.has_value());
270 if (volume == nullptr || !volume->emboss_shape.has_value() || !volume->emboss_shape->fix_3mf_tr)
271 return Emboss::calc_up(to_world, UP_LIMIT);
272
273 // exist fix matrix and must be applied before calculation
274 to_world = to_world * volume->emboss_shape->fix_3mf_tr->inverse();
275 return Emboss::calc_up(to_world, UP_LIMIT);
276}
Definition 3DScene.hpp:90
Transform3d world_matrix() const
Definition 3DScene.cpp:447
Model * get_model() const
Definition Selection.hpp:219
const GLVolume * get_first_volume() const
Definition Selection.hpp:317
Definition Model.hpp:832
std::optional< EmbossShape > emboss_shape
Definition Model.hpp:1019
std::optional< float > calc_up(const Transform3d &tr, double up_limit=0.9)
By transformation calculate angle between suggested and actual up vector.
Definition Emboss.cpp:1768
constexpr double UP_LIMIT
Definition SurfaceDrag.hpp:56
static ModelVolume * get_model_volume(const Selection &selection, Model &model)
Definition GLGizmoBrimEars.cpp:66
Eigen::Transform< double, 3, Eigen::Affine, Eigen::DontAlign > Transform3d
Definition Point.hpp:96

References Slic3r::Emboss::calc_up(), Slic3r::ModelVolume::emboss_shape, Slic3r::GUI::Selection::get_first_volume(), Slic3r::GUI::Selection::get_model(), get_model_volume(), Slic3r::Model::objects, UP_LIMIT, and Slic3r::GLVolume::world_matrix().

Referenced by Slic3r::GUI::GLGizmoEmboss::draw_advanced(), Slic3r::GUI::GLGizmoSVG::draw_mirroring(), Slic3r::GUI::GLGizmoSVG::draw_rotation(), anonymous_namespace{TextLines.cpp}::its_create_torus(), Slic3r::GUI::GLGizmoEmboss::on_mouse_for_translate(), Slic3r::GUI::GLGizmoSVG::on_mouse_for_translate(), Slic3r::GUI::GLGizmoEmboss::set_volume_by_selection(), Slic3r::GUI::GLGizmoSVG::set_volume_by_selection(), Slic3r::GUI::GLGizmoEmboss::volume_transformation_changed(), and Slic3r::GUI::GLGizmoSVG::volume_transformation_changed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_color_distance() [1/2]

float Slic3r::GUI::calc_color_distance ( RGBA c1,
RGBA c2 )
38{
39 float lab[2][3];
40 RGB2Lab(c1[0], c1[1], c1[2], &lab[0][0], &lab[0][1], &lab[0][2]);
41 RGB2Lab(c2[0], c2[1], c2[2], &lab[1][0], &lab[1][1], &lab[1][2]);
42
43 return DeltaE76(lab[0][0], lab[0][1], lab[0][2], lab[1][0], lab[1][1], lab[1][2]);
44}
void RGB2Lab(float R, float G, float B, float *L, float *a, float *b)
Definition ColorSpaceConvert.cpp:111
float DeltaE76(float l1, float a1, float b1, float l2, float a2, float b2)
Definition ColorSpaceConvert.cpp:240

References DeltaE76(), and RGB2Lab().

Here is the call graph for this function:

◆ calc_color_distance() [2/2]

float Slic3r::GUI::calc_color_distance ( wxColour c1,
wxColour c2 )
29{
30 float lab[2][3];
31 RGB2Lab(c1.Red(), c1.Green(), c1.Blue(), &lab[0][0], &lab[0][1], &lab[0][2]);
32 RGB2Lab(c2.Red(), c2.Green(), c2.Blue(), &lab[1][0], &lab[1][1], &lab[1][2]);
33
34 return DeltaE76(lab[0][0], lab[0][1], lab[0][2], lab[1][0], lab[1][1], lab[1][2]);
35}

References DeltaE76(), and RGB2Lab().

Referenced by Slic3r::DevMappingUtil::ams_filament_mapping(), convert_obj_cluster_colors(), and draw_mixed_gradient_plot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_distance() [1/2]

std::optional< float > Slic3r::GUI::calc_distance ( const GLVolume & gl_volume,
const RaycastManager & raycaster,
const RaycastManager::ISkip * condition,
const std::optional< Slic3r::Transform3d > & fix )
224 {
225 Transform3d w = gl_volume.world_matrix();
226 if (fix.has_value())
227 w = w * fix->inverse();
228 Vec3d p = w.translation();
229 Vec3d dir = -get_z_base(w);
230 auto hit_opt = raycaster.closest_hit(p, dir, condition);
231 if (!hit_opt.has_value())
232 return {};
233
234 const RaycastManager::Hit &hit = *hit_opt;
235 // NOTE: hit.squared_distance is in volume space not world
236
237 const Transform3d &tr = raycaster.get_transformation(hit.tr_key);
238 Vec3d hit_world = tr * hit.position;
239 Vec3d p_to_hit = hit_world - p;
240 double distance_sq = p_to_hit.squaredNorm();
241
242 // too small distance is calculated as zero distance
243 if (distance_sq < ::surface_distance_sq.min)
244 return {};
245
246 // check maximal distance
247 const BoundingBoxf3& bb = gl_volume.bounding_box();
248 double max_squared_distance = std::max(std::pow(2 * bb.size().z(), 2), ::surface_distance_sq.max);
249 if (distance_sq > max_squared_distance)
250 return {};
251
252 // calculate sign
253 float sign = (p_to_hit.dot(dir) > 0)? 1.f : -1.f;
254
255 // distiguish sign
256 return sign * static_cast<float>(sqrt(distance_sq));
257}
PointType size() const
Definition BoundingBox.cpp:187
Definition BoundingBox.hpp:265
BoundingBoxf3 bounding_box() const
Definition 3DScene.hpp:267
Transform3d get_transformation(const TrKey &tr_key) const
Getter on transformation from hitted volume to world.
Definition RaycastManager.cpp:235
std::optional< Hit > closest_hit(const Vec3d &point, const Vec3d &direction, const ISkip *skip=nullptr) const
Unproject Ray(point direction) on mesh to find closest hit of surface in given direction NOTE: It ins...
Definition RaycastManager.cpp:177
Vec3 position
Definition RaycastManager.hpp:56
const Vec3d get_z_base(const Transform3d &transform)
Definition Point.hpp:190
Definition RaycastManager.hpp:61
TrKey tr_key
Definition RaycastManager.hpp:62

References Slic3r::GLVolume::bounding_box(), Slic3r::GUI::RaycastManager::closest_hit(), Slic3r::GUI::RaycastManager::get_transformation(), Slic3r::get_z_base(), Slic3r::GUI::RaycastManager::SurfacePoint< T >::position, Slic3r::BoundingBox3Base< PointType >::size(), Slic3r::GUI::RaycastManager::Hit::tr_key, and Slic3r::GLVolume::world_matrix().

Here is the call graph for this function:

◆ calc_distance() [2/2]

std::optional< float > Slic3r::GUI::calc_distance ( const GLVolume & gl_volume,
RaycastManager & raycaster,
GLCanvas3D & canvas )

Calculate distance by ray to surface of object in emboss direction.

Parameters
gl_volumeDefine embossed volume
raycasterWay to cast rays to object
canvasContain model
Returns
Calculated distance from surface
199{
200 const ModelObject *object = get_model_object(gl_volume, canvas.get_model()->objects);
201 assert(object != nullptr);
202 if (object == nullptr)
203 return {};
204
205 const ModelInstance *instance = get_model_instance(gl_volume, *object);
206 const ModelVolume *volume = get_model_volume(gl_volume, *object);
207 assert(instance != nullptr && volume != nullptr);
208 if (object == nullptr || instance == nullptr || volume == nullptr)
209 return {};
210
211 if (volume->is_the_only_one_part())
212 return {};
213
214 if (!volume->emboss_shape.has_value())
215 return {};
216
217 RaycastManager::AllowVolumes condition = create_condition(object->volumes, volume->id());
218 RaycastManager::Meshes meshes = create_meshes(canvas, condition);
219 raycaster.actualize(*instance, &condition, &meshes);
220 return calc_distance(gl_volume, raycaster, &condition, volume->emboss_shape->fix_3mf_tr);
221}
const Model * get_model() const
Definition GLCanvas3D.hpp:1026
Definition RaycastManager.hpp:106
void actualize(const ModelObject &object, const ISkip *skip=nullptr, Meshes *meshes=nullptr)
Actualize raycasters + transformation Detection of removed object Detection of removed instance Detec...
Definition RaycastManager.cpp:38
std::vector< Mesh > Meshes
Definition RaycastManager.hpp:29
Definition Model.hpp:1421
Definition Model.hpp:382
ModelVolumePtrs volumes
Definition Model.hpp:393
bool is_the_only_one_part() const
Definition Model.cpp:2128
ObjectID id() const
Definition ObjectID.hpp:69
ModelObject * get_model_object(const GLVolume &gl_volume, const Model &model)
Definition GLCanvas3D.cpp:13015
RaycastManager::Meshes create_meshes(GLCanvas3D &canvas, const RaycastManager::AllowVolumes &condition)
Use scene Raycasters and prepare data for actualize RaycasterManager.
Definition RaycastManager.cpp:330
std::optional< float > calc_distance(const GLVolume &gl_volume, RaycastManager &raycaster, GLCanvas3D &canvas)
Calculate distance by ray to surface of object in emboss direction.
Definition SurfaceDrag.cpp:198
RaycastManager::AllowVolumes create_condition(const ModelVolumePtrs &volumes, const ObjectID &disallowed_volume_id)
Create condition to allowe only parts from volumes without one given.
Definition RaycastManager.cpp:376
ModelInstance * get_model_instance(const GLVolume &gl_volume, const Model &model)
Definition GLCanvas3D.cpp:13028

References Slic3r::GUI::RaycastManager::actualize(), calc_distance(), create_condition(), create_meshes(), Slic3r::ModelVolume::emboss_shape, Slic3r::GUI::GLCanvas3D::get_model(), get_model_instance(), get_model_object(), get_model_volume(), Slic3r::ObjectBase::id(), Slic3r::ModelVolume::is_the_only_one_part(), Slic3r::Model::objects, and Slic3r::ModelObject::volumes.

Referenced by calc_distance(), Slic3r::GUI::GLGizmoSVG::on_mouse_for_translate(), Slic3r::GUI::GLGizmoEmboss::set_volume_by_selection(), Slic3r::GUI::GLGizmoSVG::set_volume_by_selection(), and anonymous_namespace{SurfaceDrag.cpp}::start_dragging().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_gray()

float Slic3r::GUI::calc_gray ( wxColour color)
inline
47{
48 return 0.299 * (float) color.Red() + 0.587 * (float) color.Green() + 0.114 * (float) color.Blue();
49}

References calc_gray().

Referenced by Slic3r::GUI::SliceInfoPopup::SliceInfoPopup(), and calc_gray().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_scale()

std::optional< double > Slic3r::GUI::calc_scale ( const Matrix3d & from,
const Matrix3d & to,
const Vec3d & dir )
static
90{
91 Vec3d from_dir = from * dir;
92 Vec3d to_dir = to * dir;
93 double from_scale_sq = from_dir.squaredNorm();
94 double to_scale_sq = to_dir.squaredNorm();
95 if (is_approx(from_scale_sq, to_scale_sq, 1e-3))
96 return {}; // no scale
97 return sqrt(from_scale_sq / to_scale_sq);
98}
constexpr bool is_approx(Number value, Number test_value, Number precision=EPSILON)
Definition libslic3r.h:320

References Slic3r::is_approx().

Referenced by anonymous_namespace{SurfaceDrag.cpp}::get_volume_transformation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calc_surface_offset()

std::optional< Vec3d > Slic3r::GUI::calc_surface_offset ( const Selection & selection,
RaycastManager & raycast_manager )

Calculate translation of volume onto surface of model.

Parameters
selectionMust contain only one selected volume, Transformation of current instance
raycast_managerAABB trees of object. Actualize object
Returns
Offset of volume in volume coordinate
140 {
141 const GLVolume *gl_volume_ptr = get_selected_gl_volume(selection);
142 if (gl_volume_ptr == nullptr)
143 return {};
144 const GLVolume& gl_volume = *gl_volume_ptr;
145
146 const ModelObjectPtrs &objects = selection.get_model()->objects;
147 const ModelVolume* volume = get_model_volume(gl_volume, objects);
148 if (volume == nullptr)
149 return {};
150
151 const ModelInstance* instance = get_model_instance(gl_volume, objects);
152 if (instance == nullptr)
153 return {};
154
155 // Move object on surface
156 auto cond = RaycastManager::SkipVolume(volume->id().id);
157 raycast_manager.actualize(*instance, &cond);
158
159 Transform3d to_world = world_matrix_fixed(gl_volume, objects);
160 Vec3d point = to_world.translation();
161 Vec3d dir = -get_z_base(to_world);
162 // ray in direction of text projection(from volume zero to z-dir)
163 std::optional<RaycastManager::Hit> hit_opt = raycast_manager.closest_hit(point, dir, &cond);
164
165 // Try to find closest point when no hit object in emboss direction
166 if (!hit_opt.has_value()) {
167 std::optional<RaycastManager::ClosePoint> close_point_opt = raycast_manager.closest(point);
168
169 // It should NOT appear. Closest point always exists.
170 assert(close_point_opt.has_value());
171 if (!close_point_opt.has_value())
172 return {};
173
174 // It is no neccesary to move with origin by very small value
175 if (close_point_opt->squared_distance < EPSILON)
176 return {};
177
178 const RaycastManager::ClosePoint &close_point = *close_point_opt;
179 Transform3d hit_tr = raycast_manager.get_transformation(close_point.tr_key);
180 Vec3d hit_world = hit_tr * close_point.point;
181 Vec3d offset_world = hit_world - point; // vector in world
182 Vec3d offset_volume = to_world.inverse().linear() * offset_world;
183 return offset_volume;
184 }
185
186 // It is no neccesary to move with origin by very small value
187 const RaycastManager::Hit &hit = *hit_opt;
188 if (hit.squared_distance < EPSILON)
189 return {};
190 Transform3d hit_tr = raycast_manager.get_transformation(hit.tr_key);
191 Vec3d hit_world = hit_tr * hit.position;
192 Vec3d offset_world = hit_world - point; // vector in world
193 // TIP: It should be close to only z move
194 Vec3d offset_volume = to_world.inverse().linear() * offset_world;
195 return offset_volume;
196}
Definition RaycastManager.hpp:98
TrKey tr_key
Definition RaycastManager.hpp:68
Vec3d point
Definition RaycastManager.hpp:69
std::optional< ClosePoint > closest(const Vec3d &point, const ISkip *skip=nullptr) const
Search of closest point.
Definition RaycastManager.cpp:209
Definition RaycastManager.hpp:67
size_t id
Definition ObjectID.hpp:39
Transform3d world_matrix_fixed(const GLVolume &gl_volume, const ModelObjectPtrs &objects)
Get transformation to world.
Definition SurfaceDrag.cpp:278
GLVolume * get_selected_gl_volume(const GLCanvas3D &canvas)
Definition GLCanvas3D.cpp:13003
std::vector< ModelObject * > ModelObjectPtrs
Definition CutUtils.hpp:13
double squared_distance
Definition RaycastManager.hpp:63

References Slic3r::GUI::RaycastManager::actualize(), Slic3r::GUI::RaycastManager::closest(), Slic3r::GUI::RaycastManager::closest_hit(), EPSILON, Slic3r::GUI::Selection::get_model(), get_model_instance(), get_model_volume(), get_selected_gl_volume(), Slic3r::GUI::RaycastManager::get_transformation(), Slic3r::get_z_base(), Slic3r::ObjectBase::id(), Slic3r::ObjectID::id, Slic3r::Model::objects, Slic3r::GUI::RaycastManager::ClosePoint::point, Slic3r::GUI::RaycastManager::SurfacePoint< T >::position, Slic3r::GUI::RaycastManager::Hit::squared_distance, Slic3r::GUI::RaycastManager::ClosePoint::tr_key, Slic3r::GUI::RaycastManager::Hit::tr_key, and world_matrix_fixed().

Referenced by Slic3r::GUI::Emboss::start_update_volume().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculate_md5()

std::string Slic3r::GUI::calculate_md5 ( const std::string & input)
static
526{
527 unsigned char digest[MD5_DIGEST_LENGTH];
528 std::string md5;
529
530 EVP_MD_CTX *mdContext = EVP_MD_CTX_new();
531 EVP_DigestInit(mdContext, EVP_md5());
532 EVP_DigestUpdate(mdContext, input.c_str(), input.length());
533 EVP_DigestFinal(mdContext, digest, nullptr);
534 EVP_MD_CTX_free(mdContext);
535
536 char hexDigest[MD5_DIGEST_LENGTH * 2 + 1];
537 for (int i = 0; i < MD5_DIGEST_LENGTH; ++i) { sprintf(hexDigest + (i * 2), "%02x", digest[i]); }
538 hexDigest[MD5_DIGEST_LENGTH * 2] = '\0';
539
540 md5 = std::string(hexDigest);
541 return md5;
542}

Referenced by get_filament_id().

Here is the caller graph for this function:

◆ calib_temp_dir()

const std::string & Slic3r::GUI::calib_temp_dir ( )
static
75{
76 static const std::string dir = temporary_dir() + "/calib";
77 return dir;
78}
const std::string & temporary_dir()
Definition utils.cpp:308

References Slic3r::temporary_dir().

Referenced by calib_temp_file(), Slic3r::GUI::CalibUtils::send_to_print(), and Slic3r::GUI::CalibUtils::send_to_print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calib_temp_file()

std::string Slic3r::GUI::calib_temp_file ( const std::string & name)
static
79{ return calib_temp_dir() + "/" + name; }
static const std::string & calib_temp_dir()
Definition CalibUtils.cpp:74

References calib_temp_dir().

Referenced by Slic3r::GUI::CalibUtils::process_and_store_3mf(), Slic3r::GUI::CalibUtils::send_to_print(), and Slic3r::GUI::CalibUtils::send_to_print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ call_after_if_active()

void Slic3r::GUI::call_after_if_active ( std::function< void()> fn,
GUI_App * app = &wxGetApp() )
static
45{
46 // check application GUI
47 if (app == nullptr) return;
48 app->CallAfter([fn, app]() {
49 // app must exist because it call this
50 // if (app == nullptr) return;
51 const Plater *plater = app->plater();
52 if (plater == nullptr) return;
53 const GLCanvas3D *canvas = plater->canvas3D();
54 if (canvas == nullptr) return;
55 const GLGizmosManager &mng = canvas->get_gizmos_manager();
56 // check if simplify is still activ gizmo
58 fn();
59 });
60}
Definition GLGizmosManager.hpp:81
@ Simplify
Definition GLGizmosManager.hpp:103
EType get_current_type() const
Definition GLGizmosManager.hpp:299
Plater * plater()
Definition GUI_App.cpp:9709

References Slic3r::GUI::GLGizmosManager::get_current_type(), Slic3r::GUI::GLCanvas3D::get_gizmos_manager(), plater(), and Slic3r::GUI::GLGizmosManager::Simplify.

Referenced by Slic3r::GUI::GLGizmoSimplify::process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ can_add_volumes_to_object()

bool Slic3r::GUI::can_add_volumes_to_object ( const ModelObject * object)
static
4280{
4281 bool can = object->volumes.size() > 1;
4282
4283 if (can && object->is_cut()) {
4284 int no_connectors_cnt = 0;
4285 for (const ModelVolume *v : object->volumes)
4286 if (!v->is_cut_connector()) {
4287 if (!v->is_model_part())
4288 return true;
4289 no_connectors_cnt++;
4290 }
4291 can = no_connectors_cnt > 1;
4292 }
4293
4294 return can;
4295}
bool is_cut() const
Definition Model.hpp:577
bool is_cut_connector() const
Definition Model.hpp:888
bool is_model_part() const
Definition Model.hpp:1025

References Slic3r::ModelObject::is_cut(), Slic3r::ModelVolume::is_cut_connector(), Slic3r::ModelVolume::is_model_part(), and Slic3r::ModelObject::volumes.

Referenced by Slic3r::GUI::ObjectList::add_volumes_to_object_in_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ canvas_corner_height()

float Slic3r::GUI::canvas_corner_height ( )
static
2442{
2443 if (wxGetApp().show_3d_navigator())
2444 return NAVIGATOR_SIZE;
2445 const int buttons = wxGetApp().show_canvas_zoom_button() ? 3 : 2;
2447}
static constexpr float CANVAS_TOOLBAR_PADDING
Definition GLCanvas3D.cpp:2436
static constexpr float CANVAS_TOOLBAR_SPACING
Definition GLCanvas3D.cpp:2438
static constexpr float NAVIGATOR_SIZE
Definition GLCanvas3D.cpp:2434
static constexpr float CANVAS_TOOLBAR_BUTTON
Definition GLCanvas3D.cpp:2437
static constexpr float CANVAS_TOOLBAR_MARGIN
Definition GLCanvas3D.cpp:2435

References CANVAS_TOOLBAR_BUTTON, CANVAS_TOOLBAR_MARGIN, CANVAS_TOOLBAR_PADDING, CANVAS_TOOLBAR_SPACING, and NAVIGATOR_SIZE.

Referenced by Slic3r::GUI::GLCanvas3D::_render_plate_switcher().

Here is the caller graph for this function:

◆ cap_favourites()

std::vector< std::string > Slic3r::GUI::cap_favourites ( const std::vector< std::string > & ids,
size_t limit )
48{
49 std::vector<std::string> out;
50 out.reserve(std::min(ids.size(), limit));
51 for (const auto& id : ids) {
52 if (out.size() >= limit)
53 break;
54 if (std::find(out.begin(), out.end(), id) == out.end())
55 out.push_back(id);
56 }
57 return out;
58}

Referenced by Slic3r::GUI::ActionRegistry::favourite_ids(), and Slic3r::GUI::ActionRegistry::reorder_favourites().

Here is the caller graph for this function:

◆ caseInsensitiveCompare()

bool Slic3r::GUI::caseInsensitiveCompare ( const std::string & a,
const std::string & b )
static
252 {
253 std::string lowerA = a;
254 std::string lowerB = b;
255 std::transform(lowerA.begin(), lowerA.end(), lowerA.begin(), ::tolower);
256 std::transform(lowerB.begin(), lowerB.end(), lowerB.begin(), ::tolower);
257 return lowerA < lowerB;
258}

Referenced by Slic3r::GUI::CreateFilamentPresetDialog::create_vendor_item().

Here is the caller graph for this function:

◆ change_opt_value()

void Slic3r::GUI::change_opt_value ( DynamicPrintConfig & config,
const t_config_option_key & opt_key,
const boost::any & value,
int opt_index )
141{
142 try{
143
144 if (config.def()->get(opt_key)->type == coBools && config.def()->get(opt_key)->nullable) {
145 const auto v = boost::any_cast<unsigned char>(value);
146 auto vec_new = std::make_unique<ConfigOptionBoolsNullable>(1, v);
148 vec_new->set_at_to_nil(0);
149 }
150
151 config.option<ConfigOptionBoolsNullable>(opt_key)->set_at(vec_new.get(), opt_index, 0);
152 return;
153 }
154
155 const ConfigOptionDef *opt_def = config.def()->get(opt_key);
156 switch (opt_def->type) {
157 case coFloatOrPercent:{
158 std::string str = boost::any_cast<std::string>(value);
159 bool percent = false;
160 if (str.back() == '%') {
161 str.pop_back();
162 percent = true;
163 }
164 double val = std::stod(str); // locale-dependent (on purpose - the input is the actual content of the field)
165 config.set_key_value(opt_key, new ConfigOptionFloatOrPercent(val, percent));
166 break;}
167 case coFloatsOrPercents:{
168 std::string str = boost::any_cast<std::string>(value);
169 bool percent = false;
170 if (str.back() == '%') {
171 str.pop_back();
172 percent = true;
173 }
174 double val = std::stod(str); // locale-dependent (on purpose - the input is the actual content of the field)
175 auto vec_new = std::make_unique<ConfigOptionFloatOrPercent>(val, percent);
176 config.option<ConfigOptionFloatsOrPercents>(opt_key)->set_at(vec_new.get(), opt_index, opt_index);
177 break;}
178 case coPercent:
179 config.set_key_value(opt_key, new ConfigOptionPercent(boost::any_cast<double>(value)));
180 break;
181 case coFloat:{
182 double& val = config.opt_float(opt_key);
183 val = boost::any_cast<double>(value);
184 break;
185 }
186 case coPercents:{
187 auto vec_new = std::make_unique <ConfigOptionPercent>(boost::any_cast<double>(value));
188 config.option<ConfigOptionPercents>(opt_key)->set_at(vec_new.get(), opt_index, opt_index);
189 break;
190 }
191 case coFloats:{
192 auto vec_new = std::make_unique<ConfigOptionFloat>(boost::any_cast<double>(value));
193 config.option<ConfigOptionFloats>(opt_key)->set_at(vec_new.get(), opt_index, opt_index);
194 break;
195 }
196 case coString:
197 config.set_key_value(opt_key, new ConfigOptionString(boost::any_cast<std::string>(value)));
198 break;
199 case coStrings:{
200 if (opt_key == "compatible_prints" || opt_key == "compatible_printers") {
201 config.option<ConfigOptionStrings>(opt_key)->values =
202 boost::any_cast<std::vector<std::string>>(value);
203 }
204 else if (config.def()->get(opt_key)->gui_type == ConfigOptionDef::GUIType::plugin_picker) {
205 if (value.type() == typeid(std::vector<std::string>)) {
206 config.option<ConfigOptionStrings>(opt_key)->values =
207 boost::any_cast<std::vector<std::string>>(value);
208 } else {
209 std::string str = boost::any_cast<std::string>(value);
210 config.option<ConfigOptionStrings>(opt_key)->values = str.empty() ?
211 std::vector<std::string>() : std::vector<std::string>{str};
212 }
213 }
214 else if (config.def()->get(opt_key)->gui_flags.compare("serialized") == 0) {
215 std::string str = boost::any_cast<std::string>(value);
216 std::vector<std::string> values {};
217 if (!str.empty()) {
218 if (str.back() == ';') str.pop_back();
219 // Split a string to multiple strings by a semi - colon.This is the old way of storing multi - string values.
220 // Currently used for the post_process config value only.
221 boost::split(values, str, boost::is_any_of(";"));
222 if (values.size() == 1 && values[0] == "")
223 values.resize(0);
224 }
225 config.option<ConfigOptionStrings>(opt_key)->values = values;
226 }
227 else{
228 auto vec_new = std::make_unique<ConfigOptionString>(boost::any_cast<std::string>(value));
229 config.option<ConfigOptionStrings>(opt_key)->set_at(vec_new.get(), opt_index, 0);
230 }
231 }
232 break;
233 case coBool:
234 config.set_key_value(opt_key, new ConfigOptionBool(boost::any_cast<bool>(value)));
235 break;
236 case coBools:{
237 auto vec_new = std::make_unique<ConfigOptionBool>(boost::any_cast<unsigned char>(value) != 0);
238 config.option<ConfigOptionBools>(opt_key)->set_at(vec_new.get(), opt_index, 0);
239 break;}
240 case coInt:
241 config.set_key_value(opt_key, new ConfigOptionInt(boost::any_cast<int>(value)));
242 break;
243 case coInts:{
244 auto vec_new = std::make_unique<ConfigOptionInt>(boost::any_cast<int>(value));
245 config.option<ConfigOptionInts>(opt_key)->set_at(vec_new.get(), opt_index, 0);
246 }
247 break;
248 case coEnum:{
249 auto *opt = opt_def->default_value.get()->clone();
250 opt->setInt(boost::any_cast<int>(value));
251 config.set_key_value(opt_key, opt);
252 }
253 break;
254 // BBS
255 case coEnums:{
256 auto vec_new = std::make_unique<ConfigOptionEnumsGeneric>(std::vector<int>{boost::any_cast<int>(value)});
257 if (config.has(opt_key))
258 config.option<ConfigOptionEnumsGeneric>(opt_key)->set_at(vec_new.get(), opt_index, 0);
259 }
260 break;
261 case coPoint:{
262 config.set_key_value(opt_key, new ConfigOptionPoint(boost::any_cast<Vec2d>(value)));
263 }
264 break;
265 case coPoints:{
266 if (opt_key == "bed_exclude_area" && boost::any_cast<std::string>(&value) != nullptr) {
267 // Tab handles pasted volume syntax after this callback. Do not
268 // deserialize it as points: failure would erase the saved area
269 // before the user can accept or cancel the copy operation.
270 break;
271 }
272 if (opt_key == "printable_area" || opt_key == "bed_exclude_area" || opt_key == "thumbnails" || opt_key == "wrapping_exclude_area" ) {
273 config.option<ConfigOptionPoints>(opt_key)->values = boost::any_cast<std::vector<Vec2d>>(value);
274 if (opt_key == "bed_exclude_area") {
275 ConfigOptionPoints normalized(boost::any_cast<std::vector<Vec2d>>(value));
276 config.option<ConfigOptionPoints>(opt_key)->deserialize(normalized.serialize());
277 }
278 break;
279 }
280 auto vec_new = std::make_unique<ConfigOptionPoint>(boost::any_cast<Vec2d>(value));
281 config.option<ConfigOptionPoints>(opt_key)->set_at(vec_new.get(), opt_index, 0);
282 }
283 break;
284 case coNone:
285 break;
286 default:
287 break;
288 }
289 }
290 catch (const std::exception &e)
291 {
292 wxLogError(format_wxstr("Internal error when changing value for %1%: %2%", opt_key, e.what()));
293 }
294}
const ConfigOptionDef * get(const t_config_option_key &opt_key) const
Definition Config.hpp:2662
GUIType gui_type
Definition Config.hpp:2549
@ plugin_picker
Definition Config.hpp:2334
bool nullable
Definition Config.hpp:2346
std::string gui_flags
Definition Config.hpp:2554
bool has(const t_config_option_key &opt_key) const
Definition Config.hpp:2697
bool set_key_value(const std::string &opt_key, ConfigOption *opt)
Definition Config.hpp:3022
double & opt_float(const t_config_option_key &opt_key)
Definition Config.hpp:3047
const ConfigDef * def() const override
Definition PrintConfig.hpp:930
ConfigOptionIntsTempl< false > ConfigOptionInts
Definition Config.hpp:1154
ConfigOptionPercentsTempl< false > ConfigOptionPercents
Definition Config.hpp:1334
zaa_minimize_perimeter_height ConfigOptionString
Definition PrintConfig.hpp:1702
@ coFloatsOrPercents
Definition Config.hpp:202
@ coString
Definition Config.hpp:192
@ coPoint
Definition Config.hpp:204
@ coPercents
Definition Config.hpp:198
@ coInts
Definition Config.hpp:190
@ coPoints
Definition Config.hpp:206
@ coInt
Definition Config.hpp:188
@ coNone
Definition Config.hpp:182
@ coFloat
Definition Config.hpp:184
@ coFloatOrPercent
Definition Config.hpp:200
@ coStrings
Definition Config.hpp:194
@ coFloats
Definition Config.hpp:186
@ coPercent
Definition Config.hpp:196
ConfigOptionFloatsOrPercentsTempl< false > ConfigOptionFloatsOrPercents
Definition Config.hpp:1531

References Slic3r::coBool, Slic3r::coBools, Slic3r::coEnum, Slic3r::coEnums, Slic3r::coFloat, Slic3r::coFloatOrPercent, Slic3r::coFloats, Slic3r::coFloatsOrPercents, Slic3r::coInt, Slic3r::coInts, Slic3r::ConfigOptionString, Slic3r::coNone, Slic3r::coPercent, Slic3r::coPercents, Slic3r::coPoint, Slic3r::coPoints, Slic3r::coString, Slic3r::coStrings, Slic3r::DynamicPrintConfig::def(), Slic3r::ConfigOptionDef::default_value, format_wxstr(), Slic3r::ConfigDef::get(), Slic3r::ConfigOptionDef::gui_flags, Slic3r::ConfigOptionDef::gui_type, Slic3r::ConfigOptionResolver::has(), Slic3r::ConfigOptionBoolsTempl< true >::nil_value(), Slic3r::ConfigOptionDef::nullable, Slic3r::DynamicConfig::opt_float(), Slic3r::ConfigBase::option(), Slic3r::ConfigOptionDef::plugin_picker, Slic3r::ConfigOptionPoints::serialize(), Slic3r::DynamicConfig::set_key_value(), and Slic3r::ConfigOptionDef::type.

Referenced by Slic3r::GUI::ConfigOptionsGroup::change_opt_value(), Slic3r::GUI::Tab::load_key_value(), Slic3r::GUI::TabFilament::on_value_change(), and Slic3r::GUI::TabPrinter::on_value_change().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_color_change()

bool Slic3r::GUI::check_color_change ( PrintObject * object,
size_t frst_layer_id,
size_t layers_cnt,
bool check_overhangs,
std::function< bool(Layer *)> break_condition )
87{
88 double prev_area = area(object->get_layer(frst_layer_id)->lslices);
89
90 bool detected = false;
91 for (size_t i = frst_layer_id + 1; i < layers_cnt; i++) {
92 Layer *layer = object->get_layer(i);
93 double cur_area = area(layer->lslices);
94
95 // check for overhangs
96 if (check_overhangs && cur_area > prev_area && !equivalent_areas(prev_area, cur_area)) break;
97
98 // Check percent of the area decrease.
99 // This value have to be more than min_delta_area and more then 10%
100 if ((prev_area - cur_area > min_delta_area()) && (cur_area / prev_area < 0.9)) {
101 detected = true;
102 if (break_condition(layer)) break;
103 }
104
105 prev_area = cur_area;
106 }
107 return detected;
108}
Definition Layer.hpp:138
ExPolygons lslices
Definition Layer.hpp:170
const Layer * get_layer(int idx) const
Definition Print.hpp:456
double min_delta_area()
Definition IMSlider.cpp:54
bool equivalent_areas(const double &bottom_area, const double &top_area)
Definition IMSlider.cpp:81
double area(const ExPolygon &poly)
Definition ExPolygon.hpp:511

References Slic3r::area(), equivalent_areas(), Slic3r::PrintObject::get_layer(), Slic3r::Layer::lslices, and min_delta_area().

Here is the call graph for this function:

◆ check_dark_mode()

bool Slic3r::GUI::check_dark_mode ( )
311 {
312#if 0 //#ifdef _WIN32 // #ysDarkMSW - Allow it when we deside to support the sustem colors for application
313 wxRegKey rk(wxRegKey::HKCU,
314 "Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize");
315 if (rk.Exists() && rk.HasValue("AppsUseLightTheme")) {
316 long value = -1;
317 rk.QueryValue("AppsUseLightTheme", &value);
318 return value <= 0;
319 }
320#endif
321 return wxSystemSettings::GetAppearance().IsDark();
322}

Referenced by create_scaled_bitmap(), and Slic3r::GUI::GUI_App::dark_mode().

Here is the caller graph for this function:

◆ check_nozzle_diameter_and_type()

bool Slic3r::GUI::check_nozzle_diameter_and_type ( const DynamicPrintConfig & full_config,
wxString & error_msg )
static
333{
334 DeviceManager *dev = Slic3r::GUI::wxGetApp().getDeviceManager();
335 if (!dev) {
336 error_msg = _L("Need select printer");
337 return false;
338 }
339
341 if (obj == nullptr) {
342 error_msg = _L("Need select printer");
343 return false;
344 }
345
346 if (!Slic3r::GUI::wxGetApp().plater()->check_printer_initialized(obj))
347 return false;
348
349 // P1P/S
351 return true;
352
353 if (!is_same_nozzle_type(full_config, obj, error_msg))
354 return false;
355
356 return true;
357}
NozzleType GetNozzleType(int extder_id) const
Definition DevExtruderSystem.h:153
static bool is_same_nozzle_type(const DynamicPrintConfig &full_config, const MachineObject *obj, wxString &error_msg)
Definition CalibUtils.cpp:301
@ ntUndefine
Definition CommonDefs.hpp:14

References _L, Slic3r::DeviceManager::get_selected_machine(), Slic3r::MachineObject::GetExtderSystem(), Slic3r::DevExtderSystem::GetNozzleType(), is_same_nozzle_type(), Slic3r::ntUndefine, and plater().

Referenced by Slic3r::GUI::CalibUtils::process_and_store_3mf().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_objects_after_cut()

void Slic3r::GUI::check_objects_after_cut ( const ModelObjectPtrs & objects)
static
3543{
3544 std::vector<std::string> err_objects_names;
3545 for (const ModelObject* object : objects) {
3546 std::vector<std::string> connectors_names;
3547 connectors_names.reserve(object->volumes.size());
3548 for (const ModelVolume* vol : object->volumes)
3549 if (vol->cut_info.is_connector)
3550 connectors_names.push_back(vol->name);
3551 const size_t connectors_count = connectors_names.size();
3552 sort_remove_duplicates(connectors_names);
3553 if (connectors_count != connectors_names.size())
3554 err_objects_names.push_back(object->name);
3555 }
3556 if (err_objects_names.empty())
3557 return;
3558
3559 wxString names = from_u8(err_objects_names[0]);
3560 for (size_t i = 1; i < err_objects_names.size(); i++)
3561 names += ", " + from_u8(err_objects_names[i]);
3562 WarningDialog(wxGetApp().plater(), format_wxstr(_L_PLURAL("Object (%1%) has duplicated connectors. "
3563 "Some connectors may be missing in slicing result.\n"
3564 "Please report to the OrcaSlicer team in which scenario this issue happened.\n"
3565 "Thank you.",
3566 "Objects (%1%) have duplicated connectors. "
3567 "Some connectors may be missing in slicing result.\n"
3568 "Please report to the OrcaSlicer team in which scenario this issue happened.\n"
3569 "Thank you.", unsigned(err_objects_names.size())), names)).ShowModal();
3570}
CutInfo cut_info
Definition Model.hpp:883
std::string name
Definition Model.hpp:834
void sort_remove_duplicates(std::vector< T > &vec)
Definition libslic3r.h:231
#define _L_PLURAL(s, plural, n)
Definition I18N.hpp:96
bool is_connector
Definition Model.hpp:860

References _L_PLURAL, Slic3r::ModelVolume::cut_info, format_wxstr(), from_u8(), Slic3r::ModelVolume::CutInfo::is_connector, Slic3r::ModelVolume::name, plater(), Slic3r::GUI::DPIAware< P >::ShowModal(), and Slic3r::sort_remove_duplicates().

Referenced by Slic3r::GUI::GLGizmoCut3D::perform_cut().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ circle_polygon()

std::vector< Vec2d > Slic3r::GUI::circle_polygon ( const Vec2d & c,
double r,
int n = 48 )
static
2807{
2808 std::vector<Vec2d> v; v.reserve(n);
2809 for (int i = 0; i < n; ++i) {
2810 const double a = 2.0 * M_PI * double(i) / double(n);
2811 v.push_back(Vec2d(c.x() + r * std::cos(a), c.y() + r * std::sin(a)));
2812 }
2813 return v;
2814}
Eigen::Matrix< double, 2, 1, Eigen::DontAlign > Vec2d
Definition Point.hpp:67

References circle_polygon(), and M_PI.

Referenced by circle_polygon(), Slic3r::GUI::DesignSketchTool::entity_polyline(), and Slic3r::GUI::DesignSketchTool::render().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ circular_arrow()

GLModel::Geometry Slic3r::GUI::circular_arrow ( unsigned int resolution,
float radius,
float tip_height,
float tip_width,
float stem_width,
float thickness )
998{
999 resolution = std::max<unsigned int>(2, resolution);
1000
1001 GLModel::Geometry data;
1003 data.reserve_vertices(8 * (resolution + 1) + 30);
1004 data.reserve_indices((8 * resolution + 16) * 3);
1005
1006 const float half_thickness = 0.5f * thickness;
1007 const float half_stem_width = 0.5f * stem_width;
1008 const float half_tip_width = 0.5f * tip_width;
1009
1010 const float outer_radius = radius + half_stem_width;
1011 const float inner_radius = radius - half_stem_width;
1012 const float step_angle = 0.5f * float(PI) / float(resolution);
1013
1014 // tip
1015 // top face vertices
1016 data.add_vertex(Vec3f(0.0f, outer_radius, half_thickness), (Vec3f)Vec3f::UnitZ());
1017 data.add_vertex(Vec3f(0.0f, radius + half_tip_width, half_thickness), (Vec3f)Vec3f::UnitZ());
1018 data.add_vertex(Vec3f(-tip_height, radius, half_thickness), (Vec3f)Vec3f::UnitZ());
1019 data.add_vertex(Vec3f(0.0f, radius - half_tip_width, half_thickness), (Vec3f)Vec3f::UnitZ());
1020 data.add_vertex(Vec3f(0.0f, inner_radius, half_thickness), (Vec3f)Vec3f::UnitZ());
1021
1022 // top face triangles
1023 data.add_triangle(0, 1, 2);
1024 data.add_triangle(0, 2, 4);
1025 data.add_triangle(4, 2, 3);
1026
1027 // bottom face vertices
1028 data.add_vertex(Vec3f(0.0f, outer_radius, -half_thickness), (Vec3f)(-Vec3f::UnitZ()));
1029 data.add_vertex(Vec3f(0.0f, radius + half_tip_width, -half_thickness), (Vec3f)(-Vec3f::UnitZ()));
1030 data.add_vertex(Vec3f(-tip_height, radius, -half_thickness), (Vec3f)(-Vec3f::UnitZ()));
1031 data.add_vertex(Vec3f(0.0f, radius - half_tip_width, -half_thickness), (Vec3f)(-Vec3f::UnitZ()));
1032 data.add_vertex(Vec3f(0.0f, inner_radius, -half_thickness), (Vec3f)(-Vec3f::UnitZ()));
1033
1034 // bottom face triangles
1035 data.add_triangle(5, 7, 6);
1036 data.add_triangle(5, 9, 7);
1037 data.add_triangle(9, 8, 7);
1038
1039 // side faces vertices
1040 data.add_vertex(Vec3f(0.0f, outer_radius, -half_thickness), (Vec3f)Vec3f::UnitX());
1041 data.add_vertex(Vec3f(0.0f, radius + half_tip_width, -half_thickness), (Vec3f)Vec3f::UnitX());
1042 data.add_vertex(Vec3f(0.0f, outer_radius, half_thickness), (Vec3f)Vec3f::UnitX());
1043 data.add_vertex(Vec3f(0.0f, radius + half_tip_width, half_thickness), (Vec3f)Vec3f::UnitX());
1044
1045 Vec3f normal(-half_tip_width, tip_height, 0.0f);
1046 normal.normalize();
1047 data.add_vertex(Vec3f(0.0f, radius + half_tip_width, -half_thickness), normal);
1048 data.add_vertex(Vec3f(-tip_height, radius, -half_thickness), normal);
1049 data.add_vertex(Vec3f(0.0f, radius + half_tip_width, half_thickness), normal);
1050 data.add_vertex(Vec3f(-tip_height, radius, half_thickness), normal);
1051
1052 normal = { -half_tip_width, -tip_height, 0.0f };
1053 normal.normalize();
1054 data.add_vertex(Vec3f(-tip_height, radius, -half_thickness), normal);
1055 data.add_vertex(Vec3f(0.0f, radius - half_tip_width, -half_thickness), normal);
1056 data.add_vertex(Vec3f(-tip_height, radius, half_thickness), normal);
1057 data.add_vertex(Vec3f(0.0f, radius - half_tip_width, half_thickness), normal);
1058
1059 data.add_vertex(Vec3f(0.0f, radius - half_tip_width, -half_thickness), (Vec3f)Vec3f::UnitX());
1060 data.add_vertex(Vec3f(0.0f, inner_radius, -half_thickness), (Vec3f)Vec3f::UnitX());
1061 data.add_vertex(Vec3f(0.0f, radius - half_tip_width, half_thickness), (Vec3f)Vec3f::UnitX());
1062 data.add_vertex(Vec3f(0.0f, inner_radius, half_thickness), (Vec3f)Vec3f::UnitX());
1063
1064 // side face triangles
1065 for (unsigned int i = 0; i < 4; ++i) {
1066 const unsigned int ii = i * 4;
1067 data.add_triangle(10 + ii, 11 + ii, 13 + ii);
1068 data.add_triangle(10 + ii, 13 + ii, 12 + ii);
1069 }
1070
1071 // stem
1072 // top face vertices
1073 for (unsigned int i = 0; i <= resolution; ++i) {
1074 const float angle = float(i) * step_angle;
1075 data.add_vertex(Vec3f(inner_radius * ::sin(angle), inner_radius * ::cos(angle), half_thickness), (Vec3f)Vec3f::UnitZ());
1076 }
1077
1078 for (unsigned int i = 0; i <= resolution; ++i) {
1079 const float angle = float(i) * step_angle;
1080 data.add_vertex(Vec3f(outer_radius * ::sin(angle), outer_radius * ::cos(angle), half_thickness), (Vec3f)Vec3f::UnitZ());
1081 }
1082
1083 // top face triangles
1084 for (unsigned int i = 0; i < resolution; ++i) {
1085 data.add_triangle(26 + i, 27 + i, 27 + resolution + i);
1086 data.add_triangle(27 + i, 28 + resolution + i, 27 + resolution + i);
1087 }
1088
1089 // bottom face vertices
1090 for (unsigned int i = 0; i <= resolution; ++i) {
1091 const float angle = float(i) * step_angle;
1092 data.add_vertex(Vec3f(inner_radius * ::sin(angle), inner_radius * ::cos(angle), -half_thickness), (Vec3f)(-Vec3f::UnitZ()));
1093 }
1094
1095 for (unsigned int i = 0; i <= resolution; ++i) {
1096 const float angle = float(i) * step_angle;
1097 data.add_vertex(Vec3f(outer_radius * ::sin(angle), outer_radius * ::cos(angle), -half_thickness), (Vec3f)(-Vec3f::UnitZ()));
1098 }
1099
1100 // bottom face triangles
1101 for (unsigned int i = 0; i < resolution; ++i) {
1102 data.add_triangle(28 + 2 * resolution + i, 29 + 3 * resolution + i, 29 + 2 * resolution + i);
1103 data.add_triangle(29 + 2 * resolution + i, 29 + 3 * resolution + i, 30 + 3 * resolution + i);
1104 }
1105
1106 // side faces vertices and triangles
1107 for (unsigned int i = 0; i <= resolution; ++i) {
1108 const float angle = float(i) * step_angle;
1109 const float c = ::cos(angle);
1110 const float s = ::sin(angle);
1111 data.add_vertex(Vec3f(inner_radius * s, inner_radius * c, -half_thickness), Vec3f(-s, -c, 0.0f));
1112 }
1113
1114 for (unsigned int i = 0; i <= resolution; ++i) {
1115 const float angle = float(i) * step_angle;
1116 const float c = ::cos(angle);
1117 const float s = ::sin(angle);
1118 data.add_vertex(Vec3f(inner_radius * s, inner_radius * c, half_thickness), Vec3f(-s, -c, 0.0f));
1119 }
1120
1121 unsigned int first_id = 26 + 4 * (resolution + 1);
1122 for (unsigned int i = 0; i < resolution; ++i) {
1123 const unsigned int ii = first_id + i;
1124 data.add_triangle(ii, ii + 1, ii + resolution + 2);
1125 data.add_triangle(ii, ii + resolution + 2, ii + resolution + 1);
1126 }
1127
1128 data.add_vertex(Vec3f(inner_radius, 0.0f, -half_thickness), (Vec3f)(-Vec3f::UnitY()));
1129 data.add_vertex(Vec3f(outer_radius, 0.0f, -half_thickness), (Vec3f)(-Vec3f::UnitY()));
1130 data.add_vertex(Vec3f(inner_radius, 0.0f, half_thickness), (Vec3f)(-Vec3f::UnitY()));
1131 data.add_vertex(Vec3f(outer_radius, 0.0f, half_thickness), (Vec3f)(-Vec3f::UnitY()));
1132
1133 first_id = 26 + 6 * (resolution + 1);
1134 data.add_triangle(first_id, first_id + 1, first_id + 3);
1135 data.add_triangle(first_id, first_id + 3, first_id + 2);
1136
1137 for (int i = resolution; i >= 0; --i) {
1138 const float angle = float(i) * step_angle;
1139 const float c = ::cos(angle);
1140 const float s = ::sin(angle);
1141 data.add_vertex(Vec3f(outer_radius * s, outer_radius * c, -half_thickness), Vec3f(s, c, 0.0f));
1142 }
1143
1144 for (int i = resolution; i >= 0; --i) {
1145 const float angle = float(i) * step_angle;
1146 const float c = ::cos(angle);
1147 const float s = ::sin(angle);
1148 data.add_vertex(Vec3f(outer_radius * s, outer_radius * c, +half_thickness), Vec3f(s, c, 0.0f));
1149 }
1150
1151 first_id = 30 + 6 * (resolution + 1);
1152 for (unsigned int i = 0; i < resolution; ++i) {
1153 const unsigned int ii = first_id + i;
1154 data.add_triangle(ii, ii + 1, ii + resolution + 2);
1155 data.add_triangle(ii, ii + resolution + 2, ii + resolution + 1);
1156 }
1157
1158 return data;
1159}
static constexpr double PI
Definition libslic3r.h:81
zaa_minimize_perimeter_height resolution((ConfigOptionFloats, retraction_minimum_travel))((ConfigOptionBools
double angle(const Eigen::MatrixBase< Derived > &v1, const Eigen::MatrixBase< Derived2 > &v2)
Definition Point.hpp:138
Point normal(Point pt, double scale)
Definition TreeSupport.cpp:112
Definition GLModel.hpp:28

References Slic3r::GUI::GLModel::Geometry::add_triangle(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::angle(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::normal(), Slic3r::GUI::GLModel::Geometry::P3N3, PI, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), Slic3r::resolution(), and Slic3r::GUI::GLModel::Geometry::Triangles.

Referenced by Slic3r::GUI::Selection::init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ circumcircle()

bool Slic3r::GUI::circumcircle ( const Vec2d & a,
const Vec2d & b,
const Vec2d & c,
Vec2d & center,
double & radius )
static
2971{
2972 const double d = 2.0 * (a.x() * (b.y() - c.y()) +
2973 b.x() * (c.y() - a.y()) +
2974 c.x() * (a.y() - b.y()));
2975 if (std::abs(d) < 1e-9)
2976 return false;
2977 const double a2 = a.squaredNorm(), b2 = b.squaredNorm(), c2 = c.squaredNorm();
2978 const double ux = (a2 * (b.y() - c.y()) + b2 * (c.y() - a.y()) + c2 * (a.y() - b.y())) / d;
2979 const double uy = (a2 * (c.x() - b.x()) + b2 * (a.x() - c.x()) + c2 * (b.x() - a.x())) / d;
2980 center = Vec2d(ux, uy);
2981 radius = (a - center).norm();
2982 return true;
2983}
void center(ExPolygonsWithIds &e)
Definition Emboss.cpp:1382

References Slic3r::center(), and circumcircle().

Referenced by circumcircle(), Slic3r::GUI::DesignSketchTool::make_three_point_arc(), and Slic3r::GUI::DesignSketchTool::make_three_point_circle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ classify_code_lines()

std::vector< std::pair< std::string, bool > > Slic3r::GUI::classify_code_lines ( const std::string & msg)
static
277{
278 std::vector<std::string> lines;
279 boost::split(lines, msg, boost::is_any_of("\n"));
280 for (std::string &line : lines)
281 if (!line.empty() && line.back() == '\r')
282 line.pop_back();
283
284 std::vector<std::pair<std::string, bool>> tagged;
285 tagged.reserve(lines.size());
286 for (size_t i = 0; i < lines.size(); ++i) {
287 bool is_code = is_caret_line(lines[i]) || (i + 1 < lines.size() && is_caret_line(lines[i + 1]));
288 tagged.emplace_back(std::move(lines[i]), is_code);
289 }
290 return tagged;
291}
static bool is_caret_line(const std::string &line)
Definition MsgDialog.cpp:268

References is_caret_line().

Referenced by format_parser_error_html(), and measure_mixed_text().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clickable()

bool Slic3r::GUI::clickable ( const IconManager::Icon & icon,
const IconManager::Icon & icon_hover )

Draw icon which change on hover.

Parameters
iconDraw when no hover
icon_hoverDraw when hover
Returns
True when click, otherwise False
400{
401 // check of hover
402 ImGuiWindow *window = ImGui::GetCurrentWindow();
403 float cursor_x = ImGui::GetCursorPosX()
404 - window->DC.GroupOffset.x
405 - window->DC.ColumnsOffset.x;
407 ImGui::SameLine(cursor_x);
408 if (ImGui::IsItemHovered()) {
409 // redraw image
410 draw(icon_hover);
411 } else {
412 // redraw normal image
413 draw(icon);
414 }
415 return ImGui::IsItemClicked();
416}
static void draw_transparent_icon(const IconManager::Icon &icon)
Definition IconManager.cpp:347

References draw(), and priv::draw_transparent_icon().

Referenced by button(), Slic3r::GUI::GLGizmoEmboss::draw_bold_button(), anonymous_namespace{GLGizmoSVG.cpp}::draw_clickable(), Slic3r::GUI::GLGizmoEmboss::draw_italic_button(), and anonymous_namespace{GLGizmoSVG.cpp}::reset_button().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cloud_navigation_is_top_level()

bool Slic3r::GUI::cloud_navigation_is_top_level ( const wxWebViewEvent & evt)
static
368{
369#ifdef __WXGTK__
370 return evt.GetNavigationAction() == wxWEBVIEW_NAV_ACTION_USER;
371#else
372 return evt.IsTargetMainFrame();
373#endif
374}

Referenced by Slic3r::GUI::WebViewPanel::OnCloudWebViewEvent().

Here is the caller graph for this function:

◆ cloud_page_url()

wxString Slic3r::GUI::cloud_page_url ( NetworkAgent * agent,
const std::string & path )
static
346{
347 if (path.empty())
348 return {};
349 auto orca = get_orca_cloud_agent(agent);
350 if (!orca)
351 return {};
352 std::string base = orca->get_cloud_base_url();
353 while (!base.empty() && base.back() == '/')
354 base.pop_back();
355 if (base.empty())
356 return {};
357 return from_u8(base + path);
358}
static std::shared_ptr< OrcaCloudServiceAgent > get_orca_cloud_agent(NetworkAgent *agent)
Definition GUI_App.cpp:338

References from_u8(), and get_orca_cloud_agent().

Referenced by Slic3r::GUI::GUI_App::open_orca_cloud().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CMYW_CYAN()

const wxColour Slic3r::GUI::CMYW_CYAN ( 0 ,
255 ,
255  )
static

Referenced by Slic3r::GUI::ColorDecomposeDialog::compute_decomposition(), pure_color_for_base(), and standard_base_color_for().

Here is the caller graph for this function:

◆ CMYW_MAGENTA()

const wxColour Slic3r::GUI::CMYW_MAGENTA ( 255 ,
0 ,
255  )
static

Referenced by pure_color_for_base(), and standard_base_color_for().

Here is the caller graph for this function:

◆ CMYW_WHITE()

const wxColour Slic3r::GUI::CMYW_WHITE ( 255 ,
255 ,
255  )
static

Referenced by pure_color_for_base(), and standard_base_color_for().

Here is the caller graph for this function:

◆ CMYW_YELLOW()

const wxColour Slic3r::GUI::CMYW_YELLOW ( 255 ,
255 ,
0  )
static

Referenced by Slic3r::GUI::ColorDecomposeDialog::compute_decomposition(), pure_color_for_base(), and standard_base_color_for().

Here is the caller graph for this function:

◆ collect_ams_color_items()

std::vector< ColorPickerPopup::ColorItem > Slic3r::GUI::collect_ams_color_items ( DevFilaSystem * fila_system)
static
108{
109 std::vector<ColorPickerPopup::ColorItem> items;
110 if (!fila_system) return items;
111
112 for (const auto& ams_pair : fila_system->GetAmsList()) {
113 DevAms* ams = ams_pair.second;
114 if (!ams) continue;
115
116 for (const auto& tray_pair : ams->GetTrays()) {
117 DevAmsTray* tray = tray_pair.second;
118 if (!tray || !tray->is_tray_info_ready()) continue;
119
121 for (const std::string& col : tray->cols) {
122 item.colors.emplace_back(DevAmsTray::decode_color(col));
123 }
124 if (item.colors.empty() && !tray->color.empty()) {
125 item.colors.emplace_back(DevAmsTray::decode_color(tray->color));
126 }
127 if (item.colors.empty()) continue;
128
129 item.ctype = item.colors.size() > 1 ? tray->ctype : 2;
130 items.emplace_back(std::move(item));
131 }
132 }
133
134 return items;
135}
Definition DevFilaSystem.h:51
std::vector< std::string > cols
Definition DevFilaSystem.h:66
static wxColour decode_color(const std::string &color)
Definition DevFilaSystem.cpp:38
bool is_tray_info_ready() const
Definition DevFilaSystem.cpp:90
int ctype
Definition DevFilaSystem.h:77
std::string color
Definition DevFilaSystem.h:65
Definition DevFilaSystem.h:139
const std::map< std::string, DevAmsTray * > & GetTrays() const
Definition DevFilaSystem.h:229
std::map< std::string, DevAms *, NumericStrCompare > & GetAmsList()
Definition DevFilaSystem.h:344
int ctype
Definition AMSMaterialsSetting.hpp:88
std::vector< wxColour > colors
Definition AMSMaterialsSetting.hpp:87
Definition AMSMaterialsSetting.hpp:86

References Slic3r::DevAmsTray::color, Slic3r::GUI::ColorPickerPopup::ColorItem::colors, Slic3r::DevAmsTray::cols, Slic3r::DevAmsTray::ctype, Slic3r::GUI::ColorPickerPopup::ColorItem::ctype, Slic3r::DevAmsTray::decode_color(), Slic3r::DevFilaSystem::GetAmsList(), Slic3r::DevAms::GetTrays(), and Slic3r::DevAmsTray::is_tray_info_ready().

Referenced by Slic3r::GUI::AMSMaterialsSetting::on_clr_picker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ collect_imex_warnings()

std::vector< wxString > Slic3r::GUI::collect_imex_warnings ( PartPlate * plate)
static
13599{
13600 std::vector<wxString> warnings;
13601 if (!plate) return warnings;
13602
13603 // Multi-material conflicts are now hard-blocked at slice time via
13604 // imex_multicolor_block_reason (Print::validate). The pre-slice nanny used to
13605 // emit a vague soft warning here, but the hard block surfaces a more
13606 // descriptive message at exactly the right moment, so the duplicate warning
13607 // was dropped. Bed-temp + filament-type checks below remain useful soft
13608 // warnings — they catch user configurations that *will* slice but produce
13609 // problematic gcode.
13610 // Resolved: a plate on Primary still slices in the process preset's mode, and these
13611 // bed-temperature and filament-type warnings are the only notice the user gets.
13612 const std::string mode = plate->get_effective_imex_mode();
13613 if (mode == kImexPrimaryMode) return warnings;
13614
13615 PresetBundle* bundle = wxGetApp().preset_bundle;
13616 if (!bundle) return warnings;
13617
13618 // The mode's tool roster, its declared primary, and which logical filament slot the
13619 // primary prints with all come from imex_resolve_routing() -- the same library call
13620 // Print::validate() makes for its hard block, so the sentence shown here and the refusal
13621 // shown at slice time cannot describe the plate differently. An unresolved mode, and a
13622 // mode the tools array is too short to cover, both yield an empty roster and no primary,
13623 // which is the same "nothing to warn about" answer the open-coded lookup gave.
13624 //
13625 // The pem source is the GUI's own (effective_physical_extruder_map on the live bundle);
13626 // Print::apply() normalises the slicer's copy through the same helper, so the two agree.
13629 mode, plate->get_extruders(true), pem);
13630
13631 // Upper bound: filament_presets.size() is the practical limit, capped at MAXIMUM_EXTRUDER_NUMBER (64).
13632 // GUI-only: every warning below names a filament preset, so a tool with no preset to
13633 // name is one this dialog has nothing to say about. The slicer has no such limit --
13634 // it refuses the plate outright rather than describing it.
13635 const size_t max_tool = std::min(bundle->filament_presets.size(), MAXIMUM_EXTRUDER_NUMBER);
13636
13637 std::vector<int> active_tools;
13638 const int primary_tool = routing.primary_phys;
13639 for (const auto& [phys_idx, role] : routing.tools) {
13640 (void)role;
13641 // parse_imex_active_tools already drops negative indices.
13642 if (max_tool == 0 || (size_t)phys_idx < max_tool)
13643 active_tools.push_back(phys_idx);
13644 }
13645
13646 // Two or more tools is what makes a primary/secondary comparison meaningful; both checks
13647 // below are primary-vs-secondary. A single-tool roster is left to Print::validate.
13648 if (active_tools.size() < 2 || primary_tool < 0) return warnings;
13649 const DynamicPrintConfig& full_cfg = bundle->full_config();
13650 // Bed temps are per-plate-type; resolve the active plate's bed type to get the right key.
13651 const BedType bed_type = bundle->project_config.opt_enum<BedType>("curr_bed_type");
13652 const std::string bed_temp_key = get_bed_temp_key(bed_type);
13653 const auto* bed_temps = bed_temp_key.empty() ? nullptr : full_cfg.option<ConfigOptionInts>(bed_temp_key);
13654 const auto& filament_presets = bundle->filament_presets;
13655
13656 // active_tools and primary_tool are PHYSICAL extruder indices (from
13657 // imex_mode_active_tools). filament_presets and bed_temps are indexed by LOGICAL
13658 // filament slot. For MMU/AFC layouts where multiple logical slots feed one
13659 // physical extruder, looking up filament_presets[physical_idx] returns the wrong
13660 // filament. Translate physical -> logical before indexing.
13661 //
13662 // Primary vs secondary use DIFFERENT translation rules:
13663 // - Primary's filament: routing.primary_logical, the slot the plate's objects put on
13664 // the primary's physical head. -1 there is exactly the condition Print::validate
13665 // refuses the plate on (ImexRouting::primary_unrouted); this dialog runs first and
13666 // still wants a filament to name, so it falls back to the printer's own routing.
13667 // - Secondary's filament: per-plate imex_head_filament_map override (set via
13668 // the IMEX ghost picker). No object owns a secondary in copy/mirror mode —
13669 // the firmware duplicates the primary, so the override is the only source. Stays
13670 // GUI-local: the slicer never has to name a secondary's filament.
13671 std::map<int, int> plate_head_map;
13672 if (auto* hfm = plate->config()->option<ConfigOptionString>("imex_head_filament_map"))
13673 plate_head_map = parse_imex_head_filament_map(hfm->value);
13674
13675 auto logical_for_secondary = [&](int physical_idx) -> int {
13676 const int logical = resolve_filament_for_head(plate_head_map, pem, physical_idx);
13677 return logical >= 0 ? logical : physical_idx;
13678 };
13679
13680 // Primary tool's bed temp and filament type (looked up by logical slot). Both lookups
13681 // are guarded against a negative slot: first_filament_for_physical_head() returns -1 for
13682 // a primary no logical filament reaches at all, and `-1 < size()` would otherwise index
13683 // in front of the array.
13684 const int primary_logical = routing.routes_to_primary()
13685 ? routing.primary_logical
13686 : first_filament_for_physical_head(pem, primary_tool);
13687 const int primary_bed_temp = (bed_temps && primary_logical >= 0 &&
13688 primary_logical < (int)bed_temps->values.size())
13689 ? bed_temps->values[primary_logical] : 0;
13690 std::string primary_display_type;
13691 if (primary_logical >= 0 && primary_logical < (int)filament_presets.size()) {
13692 Preset* p = bundle->filaments.find_preset(filament_presets[primary_logical]);
13693 if (p) p->get_filament_type(primary_display_type);
13694 }
13695 if (primary_display_type.empty()) primary_display_type = "unknown";
13696
13697 for (size_t i = 0; i < active_tools.size(); ++i) {
13698 const int tool_idx = active_tools[i];
13699 if (tool_idx == primary_tool) continue;
13700
13701 const int secondary_logical = logical_for_secondary(tool_idx);
13702
13703 std::string secondary_display_type;
13704 if (secondary_logical < (int)filament_presets.size()) {
13705 Preset* p = bundle->filaments.find_preset(filament_presets[secondary_logical]);
13706 if (p) p->get_filament_type(secondary_display_type);
13707 }
13708 if (secondary_display_type.empty()) secondary_display_type = "unknown";
13709
13710 // Check 1: bed temperature — primary wins, secondary may not get what it needs
13711 if (bed_temps && primary_bed_temp > 0 && secondary_logical < (int)bed_temps->values.size()) {
13712 const int secondary_bed_temp = bed_temps->values[secondary_logical];
13713 if (secondary_bed_temp > 0 && std::abs(secondary_bed_temp - primary_bed_temp) > 5) {
13714 warnings.push_back(wxString::Format(
13715 _L("Bed temperature conflict: T%d (%s) sets the bed to %d℃ \u2014 "
13716 "T%d (%s) requires %d℃. The primary tool controls the bed; "
13717 "secondary tools print at whatever temperature it sets."),
13718 primary_tool, primary_display_type, primary_bed_temp,
13719 tool_idx, secondary_display_type, secondary_bed_temp));
13720 }
13721 }
13722
13723 // Check 2: filament type mismatch
13724 if (primary_display_type != secondary_display_type &&
13725 primary_display_type != "unknown" && secondary_display_type != "unknown") {
13726 warnings.push_back(wxString::Format(
13727 _L("Filament type mismatch: T%d uses %s and T%d uses %s. "
13728 "These materials have incompatible requirements and are not designed to print together."),
13729 primary_tool, primary_display_type,
13730 tool_idx, secondary_display_type));
13731 }
13732 }
13733
13734 return warnings;
13735}
Definition Config.hpp:1158
size_t size() const override
Definition Config.hpp:722
ENUM opt_enum(const t_config_option_key &opt_key) const
Definition Config.hpp:3066
std::string get_effective_imex_mode() const
Definition PartPlate.cpp:467
DynamicPrintConfig * config()
Definition PartPlate.hpp:337
std::vector< int > get_extruders(bool conside_custom_gcode=false, bool expand_mixed_slots=true) const
Definition PartPlate.cpp:3063
DynamicPrintConfig project_config
Definition PresetBundle.hpp:521
PresetCollection filaments
Definition PresetBundle.hpp:499
std::vector< std::string > filament_presets
Definition PresetBundle.hpp:507
Preset * find_preset(const std::string &name, bool first_visible_if_not_found=false, bool real=false, bool only_from_library=false)
Definition Preset.cpp:3772
std::string get_filament_type(std::string &display_filament_type)
Definition Preset.cpp:998
static constexpr size_t MAXIMUM_EXTRUDER_NUMBER
Definition libslic3r.h:70
int first_filament_for_physical_head(const ConfigOptionInts &pem, int physical)
Definition IMEXHelpers.cpp:213
static std::string get_bed_temp_key(const BedType type)
Definition PrintConfig.hpp:732
std::map< int, int > parse_imex_head_filament_map(const std::string &s)
Definition IMEXHelpers.cpp:457
BedType
Definition PrintConfig.hpp:507
@ Preset
Definition calib.hpp:39
ConfigOptionInts effective_physical_extruder_map(const ConfigOptionInts *explicit_pem, int nozzle_count)
Definition IMEXHelpers.cpp:52
int resolve_filament_for_head(const std::map< int, int > &plate_map, const ConfigOptionInts &pem, int physical)
Definition IMEXHelpers.cpp:556
ImexRouting imex_resolve_routing(const ConfigBase &cfg, const std::string &parallel_mode, const std::vector< int > &used_slots_1b, const ConfigOptionInts &pem)
Definition IMEXHelpers.cpp:497
constexpr const char * kImexPrimaryMode
Definition IMEXHelpers.hpp:27
Definition IMEXHelpers.hpp:478
int primary_logical
Definition IMEXHelpers.hpp:494
int primary_phys
Definition IMEXHelpers.hpp:489
bool routes_to_primary() const
Definition IMEXHelpers.hpp:503
std::vector< std::pair< int, ImexRole > > tools
Definition IMEXHelpers.hpp:486

References _L, Slic3r::GUI::PartPlate::config(), Slic3r::Preset::config, Slic3r::effective_physical_extruder_map(), Slic3r::PresetBundle::filament_presets, Slic3r::PresetBundle::filaments, Slic3r::PresetCollection::find_preset(), Slic3r::first_filament_for_physical_head(), Slic3r::PresetBundle::full_config(), Slic3r::get_bed_temp_key(), Slic3r::PresetCollection::get_edited_preset(), Slic3r::GUI::PartPlate::get_effective_imex_mode(), Slic3r::GUI::PartPlate::get_extruders(), Slic3r::Preset::get_filament_type(), Slic3r::imex_resolve_routing(), Slic3r::kImexPrimaryMode, MAXIMUM_EXTRUDER_NUMBER, Slic3r::DynamicConfig::opt_enum(), Slic3r::ConfigBase::option(), Slic3r::GUI::Plater::p, Slic3r::parse_imex_head_filament_map(), Slic3r::ImexRouting::primary_logical, Slic3r::ImexRouting::primary_phys, Slic3r::PresetBundle::printers, Slic3r::PresetBundle::project_config, Slic3r::resolve_filament_for_head(), Slic3r::ImexRouting::routes_to_primary(), Slic3r::ConfigOptionVector< int >::size(), and Slic3r::ImexRouting::tools.

Referenced by Slic3r::GUI::Plater::priv::on_action_slice_all(), and Slic3r::GUI::Plater::priv::on_action_slice_plate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ collect_preset_color_items()

std::vector< ColorPickerPopup::ColorItem > Slic3r::GUI::collect_preset_color_items ( const std::string & filament_id)
static
138{
139 std::vector<ColorPickerPopup::ColorItem> items;
140 if (filament_id.empty()) return items;
141
142 auto* clr_query = GUI::wxGetApp().get_filament_color_code_query();
143 if (!clr_query) return items;
144
145 auto* agent = wxGetApp().getAgent();
146 const std::string catalog_id = agent ? agent->from_orca_filament_id(filament_id) : filament_id;
147 FilamentColorCodes* color_codes = clr_query->GetFilaInfoMap(wxString::FromUTF8(catalog_id));
148 if (!color_codes || !color_codes->GetFilamentColor2CodeMap()) return items;
149
150 std::set<std::string> seen;
151 for (const auto& color_pair : *color_codes->GetFilamentColor2CodeMap()) {
152 const FilamentColor& fila_color = color_pair.first;
153 FilamentColorCode* color_code = color_pair.second;
154 if (!color_code || fila_color.GetColors().empty()) continue;
155
157 item.ctype = fila_color.ColorCount() < 2 ? 2 :
159 item.name = color_code->GetFilaColorName();
160
161 std::string key = std::to_string(item.ctype);
162 for (const wxColour& color : fila_color.GetColors()) {
163 item.colors.emplace_back(color);
164 char rgba[9];
165 std::snprintf(rgba, sizeof(rgba), "%02X%02X%02X%02X",
166 static_cast<unsigned>(color.Red()), static_cast<unsigned>(color.Green()),
167 static_cast<unsigned>(color.Blue()), static_cast<unsigned>(color.Alpha()));
168 key += "|" + std::string(rgba);
169 }
170
171 if (item.colors.empty() || !seen.insert(key).second) continue;
172 items.emplace_back(std::move(item));
173 }
174
175 return items;
176}
Definition EncodedFilament.hpp:216
wxString GetFilaColorName() const
Definition EncodedFilament.cpp:178
Definition EncodedFilament.hpp:191
FilamentColor2CodeMap * GetFilamentColor2CodeMap() const
Definition EncodedFilament.hpp:200
wxString name
Definition AMSMaterialsSetting.hpp:89
Definition EncodedFilament.hpp:77
const std::vector< wxColour > & GetColors() const noexcept
Definition EncodedFilament.hpp:91
@ GRADIENT_CLR
Definition EncodedFilament.hpp:82
ColorType m_color_type
Definition EncodedFilament.hpp:85
size_t ColorCount() const noexcept
Definition EncodedFilament.hpp:89

References Slic3r::FilamentColor::ColorCount(), Slic3r::GUI::ColorPickerPopup::ColorItem::colors, Slic3r::GUI::ColorPickerPopup::ColorItem::ctype, Slic3r::FilamentColor::GetColors(), Slic3r::FilamentColorCode::GetFilaColorName(), Slic3r::FilamentColorCodes::GetFilamentColor2CodeMap(), Slic3r::FilamentColor::GRADIENT_CLR, Slic3r::FilamentColor::m_color_type, and Slic3r::GUI::ColorPickerPopup::ColorItem::name.

Referenced by Slic3r::GUI::AMSMaterialsSetting::on_clr_picker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ COLOR_BG_CARD()

const wxColour Slic3r::GUI::COLOR_BG_CARD ( "#F8F8F8" )
static

Referenced by Slic3r::GUI::ColorDecomposeDialog::create_mode_card(), and Slic3r::GUI::ColorDecomposeDialog::update_mode_card_content().

Here is the caller graph for this function:

◆ COLOR_BORDER_NORMAL()

const wxColour Slic3r::GUI::COLOR_BORDER_NORMAL ( "#EEEEEE" )
static

Referenced by Slic3r::GUI::ColorDecomposeDialog::create_mode_card().

Here is the caller graph for this function:

◆ COLOR_BRAND()

const wxColour Slic3r::GUI::COLOR_BRAND ( "#009688" )
static

Referenced by Slic3r::GUI::ColorDecomposeDialog::create_mode_card().

Here is the caller graph for this function:

◆ COLOR_DIVIDER()

const wxColour Slic3r::GUI::COLOR_DIVIDER ( "#EEEEEE" )
static

Referenced by create_h_divider().

Here is the caller graph for this function:

◆ COLOR_LABEL_GREY()

const wxColour Slic3r::GUI::COLOR_LABEL_GREY ( "#ACACAC" )
static

Referenced by create_mode_group_label().

Here is the caller graph for this function:

◆ COLOR_LABEL_MUTED()

const wxColour Slic3r::GUI::COLOR_LABEL_MUTED ( "#6B6A6A" )
static

Referenced by Slic3r::GUI::MixedFilamentDialog::create_material_selection(), Slic3r::GUI::MixedFilamentDialog::create_preview_panel(), Slic3r::GUI::MixedFilamentDialog::create_ratio_slider(), and Slic3r::GUI::MixedFilamentDialog::create_triangle_picker().

Here is the caller graph for this function:

◆ color_string()

void Slic3r::GUI::color_string ( wxString & str,
const std::string & color )
static
106{
107#if defined(SUPPORTS_MARKUP) && !defined(__APPLE__)
108 str = from_u8((boost::format("<span color=\"%1%\">%2%</span>") % color % into_u8(str)).str());
109#endif
110}
std::string into_u8(const wxString &str)
Definition GUI.cpp:549

References from_u8(), and into_u8().

Referenced by Slic3r::GUI::ModelNode::ModelNode(), Slic3r::GUI::DiffModel::AddOption(), Slic3r::GUI::DiffModel::AddPreset(), and Slic3r::CLI::run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ COLOR_TEXT_DARK()

const wxColour Slic3r::GUI::COLOR_TEXT_DARK ( "#262E30" )
static

Referenced by Slic3r::GUI::ColorDecomposeDialog::create_mode_selection_section(), Slic3r::GUI::ColorDecomposeDialog::create_target_color_section(), and Slic3r::GUI::ColorDecomposeDialog::update_mode_card_content().

Here is the caller graph for this function:

◆ colour_to_ams_string()

std::string Slic3r::GUI::colour_to_ams_string ( const wxColour & color)
static
89{
90 char col_buf[10];
91 sprintf(col_buf, "%02X%02X%02X%02X", (int)color.Red(), (int)color.Green(), (int)color.Blue(), (int)color.Alpha());
92 return col_buf;
93}

Referenced by Slic3r::GUI::AMSMaterialsSetting::on_select_ok().

Here is the caller graph for this function:

◆ combo_append_index()

int Slic3r::GUI::combo_append_index ( ComboBox * c,
const wxString & label,
int index )
static
165{
166 const int row = c->Append(label, wxNullBitmap);
167 c->SetClientData(unsigned(row), reinterpret_cast<void*>(intptr_t(index)));
168 return row;
169}
int Append(const wxString &item, const wxBitmap &bitmap=wxNullBitmap, int item_style=0)
Definition ComboBox.cpp:227

References ComboBox::Append().

Referenced by Slic3r::GUI::DesignPanel::DesignPanel(), Slic3r::GUI::DesignPanel::load_feature_into_dialog(), Slic3r::GUI::DesignPanel::open_tool(), and Slic3r::GUI::DesignPanel::populate_sheet_body_choices().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ combochecklist_get_flags()

unsigned int Slic3r::GUI::combochecklist_get_flags ( wxComboCtrl * comboCtrl)
515{
516 unsigned int flags = 0;
517
518 wxCheckListBoxComboPopup* popup = dynamic_cast<wxCheckListBoxComboPopup*>(comboCtrl->GetPopupControl());
519 if (popup != nullptr) {
520 for (unsigned int i = 0; i < popup->GetCount(); ++i) {
521 if (popup->IsChecked(i))
522 flags |= 1 << i;
523 }
524 }
525
526 return flags;
527}
Definition wxExtensions.hpp:104

◆ combochecklist_set_flags()

void Slic3r::GUI::combochecklist_set_flags ( wxComboCtrl * comboCtrl,
unsigned int flags )
530{
531 wxCheckListBoxComboPopup* popup = dynamic_cast<wxCheckListBoxComboPopup*>(comboCtrl->GetPopupControl());
532 if (popup != nullptr) {
533 for (unsigned int i = 0; i < popup->GetCount(); ++i) {
534 popup->Check(i, (flags & (1 << i)) != 0);
535 }
536 }
537}

◆ commit_icon()

std::string Slic3r::GUI::commit_icon ( bool bodies)
static
273{
274 const std::string name = bodies ? "toolbar_add_plate_bodies" : "toolbar_add_plate";
275 return dp_dark() ? name + "_dark" : name;
276}
static bool dp_dark()
Definition DesignPanel.cpp:209

References dp_dark().

Referenced by Slic3r::GUI::DesignPanel::DesignPanel(), and Slic3r::GUI::DesignPanel::set_commit_mode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compare_ascii_case_insensitive_natural()

int Slic3r::GUI::compare_ascii_case_insensitive_natural ( const std::string & lhs,
const std::string & rhs )
inline
85 {
86 std::size_t li = 0;
87 std::size_t ri = 0;
88
89 while (li < lhs.size() && ri < rhs.size())
90 {
91 const unsigned char lc = static_cast<unsigned char>(lhs[li]);
92 const unsigned char rc = static_cast<unsigned char>(rhs[ri]);
93
94 if (std::isdigit(lc) && std::isdigit(rc))
95 {
96 const std::size_t lhs_digit_begin = li;
97 const std::size_t rhs_digit_begin = ri;
98 while (li < lhs.size() && std::isdigit(static_cast<unsigned char>(lhs[li])))
99 ++li;
100 while (ri < rhs.size() && std::isdigit(static_cast<unsigned char>(rhs[ri])))
101 ++ri;
102
103 const std::string_view lhs_run(lhs.data() + lhs_digit_begin, li - lhs_digit_begin);
104 const std::string_view rhs_run(rhs.data() + rhs_digit_begin, ri - rhs_digit_begin);
105 // why: digit runs compare numerically; leading zeros only break exact ties ("1" < "01").
106 const std::string_view lhs_num = lhs_run.substr(std::min(lhs_run.find_first_not_of('0'), lhs_run.size()));
107 const std::string_view rhs_num = rhs_run.substr(std::min(rhs_run.find_first_not_of('0'), rhs_run.size()));
108 if (lhs_num.size() != rhs_num.size())
109 return lhs_num.size() < rhs_num.size() ? -1 : 1;
110 if (const int cmp = lhs_num.compare(rhs_num); cmp != 0)
111 return cmp;
112 // note: fewer-leading-zeros-first is our convention, not an industry standard (impls
113 // diverge here); it only matters as a deterministic total order for unstable std::sort.
114 if (lhs_run.size() != rhs_run.size())
115 return lhs_run.size() < rhs_run.size() ? -1 : 1;
116 continue;
117 }
118
119 const int lower_lhs = std::tolower(lc);
120 const int lower_rhs = std::tolower(rc);
121 if (lower_lhs != lower_rhs)
122 return lower_lhs < lower_rhs ? -1 : 1;
123
124 ++li;
125 ++ri;
126 }
127
128 if (li == lhs.size() && ri == rhs.size())
129 return 0;
130 return li == lhs.size() ? -1 : 1;
131 }

Referenced by compare_plugin_base_order(), compare_plugin_sort_key(), and compare_plugin_version().

Here is the caller graph for this function:

◆ compare_plugin_base_order()

template<class PluginItem>
int Slic3r::GUI::compare_plugin_base_order ( const PluginItem & lhs,
const PluginItem & rhs )
139 {
140 if (const int cmp = compare_ascii_case_insensitive_natural(lhs.display_name, rhs.display_name); cmp != 0)
141 return cmp;
142 if (const int cmp = static_cast<int>(lhs.source) - static_cast<int>(rhs.source); cmp != 0)
143 return cmp;
144 if (const int cmp = static_cast<int>(lhs.status) - static_cast<int>(rhs.status); cmp != 0)
145 return cmp;
146 if (const int cmp = lhs.type_key.compare(rhs.type_key); cmp != 0)
147 return cmp;
148 return lhs.plugin_key.compare(rhs.plugin_key);
149 }
int compare_ascii_case_insensitive_natural(const std::string &lhs, const std::string &rhs)
Definition PluginSort.hpp:84

References compare_ascii_case_insensitive_natural().

Here is the call graph for this function:

◆ compare_plugin_sort_key()

template<class PluginItem>
int Slic3r::GUI::compare_plugin_sort_key ( const PluginItem & lhs,
const PluginItem & rhs,
PluginSortKey sort_key )
174 {
175 switch (sort_key)
176 {
178 // why: PluginStatus/PluginSource declare the dialog sort priority as their ordinal order.
179 return static_cast<int>(lhs.status) - static_cast<int>(rhs.status);
181 return compare_ascii_case_insensitive_natural(lhs.display_name, rhs.display_name);
183 return static_cast<int>(lhs.source) - static_cast<int>(rhs.source);
185 return compare_plugin_version(lhs.sort_version, rhs.sort_version);
187 // why: no primary key - every pair ties here so sort_plugin_items_for_dialog falls
188 // straight to the ascending base order (direction is irrelevant for the baseline).
189 return 0;
190 }
191
192 return 0;
193 }
int compare_plugin_version(const std::string &lhs, const std::string &rhs)
Definition PluginSort.hpp:155
@ Name
Definition PluginSort.hpp:20
@ None
Definition PluginSort.hpp:25

References compare_ascii_case_insensitive_natural(), compare_plugin_version(), Name, None, Source, Status, and Version.

Here is the call graph for this function:

◆ compare_plugin_version()

int Slic3r::GUI::compare_plugin_version ( const std::string & lhs,
const std::string & rhs )
inline
156 {
157 const auto lhs_semver = Semver::parse(lhs);
158 const auto rhs_semver = Semver::parse(rhs);
159 if (lhs_semver && rhs_semver)
160 {
161 if (*lhs_semver < *rhs_semver) return -1;
162 if (*rhs_semver < *lhs_semver) return 1;
163 return 0;
164 }
166 }
static boost::optional< Semver > parse(const std::string &str)
Definition Semver.hpp:63

References compare_ascii_case_insensitive_natural(), and Slic3r::Semver::parse().

Referenced by compare_plugin_sort_key().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_belt_back_transform()

Transform3d Slic3r::GUI::compute_belt_back_transform ( const PrintConfig & cfg)
static
1362{
1363 if (!cfg.belt_printer.value)
1364 return Transform3d::Identity();
1365
1367 mft.init_from_config(cfg);
1368 const Transform3d mf_inv = mft.is_active() ? Transform3d(mft.transform().inverse())
1369 : Transform3d::Identity();
1370
1371 // Forward G-code axis remap as an affine matrix (out_i = sign * in[r_i % 3], plus a
1372 // build-volume offset for Rev axes). This is the matrix form of the per-point
1373 // GCodeWriter::apply_axis_remap (row convention: each OUTPUT axis selects an input
1374 // axis + sign) and MUST stay in sync with it. The build-volume max matches what the
1375 // writer is fed in GCode.cpp (printable_area max + printable_height). (Follow-up:
1376 // precompute this matrix once in GCodeWriter and share it with apply_axis_remap to
1377 // remove the parallel encoding.)
1378 Transform3d ar = Transform3d::Identity();
1379 const int rr[3] = { int(cfg.gcode_remap_x.value), int(cfg.gcode_remap_y.value), int(cfg.gcode_remap_z.value) };
1380 if (rr[0] != 0 || rr[1] != 1 || rr[2] != 2) {
1381 BoundingBoxf bbox_bed(cfg.printable_area.values);
1382 const Vec3d vmax(bbox_bed.max.x(), bbox_bed.max.y(), cfg.printable_height.value);
1383 Matrix3d M = Matrix3d::Zero();
1384 Vec3d t = Vec3d::Zero();
1385 for (int i = 0; i < 3; ++i) {
1386 const int axis = rr[i] % 3;
1387 if (rr[i] < 3) M(i, axis) = 1.0;
1388 else if (rr[i] < 6) M(i, axis) = -1.0;
1389 else { M(i, axis) = -1.0; t[i] = vmax[axis]; }
1390 }
1391 ar.linear() = M;
1392 ar.translation() = t;
1393 }
1394 const Transform3d ar_inv = ar.inverse();
1395
1396 return ar_inv * mf_inv;
1397}
Definition BoundingBox.hpp:257
Definition MachineFrameTransform.hpp:22
const Transform3d & transform() const
Definition MachineFrameTransform.hpp:44
bool is_active() const
Definition MachineFrameTransform.hpp:39
bool init_from_config(const PrintConfig &config)
Definition MachineFrameTransform.cpp:11
Eigen::Matrix< double, 3, 3, Eigen::DontAlign > Matrix3d
Definition Point.hpp:86

References Slic3r::MachineFrameTransform::init_from_config(), Slic3r::MachineFrameTransform::is_active(), Slic3r::BoundingBoxBase< PointType, APointsType >::max, and Slic3r::MachineFrameTransform::transform().

Referenced by Slic3r::GUI::GCodeViewer::load_as_gcode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ concat()

std::vector< std::string > Slic3r::GUI::concat ( std::vector< std::string > const & l,
std::vector< std::string > const & r )
static
3695{
3696 std::vector<std::string> t;
3697 bool l_is_sorted = std::is_sorted(l.begin(), l.end());
3698 bool r_is_sorted = std::is_sorted(r.begin(), r.end());
3699
3700 if (l_is_sorted && r_is_sorted) {
3701 std::set_union(l.begin(), l.end(), r.begin(), r.end(), std::back_inserter(t));
3702 return t;
3703 }
3704
3705 std::vector<std::string> l_sorted = l;
3706 std::vector<std::string> r_sorted = r;
3707 std::sort(l_sorted.begin(), l_sorted.end());
3708 std::sort(r_sorted.begin(), r_sorted.end());
3709 std::set_union(l_sorted.begin(), l_sorted.end(), r_sorted.begin(), r_sorted.end(), std::back_inserter(t));
3710 return t;
3711}

References concat().

Referenced by Slic3r::GUI::TabPrintLayer::TabPrintLayer(), Slic3r::GUI::TabPrintObject::TabPrintObject(), Slic3r::GUI::TabPrintPlate::TabPrintPlate(), concat(), Slic3r::GUI::TabPrintModel::on_value_change(), Slic3r::GUI::TabPrintPlate::on_value_change(), Slic3r::GUI::TabPrintModel::reload_config(), Slic3r::GUI::TabPrintModel::update_custom_dirty(), and Slic3r::GUI::TabPrintModel::update_model_config().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ concat_strings()

std::string Slic3r::GUI::concat_strings ( const std::set< std::string > & strings,
const std::string & delim = "\n" )
static
811{
812 return std::accumulate(
813 strings.begin(), strings.end(), std::string(""),
814 [delim](const std::string &s, const std::string &name) {
815 return s + name + delim;
816 });
817}

Referenced by Slic3r::GUI::ArrangeJob::finalize().

Here is the caller graph for this function:

◆ CONFIG_UPDATE_WIKI_URL()

const std::string Slic3r::GUI::CONFIG_UPDATE_WIKI_URL ( "" )
static

◆ confirm_create_decompose_missing_components()

bool Slic3r::GUI::confirm_create_decompose_missing_components ( wxWindow * parent,
const std::vector< DecomposeMissingComponent > & missing )
396{
397 if (missing.empty())
398 return true;
399
400 static const char* config_key = "not_show_color_decompose_missing_component_tip";
401 if (wxGetApp().app_config->get(config_key) == "1") {
402 return true;
403 }
404
405 wxString missing_text;
406 for (size_t i = 0; i < missing.size(); ++i) {
407 if (i > 0)
408 missing_text += _L(", ");
409 missing_text += missing[i].display_name;
410 }
411
412 wxString message = wxString::Format(_L_PLURAL("The current filament list does not contain %s. A project filament required by "
413 "the mixed filament will be created automatically after decomposition.",
414 "The current filament list does not contain %s. Project filaments required by "
415 "the mixed filament will be created automatically after decomposition.",
416 missing.size()),
417 missing_text);
418
419 MessageDialog dlg(parent, message, _L("Tip"), wxOK | wxCANCEL | wxICON_INFORMATION);
420 dlg.show_dsa_button();
421 int res = dlg.ShowModal();
422 if (res == wxID_OK && dlg.get_checkbox_state())
423 wxGetApp().app_config->set(config_key, "1");
424 return res == wxID_OK;
425}

References _L, _L_PLURAL, Slic3r::GUI::MsgDialog::get_checkbox_state(), Slic3r::GUI::MsgDialog::show_dsa_button(), and Slic3r::GUI::DPIAware< P >::ShowModal().

Referenced by Slic3r::GUI::Sidebar::decompose_filament_color().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ constraint_id()

int Slic3r::GUI::constraint_id ( int grabber_id)
static
195{
196 static const std::vector<int> id_map = {1, 0, 3, 2, 5, 4, 8, 9, 6, 7};
197 return (0 <= grabber_id && grabber_id < (int) id_map.size()) ? id_map[grabber_id] : -1;
198}

Referenced by Slic3r::GUI::GLGizmoScale3D::on_start_dragging().

Here is the caller graph for this function:

◆ constraint_reject_text()

wxString Slic3r::GUI::constraint_reject_text ( ConstraintReject reason,
SketchConstraintType type )
static
8411{
8412 using T = SketchConstraintType;
8413 switch (reason) {
8414 case ConstraintReject::NeedOneEntity: return _L("Pick an entity first");
8415 case ConstraintReject::NeedTwoEntities: return _L("Pick two entities first");
8416 case ConstraintReject::NeedALine: return _L("Horizontal and Vertical apply to a line");
8418 if (type == T::Angle) return _L("Angle applies between two lines");
8419 if (type == T::Collinear) return _L("Collinear needs two lines");
8420 return _L("Parallel, perpendicular and equal length apply to two lines");
8422 if (type == T::EqualRadius) return _L("Equal radius needs two circles or arcs");
8423 return _L("Concentric needs two circles or arcs");
8424 case ConstraintReject::NeedTangentPair: return _L("Tangent needs a line and a circle/arc, or two circles/arcs");
8425 case ConstraintReject::NeedJoinablePoints: return _L("This constraint needs two entities with a point to join");
8426 case ConstraintReject::NeedMeasurablePoints: return _L("This dimension needs two entities with a point to measure between");
8427 case ConstraintReject::NeedPointAndLine: return _L("Midpoint needs a point and a line");
8429 if (type == T::Symmetric) return _L("Symmetric needs two points or two lines + an axis");
8430 return _L("Symmetric needs two points or two lines");
8431 case ConstraintReject::NeedAxisLine: return _L("Symmetric: pick two entities, then an axis line");
8432 case ConstraintReject::NeedRound: return _L("Radius/Diameter needs a circle or arc");
8433 case ConstraintReject::Unsupported: return _L("Unsupported constraint");
8435 default: return wxString();
8436 }
8437}
SketchConstraintType
Definition SketchEngine.hpp:100
@ NeedMeasurablePoints
Definition SketchEngine.hpp:181
@ NeedTwoRounds
Definition SketchEngine.hpp:181
@ NeedRound
Definition SketchEngine.hpp:187
@ NeedJoinablePoints
Definition SketchEngine.hpp:181
@ NeedTwoEntities
Definition SketchEngine.hpp:180
@ NeedTwoPointsOrLines
Definition SketchEngine.hpp:185
@ NeedTwoLines
Definition SketchEngine.hpp:180
@ Unsupported
Definition SketchEngine.hpp:188
@ NeedOneEntity
Definition SketchEngine.hpp:180
@ NeedPointAndLine
Definition SketchEngine.hpp:184
@ NeedTangentPair
Definition SketchEngine.hpp:181
@ NeedAxisLine
Definition SketchEngine.hpp:186
@ NeedALine
Definition SketchEngine.hpp:180

References _L, Slic3r::NeedALine, Slic3r::NeedAxisLine, Slic3r::NeedJoinablePoints, Slic3r::NeedMeasurablePoints, Slic3r::NeedOneEntity, Slic3r::NeedPointAndLine, Slic3r::NeedRound, Slic3r::NeedTangentPair, Slic3r::NeedTwoEntities, Slic3r::NeedTwoLines, Slic3r::NeedTwoPointsOrLines, Slic3r::NeedTwoRounds, Slic3r::None, and Slic3r::Unsupported.

Referenced by Slic3r::GUI::DesignPanel::apply_entity_constraint(), and Slic3r::GUI::DesignPanel::apply_live_constraint().

Here is the caller graph for this function:

◆ construct_error_string()

bool Slic3r::GUI::construct_error_string ( ObjectFilamentResults & object_result,
std::string & error_string )
static
1861{
1862 error_string.clear();
1863 if (!object_result.partly_outside_objects.empty()) {
1864 error_string += _u8L("Following objects are laid over the boundary of plate or exceeds the height limit:\n");
1865 for(auto& object: object_result.partly_outside_objects)
1866 {
1867 error_string += object->name;
1868 error_string += "\n";
1869 }
1870 error_string += _u8L("Please solve the problem by moving it totally on or off the plate, and confirming that the height is within the build volume.\n");
1871 return true;
1872 }
1873 return false;
1874}
std::vector< ModelObject * > partly_outside_objects
Definition 3DScene.hpp:82

References _u8L, and Slic3r::ObjectFilamentResults::partly_outside_objects.

Referenced by Slic3r::GUI::GLCanvas3D::check_volumes_outside_state(), and Slic3r::GUI::GLCanvas3D::reload_scene().

Here is the caller graph for this function:

◆ construct_extruder_unprintable_error()

std::pair< bool, bool > Slic3r::GUI::construct_extruder_unprintable_error ( ObjectFilamentResults & object_result,
std::string & left_extruder_unprintable_text,
std::string & right_extruder_unprintable_text )
static
1877{
1878 left_extruder_unprintable_text.clear();
1879 right_extruder_unprintable_text.clear();
1880 if (object_result.filaments.empty())
1881 return {false,false};
1882
1883 const std::vector<std::string> nozzle_name_list = { _u8L("left nozzle"), _u8L("right nozzle") };
1884
1885 std::vector<ObjectFilamentInfo> left_unprintable_objects;
1886 std::vector<ObjectFilamentInfo> right_unprintable_objects;
1887
1888 std::vector<int> conflicted_filaments = object_result.filaments;
1889
1890 auto mode = object_result.mode;
1891
1892 for (auto& obj_filament : object_result.object_filaments) {
1893 bool found_left = false;
1894 bool found_right = false;
1895
1896 if (mode == FilamentMapMode::fmmManual) {
1897 for (auto& elem : obj_filament.manual_filaments) {
1898 int extruder_id = elem.second;
1899 if (extruder_id == 1) {
1900 found_left = true;
1901 }
1902 if (extruder_id == 2) {
1903 found_right = true;
1904 }
1905 }
1906 }
1907 else {
1908 if (!obj_filament.auto_filaments.empty()) {
1909 found_left = true;
1910 found_right = true;
1911 }
1912 }
1913
1914 if (found_left)
1915 left_unprintable_objects.emplace_back(obj_filament);
1916 if (found_right)
1917 right_unprintable_objects.emplace_back(obj_filament);
1918 }
1919
1920 Preset &preset = GUI::wxGetApp().preset_bundle->printers.get_edited_preset();
1921 float left_x_min = 0, left_x_max = 0, left_y_min = 0, left_y_max = 0, left_z_min = 0, left_z_max = 0;
1922 float right_x_min = 0, right_x_max = 0, right_y_min = 0, right_y_max = 0, right_z_min = 0, right_z_max = 0;
1923 auto printable_height_option = preset.config.option<ConfigOptionFloatsNullable>("extruder_printable_height");
1924 if (printable_height_option && printable_height_option->values.size() == 2) {
1925 left_z_max = (float) printable_height_option->values[0];
1926 right_z_max = (float) printable_height_option->values[1];
1927 }
1928 std::vector<Pointfs> printable_areas = preset.config.option<ConfigOptionPointsGroups>("extruder_printable_area")->values;
1929 if (printable_areas.size() == 2 && printable_areas[0].size() == 4) {
1930 left_x_min = printable_areas[0][0][0];
1931 left_y_min = printable_areas[0][0][1];
1932 left_x_max = printable_areas[0][2][0];
1933 left_y_max = printable_areas[0][2][1];
1934
1935 right_x_min = printable_areas[1][0][0];
1936 right_y_min = printable_areas[1][0][1];
1937 right_x_max = printable_areas[1][2][0];
1938 right_y_max = printable_areas[1][2][1];
1939 }
1940
1941 std::vector<std::string> tips(2);
1942 for (size_t idx = 0; idx < tips.size(); ++idx) {
1943 const auto& unprintable_objs = idx == 0 ? left_unprintable_objects : right_unprintable_objects;
1944 auto& output_text = idx == 0 ? left_extruder_unprintable_text : right_extruder_unprintable_text;
1945 if (unprintable_objs.empty())
1946 continue;
1947 std::string nozzle_name = nozzle_name_list[idx];
1948 std::string model_prefix;
1949 if ((idx == 0 && left_unprintable_objects.size() > 1) || (idx == 1 && right_unprintable_objects.size() > 1))
1950 model_prefix = (boost::format(_u8L("The position or size of some models exceeds the %s's printable range.")) % nozzle_name).str();
1951 else
1952 model_prefix = (boost::format(_u8L("The position or size of the model %s exceeds the %s's printable range."))
1953 %unprintable_objs.front().object->name % nozzle_name).str();
1954 tips[idx] += model_prefix;
1955
1956 tips[idx] += (boost::format(_u8L(" Please check and adjust the part's position or size to fit the printable range:\n"))).str();
1957 if (idx == 0)
1958 tips[idx] += (boost::format(_u8L("Left nozzle: X:%1%-%2%, Y:%3%-%4%, Z:%5%-%6%\n"))
1959 % format_number(left_x_min) % format_number(left_x_max) % format_number(left_y_min)
1960 % format_number(left_y_max) % format_number(left_z_min) % format_number(left_z_max)).str();
1961 else
1962 tips[idx] += (boost::format(_u8L("Right nozzle: X:%1%-%2%, Y:%3%-%4%, Z:%5%-%6%"))
1963 %format_number(right_x_min) %format_number(right_x_max) %format_number(right_y_min)
1964 %format_number(right_y_max) %format_number(right_z_min) %format_number(right_z_max)).str();
1965 output_text = tips[idx];
1966 }
1967
1968 return { !left_unprintable_objects.empty(),!right_unprintable_objects.empty() };
1969}
static std::string format_number(float value)
Definition GLCanvas3D.cpp:295
std::vector< int > filaments
Definition 3DScene.hpp:80
std::vector< ObjectFilamentInfo > object_filaments
Definition 3DScene.hpp:84
FilamentMapMode mode
Definition 3DScene.hpp:79
@ fmmManual
Definition PrintConfig.hpp:635

References _u8L, Slic3r::Preset::config, Slic3r::ObjectFilamentResults::filaments, Slic3r::fmmManual, format_number(), Slic3r::ObjectFilamentResults::mode, Slic3r::ObjectFilamentResults::object_filaments, and Slic3r::ConfigBase::option().

Referenced by Slic3r::GUI::GLCanvas3D::check_volumes_outside_state(), and Slic3r::GUI::GLCanvas3D::reload_scene().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ contains()

bool Slic3r::GUI::contains ( const BuildVolume & volume,
const GLModel & model,
bool ignore_bottom )
878{
879 static constexpr const double epsilon = BuildVolume::BedEpsilon;
880 switch (volume.type()) {
882 {
884 if (volume.printable_height() == 0.0)
885 build_volume.max.z() = std::numeric_limits<double>::max();
886 if (ignore_bottom)
887 build_volume.min.z() = -std::numeric_limits<double>::max();
888 const BoundingBoxf3& model_box = model.get_bounding_box();
889 return build_volume.contains(model_box.min) && build_volume.contains(model_box.max);
890 }
892 {
893 const Geometry::Circled& circle = volume.circle();
894 const Vec2f c = unscaled<float>(circle.center);
895 const float r = unscaled<double>(circle.radius) + float(epsilon);
896 const float r2 = sqr(r);
897 return volume.printable_height() == 0.0 ?
898 all_vertices_inside(model.get_geometry(), [c, r2](const Vec3f& p) { return (to_2d(p) - c).squaredNorm() <= r2; }) :
899
900 all_vertices_inside(model.get_geometry(), [c, r2, z = volume.printable_height() + epsilon](const Vec3f& p) { return (to_2d(p) - c).squaredNorm() <= r2 && p.z() <= z; });
901 }
903 //FIXME doing test on convex hull until we learn to do test on non-convex polygons efficiently.
905 return volume.printable_height() == 0.0 ?
906 all_vertices_inside(model.get_geometry(), [&volume](const Vec3f& p) { return Geometry::inside_convex_polygon(volume.top_bottom_convex_hull_decomposition_bed(), to_2d(p).cast<double>()); }) :
907 all_vertices_inside(model.get_geometry(), [&volume, z = volume.printable_height() + epsilon](const Vec3f& p) { return Geometry::inside_convex_polygon(volume.top_bottom_convex_hull_decomposition_bed(), to_2d(p).cast<double>()) && p.z() <= z; });
908 default:
909 return true;
910 }
911}
Definition BoundingBox.hpp:117
BoundingBox3Base< PointType > inflated(coordf_t delta) const
Definition BoundingBox.hpp:157
bool contains(const PointType &point) const
Definition BoundingBox.hpp:161
PointType max
Definition BoundingBox.hpp:21
PointType min
Definition BoundingBox.hpp:20
static constexpr const double BedEpsilon
Definition BuildVolume.hpp:121
const BoundingBoxf3 & bounding_volume() const
Definition BuildVolume.hpp:82
const Geometry::Circled & circle() const
Definition BuildVolume.hpp:91
BuildVolume_Type type() const
Definition BuildVolume.hpp:72
const std::pair< std::vector< Vec2d >, std::vector< Vec2d > > & top_bottom_convex_hull_decomposition_bed() const
Definition BuildVolume.hpp:134
double printable_height() const
Definition BuildVolume.hpp:66
const Geometry & get_geometry() const
Definition GLModel.hpp:171
const BoundingBoxf3 & get_bounding_box() const
Definition GLModel.hpp:190
bool all_vertices_inside(const GLModel::Geometry &geometry, Fn fn)
Definition GLModel.cpp:860
constexpr double epsilon()
Definition IMSlider.hpp:31
Circle< Vec2d > Circled
Definition Circle.hpp:96
bool inside_convex_polygon(const std::pair< std::vector< Vec2d >, std::vector< Vec2d > > &top_bottom_decomposition, const Vec2d &pt)
Definition ConvexHull.cpp:392
Eigen::Matrix< typename Derived::Scalar, 2, 1, Eigen::DontAlign > to_2d(const Eigen::MatrixBase< Derived > &ptN)
Definition Point.hpp:147
@ Circle
Definition BuildVolume.hpp:25
@ Convex
Definition BuildVolume.hpp:27
@ Custom
Definition BuildVolume.hpp:29
@ Rectangle
Definition BuildVolume.hpp:23
constexpr Eigen::Matrix< Tout, 2, EigenArgs... > unscaled(const Slic3r::Point &v) noexcept
Definition Arrange.cpp:81
constexpr T sqr(T x)
Definition libslic3r.h:301
zaa_minimize_perimeter_height printable_height((ConfigOptionFloatsNullable, extruder_printable_height))((ConfigOptionPoint
auto cast(const BoundingBoxBase< Tin > &b)
Definition BoundingBox.hpp:299
Vector center
Definition Circle.hpp:70
Scalar radius
Definition Circle.hpp:71

References all_vertices_inside(), Slic3r::BuildVolume::BedEpsilon, Slic3r::BuildVolume::bounding_volume(), Slic3r::Geometry::Circle< Vector >::center, Slic3r::Circle, Slic3r::BuildVolume::circle(), Slic3r::BoundingBox3Base< PointType >::contains(), Slic3r::Convex, Slic3r::Custom, epsilon(), Slic3r::GUI::GLModel::get_bounding_box(), Slic3r::GUI::GLModel::get_geometry(), Slic3r::BoundingBox3Base< PointType >::inflated(), Slic3r::BoundingBoxBase< PointType, APointsType >::max, Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::max, Slic3r::BoundingBoxBase< PointType, APointsType >::min, Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::min, Slic3r::BuildVolume::printable_height(), Slic3r::Geometry::Circle< Vector >::radius, Slic3r::Rectangle, Slic3r::sqr(), Slic3r::BuildVolume::type(), and Slic3r::unscaled().

Here is the call graph for this function:

◆ context_bit()

uint8_t Slic3r::GUI::context_bit ( ShortcutContext context)
constexpr
23{ return uint8_t(1u << unsigned(context)); }

Referenced by Slic3r::GUI::ShortcutCaptureDialog::ShortcutCaptureDialog(), Slic3r::GUI::ShortcutRegistry::lookup(), Slic3r::GUI::ShortcutRegistry::match(), Slic3r::GUI::ShortcutCaptureDialog::record(), and shortcuts_in().

Here is the caller graph for this function:

◆ convert_face_colors()

void Slic3r::GUI::convert_face_colors ( const std::vector< std::array< std::size_t, 3 > > & src,
std::vector< std::array< float, 3 > > & dst )
static
1191{
1192 dst.resize(src.size());
1193 for (size_t i = 0; i < src.size(); ++i)
1194 dst[i] = { src[i][0] / 255.f, src[i][1] / 255.f, src[i][2] / 255.f };
1195}

Referenced by Slic3r::GUI::TexturePreviewCanvas::set_face_colors(), and Slic3r::GUI::TexturePreviewCanvas::set_original_face_colors().

Here is the caller graph for this function:

◆ convert_input()

double Slic3r::GUI::convert_input ( int coord_byte_low,
int coord_byte_high,
double deadzone )
static
1379{
1380 int value = coord_byte_low | (coord_byte_high << 8);
1381 if (value >= 32768)
1382 value = value - 65536;
1383 double ret = (double)value / 350.0;
1384 return (std::abs(ret) > deadzone) ? ret : 0.0;
1385}

Referenced by Slic3r::GUI::Mouse3DController::handle_packet_rotation(), and Slic3r::GUI::Mouse3DController::handle_packet_translation().

Here is the caller graph for this function:

◆ convert_newlines_to_br()

std::string Slic3r::GUI::convert_newlines_to_br ( const std::string & text)
static
164 {
165 std::string result = text;
166 size_t pos = 0;
167 while ((pos = result.find('\n', pos)) != std::string::npos) {
168 result.replace(pos, 1, "<br>");
169 pos += 4;
170 }
171 return result;
172}

Referenced by Slic3r::GUI::ProjectPanel::on_reload().

Here is the caller graph for this function:

◆ convert_to_rgba()

RGBA Slic3r::GUI::convert_to_rgba ( const wxColour & color)
19{
20 RGBA rgba;
21 rgba[0] = std::clamp(color.Red() / 255.f, 0.f, 1.f);
22 rgba[1] = std::clamp(color.Green() / 255.f, 0.f, 1.f);
23 rgba[2] = std::clamp(color.Blue() / 255.f, 0.f, 1.f);
24 rgba[3] = std::clamp(color.Alpha() / 255.f, 0.f, 1.f);
25 return rgba;
26}
std::array< float, 4 > RGBA
Definition Color.hpp:13

◆ convert_to_wxColour()

wxColour Slic3r::GUI::convert_to_wxColour ( const RGBA & color)
9{
10 auto r = std::clamp((int) (color[0] * 255.f), 0, 255);
11 auto g = std::clamp((int) (color[1] * 255.f), 0, 255);
12 auto b = std::clamp((int) (color[2] * 255.f), 0, 255);
13 auto a = std::clamp((int) (color[3] * 255.f), 0, 255);
14 wxColour wx_color(r, g, b, a);
15 return wx_color;
16}

◆ copy_file_gui()

CopyFileResult Slic3r::GUI::copy_file_gui ( const std::string & from,
const std::string & to,
std::string & error_message,
const bool with_check )
72{
73#ifdef WIN32
74 //still has exceptions
75 /*wxString src = from_u8(from);
76 wxString dest = from_u8(to);
77
78 bool result = CopyFile(src.wc_str(), dest.wc_str(), false);
79 if (!result) {
80 DWORD errCode = GetLastError();
81 error_message = "Error: " + errCode;
82 return FAIL_COPY_FILE;
83 }
84 return SUCCESS;*/
85
86 wxString src = from_u8(from);
87 wxString dest = from_u8(to);
88 BOOL result;
89 char* buff = nullptr;
90 HANDLE handlesrc = nullptr;
91 HANDLE handledst = nullptr;
93 DWORD size = 0;
94 DWORD dwRead = 0, dwWrite = 0;
95
96 handlesrc = CreateFile(src.wc_str(),
97 GENERIC_READ,
98 FILE_SHARE_READ,
99 NULL,
100 OPEN_EXISTING,
101 FILE_ATTRIBUTE_TEMPORARY,
102 0);
103 if(handlesrc==INVALID_HANDLE_VALUE){
104 error_message = "Error: open src file";
105 ret = FAIL_COPY_FILE;
106 goto __finished;
107 }
108
109 handledst=CreateFile(dest.wc_str(),
110 GENERIC_WRITE,
111 FILE_SHARE_READ,
112 NULL,
113 CREATE_ALWAYS,
114 FILE_ATTRIBUTE_TEMPORARY,
115 0);
116 if(handledst==INVALID_HANDLE_VALUE){
117 error_message = "Error: create dest file";
118 ret = FAIL_COPY_FILE;
119 goto __finished;
120 }
121
122 size = GetFileSize(handlesrc,NULL);
123 buff = new char[size+1];
124 result = ReadFile(handlesrc, buff, size, &dwRead, NULL);
125 if (!result) {
126 DWORD errCode = GetLastError();
127 error_message = "Error: " + std::to_string(errCode);
128 ret = FAIL_COPY_FILE;
129 goto __finished;
130 }
131 buff[size]=0;
132 result = WriteFile(handledst,buff,size,&dwWrite,NULL);
133 if (!result) {
134 DWORD errCode = GetLastError();
135 error_message = "Error: " + std::to_string(errCode);
136 ret = FAIL_COPY_FILE;
137 goto __finished;
138 }
139
140__finished:
141 if (handlesrc)
142 CloseHandle(handlesrc);
143 if (handledst)
144 CloseHandle(handledst);
145 if (buff)
146 delete[] buff;
147
148 return ret;
149#else
150 return copy_file(from, to, error_message, with_check);
151#endif
152}
CopyFileResult
Definition Utils.hpp:259
@ FAIL_COPY_FILE
Definition Utils.hpp:261
@ SUCCESS
Definition Utils.hpp:260

References Slic3r::copy_file(), Slic3r::FAIL_COPY_FILE, from_u8(), and Slic3r::SUCCESS.

Here is the call graph for this function:

◆ count_decompose_new_physical_filaments()

size_t Slic3r::GUI::count_decompose_new_physical_filaments ( const ColorDecomposeResult & result,
const std::vector< std::string > & physical_colors,
const std::vector< std::string > & physical_types,
size_t source_physical_idx,
const std::vector< size_t > * physical_config_indices )
361{
362 if (result.mode != DecomposeMode::CMYW && result.mode != DecomposeMode::RYBW)
363 return 0;
364
365 std::vector<size_t> fallback_indices;
366 const std::vector<size_t>* indices = physical_config_indices;
367 if (!indices) {
368 fallback_indices.resize(physical_colors.size());
369 for (size_t i = 0; i < fallback_indices.size(); ++i)
370 fallback_indices[i] = i;
371 indices = &fallback_indices;
372 }
373
374 size_t source_config_idx = size_t(-1);
375 if (source_physical_idx < indices->size())
376 source_config_idx = (*indices)[source_physical_idx];
377
378 const std::string basic_type =
379 decompose_basic_type_from_source(source_config_idx, source_physical_idx, physical_types);
380
381 size_t missing_count = 0;
382 for (const DecomposeComponent& comp : result.components) {
383 if (comp.base_color == DecomposeBaseColor::None)
384 continue;
385 DecomposeOfficialComponent official_component =
386 lookup_decompose_official_component(basic_type, comp.base_color, comp.colour);
387 int existing_idx = find_existing_decompose_component(official_component, physical_colors,
388 *indices, source_config_idx);
389 if (existing_idx <= 0)
390 ++missing_count;
391 }
392 return missing_count;
393}
std::vector< DecomposeComponent > components
Definition ColorDecomposeDialog.hpp:50
@ None
Definition ColorDecomposeDialog.hpp:30
DecomposeMode mode
Definition ColorDecomposeDialog.hpp:48
int find_existing_decompose_component(const DecomposeOfficialComponent &component, const std::vector< std::string > &physical_colors, const std::vector< size_t > &physical_config_indices, size_t source_config_idx)
Definition ColorDecomposeSupport.cpp:236
std::string decompose_basic_type_from_source(size_t source_config_idx, size_t source_physical_idx, const std::vector< std::string > &physical_types)
Definition ColorDecomposeSupport.cpp:72
DecomposeOfficialComponent lookup_decompose_official_component(const std::string &basic_type, DecomposeBaseColor base_color, const wxColour &fallback)
Definition ColorDecomposeSupport.cpp:140

References Slic3r::GUI::DecomposeComponent::base_color, Slic3r::GUI::DecomposeComponent::colour, Slic3r::GUI::ColorDecomposeResult::components, decompose_basic_type_from_source(), find_existing_decompose_component(), lookup_decompose_official_component(), Slic3r::GUI::ColorDecomposeResult::mode, and None.

Referenced by Slic3r::GUI::ColorDecomposeDialog::update_filament_limit_warning().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_checkbox() [1/3]

wxBoxSizer * Slic3r::GUI::create_checkbox ( wxWindow * parent,
Preset * preset,
wxString & preset_name,
std::vector< std::pair<::CheckBox *, Preset * > > & preset_checkbox )
static
361{
362 wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
363 ::CheckBox * checkbox = new ::CheckBox(parent);
364 sizer->Add(checkbox, 0, 0, 0);
365 preset_checkbox.push_back(std::make_pair(checkbox, preset));
366 wxStaticText *preset_name_str = new wxStaticText(parent, wxID_ANY, preset_name);
367 wxToolTip * toolTip = new wxToolTip(preset_name);
368 preset_name_str->SetToolTip(toolTip);
369 sizer->Add(preset_name_str, 0, wxLEFT, 5);
370 return sizer;
371}
class WXDLLIMPEXP_FWD_CORE wxStaticText
Definition ProgressDialog.hpp:30
Definition Field.hpp:363

References wxStaticText.

Referenced by Slic3r::GUI::CreateFilamentPresetDialog::create_filament_preset_item(), Slic3r::GUI::ExportConfigsDialog::select_curr_radiobox(), and Slic3r::GUI::CreatePrinterPresetDialog::update_presets_list().

Here is the caller graph for this function:

◆ create_checkbox() [2/3]

wxBoxSizer * Slic3r::GUI::create_checkbox ( wxWindow * parent,
std::string & compatible_printer,
Preset * preset,
std::unordered_map<::CheckBox *, std::pair< std::string, Preset * > > & ptinter_compatible_filament_preset )
static
374{
375 wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
376 ::CheckBox *checkbox = new ::CheckBox(parent);
377 sizer->Add(checkbox, 0, 0, 0);
378 ptinter_compatible_filament_preset[checkbox] = std::make_pair(compatible_printer, preset);
379 wxStaticText *preset_name_str = new wxStaticText(parent, wxID_ANY, wxString::FromUTF8(compatible_printer));
380 sizer->Add(preset_name_str, 0, wxLEFT, 5);
381 return sizer;
382}

References wxStaticText.

◆ create_checkbox() [3/3]

wxBoxSizer * Slic3r::GUI::create_checkbox ( wxWindow * parent,
wxString & preset_name,
std::vector< std::pair<::CheckBox *, std::string > > & preset_checkbox )
static
385{
386 wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
387 ::CheckBox *checkbox = new ::CheckBox(parent);
388 sizer->Add(checkbox, 0, 0, 0);
389 preset_checkbox.push_back(std::make_pair(checkbox, into_u8(preset_name)));
390 wxStaticText *preset_name_str = new wxStaticText(parent, wxID_ANY, preset_name);
391 sizer->Add(preset_name_str, 0, wxLEFT, 5);
392 return sizer;
393}

References into_u8(), and wxStaticText.

Here is the call graph for this function:

◆ create_color_swatch()

wxPanel * Slic3r::GUI::create_color_swatch ( wxWindow * parent,
const wxColour & color,
int size )
static
337{
338 auto* panel = new wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(size, size));
339 panel->SetBackgroundColour(color);
340 panel->SetMinSize(wxSize(size, size));
341 panel->SetBackgroundStyle(wxBG_STYLE_PAINT);
342 panel->Bind(wxEVT_PAINT, [panel](wxPaintEvent&) {
343 wxAutoBufferedPaintDC dc(panel);
344 wxSize sz = panel->GetClientSize();
345 wxColour c = panel->GetBackgroundColour();
346 dc.SetPen(*wxTRANSPARENT_PEN);
347 dc.SetBrush(wxBrush(c));
348 dc.DrawRectangle(0, 0, sz.GetWidth(), sz.GetHeight());
349 // Mirror sidebar (FilamentBitmapUtils::create_single_filament_bitmap):
350 // gray border for near-white in light mode so white swatches stay
351 // visible on a white background; light border for near-black in dark mode.
352 const bool light_mode = !wxGetApp().dark_mode();
353 if ((light_mode && c.Red() > 224 && c.Green() > 224 && c.Blue() > 224) ||
354 (!light_mode && c.Red() < 45 && c.Green() < 45 && c.Blue() < 45)) {
355 dc.SetBrush(*wxTRANSPARENT_BRUSH);
356 dc.SetPen(wxPen(light_mode ? wxColour(130, 130, 128) : wxColour(207, 207, 207),
357 1, wxPENSTYLE_SOLID));
358 dc.DrawRectangle(0, 0, sz.GetWidth(), sz.GetHeight());
359 }
360 });
361 return panel;
362}

Referenced by Slic3r::GUI::ColorDecomposeDialog::create_target_color_section(), and Slic3r::GUI::ColorDecomposeDialog::update_mode_card_content().

Here is the caller graph for this function:

◆ create_combochecklist()

void Slic3r::GUI::create_combochecklist ( wxComboCtrl * comboCtrl,
const std::string & text,
const std::string & items )
469{
470 if (comboCtrl == nullptr)
471 return;
472 wxGetApp().UpdateDarkUI(comboCtrl);
473
475 if (popup != nullptr) {
476 // FIXME If the following line is removed, the combo box popup list will not react to mouse clicks.
477 // On the other side, with this line the combo box popup cannot be closed by clicking on the combo button on Windows 10.
478 comboCtrl->UseAltPopupWindow();
479
480 int max_width = 0;
481
482 // the following line messes up the popup size the first time it is shown on wxWidgets 3.1.3
483// comboCtrl->EnablePopupAnimation(false);
484#ifdef _WIN32
485 popup->SetFont(comboCtrl->GetFont());
486#endif // _WIN32
487 comboCtrl->SetPopupControl(popup);
488 wxString title = from_u8(text);
489 max_width = std::max(max_width, 60 + comboCtrl->GetTextExtent(title).x);
490 popup->SetStringValue(title);
491 popup->Bind(wxEVT_CHECKLISTBOX, [popup](wxCommandEvent& evt) { popup->OnCheckListBox(evt); });
492 popup->Bind(wxEVT_LISTBOX, [popup](wxCommandEvent& evt) { popup->OnListBoxSelection(evt); });
493 popup->Bind(wxEVT_KEY_DOWN, [popup](wxKeyEvent& evt) { popup->OnKeyEvent(evt); });
494 popup->Bind(wxEVT_KEY_UP, [popup](wxKeyEvent& evt) { popup->OnKeyEvent(evt); });
495
496 std::vector<std::string> items_str;
497 boost::split(items_str, items, boost::is_any_of("|"), boost::token_compress_off);
498
499 // each item must be composed by 2 parts
500 assert(items_str.size() %2 == 0);
501
502 for (size_t i = 0; i < items_str.size(); i += 2) {
503 wxString label = from_u8(items_str[i]);
504 max_width = std::max(max_width, 60 + popup->GetTextExtent(label).x);
505 popup->Append(label);
506 popup->Check(i / 2, items_str[i + 1] == "1");
507 }
508
509 comboCtrl->SetMinClientSize(wxSize(max_width, -1));
510 wxGetApp().UpdateDarkUI(popup);
511 }
512}
virtual void OnKeyEvent(wxKeyEvent &evt)
Definition wxExtensions.cpp:259
virtual void SetStringValue(const wxString &value)
Definition wxExtensions.cpp:222
void OnCheckListBox(wxCommandEvent &evt)
Definition wxExtensions.cpp:291
void OnListBoxSelection(wxCommandEvent &evt)
Definition wxExtensions.cpp:318

References from_u8(), wxCheckListBoxComboPopup::OnCheckListBox(), wxCheckListBoxComboPopup::OnKeyEvent(), wxCheckListBoxComboPopup::OnListBoxSelection(), and wxCheckListBoxComboPopup::SetStringValue().

Here is the call graph for this function:

◆ create_condition()

RaycastManager::AllowVolumes Slic3r::GUI::create_condition ( const ModelVolumePtrs & volumes,
const ObjectID & disallowed_volume_id )

Create condition to allowe only parts from volumes without one given.

Parameters
volumesList of allowed volumes included one which is dissalowed and non parts
disallowed_volume_idDisallowed volume
Returns
Condition
376 {
377 std::vector<size_t> allowed_volumes_id;
378 if (volumes.size() > 1) {
379 allowed_volumes_id.reserve(volumes.size() - 1);
380 for (const ModelVolume *v : volumes) {
381 // drag only above part not modifiers or negative surface
382 if (!v->is_model_part())
383 continue;
384
385 // skip actual selected object
386 if (v->id() == disallowed_volume_id)
387 continue;
388
389 allowed_volumes_id.emplace_back(v->id().id);
390 }
391 }
392 return RaycastManager::AllowVolumes(allowed_volumes_id);
393}

Referenced by calc_distance(), and anonymous_namespace{SurfaceDrag.cpp}::start_dragging().

Here is the caller graph for this function:

◆ create_dual_filament_bitmap()

wxBitmap Slic3r::GUI::create_dual_filament_bitmap ( const wxColour & color1,
const wxColour & color2,
const wxSize & size )
static
314{
315 BitmapDC bdc = init_bitmap_dc(size);
316
317 int half_width = size.GetWidth() / 2;
318
319 bdc.dc.SetBrush(wxBrush(color1));
320 bdc.dc.DrawRectangle(0, 0, half_width, size.GetHeight());
321
322 bdc.dc.SetBrush(wxBrush(color2));
323 bdc.dc.DrawRectangle(half_width, 0, size.GetWidth() - half_width, size.GetHeight());
324
325 bdc.dc.SelectObject(wxNullBitmap);
326 return bdc.bitmap;
327}
static BitmapDC init_bitmap_dc(const wxSize &size)
Definition FilamentBitmapUtils.cpp:218
Definition FilamentBitmapUtils.cpp:204
wxBitmap bitmap
Definition FilamentBitmapUtils.cpp:205
wxMemoryDC dc
Definition FilamentBitmapUtils.cpp:206

References Slic3r::GUI::BitmapDC::bitmap, Slic3r::GUI::BitmapDC::dc, and init_bitmap_dc().

Referenced by create_filament_bitmap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_filament_bitmap()

wxBitmap Slic3r::GUI::create_filament_bitmap ( const std::vector< wxColour > & colors,
const wxSize & size,
bool force_gradient )
416{
417 if (colors.empty()) return wxNullBitmap;
418
419 if (force_gradient && colors.size() >= 2) {
420 return create_gradient_filament_bitmap(colors, size);
421 }
422
423 switch (colors.size()) {
424 case 1: return create_single_filament_bitmap(colors[0], size);
425 case 2: return create_dual_filament_bitmap(colors[0], colors[1], size);
426 case 3: return create_triple_filament_bitmap(colors, size);
427 case 4: return create_quadruple_filament_bitmap(colors, size);
428 default: return create_gradient_filament_bitmap(colors, size);
429 }
430}
static wxBitmap create_single_filament_bitmap(const wxColour &color, const wxSize &size)
Definition FilamentBitmapUtils.cpp:280
static wxBitmap create_quadruple_filament_bitmap(const std::vector< wxColour > &colors, const wxSize &size)
Definition FilamentBitmapUtils.cpp:350
static wxBitmap create_dual_filament_bitmap(const wxColour &color1, const wxColour &color2, const wxSize &size)
Definition FilamentBitmapUtils.cpp:313
static wxBitmap create_gradient_filament_bitmap(const std::vector< wxColour > &colors, const wxSize &size)
Definition FilamentBitmapUtils.cpp:373
static wxBitmap create_triple_filament_bitmap(const std::vector< wxColour > &colors, const wxSize &size)
Definition FilamentBitmapUtils.cpp:329

References create_dual_filament_bitmap(), create_gradient_filament_bitmap(), create_quadruple_filament_bitmap(), create_single_filament_bitmap(), and create_triple_filament_bitmap().

Referenced by Slic3r::GUI::FilamentPickerDialog::CreateColorBitmap(), Slic3r::GUI::FilamentPickerDialog::CreateColorGrid(), get_extruder_color_icon(), Slic3r::GUI::FilamentPickerDialog::UpdateCustomColorPreview(), and Slic3r::GUI::FilamentPickerDialog::UpdatePreview().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_freq_settings_popupmenu()

void Slic3r::GUI::create_freq_settings_popupmenu ( wxMenu * menu,
const bool is_object_settings,
wxDataViewItem item )
static
496{
497 // Add default settings bundles
499
500 const int filaments_cnt = filaments_count();
501
502 for (auto& category : bundle) {
503 if (is_improper_category(category.first, filaments_cnt, is_object_settings))
504 continue;
505
506 append_menu_item(menu, wxID_ANY, _(category.first), "",
507 [menu, item, is_object_settings, bundle](wxCommandEvent& event) {
508 wxString category_name = menu->GetLabel(event.GetId());
509 std::vector<std::string> options;
510 for (auto& category : bundle)
511 if (category_name == _(category.first)) {
512 options = category.second;
513 break;
514 }
515 if (options.empty())
516 return;
517 // Because of we couldn't edited layer_height for ItVolume from settings list,
518 // correct options according to the selected item type : remove "layer_height" option
519 if (!is_object_settings && category_name == _("Quality")) {
520 const auto layer_height_it = std::find(options.begin(), options.end(), "layer_height");
521 if (layer_height_it != options.end())
522 options.erase(layer_height_it);
523 }
524
526 },
527 SettingsFactory::get_category_bitmap(category.first), menu,
528 []() { return true; }, plater());
529 }
530}
void add_category_to_settings_from_frequent(const std::vector< std::string > &category_options, wxDataViewItem item)
Definition GUI_ObjectList.cpp:2190
static PrinterTechnology printer_technology()
Definition GUI_Factories.cpp:60
static SettingsFactory::Bundle FREQ_SETTINGS_BUNDLE_FFF
Definition GUI_Factories.cpp:83
static int filaments_count()
Definition GUI_Factories.cpp:65
static bool is_improper_category(const std::string &category, const int filaments_cnt, const bool is_object_settings=true)
Definition GUI_Factories.cpp:70
static SettingsFactory::Bundle FREQ_SETTINGS_BUNDLE_SLA
Definition GUI_Factories.cpp:99
static const char * category_name(AuditEventCategory category)
Definition PluginAuditManager.cpp:348
@ ptFFF
Definition Config.hpp:231
static wxBitmap get_category_bitmap(const std::string &category_name, bool menu_bmp=true)
Definition GUI_Factories.cpp:357
std::map< std::string, std::vector< std::string > > Bundle
Definition GUI_Factories.hpp:34

References _, Slic3r::GUI::ObjectList::add_category_to_settings_from_frequent(), append_menu_item(), Slic3r::category_name(), filaments_count(), FREQ_SETTINGS_BUNDLE_FFF, FREQ_SETTINGS_BUNDLE_SLA, Slic3r::GUI::SettingsFactory::get_category_bitmap(), is_improper_category(), obj_list(), plater(), printer_technology(), and Slic3r::ptFFF.

Here is the call graph for this function:

◆ create_gradient_filament_bitmap()

wxBitmap Slic3r::GUI::create_gradient_filament_bitmap ( const std::vector< wxColour > & colors,
const wxSize & size )
static
374{
375 BitmapDC bdc = init_bitmap_dc(size);
376
377 if (colors.size() == 1) {
378 return create_single_filament_bitmap(colors[0], size);
379 }
380
381 // use segment gradient, make transition more natural
382 wxDC& dc = bdc.dc;
383 int total_width = size.GetWidth();
384 int height = size.GetHeight();
385
386 // calculate segment count
387 int segment_count = colors.size() - 1;
388 double segment_width = (double)total_width / segment_count;
389
390 int left = 0;
391 for (int i = 0; i < segment_count; i++) {
392 int current_width = (int)segment_width;
393
394 // handle last segment, ensure fully filled
395 if (i == segment_count - 1) {
396 current_width = total_width - left;
397 }
398
399 // avoid width exceed boundary
400 if (left + current_width > total_width) {
401 current_width = total_width - left;
402 }
403
404 if (current_width > 0) {
405 auto rect = wxRect(left, 0, current_width, height);
406 dc.GradientFillLinear(rect, colors[i], colors[i + 1], wxEAST);
407 left += current_width;
408 }
409 }
410
411 bdc.dc.SelectObject(wxNullBitmap);
412 return bdc.bitmap;
413}
@ left
Definition MarchingSquares.hpp:188

References Slic3r::GUI::BitmapDC::bitmap, create_single_filament_bitmap(), Slic3r::GUI::BitmapDC::dc, and init_bitmap_dc().

Referenced by create_filament_bitmap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_gradient_ramp_bitmap()

wxBitmap Slic3r::GUI::create_gradient_ramp_bitmap ( const std::vector< wxColour > & ramp,
const wxSize & size )
223{
224 if (ramp.empty()) return wxNullBitmap;
225
226 BitmapDC bdc = init_bitmap_dc(size);
227 if (!bdc.dc.IsOk()) return wxNullBitmap;
228
229 fill_gradient_ramp_rect(bdc.dc, wxRect(0, 0, size.GetWidth(), size.GetHeight()), ramp);
230
231 bdc.dc.SelectObject(wxNullBitmap);
232 return bdc.bitmap;
233}
void fill_gradient_ramp_rect(wxDC &dc, const wxRect &rect, const std::vector< wxColour > &ramp)
Definition FilamentBitmapUtils.cpp:189

References Slic3r::GUI::BitmapDC::bitmap, Slic3r::GUI::BitmapDC::dc, fill_gradient_ramp_rect(), and init_bitmap_dc().

Referenced by get_extruder_color_icon().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_h_divider()

wxPanel * Slic3r::GUI::create_h_divider ( wxWindow * parent,
int fixed_width = -1 )
static
148{
149 const int h = parent->FromDIP(1);
150 int w = fixed_width > 0 ? fixed_width : -1;
151 auto* panel = new wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(w, h));
152 panel->SetMinSize(wxSize(w, h));
153 if (fixed_width > 0)
154 panel->SetMaxSize(wxSize(fixed_width, h));
155 panel->SetBackgroundColour(StateColor::darkModeColorFor(COLOR_DIVIDER));
156 return panel;
157}
static const wxColour COLOR_DIVIDER("#EEEEEE")

References COLOR_DIVIDER(), and StateColor::darkModeColorFor().

Referenced by Slic3r::GUI::ColorDecomposeDialog::build_ui(), Slic3r::GUI::ColorDecomposeDialog::create_mode_card(), and Slic3r::GUI::ColorDecomposeDialog::create_mode_selection_section().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_mesh()

TriangleMesh Slic3r::GUI::create_mesh ( const std::string & type_name,
const BoundingBoxf3 & bb )
static
2505{
2506 const double side = wxGetApp().plater()->canvas3D()->get_size_proportional_to_max_bed_size(0.1);
2507
2508 TriangleMesh mesh;
2509 if (type_name == "Cube")
2510 // Sitting on the print bed, left front front corner at (0, 0).
2511 mesh = TriangleMesh(its_make_cube(side, side, side));
2512 else if (type_name == "Cylinder")
2513 // Centered around 0, sitting on the print bed.
2514 // The cylinder has the same volume as the box above.
2515 mesh = TriangleMesh(its_make_cylinder(0.5 * side, side));
2516 else if (type_name == "Sphere")
2517 // Centered around 0, half the sphere below the print bed, half above.
2518 // The sphere has the same volume as the box above.
2519 mesh = TriangleMesh(its_make_sphere(0.5 * side, PI / 90));
2520 else if (type_name == "Slab")
2521 // Sitting on the print bed, left front front corner at (0, 0).
2522 mesh = TriangleMesh(its_make_cube(bb.size().x() * 1.5, bb.size().y() * 1.5, bb.size().z() * 0.5));
2523 else if (type_name == "Cone")
2524 mesh = TriangleMesh(its_make_cone(0.5 * side, side));
2525 else if (type_name == "Disc")
2526 mesh = TriangleMesh(its_make_cylinder(0.5 * side, 0.2f));
2527 else if (type_name == "Torus")
2528 mesh = TriangleMesh(its_make_torus(0.5 * side, 0.125 * side,(PI / 60)));
2529 return mesh;
2530}
Definition TriangleMesh.hpp:94
indexed_triangle_set its_make_torus(double r, double h, double fa)
Definition TriangleMesh.cpp:1027
indexed_triangle_set its_make_sphere(double radius, double fa)
Definition TriangleMesh.cpp:1128
indexed_triangle_set its_make_cube(double xd, double yd, double zd)
Definition TriangleMesh.cpp:902
indexed_triangle_set its_make_cone(double r, double h, double fa)
Definition TriangleMesh.cpp:1079
indexed_triangle_set its_make_cylinder(double r, double h, double fa)
Definition TriangleMesh.cpp:936

References Slic3r::its_make_cone(), Slic3r::its_make_cube(), Slic3r::its_make_cylinder(), Slic3r::its_make_sphere(), Slic3r::its_make_torus(), PI, and Slic3r::BoundingBox3Base< PointType >::size().

Referenced by Slic3r::GUI::ObjectList::load_generic_subobject(), and Slic3r::GUI::ObjectList::load_shape_object().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_meshes()

RaycastManager::Meshes Slic3r::GUI::create_meshes ( GLCanvas3D & canvas,
const RaycastManager::AllowVolumes & condition )

Use scene Raycasters and prepare data for actualize RaycasterManager.

Parameters
canvascontain Scene raycasters
conditionLimit for scene casters
Returns
Meshes
331{
333 auto scene_casters = canvas.get_raycasters_for_picking(type);
334 if (scene_casters == nullptr)
335 return {};
336 const std::vector<std::shared_ptr<SceneRaycasterItem>> &casters = *scene_casters;
337
338 const GLVolumePtrs &gl_volumes = canvas.get_volumes().volumes;
339 const ModelObjectPtrs &objects = canvas.get_model()->objects;
340
342 for (const std::shared_ptr<SceneRaycasterItem> &caster : casters) {
343 int index = SceneRaycaster::decode_id(type, caster->get_id());
344 if (index < 0)
345 continue;
346 auto index_ = static_cast<size_t>(index);
347 if(index_ >= gl_volumes.size())
348 continue;
349 const GLVolume *gl_volume = gl_volumes[index_];
350 if (gl_volume == nullptr)
351 continue;
352 const ModelVolume *volume = get_model_volume(*gl_volume, objects);
353 if (volume == nullptr)
354 continue;
355 size_t id = volume->id().id;
356 if (condition.skip(id))
357 continue;
358 auto mesh = std::make_unique<AABBMesh>(caster->get_raycaster()->get_aabb_mesh());
359 meshes.emplace_back(std::make_pair(id, std::move(mesh)));
360 }
361 return meshes;
362}
GLVolumePtrs volumes
Definition 3DScene.hpp:468
const GLVolumeCollection & get_volumes() const
Definition GLCanvas3D.hpp:993
std::vector< std::shared_ptr< SceneRaycasterItem > > * get_raycasters_for_picking(SceneRaycaster::EType type)
Definition GLCanvas3D.hpp:972
bool skip(const size_t &model_volume_id) const override
Condition to not process model volume.
Definition RaycastManager.hpp:110
static int decode_id(EType type, int id)
Definition SceneRaycaster.cpp:344
EType
Definition SceneRaycaster.hpp:47
@ Volume
Definition SceneRaycaster.hpp:50
std::vector< GLVolume * > GLVolumePtrs
Definition 3DScene.hpp:412

References Slic3r::GUI::SceneRaycaster::decode_id(), Slic3r::GUI::GLCanvas3D::get_model(), get_model_volume(), Slic3r::GUI::GLCanvas3D::get_raycasters_for_picking(), Slic3r::GUI::GLCanvas3D::get_volumes(), Slic3r::ObjectBase::id(), Slic3r::ObjectID::id, Slic3r::Model::objects, Slic3r::GUI::RaycastManager::AllowVolumes::skip(), Slic3r::GUI::SceneRaycaster::Volume, and Slic3r::GLVolumeCollection::volumes.

Referenced by calc_distance(), anonymous_namespace{EmbossJob.cpp}::start_create_volume_on_surface_job(), and anonymous_namespace{SurfaceDrag.cpp}::start_dragging().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_mixed_filament_from_result()

bool Slic3r::GUI::create_mixed_filament_from_result ( Sidebar * sidebar,
const MixedFilamentResult & result,
const std::vector< std::string > & color_strs )
static
5037{
5038 if (!sidebar || result.components.size() < 2 || result.ratios.size() < 2)
5039 return false;
5040 if (!dynamic_cast<Plater*>(sidebar->GetParent()))
5041 return false;
5042
5043 size_t num_physical = sidebar->combos_filament().size();
5044 if (num_physical < 2)
5045 return false;
5046 if (wxGetApp().preset_bundle->filament_presets.size() >= size_t(EnforcerBlockerType::ExtruderMax))
5047 return false;
5048
5049 auto& project_config = wxGetApp().preset_bundle->project_config;
5050 size_t total = wxGetApp().preset_bundle->filament_presets.size();
5051 size_t new_idx = total;
5052
5053 std::string mixed_color = blend_mixed_color(result.components, result.ratios, color_strs);
5054 wxGetApp().preset_bundle->set_num_filaments(total + 1, mixed_color);
5055
5056 auto* multi_colour_opt = project_config.option<ConfigOptionStrings>("filament_multi_colour");
5057 if (multi_colour_opt) {
5058 while (multi_colour_opt->values.size() <= new_idx) multi_colour_opt->values.push_back("");
5059 multi_colour_opt->values[new_idx] = mixed_color;
5060 }
5061
5062 // set_num_filaments() above already grows these parallel arrays; the writes are still
5063 // size-guarded so a sizing bug degrades into a no-op rather than a heap overwrite.
5064 {
5065 auto* is_mixed_opt = project_config.option<ConfigOptionBools>("filament_is_mixed");
5066 while (is_mixed_opt->values.size() <= new_idx) is_mixed_opt->values.push_back(false);
5067 is_mixed_opt->values[new_idx] = true;
5068 }
5069
5070 {
5071 auto* comp_opt = project_config.option<ConfigOptionStrings>("filament_mixed_components");
5072 while (comp_opt->values.size() <= new_idx) comp_opt->values.push_back(std::string{});
5073 comp_opt->values[new_idx] = format_mixed_components(result.components);
5074 }
5075 {
5076 auto* ratios_opt = project_config.option<ConfigOptionStrings>("filament_mixed_sublayer_ratios");
5077 while (ratios_opt->values.size() <= new_idx) ratios_opt->values.push_back(std::string{});
5078 ratios_opt->values[new_idx] = format_mixed_ratios(result.ratios);
5079 }
5080
5081 if (!project_config.option("filament_mixed_gradient"))
5082 project_config.set_key_value("filament_mixed_gradient", new ConfigOptionBools({false}));
5083 if (!project_config.option("filament_mixed_gradient_range"))
5084 project_config.set_key_value("filament_mixed_gradient_range", new ConfigOptionStrings({""}) );
5085 if (!project_config.option("filament_mixed_gradient_curve"))
5086 project_config.set_key_value("filament_mixed_gradient_curve", new ConfigOptionStrings({""}) );
5087 if (!project_config.option("filament_mixed_gradient_per_part"))
5088 project_config.set_key_value("filament_mixed_gradient_per_part", new ConfigOptionBools({false}));
5089
5090 {
5091 auto* grad_opt = project_config.option<ConfigOptionBools>("filament_mixed_gradient");
5092 while (grad_opt->values.size() <= new_idx) grad_opt->values.push_back(false);
5093 grad_opt->values[new_idx] = result.gradient_enabled;
5094 }
5095 {
5096 auto* grad_range_opt = project_config.option<ConfigOptionStrings>("filament_mixed_gradient_range");
5097 while (grad_range_opt->values.size() <= new_idx) grad_range_opt->values.push_back("");
5098 if (result.gradient_enabled && result.components.size() == 2) {
5099 const char* fmt = (result.gradient_direction == 0) ? "0.9000,0.1000" : "0.1000,0.9000";
5100 grad_range_opt->values[new_idx] = fmt;
5101 } else {
5102 grad_range_opt->values[new_idx] = "";
5103 }
5104 }
5105 {
5106 auto* grad_curve_opt = project_config.option<ConfigOptionStrings>("filament_mixed_gradient_curve");
5107 while (grad_curve_opt->values.size() <= new_idx) grad_curve_opt->values.push_back("");
5108 grad_curve_opt->values[new_idx] = serialize_mixed_gradient_curve_if_custom(result);
5109 }
5110 {
5111 auto* per_part_opt = project_config.option<ConfigOptionBools>("filament_mixed_gradient_per_part");
5112 while (per_part_opt->values.size() <= new_idx) per_part_opt->values.push_back(false);
5113 per_part_opt->values[new_idx] = result.gradient_enabled && result.per_part_gradient;
5114 }
5115
5116 auto& presets = wxGetApp().preset_bundle->filament_presets;
5117 if (result.components[0] >= 1 && result.components[0] <= num_physical && presets.size() > new_idx)
5118 presets[new_idx] = presets[result.components[0] - 1];
5119
5120 size_t filament_count = wxGetApp().preset_bundle->filament_presets.size();
5121 wxGetApp().plater()->get_partplate_list().on_filament_added(filament_count);
5122 wxGetApp().plater()->on_filament_count_change(filament_count);
5123 wxGetApp().get_tab(Preset::TYPE_PRINT)->update();
5124 wxGetApp().preset_bundle->export_selections(*wxGetApp().app_config);
5125
5126 sidebar->update_mixed_filament_list();
5127 wxGetApp().plater()->update_project_dirty_from_presets();
5128 wxPostEvent(sidebar, SimpleEvent(EVT_SCHEDULE_BACKGROUND_PROCESS, sidebar));
5129 return true;
5130}
Definition Config.hpp:1190
void update_mixed_filament_list()
Definition Plater.cpp:4326
std::vector< PlaterPresetComboBox * > & combos_filament()
Definition Plater.cpp:6891
int gradient_direction
Definition MixedFilamentDialog.hpp:40
static std::string blend_mixed_color(const std::vector< unsigned int > &comp_ids, const std::vector< int > &ratios, const std::vector< std::string > &color_strs)
Definition Plater.cpp:4315
bool gradient_enabled
Definition MixedFilamentDialog.hpp:39
std::vector< int > ratios
Definition MixedFilamentDialog.hpp:38
std::vector< unsigned int > components
Definition MixedFilamentDialog.hpp:37
static std::string serialize_mixed_gradient_curve_if_custom(const MixedFilamentResult &result)
Definition Plater.cpp:5005
bool per_part_gradient
Definition MixedFilamentDialog.hpp:41
@ ExtruderMax
Definition TriangleSelector.hpp:66
std::string format_mixed_components(const std::vector< unsigned int > &components)
Definition FilamentMixer.cpp:433
std::string format_mixed_ratios(const std::vector< int > &weights)
Definition FilamentMixer.cpp:444
Definition Event.hpp:17

References blend_mixed_color(), Slic3r::GUI::Sidebar::combos_filament(), Slic3r::GUI::MixedFilamentResult::components, Slic3r::ExtruderMax, Slic3r::format_mixed_components(), Slic3r::format_mixed_ratios(), Slic3r::GUI::MixedFilamentResult::gradient_direction, Slic3r::GUI::MixedFilamentResult::gradient_enabled, Slic3r::GUI::MixedFilamentResult::per_part_gradient, Slic3r::GUI::MixedFilamentResult::ratios, serialize_mixed_gradient_curve_if_custom(), Slic3r::ConfigOptionVector< T >::size(), Slic3r::Preset::TYPE_PRINT, Slic3r::GUI::Sidebar::update_mixed_filament_list(), and Slic3r::ConfigOptionVector< T >::values.

Referenced by Slic3r::GUI::Sidebar::add_mixed_filament(), Slic3r::GUI::Plater::priv::apply_textured_mesh_import_result(), Slic3r::GUI::Sidebar::decompose_filament_color(), and Slic3r::GUI::Sidebar::ensure_mixed_filament().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_mode_group_label()

wxStaticText * Slic3r::GUI::create_mode_group_label ( wxWindow * parent,
const wxString & text )
static
160{
161 auto* label = new wxStaticText(parent, wxID_ANY, text);
162 label->SetFont(Label::Body_11);
163 label->SetForegroundColour(StateColor::darkModeColorFor(COLOR_LABEL_GREY));
164 return label;
165}
static wxFont Body_11
Definition Label.hpp:57
static const wxColour COLOR_LABEL_GREY("#ACACAC")

References Label::Body_11, COLOR_LABEL_GREY(), StateColor::darkModeColorFor(), and wxStaticText.

Referenced by Slic3r::GUI::ColorDecomposeDialog::create_mode_selection_section().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_preset_tree()

wxBoxSizer * Slic3r::GUI::create_preset_tree ( wxWindow * parent,
std::pair< std::string, std::vector< std::shared_ptr< Preset > > > printer_and_preset )
static
438{
439 wxTreeCtrl *treeCtrl = new wxTreeCtrl(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE | wxNO_BORDER);
440 wxColour backgroundColor = parent->GetBackgroundColour();
441 treeCtrl->SetBackgroundColour(backgroundColor);
442
443 wxString printer_name = wxString::FromUTF8(printer_and_preset.first);
444 wxTreeItemId rootId = treeCtrl->AddRoot(printer_name);
445 int row = 1;
446 for (std::shared_ptr<Preset> preset : printer_and_preset.second) {
447 wxString preset_name = wxString::FromUTF8(preset->name);
448 wxTreeItemId childId1 = treeCtrl->AppendItem(rootId, preset_name);
449 row++;
450 }
451
452 treeCtrl->Expand(rootId);
453 wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
454 treeCtrl->SetMinSize(wxSize(-1, row * 22));
455 treeCtrl->SetMaxSize(wxSize(-1, row * 22));
456 sizer->Add(treeCtrl, 0, wxEXPAND | wxALL, 0);
457
458 return sizer;
459}

◆ create_printer_webview_handler()

std::unique_ptr< PrinterWebViewHandler > Slic3r::GUI::create_printer_webview_handler ( PrinterWebView & owner)
318{
319 auto cfg = get_active_printer_config();
320 if(cfg == nullptr) return nullptr;
321
322 const auto host_type = cfg->option<ConfigOptionEnum<PrintHostType>>("host_type")->value;
323 switch (host_type)
324 {
326 return std::make_unique<ElegooPrinterWebViewHandler>(owner);
327 default:
328 return nullptr;
329 }
330}
@ htElegooLink
Definition PrintConfig.hpp:119

References Slic3r::htElegooLink.

Referenced by Slic3r::GUI::PrinterWebView::load_url().

Here is the caller graph for this function:

◆ create_quadruple_filament_bitmap()

wxBitmap Slic3r::GUI::create_quadruple_filament_bitmap ( const std::vector< wxColour > & colors,
const wxSize & size )
static
351{
352 BitmapDC bdc = init_bitmap_dc(size);
353
354 int half_width = (size.GetWidth() + 1) / 2;
355 int half_height = (size.GetHeight() + 1) / 2;
356
357 const int rects[4][4] = {
358 {0, 0, half_width, half_height}, // Top left
359 {half_width, 0, size.GetWidth() - half_width, half_height}, // Top right
360 {0, half_height, half_width, size.GetHeight() - half_height}, // Bottom left
361 {half_width, half_height, size.GetWidth() - half_width, size.GetHeight() - half_height} // Bottom right
362 };
363
364 for (int i = 0; i < 4; i++) {
365 bdc.dc.SetBrush(wxBrush(colors[i]));
366 bdc.dc.DrawRectangle(rects[i][0], rects[i][1], rects[i][2], rects[i][3]);
367 }
368
369 bdc.dc.SelectObject(wxNullBitmap);
370 return bdc.bitmap;
371}

References Slic3r::GUI::BitmapDC::bitmap, Slic3r::GUI::BitmapDC::dc, and init_bitmap_dc().

Referenced by create_filament_bitmap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_select_filament_preset_checkbox()

wxBoxSizer * Slic3r::GUI::create_select_filament_preset_checkbox ( wxWindow * parent,
std::string & compatible_printer,
std::vector< Preset * > presets,
std::unordered_map<::CheckBox *, std::pair< std::string, Preset * > > & machine_filament_preset )
static
478{
479 wxBoxSizer *horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
480 wxBoxSizer *checkbox_sizer = new wxBoxSizer(wxVERTICAL);
481 ::CheckBox *checkbox = new ::CheckBox(parent);
482 checkbox_sizer->Add(checkbox, 0, wxEXPAND | wxRIGHT, 5);
483
484 wxBoxSizer *combobox_sizer = new wxBoxSizer(wxVERTICAL);
485 wxStaticText *machine_name_str = new wxStaticText(parent, wxID_ANY, wxString::FromUTF8(compatible_printer));
486 ComboBox * combobox = new ComboBox(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(200, 24), 0, nullptr, wxCB_READONLY);
487 combobox->SetBackgroundColor(PRINTER_LIST_COLOUR);
488 combobox->SetBorderColor(*wxWHITE);
489 combobox->SetLabel(_L("Select filament preset"));
490 combobox->Bind(wxEVT_COMBOBOX, [combobox, checkbox, presets, &machine_filament_preset, compatible_printer](wxCommandEvent &e) {
491 combobox->SetLabelColor(*wxBLACK);
492 wxString preset_name = combobox->GetStringSelection();
493 checkbox->SetValue(true);
494 for (Preset *preset : presets) {
495 if (preset_name == wxString::FromUTF8(preset->name)) {
496 machine_filament_preset[checkbox] = std::make_pair(compatible_printer, preset);
497 }
498 }
499 e.Skip();
500 });
501 combobox_sizer->Add(machine_name_str, 0, wxEXPAND, 0);
502 combobox_sizer->Add(combobox, 0, wxEXPAND | wxTOP, 5);
503
504 wxArrayString choices;
505 for (Preset *preset : presets) {
506 choices.Add(wxString::FromUTF8(preset->name));
507 }
508 combobox->Set(choices);
509
510 horizontal_sizer->Add(checkbox_sizer);
511 horizontal_sizer->Add(combobox_sizer);
512 return horizontal_sizer;
513}
#define PRINTER_LIST_COLOUR
Definition CreatePresetsDialog.cpp:90
void SetValue(bool value) override
Definition CheckBox.cpp:43
Definition ComboBox.hpp:21
void SetLabel(const wxString &label) override
Definition ComboBox.cpp:169
Definition Preset.hpp:241

References _L, PRINTER_LIST_COLOUR, ComboBox::SetLabel(), CheckBox::SetValue(), and wxStaticText.

Referenced by Slic3r::GUI::CreateFilamentPresetDialog::get_filament_presets_by_machine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_settings_popupmenu()

wxMenu * Slic3r::GUI::create_settings_popupmenu ( wxMenu * parent_menu,
const bool is_object_settings,
wxDataViewItem item )
static
447{
448 wxMenu* menu = new wxMenu;
449
450 FullSettingsHierarchy categories;
451 get_full_settings_hierarchy(categories, !is_object_settings);
452
453 auto get_selected_options_for_category = [categories, item](const wxString& category_name) {
454 wxArrayString names;
455 wxArrayInt selections;
456
457 std::vector< std::pair<std::string, bool> > category_options;
458 for (auto& cat : categories) {
459 if (_(cat.first) == category_name) {
460 ModelConfig& config = obj_list()->get_item_config(item);
461 auto opt_keys = config.keys();
462
463 int sel = 0;
464 for (const std::pair<std::string, std::string>& pair : cat.second) {
465 names.Add(_(pair.second));
466 if (find(opt_keys.begin(), opt_keys.end(), pair.first) != opt_keys.end())
467 selections.Add(sel);
468 sel++;
469 category_options.push_back(std::make_pair(pair.first, false));
470 }
471 break;
472 }
473 }
474
475 if (!category_options.empty() &&
476 wxGetSelectedChoices(selections, _L("Select settings"), category_name, names) != -1) {
477 for (auto sel : selections)
478 category_options[sel].second = true;
479 }
480 return category_options;
481 };
482
483 for (auto cat : categories) {
484 append_menu_item(menu, wxID_ANY, _(cat.first), "",
485 [menu, item, get_selected_options_for_category](wxCommandEvent& event) {
486 std::vector< std::pair<std::string, bool> > category_options = get_selected_options_for_category(menu->GetLabel(event.GetId()));
487 obj_list()->add_category_to_settings_from_selection(category_options, item);
488 }, SettingsFactory::get_category_bitmap(cat.first), parent_menu,
489 []() { return true; }, plater());
490 }
491
492 return menu;
493}
ModelConfig & get_item_config(const wxDataViewItem &item) const
Definition GUI_ObjectList.cpp:735
Definition PrintConfig.hpp:2606
t_config_option_keys keys() const
Definition PrintConfig.hpp:2650
static void get_full_settings_hierarchy(FullSettingsHierarchy &settings_menu, const bool is_part)
Definition GUI_Factories.cpp:422
std::map< std::string, std::vector< std::pair< std::string, std::string > > > FullSettingsHierarchy
Definition GUI_Factories.cpp:421

References _, _L, append_menu_item(), Slic3r::category_name(), Slic3r::GUI::SettingsFactory::get_category_bitmap(), get_full_settings_hierarchy(), Slic3r::GUI::ObjectList::get_item_config(), Slic3r::ModelConfig::keys(), obj_list(), and plater().

Referenced by Slic3r::GUI::MenuFactory::append_menu_item_settings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_single_filament_bitmap()

wxBitmap Slic3r::GUI::create_single_filament_bitmap ( const wxColour & color,
const wxSize & size )
static
281{
282 // Check if color is transparent
283 if (is_transparent_color(color)) {
284 return create_transparent_bitmap(size);
285 }
286
287 BitmapDC bdc = init_bitmap_dc(size);
288 if (!bdc.dc.IsOk()) return wxNullBitmap;
289
290 bdc.dc.SetBackground(wxBrush(color));
291 bdc.dc.Clear();
292 bdc.dc.SetBrush(wxBrush(color));
293 bdc.dc.DrawRectangle(0, 0, size.GetWidth(), size.GetHeight());
294
295 // Add gray border for light colors (similar to wxExtensions.cpp logic) - only in light mode
296 if (!wxGetApp().dark_mode() && color.Red() > 224 && color.Blue() > 224 && color.Green() > 224) {
297 bdc.dc.SetPen(wxPen(wxColour(130, 130, 128), 1, wxPENSTYLE_SOLID));
298 bdc.dc.SetBrush(*wxTRANSPARENT_BRUSH);
299 bdc.dc.DrawRectangle(0, 0, size.GetWidth(), size.GetHeight());
300 }
301
302 // Add white border for dark colors - only in dark mode
303 if(wxGetApp().dark_mode() && color.Red() < 45 && color.Blue() < 45 && color.Green() < 45) {
304 bdc.dc.SetPen(wxPen(wxColour(207, 207, 207), 1, wxPENSTYLE_SOLID));
305 bdc.dc.SetBrush(*wxTRANSPARENT_BRUSH);
306 bdc.dc.DrawRectangle(0, 0, size.GetWidth(), size.GetHeight());
307 }
308
309 bdc.dc.SelectObject(wxNullBitmap);
310 return bdc.bitmap;
311}
static wxBitmap create_transparent_bitmap(const wxSize &size)
Definition FilamentBitmapUtils.cpp:241
static bool is_transparent_color(const wxColour &color)
Definition FilamentBitmapUtils.cpp:236

References Slic3r::GUI::BitmapDC::bitmap, create_transparent_bitmap(), Slic3r::GUI::BitmapDC::dc, init_bitmap_dc(), and is_transparent_color().

Referenced by create_filament_bitmap(), and create_gradient_filament_bitmap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_transparent_bitmap()

wxBitmap Slic3r::GUI::create_transparent_bitmap ( const wxSize & size)
static
241 {
242 BitmapDC bdc = init_bitmap_dc(size);
243 if (!bdc.dc.IsOk()) return wxNullBitmap;
244
245 // Create checkerboard pattern
246 wxColour light_gray(217, 217, 217); // #D9D9D9
247 wxColour white(255, 255, 255);
248
249 bool is_dark_mode = wxGetApp().dark_mode();
250
251 // Calculate parameters based on mode
252 int start_pos = is_dark_mode ? 0 : 1;
253 int end_width = is_dark_mode ? size.GetWidth() : size.GetWidth() - 1;
254 int end_height = is_dark_mode ? size.GetHeight() : size.GetHeight() - 1;
255 int square_size = std::max(6, std::min(end_width - start_pos, end_height - start_pos) / 8);
256
257 // Draw checkerboard
258 for (int x = start_pos; x < end_width; x += square_size) {
259 for (int y = start_pos; y < end_height; y += square_size) {
260 bool is_light = ((x / square_size) + (y / square_size)) % 2 == 0;
261 bdc.dc.SetBrush(wxBrush(is_light ? white : light_gray));
262
263 int width = std::min(square_size, size.GetWidth() - x);
264 int height = std::min(square_size, size.GetHeight() - y);
265 bdc.dc.DrawRectangle(x, y, width, height);
266 }
267 }
268
269 // Add border only in light mode
270 if (!is_dark_mode) {
271 bdc.dc.SetPen(wxPen(wxColour(130, 130, 128), 1, wxPENSTYLE_SOLID));
272 bdc.dc.SetBrush(*wxTRANSPARENT_BRUSH);
273 bdc.dc.DrawRectangle(0, 0, size.GetWidth(), size.GetHeight());
274 }
275
276 bdc.dc.SelectObject(wxNullBitmap);
277 return bdc.bitmap;
278}

References Slic3r::GUI::BitmapDC::bitmap, Slic3r::GUI::BitmapDC::dc, and init_bitmap_dc().

Referenced by create_single_filament_bitmap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_triple_filament_bitmap()

wxBitmap Slic3r::GUI::create_triple_filament_bitmap ( const std::vector< wxColour > & colors,
const wxSize & size )
static
330{
331 BitmapDC bdc = init_bitmap_dc(size);
332
333 int third_width = size.GetWidth() / 3;
334 int remaining_width = size.GetWidth() - (third_width * 2);
335
336 // Draw three vertical sections
337 bdc.dc.SetBrush(wxBrush(colors[0]));
338 bdc.dc.DrawRectangle(0, 0, third_width, size.GetHeight());
339
340 bdc.dc.SetBrush(wxBrush(colors[1]));
341 bdc.dc.DrawRectangle(third_width, 0, third_width, size.GetHeight());
342
343 bdc.dc.SetBrush(wxBrush(colors[2]));
344 bdc.dc.DrawRectangle(third_width * 2, 0, remaining_width, size.GetHeight());
345
346 bdc.dc.SelectObject(wxNullBitmap);
347 return bdc.bitmap;
348}

References Slic3r::GUI::BitmapDC::bitmap, Slic3r::GUI::BitmapDC::dc, and init_bitmap_dc().

Referenced by create_filament_bitmap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ custom_gcode_group_title()

wxString Slic3r::GUI::custom_gcode_group_title ( const Page * page,
const t_config_option_key & opt_key )
static
4369{
4370 if (page)
4371 for (const auto& opt_group : page->m_optgroups)
4372 for (const auto& opt : opt_group->opt_map())
4373 if (opt.second.first == opt_key)
4374 return opt_group->title;
4375 return from_u8(opt_key);
4376}
std::vector< ConfigOptionsGroupShp > m_optgroups
Definition Tab.hpp:99
Definition BruteforceOptimizer.hpp:11

References from_u8(), and Slic3r::GUI::Page::m_optgroups.

Referenced by Slic3r::GUI::Tab::edit_custom_gcode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cut_model()

void Slic3r::GUI::cut_model ( Model & model,
double z,
ModelObjectCutAttributes attributes )
static
504{
505 size_t obj_idx = 0;
506 size_t instance_idx = 0;
508 return;
509
510 auto* object = model.objects[0];
511
512 const Vec3d instance_offset = object->instances[instance_idx]->get_offset();
513 Cut cut(object, instance_idx, Geometry::translation_transform(z * Vec3d::UnitZ() - instance_offset), attributes);
514 const auto new_objects = cut.perform_with_plane();
515 model.delete_object(obj_idx);
516
517 for (ModelObject *model_object : new_objects) {
518 auto *object = model.add_object(*model_object);
519 object->sort_volumes(true);
520 std::string object_name = object->name.empty() ? fs::path(object->input_file).filename().string() : object->name;
521 object->ensure_on_bed();
522 }
523}
Definition CutUtils.hpp:20
void sort_volumes(bool full_sort)
Definition Model.cpp:1514
void delete_object(size_t idx)
Definition Model.cpp:672
ModelObject * add_object()
Definition Model.cpp:607
constexpr bool has(option_type t) const
Definition enum_bitmask.hpp:47
void translation_transform(Transform3d &transform, const Vec3d &translation)
Definition Geometry.cpp:346
@ KeepLower
Definition CutUtils.hpp:15
@ KeepUpper
Definition CutUtils.hpp:15

References Slic3r::Model::add_object(), Slic3r::Model::delete_object(), Slic3r::enum_bitmask< option_type, typename >::has(), Slic3r::KeepLower, Slic3r::KeepUpper, Slic3r::Model::objects, Slic3r::Cut::perform_with_plane(), Slic3r::ModelObject::sort_volumes(), and Slic3r::Geometry::translation_transform().

Referenced by Slic3r::GUI::CalibUtils::calib_max_vol_speed(), Slic3r::GUI::CalibUtils::calib_retraction(), Slic3r::GUI::CalibUtils::calib_temptue(), and Slic3r::GUI::CalibUtils::calib_VFA().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dash_polyline()

std::vector< std::vector< Vec2d > > Slic3r::GUI::dash_polyline ( const std::vector< Vec2d > & pts,
bool closed,
double dash,
double gap )
static
7465{
7466 std::vector<std::vector<Vec2d>> out;
7467 if (pts.size() < 2 || dash <= 0.0 || gap <= 0.0) return out;
7468 const size_t segs = closed ? pts.size() : pts.size() - 1;
7469 bool on = true; // start on a dash, so a short entity is still visible
7470 double left = dash; // distance remaining in the current dash/gap
7471 std::vector<Vec2d> cur;
7472 if (on) cur.push_back(pts[0]);
7473 for (size_t i = 0; i < segs; ++i) {
7474 const Vec2d a = pts[i], b = pts[(i + 1) % pts.size()];
7475 double seg = (b - a).norm();
7476 if (seg < 1e-12) continue;
7477 const Vec2d dir = (b - a) / seg;
7478 double t = 0.0;
7479 while (seg - t > left) {
7480 t += left;
7481 const Vec2d p = a + dir * t;
7482 if (on) { cur.push_back(p); out.push_back(cur); cur.clear(); }
7483 else { cur.clear(); cur.push_back(p); }
7484 on = !on;
7485 left = on ? dash : gap;
7486 }
7487 left -= (seg - t);
7488 if (on) cur.push_back(b);
7489 }
7490 if (on && cur.size() >= 2) out.push_back(cur);
7491 return out;
7492}

References dash_polyline().

Referenced by dash_polyline(), and Slic3r::GUI::DesignSketchTool::render().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dataview_remove_insets()

void Slic3r::GUI::dataview_remove_insets ( wxDataViewCtrl * dv)
10 {
11 NSScrollView* scrollview = (NSScrollView*) ((wxCocoaDataViewControl*)dv->GetDataViewPeer())->GetWXWidget();
12 NSOutlineView* outlineview = scrollview.documentView;
13 [outlineview setIntercellSpacing: NSMakeSize(0.0, 1.0)];
14 if (@available(macOS 11, *)) {
15 [outlineview setStyle:NSTableViewStylePlain];
16 }
17}

Referenced by Slic3r::GUI::ObjectList::create_objects_ctrl().

Here is the caller graph for this function:

◆ debugged()

bool Slic3r::GUI::debugged ( )
93{
94 #ifdef _WIN32
95 return IsDebuggerPresent() == TRUE;
96 #else
97 return false;
98 #endif /* _WIN32 */
99}

◆ decode()

std::string Slic3r::GUI::decode ( std::string const & extra,
std::string const & path = {} )
static
1406 {}) {
1407 char const* p = extra.data();
1408 char const* e = p + extra.length();
1409 while (p + 4 < e) {
1410 boost::uint16_t len = ((boost::uint16_t)p[2]) | ((boost::uint16_t)p[3] << 8);
1411 if (p[0] == '\x75' && p[1] == '\x70' && len >= 5 && p + 4 + len < e && p[4] == '\x01') {
1412 return std::string(p + 9, p + 4 + len);
1413 }
1414 else {
1415 p += 4 + len;
1416 }
1417 }
1418 return Slic3r::decode_path(path.c_str());
1419}
std::string decode_path(const char *src)
Definition utils.cpp:1401

Referenced by Slic3r::GUI::GUI_App::install_plugin().

Here is the caller graph for this function:

◆ decode_color()

wxColour Slic3r::GUI::decode_color ( const std::string & color)
static
52{
53 std::array<int, 3> ret = {0, 0, 0};
54 const char * c = color.data() + 1;
55 if (color.size() == 7 && color.front() == '#') {
56 for (size_t j = 0; j < 3; ++j) {
57 int digit1 = hex_digit_to_int(*c++);
58 int digit2 = hex_digit_to_int(*c++);
59 if (digit1 == -1 || digit2 == -1) break;
60
61 ret[j] = float(digit1 * 16 + digit2);
62 }
63 }
64 return wxColour(ret[0], ret[1], ret[2]);
65}
int hex_digit_to_int(const char c)
Definition GUI_Utils.hpp:452

References hex_digit_to_int().

Referenced by Slic3r::GUI::SliceInfoPopup::SliceInfoPopup(), decode_color_to_float_array(), Slic3r::GUI::ModelNode::get_bitmap(), Slic3r::GUI::TickCodeInfo::get_color_for_tick(), Slic3r::GUI::PartPlate::get_imex_head_filament_color(), Slic3r::GUI::ObjectTablePanel::init_filaments_and_colors(), Slic3r::GUI::anonymous_namespace{ColorPickerDialog.cpp}::parse_color(), Slic3r::GUI::GLGizmoTextureDisplacement::rank_mixes(), and Slic3r::GUI::PartPlate::update_exclusion_volume_preview_models().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode_color_to_float_array()

ColorRGBA Slic3r::GUI::decode_color_to_float_array ( const std::string color)
static
61{
63 decode_color(color, ret);
64 return ret;
65}
static const ColorRGBA BLACK()
Definition Color.hpp:127
static wxColour decode_color(const std::string &color)
Definition SliceInfoPanel.cpp:51

References Slic3r::ColorRGBA::BLACK(), and decode_color().

Referenced by Slic3r::GUI::NotificationManager::PopNotification::PopNotification(), Slic3r::GUI::IMSlider::draw_colored_band(), Slic3r::GUI::ImGuiWrapper::push_confirm_button_style(), Slic3r::GUI::ImGuiWrapper::push_radio_style(), Slic3r::GUI::IMSlider::render_add_menu(), and Slic3r::GUI::IMSlider::render_edit_menu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decompose_base_color_display()

wxString Slic3r::GUI::decompose_base_color_display ( DecomposeBaseColor color)
59{
60 switch (color) {
61 case DecomposeBaseColor::Cyan: return _L("Cyan");
62 case DecomposeBaseColor::Magenta: return _L("Magenta");
63 case DecomposeBaseColor::Yellow: return _L("Yellow");
64 case DecomposeBaseColor::White: return _L("White");
65 case DecomposeBaseColor::Red: return _L("Red");
66 case DecomposeBaseColor::Green: return _L("Green");
67 case DecomposeBaseColor::Blue: return _L("Blue");
68 default: return wxString();
69 }
70}

References _L, Blue, Cyan, Green, Magenta, Red, White, and Yellow.

Referenced by prepare_decompose_mixed_result().

Here is the caller graph for this function:

◆ decompose_base_color_en()

const char * Slic3r::GUI::decompose_base_color_en ( DecomposeBaseColor color)
45{
46 switch (color) {
47 case DecomposeBaseColor::Cyan: return "Cyan";
48 case DecomposeBaseColor::Magenta: return "Magenta";
49 case DecomposeBaseColor::Yellow: return "Yellow";
50 case DecomposeBaseColor::White: return "White";
51 case DecomposeBaseColor::Red: return "Red";
52 case DecomposeBaseColor::Green: return "Green";
53 case DecomposeBaseColor::Blue: return "Blue";
54 default: return "";
55 }
56}

References Blue, Cyan, Green, Magenta, Red, White, and Yellow.

Referenced by lookup_decompose_official_component().

Here is the caller graph for this function:

◆ decompose_basic_filament_id()

std::string Slic3r::GUI::decompose_basic_filament_id ( const std::string & basic_type)
104{
105 // The result becomes DecomposeOfficialComponent::filament_id, which the rest of this file
106 // reads as one of our OF ids (translating back before it compares against the printer's
107 // ids), so translate on the way out; kDecompose*FilamentId itself stays the printer-side
108 // literal. The only place that would carry it further, project_config's "filament_id", is
109 // dead code: that key is not in PresetBundle's s_project_options.
110 const std::string printer_filament_id = basic_type == kDecomposePetgBasicType ? kDecomposePetgFilamentId : kDecomposePlaFilamentId;
111 auto* agent = wxGetApp().getAgent();
112 return agent ? agent->to_orca_filament_id(printer_filament_id) : printer_filament_id;
113}
constexpr const char * kDecomposePlaFilamentId
Definition ColorDecomposeSupport.hpp:23
constexpr const char * kDecomposePetgBasicType
Definition ColorDecomposeSupport.hpp:20
constexpr const char * kDecomposePetgFilamentId
Definition ColorDecomposeSupport.hpp:24

References kDecomposePetgBasicType, kDecomposePetgFilamentId, and kDecomposePlaFilamentId.

Referenced by lookup_decompose_official_component().

Here is the caller graph for this function:

◆ decompose_basic_type_from_source()

std::string Slic3r::GUI::decompose_basic_type_from_source ( size_t source_config_idx,
size_t source_physical_idx,
const std::vector< std::string > & physical_types )
75{
76 auto& project_config = wxGetApp().preset_bundle->project_config;
77 if (auto* filament_id_opt = project_config.option<ConfigOptionStrings>("filament_id")) {
78 if (source_config_idx < filament_id_opt->values.size()) {
79 // Dead in practice: "filament_id" is not in PresetBundle's s_project_options, so this
80 // option() lookup (create=false) always returns null and the block never runs. Kept as
81 // found, with the translation the values would need: they would be our OF ids, and the
82 // two constants are the printer's own ids.
83 auto* agent = wxGetApp().getAgent();
84 const std::string& orca_filament_id = filament_id_opt->values[source_config_idx];
85 const std::string printer_filament_id = agent ? agent->from_orca_filament_id(orca_filament_id) : orca_filament_id;
86 if (printer_filament_id == kDecomposePetgFilamentId)
88 if (printer_filament_id == kDecomposePlaFilamentId)
90 }
91 }
92
93 if (source_physical_idx < physical_types.size()) {
94 const std::string& type = physical_types[source_physical_idx];
99 }
101}
constexpr const char * kDecomposePlaBasicType
Definition ColorDecomposeSupport.hpp:19
constexpr const char * kDecomposePetgShortType
Definition ColorDecomposeSupport.hpp:22
constexpr const char * kDecomposePlaShortType
Definition ColorDecomposeSupport.hpp:21

References kDecomposePetgBasicType, kDecomposePetgFilamentId, kDecomposePetgShortType, kDecomposePlaBasicType, kDecomposePlaFilamentId, and kDecomposePlaShortType.

Referenced by count_decompose_new_physical_filaments(), and prepare_decompose_mixed_result().

Here is the caller graph for this function:

◆ decompose_normalize_color_hex()

std::string Slic3r::GUI::decompose_normalize_color_hex ( std::string color)
35{
36 if (color.size() >= 7)
37 color = color.substr(0, 7);
38 std::transform(color.begin(), color.end(), color.begin(), [](unsigned char c) {
39 return static_cast<char>(std::toupper(c));
40 });
41 return color;
42}

Referenced by find_existing_decompose_component(), lookup_decompose_official_component(), texture_normalize_color_hex(), and Slic3r::GUI::ColorDecomposeDialog::try_build_single_base_result().

Here is the caller graph for this function:

◆ def_text_color()

std::string Slic3r::GUI::def_text_color ( )
static
98{
99 wxColour def_colour = wxGetApp().get_label_clr_default();//wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
100 return encode_color(ColorRGB(def_colour.Red(), def_colour.Green(), def_colour.Blue()));
101}
Definition Color.hpp:17

References Slic3r::encode_color().

Referenced by Slic3r::GUI::ModelNode::ModelNode(), Slic3r::GUI::DiffModel::AddOption(), Slic3r::GUI::DiffModel::AddPreset(), and Slic3r::GUI::ModelNode::UpdateEnabling().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ delete_filament_preset_by_name()

bool Slic3r::GUI::delete_filament_preset_by_name ( std::string delete_preset_name,
std::string & selected_preset_name )
static
278{
279 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format("select preset, name %1%") % delete_preset_name;
280 if (delete_preset_name.empty()) return false;
281
282 // Find an alternate preset to be selected after the current preset is deleted.
283 PresetCollection &m_presets = wxGetApp().preset_bundle->filaments;
284 if (delete_preset_name == selected_preset_name) {
285 const std::deque<Preset> &presets = m_presets.get_presets();
286 size_t idx_current = m_presets.get_idx_selected();
287
288 // Find the visible preset.
289 size_t idx_new = idx_current;
290 if (idx_current > presets.size()) idx_current = presets.size();
291 if (idx_current < 0) idx_current = 0;
292 if (idx_new < presets.size())
293 for (; idx_new < presets.size() && (presets[idx_new].name == delete_preset_name || !presets[idx_new].is_visible); ++idx_new)
294 ;
295 if (idx_new == presets.size())
296 for (idx_new = idx_current - 1; idx_new > 0 && (presets[idx_new].name == delete_preset_name || !presets[idx_new].is_visible); --idx_new)
297 ;
298 selected_preset_name = presets[idx_new].name;
299 BOOST_LOG_TRIVIAL(info) << boost::format("cause by delete current ,choose the next visible, idx %1%, name %2%") % idx_new % selected_preset_name;
300 }
301
302 try {
303 // BBS delete preset
304 Preset *need_delete_preset = m_presets.find_preset(delete_preset_name);
305 if (!need_delete_preset) BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(" can't find delete preset and name: %1%") % delete_preset_name;
306 if (!need_delete_preset->setting_id.empty()) {
307 BOOST_LOG_TRIVIAL(info) << "delete preset = " << need_delete_preset->name << ", setting_id = " << need_delete_preset->setting_id;
308 wxGetApp().delete_preset_from_cloud(need_delete_preset->setting_id, need_delete_preset->file);
309 } else {
310 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(" can't preset setting id is empty and name: %1%") % delete_preset_name;
311 }
312 if (m_presets.get_edited_preset().name == delete_preset_name) {
313 m_presets.discard_current_changes();
314 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format("delete preset dirty and cancelled");
315 }
316 m_presets.delete_preset(need_delete_preset->name);
317 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " preset has been delete from filaments, and preset name is: " << delete_preset_name;
318 } catch (const std::exception &ex) {
319 // FIXME add some error reporting!
320 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format("found exception when delete: %1% and preset name: %%") % ex.what() % delete_preset_name;
321 return false;
322 }
323
324 return true;
325}
Definition Preset.hpp:570
const std::deque< Preset > & get_presets() const
Definition Preset.hpp:781
bool delete_preset(const std::string &name, bool force=false)
Definition Preset.cpp:3578
void discard_current_changes()
Definition Preset.hpp:795
size_t get_idx_selected()
Definition Preset.hpp:782
std::string name
Definition Preset.hpp:288
std::string setting_id
Definition Preset.hpp:325
std::string file
Definition Preset.hpp:292

References Slic3r::PresetCollection::delete_preset(), Slic3r::PresetCollection::discard_current_changes(), Slic3r::Preset::file, Slic3r::PresetCollection::find_preset(), Slic3r::PresetCollection::get_edited_preset(), Slic3r::PresetCollection::get_idx_selected(), Slic3r::PresetCollection::get_presets(), Slic3r::Preset::name, and Slic3r::Preset::setting_id.

Referenced by Slic3r::GUI::EditFilamentPresetDialog::create_dialog_buttons(), and Slic3r::GUI::EditFilamentPresetDialog::delete_preset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ delete_negative_sign()

void Slic3r::GUI::delete_negative_sign ( Vec3d & value)
108 {
109 for (size_t i = 0; i < value.size(); i++) {
110 if (abs(value[i]) < 0.001)
111 value[i] = 0.f;
112 }
113}

Referenced by Slic3r::GUI::GizmoObjectManipulation::update_settings_value().

Here is the caller graph for this function:

◆ deserialize_nozzle_config()

std::map< int, std::vector< DevNozzle > > Slic3r::GUI::deserialize_nozzle_config ( const std::string & config_str)
static
1985{
1986 std::map<int, std::vector<DevNozzle>> nozzle_cfg_map;
1987 if (config_str.empty()) return nozzle_cfg_map;
1988
1989 std::vector<std::string> extruder_parts;
1990 boost::split(extruder_parts, config_str, boost::is_any_of("|"));
1991
1992 auto get_nozzles_from_string = [](const std::string& part_str) -> std::vector<DevNozzle> {
1993 std::vector<DevNozzle> nozzles;
1994 std::vector<std::string> parts;
1995 boost::split(parts, part_str, boost::is_any_of(";"));
1996 for (const auto &part : parts) {
1997 std::vector<std::string> values;
1998 boost::split(values, part, boost::is_any_of(","));
1999 if (values.size() == 2) {
2000 DevNozzle nozzle;
2001 nozzle.m_diameter = std::stof(values[0]);
2002 nozzle.m_nozzle_flow = static_cast<NozzleFlowType>(std::stoi(values[1]));
2003 nozzles.push_back(nozzle);
2004 }
2005 }
2006 return nozzles;
2007 };
2008
2009 if (extruder_parts.size() != 2) {
2010 auto nozzles = get_nozzles_from_string(config_str);
2011 nozzle_cfg_map[MAIN_EXTRUDER_ID] = nozzles;
2012 nozzle_cfg_map[DEPUTY_EXTRUDER_ID] = { DevNozzle() };
2013 return nozzle_cfg_map;
2014 }
2015
2016 if (!extruder_parts[0].empty()) {
2017 auto nozzles = get_nozzles_from_string(extruder_parts[0]);
2018 nozzle_cfg_map[DEPUTY_EXTRUDER_ID] = nozzles;
2019 }
2020 if (!extruder_parts[1].empty()) {
2021 auto nozzles = get_nozzles_from_string(extruder_parts[1]);
2022 nozzle_cfg_map[MAIN_EXTRUDER_ID] = nozzles;
2023 }
2024
2025 return nozzle_cfg_map;
2026}
#define DEPUTY_EXTRUDER_ID
Definition DevDefs.h:102
NozzleFlowType
Definition DevDefs.h:116
bool empty(const BoundingBoxBase< PointType, PointsType > &bb)
Definition BoundingBox.hpp:273
Definition DevNozzleSystem.h:34
float m_diameter
Definition DevNozzleSystem.h:41
NozzleFlowType m_nozzle_flow
Definition DevNozzleSystem.h:39

References DEPUTY_EXTRUDER_ID, Slic3r::empty(), Slic3r::DevNozzle::m_diameter, Slic3r::DevNozzle::m_nozzle_flow, and MAIN_EXTRUDER_ID.

Referenced by Slic3r::GUI::Sidebar::priv::get_nozzle_options().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deserialize_nozzle_option()

std::optional< NozzleOption > Slic3r::GUI::deserialize_nozzle_option ( const std::string & option_str)
static
2085 {
2086 if (option_str.empty()) return std::nullopt;
2087
2088 std::vector<std::string> parts;
2089 boost::split(parts, option_str, boost::is_any_of("|"));
2090 if (parts.size() != 2) return std::nullopt;
2091
2092 NozzleOption option;
2093 option.diameter = parts[0];
2094
2095 std::vector<std::string> extruder_parts;
2096 boost::split(extruder_parts, parts[1], boost::is_any_of(";"));
2097
2098 for (const auto& extruder_part : extruder_parts) {
2099 if (extruder_part.empty()) continue;
2100
2101 std::vector<std::string> extruder_data;
2102 boost::split(extruder_data, extruder_part, boost::is_any_of(":"));
2103 if (extruder_data.size() != 2) continue;
2104
2105 int extruder_id = std::stoi(extruder_data[0]);
2106 std::unordered_map<NozzleVolumeType, int> stats;
2107
2108 std::vector<std::string> stat_parts;
2109 boost::split(stat_parts, extruder_data[1], boost::is_any_of(","));
2110
2111 for (const auto& stat_part : stat_parts) {
2112 std::vector<std::string> kv;
2113 boost::split(kv, stat_part, boost::is_any_of("#"));
2114 if (kv.size() == 2) {
2115 NozzleVolumeType type = static_cast<NozzleVolumeType>(std::stoi(kv[0]));
2116 int count = std::stoi(kv[1]);
2117 stats[type] = count;
2118 }
2119 }
2120
2121 option.extruder_nozzle_stats[extruder_id] = stats;
2122 }
2123
2124 return option;
2125}
static unsigned int count
Definition AuxiliaryDataViewModel.cpp:246
std::unordered_map< int, std::pair< NozzleVolumeType, int > > extruder_nozzle_stats
Definition MultiNozzleSync.hpp:64
std::string diameter
Definition MultiNozzleSync.hpp:63
Definition MultiNozzleSync.hpp:62
NozzleVolumeType
Definition PrintConfig.hpp:618

References count, Slic3r::GUI::NozzleOption::diameter, and Slic3r::GUI::NozzleOption::extruder_nozzle_stats.

Referenced by Slic3r::GUI::Sidebar::priv::get_nozzle_options().

Here is the caller graph for this function:

◆ design_idle_face_color()

ColorRGBA Slic3r::GUI::design_idle_face_color ( )
inline
56{
57 return ColorRGBA(0.72f, 0.76f, 0.80f, 0.14f);
58}

Referenced by Slic3r::GUI::DesignSketchTool::render().

Here is the caller graph for this function:

◆ design_selection_color()

ColorRGBA Slic3r::GUI::design_selection_color ( float alpha = 1.0f)
inline
50{
51 return ColorRGBA(0.20f, 0.85f, 1.00f, alpha);
52}

Referenced by Slic3r::GUI::DesignCanvas::reload(), Slic3r::GUI::DesignSketchTool::render(), Slic3r::GUI::DesignSketchTool::render_face_outline(), and Slic3r::GUI::DesignSketchTool::render_solid_highlight().

Here is the caller graph for this function:

◆ desktop_open_any_folder()

void Slic3r::GUI::desktop_open_any_folder ( const std::string & path)
627{
628 // Execute command to open a file explorer, platform dependent.
629
630#ifdef _WIN32
631 const wxString widepath = from_u8(path);
632 ::wxExecute(L"explorer /select," + widepath, wxEXEC_ASYNC, nullptr);
633#elif __APPLE__
635#else
636
637 // Orca#6449: Open containing dir instead of opening the file directly.
638 std::string new_path = path;
639 boost::filesystem::path p(new_path);
640 if (!fs::is_directory(p)) {
641 new_path = p.parent_path().string();
642 }
643 const char* argv[] = {"xdg-open", new_path.data(), nullptr};
644
645 // Check if we're running in an AppImage container, if so, we need to remove AppImage's env vars,
646 // because they may mess up the environment expected by the file manager.
647 // Mostly this is about LD_LIBRARY_PATH, but we remove a few more too for good measure.
648 if (wxGetEnv("APPIMAGE", nullptr)) {
649 // We're running from AppImage
650 wxEnvVariableHashMap env_vars;
651 wxGetEnvMap(&env_vars);
652
653 env_vars.erase("APPIMAGE");
654 env_vars.erase("APPDIR");
655 env_vars.erase("LD_LIBRARY_PATH");
656 env_vars.erase("LD_PRELOAD");
657 env_vars.erase("UNION_PRELOAD");
658
659 wxExecuteEnv exec_env;
660 exec_env.env = std::move(env_vars);
661
662 wxString owd;
663 if (wxGetEnv("OWD", &owd)) {
664 // This is the original work directory from which the AppImage image was run,
665 // set it as CWD for the child process:
666 exec_env.cwd = std::move(owd);
667 }
668
669 ::wxExecute(argv, wxEXEC_ASYNC, nullptr, &exec_env);
670 } else {
671 // Looks like we're NOT running from AppImage, we'll make no changes to the environment.
672 ::wxExecute(argv, wxEXEC_ASYNC, nullptr, nullptr);
673 }
674#endif
675}
#define L(s)
Definition ExtrusionEntity.cpp:25
void openFolderForFile(wxString const &file)
Definition MacDarkMode.mm:119

References from_u8(), L, and openFolderForFile().

Referenced by Slic3r::GUI::MediaFilePanel::doAction(), Slic3r::GUI::GUI_App::handle_web_request(), and Slic3r::GUI::PluginsDialog::open_plugin_folder().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ desktop_open_datadir_folder()

void Slic3r::GUI::desktop_open_datadir_folder ( )
581{
582 // Execute command to open a file explorer, platform dependent.
583 const auto path = data_dir();
584#ifdef _WIN32
585 const wxString widepath = from_u8(path);
586 const wchar_t *argv[] = { L"explorer", widepath.GetData(), nullptr };
587 ::wxExecute(argv, wxEXEC_ASYNC, nullptr);
588#elif __APPLE__
589 const char *argv[] = { "open", path.data(), nullptr };
590 ::wxExecute(argv, wxEXEC_ASYNC, nullptr);
591#else
592 const char *argv[] = { "xdg-open", path.data(), nullptr };
593
594 // Check if we're running in an AppImage container, if so, we need to remove AppImage's env vars,
595 // because they may mess up the environment expected by the file manager.
596 // Mostly this is about LD_LIBRARY_PATH, but we remove a few more too for good measure.
597 if (wxGetEnv("APPIMAGE", nullptr)) {
598 // We're running from AppImage
599 wxEnvVariableHashMap env_vars;
600 wxGetEnvMap(&env_vars);
601
602 env_vars.erase("APPIMAGE");
603 env_vars.erase("APPDIR");
604 env_vars.erase("LD_LIBRARY_PATH");
605 env_vars.erase("LD_PRELOAD");
606 env_vars.erase("UNION_PRELOAD");
607
608 wxExecuteEnv exec_env;
609 exec_env.env = std::move(env_vars);
610
611 wxString owd;
612 if (wxGetEnv("OWD", &owd)) {
613 // This is the original work directory from which the AppImage image was run,
614 // set it as CWD for the child process:
615 exec_env.cwd = std::move(owd);
616 }
617
618 ::wxExecute(argv, wxEXEC_ASYNC, nullptr, &exec_env);
619 } else {
620 // Looks like we're NOT running from AppImage, we'll make no changes to the environment.
621 ::wxExecute(argv, wxEXEC_ASYNC, nullptr, nullptr);
622 }
623#endif
624}
const std::string & data_dir()
Definition utils.cpp:365

References Slic3r::data_dir(), from_u8(), and L.

Referenced by Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::build_command_catalog(), and Slic3r::GUI::MainFrame::generate_help_menu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ desktop_open_project_attachment()

bool Slic3r::GUI::desktop_open_project_attachment ( wxWindow * parent,
const boost::filesystem::path & path )
679{
680 // The auxiliary path is UTF-8, which is what boost::filesystem reads a narrow string as.
681 const boost::filesystem::path aux_root(wxGetApp().plater()->model().get_auxiliary_file_temp_path());
682 boost::system::error_code ec;
683 if (!is_absolute_path_within_root(path, aux_root) || !boost::filesystem::is_regular_file(path, ec))
684 return false;
685
686 // Attachments come with the project and carry no download mark, so the desktop would open them without a warning.
687 if (!is_safe_to_open_file_name(path.filename().string())) {
688 MessageDialog dlg(parent,
689 wxString::Format(_L("\"%s\" is not a plain document, image or model file. Opening it may run it as a "
690 "program or script on this computer.\n\n"
691 "Only open attachments from projects you trust. Open it anyway?"),
692 from_path(path.filename())),
693 _L("Open attachment"), wxICON_WARNING | wxYES_NO);
694 if (dlg.ShowModal() != wxID_YES)
695 return false;
696 }
697 return wxLaunchDefaultApplication(from_path(path), 0);
698}
Definition MsgDialog.hpp:169
wxString from_path(const boost::filesystem::path &path)
Definition GUI.cpp:555
bool is_safe_to_open_file_name(const std::string &file_name)
Definition utils.cpp:1264
bool is_absolute_path_within_root(const boost::filesystem::path &path, const boost::filesystem::path &root)
Definition utils.cpp:1258

References _L, from_path(), Slic3r::is_absolute_path_within_root(), Slic3r::is_safe_to_open_file_name(), plater(), and Slic3r::GUI::DPIAware< P >::ShowModal().

Referenced by Slic3r::GUI::AuFile::on_dclick(), and Slic3r::GUI::ProjectPanel::OnScriptMessage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ determine_load_type()

LoadType Slic3r::GUI::determine_load_type ( std::string filename,
std::string override_setting = "" )
18912{
18913 std::string setting;
18914
18915 if (override_setting != "") {
18916 setting = override_setting;
18917 } else {
18918 setting = wxGetApp().app_config->get(SETTING_PROJECT_LOAD_BEHAVIOUR);
18919 }
18920
18923 } else if (setting == OPTION_PROJECT_LOAD_BEHAVIOUR_ALWAYS_ASK) {
18924 ProjectDropDialog dlg(filename);
18925 if (dlg.ShowModal() == wxID_OK) {
18926 int choice = dlg.get_action();
18927 LoadType load_type = static_cast<LoadType>(choice);
18928 wxGetApp().app_config->set("import_project_action", std::to_string(choice));
18929
18930 // BBS: jump to plater panel
18931 wxGetApp().mainframe->select_tab(TAB_ID_PREPARE);
18932 return load_type;
18933 }
18934
18935 return LoadType::Unknown; // Cancel
18936 } else {
18937 return LoadType::OpenProject;
18938 }
18939}
#define OPTION_PROJECT_LOAD_BEHAVIOUR_ALWAYS_ASK
Definition AppConfig.hpp:25
#define SETTING_PROJECT_LOAD_BEHAVIOUR
Definition AppConfig.hpp:22
#define OPTION_PROJECT_LOAD_BEHAVIOUR_LOAD_GEOMETRY
Definition AppConfig.hpp:26
#define TAB_ID_PREPARE
Definition MainFrame.hpp:60
Definition Plater.cpp:18591
LoadType
Definition Plater.cpp:484
@ Unknown
Definition Plater.cpp:485

References Slic3r::GUI::ProjectDropDialog::get_action(), LoadGeometry, OpenProject, OPTION_PROJECT_LOAD_BEHAVIOUR_ALWAYS_ASK, OPTION_PROJECT_LOAD_BEHAVIOUR_LOAD_GEOMETRY, SETTING_PROJECT_LOAD_BEHAVIOUR, Slic3r::GUI::DPIAware< P >::ShowModal(), TAB_ID_PREPARE, and Unknown.

Referenced by Slic3r::GUI::Plater::load_project(), and Slic3r::GUI::Plater::open_3mf_file().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ diamond()

GLModel::Geometry Slic3r::GUI::diamond ( unsigned int resolution)
1256{
1257 resolution = std::max<unsigned int>(4, resolution);
1258
1259 GLModel::Geometry data;
1261 data.reserve_vertices(resolution + 2);
1262 data.reserve_indices((2 * (resolution + 1)) * 3);
1263
1264 const float step = 2.0f * float(PI) / float(resolution);
1265
1266 // vertices
1267 for (unsigned int i = 0; i < resolution; ++i) {
1268 const float ii = float(i) * step;
1269 const Vec3f p = { 0.5f * ::cos(ii), 0.5f * ::sin(ii), 0.0f };
1270 data.add_vertex(p, (Vec3f)p.normalized());
1271 }
1272 Vec3f p = { 0.0f, 0.0f, 0.5f };
1273 data.add_vertex(p, (Vec3f)p.normalized());
1274 p = { 0.0f, 0.0f, -0.5f };
1275 data.add_vertex(p, (Vec3f)p.normalized());
1276
1277 // triangles
1278 // top
1279 for (unsigned int i = 0; i < resolution; ++i) {
1280 data.add_triangle(i + 0, i + 1, resolution);
1281 }
1282 data.add_triangle(resolution - 1, 0, resolution);
1283
1284 // bottom
1285 for (unsigned int i = 0; i < resolution; ++i) {
1286 data.add_triangle(i + 0, resolution + 1, i + 1);
1287 }
1288 data.add_triangle(resolution - 1, resolution + 1, 0);
1289
1290 return data;
1291}

References Slic3r::GUI::GLModel::Geometry::add_triangle(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::Geometry::P3N3, PI, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), Slic3r::resolution(), and Slic3r::GUI::GLModel::Geometry::Triangles.

Here is the call graph for this function:

◆ disable_screensaver()

void Slic3r::GUI::disable_screensaver ( )
72{
73 #if __APPLE__
74 CFStringRef reasonForActivity = CFSTR("Slic3r");
75 [[maybe_unused]]IOReturn success = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep,
76 kIOPMAssertionLevelOn, reasonForActivity, &assertionID);
77 // ignore result: success == kIOReturnSuccess
78 #elif _WIN32
79 SetThreadExecutionState(ES_DISPLAY_REQUIRED | ES_CONTINUOUS);
80 #endif
81}

◆ display_edge_tol()

double Slic3r::GUI::display_edge_tol ( const TopoDS_Shape & shape)
static
3474{
3475 Bnd_Box box;
3476 BRepBndLib::Add(shape, box);
3477 return std::max(1e-3 * (box.IsVoid() ? 1.0 : std::sqrt(box.SquareExtent())), 0.005);
3478}

References display_edge_tol().

Referenced by display_edge_tol(), Slic3r::GUI::DesignSketchTool::make_face_highlight(), and Slic3r::GUI::DesignSketchTool::refresh_body_edges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_local_z_move()

void Slic3r::GUI::do_local_z_move ( Selection & selection,
double relative_move )

Translation along local z Axis (emboss direction).

Parameters
selectionSelected volume for translate
relative_moveRelative move along emboss direction
438 {
439 assert(!selection.is_empty());
440 if (selection.is_empty()) return;
441
442 selection.setup_cache();
443 auto selection_translate_fnc = [&selection, relative_move]() {
444 Vec3d translate = Vec3d::UnitZ() * relative_move;
446 };
447 selection_transform(selection, selection_translate_fnc);
448}
void translate(const Vec3d &displacement, TransformationType transformation_type)
Definition Selection.cpp:1279
void setup_cache()
Definition Selection.cpp:1238
bool is_empty() const
Definition Selection.hpp:272
@ Local
Definition GUI_Geometry.hpp:23
void selection_transform(Selection &selection, const std::function< void()> &selection_transformation_fnc)
Wrap function around selection transformation to apply fix transformation Fix transformation is neede...
Definition SurfaceDrag.cpp:307
void translate(ExPolygonsWithIds &e, const Point &p)
Definition Emboss.cpp:1368

References Slic3r::GUI::Selection::is_empty(), Slic3r::GUI::TransformationType::Local, selection_transform(), Slic3r::GUI::Selection::setup_cache(), Slic3r::GUI::Selection::translate(), and Slic3r::translate().

Referenced by Slic3r::GUI::GLGizmoEmboss::draw_advanced(), Slic3r::GUI::GLGizmoSVG::draw_distance(), and anonymous_namespace{GLGizmoEmboss.cpp}::fix_transformation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_local_z_rotate()

void Slic3r::GUI::do_local_z_rotate ( Selection & selection,
double relative_angle )

Rotation around z Axis(emboss direction).

Parameters
selectionSelected volume for rotation
relative_angleRelative angle to rotate around emboss direction
406 {
407 assert(!selection.is_empty());
408 if(selection.is_empty()) return;
409
410 bool is_single_volume = selection.volumes_count() == 1;
411 assert(is_single_volume);
412 if (!is_single_volume) return;
413
414 // Fix angle for mirrored volume
415 bool is_mirrored = false;
416 const GLVolume* gl_volume = selection.get_first_volume();
417 if (gl_volume != nullptr) {
418 const ModelInstance *instance = get_model_instance(*gl_volume, selection.get_model()->objects);
419 bool is_instance_mirrored = (instance != nullptr)? has_reflection(instance->get_matrix()) : false;
420 if (is_embossed_object(selection)) {
421 is_mirrored = is_instance_mirrored;
422 } else {
423 const ModelVolume *volume = get_model_volume(*gl_volume, selection.get_model()->objects);
424 if (volume != nullptr)
425 is_mirrored = is_instance_mirrored != has_reflection(volume->get_matrix());
426 }
427 }
428 if (is_mirrored)
429 relative_angle *= -1;
430
431 selection.setup_cache();
432 auto selection_rotate_fnc = [&selection, &relative_angle](){
433 selection.rotate(Vec3d(0., 0., relative_angle), get_drag_transformation_type(selection));
434 };
435 selection_transform(selection, selection_rotate_fnc);
436}
unsigned int volumes_count() const
Definition Selection.hpp:322
void rotate(const Vec3d &rotation, TransformationType transformation_type)
Definition Selection.cpp:1343
const Transform3d & get_matrix() const
Definition Model.hpp:1511
const Transform3d & get_matrix() const
Definition Model.hpp:1139
TransformationType get_drag_transformation_type(const Selection &selection)
Distiguish between object and volume Differ in possible transformation type.
Definition SurfaceDrag.cpp:450
bool has_reflection(const Transform3d &transform)
Check whether transformation matrix contains odd number of mirroring. NOTE: In code is sometime funct...
Definition Point.hpp:179

References get_drag_transformation_type(), Slic3r::GUI::Selection::get_first_volume(), Slic3r::ModelInstance::get_matrix(), Slic3r::ModelVolume::get_matrix(), Slic3r::GUI::Selection::get_model(), get_model_instance(), get_model_volume(), Slic3r::has_reflection(), Slic3r::GUI::Selection::is_empty(), Slic3r::Model::objects, Slic3r::GUI::Selection::rotate(), selection_transform(), Slic3r::GUI::Selection::setup_cache(), and Slic3r::GUI::Selection::volumes_count().

Referenced by Slic3r::GUI::GLGizmoEmboss::draw_advanced(), Slic3r::GUI::GLGizmoSVG::draw_rotation(), and anonymous_namespace{GLGizmoEmboss.cpp}::fix_transformation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dots()

wxString Slic3r::GUI::dots ( "..." ,
wxConvUTF8  )
static

Referenced by Slic3r::GUI::InputIpAddressDialog::InputIpAddressDialog(), Slic3r::GUI::anonymous_namespace{SceneBenchmark.cpp}::SceneBenchmarkDialog::SceneBenchmarkDialog(), Slic3r::GUI::TroubleshootDialog::TroubleshootDialog(), Slic3r::GUI::MenuFactory::append_menu_item_export_drc(), Slic3r::GUI::MenuFactory::append_menu_item_export_stl(), Slic3r::GUI::MenuFactory::append_menu_item_replace_all_with_stl(), Slic3r::GUI::MenuFactory::append_menu_item_replace_with_stl(), Slic3r::GUI::MenuFactory::append_menu_items_instance_manipulation(), Slic3r::GUI::PluginConfigField::BUILD(), Slic3r::GUI::PhysicalPrinterDialog::build_printhost_settings(), Slic3r::GUI::Tab::compatible_widget_create(), Slic3r::GUI::TabPrinter::create_bed_shape_widget(), Slic3r::GUI::PreferencesDialog::create_item_downloads(), Slic3r::GUI::PreferencesDialog::create_items(), Slic3r::GUI::Tab::create_preset_tab(), Slic3r::GUI::ColourPicker::draw_bmp_btn(), Slic3r::GUI::GLGizmoSVG::draw_filename(), Slic3r::GUI::DiffViewCtrl::get_short_string(), Slic3r::GUI::MainFrame::init_menubar_as_editor(), Slic3r::GUI::MainFrame::init_menubar_as_gcodeviewer(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::ObjectList::load_modifier(), Slic3r::GUI::GUI_App::on_init_inner(), Slic3r::GUI::MainFrame::open_menubar_item(), Slic3r::GUI::GUI_App::recreate_GUI(), Slic3r::GUI::anonymous_namespace{SceneBenchmark.cpp}::SceneBenchmarkDialog::set_status(), and Slic3r::GUI::PluginConfigField::update_button_label().

Here is the caller graph for this function:

◆ double_to_string()

wxString Slic3r::GUI::double_to_string ( double const value,
const int max_precision )
100{
101// Style_NoTrailingZeroes does not work on OSX. It also does not work correctly with some locales on Windows.
102// return wxNumberFormatter::ToString(value, max_precision, wxNumberFormatter::Style_NoTrailingZeroes);
103
104 wxString s = wxNumberFormatter::ToString(value, max_precision, wxNumberFormatter::Style_None);
105
106 // The following code comes from wxNumberFormatter::RemoveTrailingZeroes(wxString& s)
107 // with the exception that here one sets the decimal separator explicitely to dot.
108 // If number is in scientific format, trailing zeroes belong to the exponent and cannot be removed.
109 if (s.find_first_of("eE") == wxString::npos) {
110 char dec_sep = is_decimal_separator_point() ? '.' : ',';
111 const size_t posDecSep = s.find(dec_sep);
112 // No decimal point => removing trailing zeroes irrelevant for integer number.
113 if (posDecSep != wxString::npos) {
114 // Find the last character to keep.
115 size_t posLastNonZero = s.find_last_not_of("0");
116 // If it's the decimal separator itself, don't keep it either.
117 if (posLastNonZero == posDecSep)
118 -- posLastNonZero;
119 s.erase(posLastNonZero + 1);
120 // Remove sign from orphaned zero.
121 if (s.compare("-0") == 0)
122 s = "0";
123 }
124 }
125
126 return s;
127}
bool is_decimal_separator_point()
Definition LocalesUtils.cpp:78

References Slic3r::is_decimal_separator_point().

Referenced by Slic3r::GUI::LayerRangeEditor::LayerRangeEditor(), Slic3r::GUI::PageDiameters::PageDiameters(), Slic3r::GUI::BedShape::apply_optgroup_values(), Slic3r::GUI::TextCtrl::BUILD(), Slic3r::GUI::ObjectLayers::create_layer(), focus_event(), Slic3r::GUI::ConfigOptionsGroup::get_config_value(), Slic3r::GUI::ConfigOptionsGroup::get_config_value2(), get_formatted_tooltip_text(), Slic3r::GUI::BedShape::get_full_name_with_params(), get_string_value(), Slic3r::GUI::Field::get_value_by_opt_type(), and Slic3r::GUI::Choice::set_selection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dp_ctl_text()

wxColour Slic3r::GUI::dp_ctl_text ( )
static
215{ return dp_tok(TokCtlText); }
static wxColour dp_tok(DpTok t)
Definition DesignPanel.cpp:210

References dp_tok(), and TokCtlText.

Referenced by Slic3r::GUI::DesignPanel::DesignPanel(), Slic3r::GUI::DesignPanel::apply_dof_status(), Slic3r::GUI::DesignPanel::on_clear_expr(), Slic3r::GUI::DesignPanel::on_set_expr(), Slic3r::GUI::DesignPanel::open_tool(), and Slic3r::GUI::DesignPanel::refresh_constrain_dof().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dp_dark()

bool Slic3r::GUI::dp_dark ( )
static
209{ return wxGetApp().dark_mode(); }

Referenced by Slic3r::GUI::DesignPanel::DesignPanel(), commit_icon(), dp_tok(), and Slic3r::GUI::DesignPanel::on_sys_color_changed().

Here is the caller graph for this function:

◆ dp_item_dim()

wxColour Slic3r::GUI::dp_item_dim ( )
static
217{ return dp_tok(TokItemDim); }

References dp_tok(), and TokItemDim.

Referenced by Slic3r::GUI::DesignPanel::refresh_parts(), Slic3r::GUI::DesignPanel::refresh_pinned(), and Slic3r::GUI::DesignPanel::refresh_tree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dp_item_text()

wxColour Slic3r::GUI::dp_item_text ( )
static
216{ return dp_tok(TokItemText); }

References dp_tok(), and TokItemText.

Referenced by Slic3r::GUI::DesignPanel::refresh_parts(), Slic3r::GUI::DesignPanel::refresh_pinned(), and Slic3r::GUI::DesignPanel::refresh_tree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dp_panel_bg()

wxColour Slic3r::GUI::dp_panel_bg ( )
static
213{ return dp_tok(TokPanelBg); }

References dp_tok(), and TokPanelBg.

Referenced by Slic3r::GUI::DesignPanel::DesignPanel(), and style_sidebar_icon_btn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dp_pick_trace()

void Slic3r::GUI::dp_pick_trace ( const char * fmt,
... )
static
3887{
3888 if (!dp_pick_trace_on()) return;
3889 va_list ap; va_start(ap, fmt);
3890 std::fputs("[pick] ", stderr);
3891 std::vfprintf(stderr, fmt, ap);
3892 std::fputc('\n', stderr);
3893 va_end(ap);
3894 std::fflush(stderr);
3895}
static bool dp_pick_trace_on()
Definition DesignSketchTool.cpp:3880

References dp_pick_trace(), and dp_pick_trace_on().

Referenced by dp_pick_trace(), Slic3r::GUI::DesignSketchTool::handle_solid_click(), Slic3r::GUI::DesignSketchTool::hit_display_sketch(), Slic3r::GUI::DesignSketchTool::on_mouse_impl(), Slic3r::GUI::DesignSketchTool::pick_bodies_in_rectangle(), and Slic3r::GUI::DesignSketchTool::resolve_solid_pick().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dp_pick_trace_on()

bool Slic3r::GUI::dp_pick_trace_on ( )
static
3881{
3882 static const bool on = ::getenv("ORCA_CAD_PICK_TRACE") != nullptr;
3883 return on;
3884}

References dp_pick_trace_on().

Referenced by dp_pick_trace(), dp_pick_trace_on(), and Slic3r::GUI::DesignSketchTool::hit_display_sketch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dp_retheme()

wxColour Slic3r::GUI::dp_retheme ( const wxColour & c,
bool to_dark )
static
221{
222 for (const DpToken& t : kDpTokens)
223 if (c == (to_dark ? t.light : t.dark))
224 return to_dark ? t.dark : t.light;
225 return c;
226}
static const DpToken kDpTokens[TokCount]
Definition DesignPanel.cpp:197
Definition DesignPanel.cpp:194

References kDpTokens.

Referenced by Slic3r::GUI::DesignPanel::on_sys_color_changed().

Here is the caller graph for this function:

◆ dp_ribbon_bg()

wxColour Slic3r::GUI::dp_ribbon_bg ( )
static
211{ return dp_tok(TokRibbonBg); }

References dp_tok(), and TokRibbonBg.

Referenced by Slic3r::GUI::DesignPanel::DesignPanel(), and Slic3r::GUI::DesignPanel::set_active_tool_btn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dp_ribbon_hover()

wxColour Slic3r::GUI::dp_ribbon_hover ( )
static
212{ return dp_tok(TokRibbonHover); }

References dp_tok(), and TokRibbonHover.

Referenced by Slic3r::GUI::DesignPanel::DesignPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dp_sec_text()

wxColour Slic3r::GUI::dp_sec_text ( )
static
214{ return dp_tok(TokSecText); }

References dp_tok(), and TokSecText.

Referenced by Slic3r::GUI::DesignPanel::DesignPanel(), Slic3r::GUI::DesignPanel::on_clear_expr(), Slic3r::GUI::DesignPanel::on_set_expr(), Slic3r::GUI::DesignPanel::open_tool(), and Slic3r::GUI::DesignPanel::rebuild_constraint_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dp_tok()

wxColour Slic3r::GUI::dp_tok ( DpTok t)
static
210{ return dp_dark() ? kDpTokens[t].dark : kDpTokens[t].light; }

References dp_dark(), and kDpTokens.

Referenced by dp_ctl_text(), dp_item_dim(), dp_item_text(), dp_panel_bg(), dp_ribbon_bg(), dp_ribbon_hover(), and dp_sec_text().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dr_yaxis()

Vec3d Slic3r::GUI::dr_yaxis ( const Vec3d & axis,
const Vec3d & ref )
static
6708{
6709 Vec3d y = axis.cross(ref);
6710 if (y.norm() < 1e-9) return ref;
6711 y.normalize();
6712 return y;
6713}

References dr_yaxis().

Referenced by dr_yaxis(), Slic3r::GUI::DesignSketchTool::drag_draft_arc(), Slic3r::GUI::DesignSketchTool::hit_test_draft_handle(), and Slic3r::GUI::DesignSketchTool::render_draft_gizmo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dragging_rotate_gizmo()

void Slic3r::GUI::dragging_rotate_gizmo ( double gizmo_angle,
std::optional< float > & current_angle,
std::optional< float > & start_angle,
Selection & selection )

On dragging rotate gizmo func Transform GLVolume from selection.

Parameters
gizmo_angleGLGizmoRotate::get_angle()
current_angleIn/Out current angle visible in UI
start_angleCache for start dragging angle
selectionSelected only Actual embossed volume
458{
459 if (!start_angle.has_value())
460 // create cache for initial angle
461 start_angle = current_angle.value_or(0.f);
462
463 gizmo_angle -= PI / 2; // Grabber is upward
464
465 double new_angle = gizmo_angle + *start_angle;
466
467 const GLVolume *gl_volume = selection.get_first_volume();
468 assert(gl_volume != nullptr);
469 if (gl_volume == nullptr)
470 return;
471
472 bool is_volume_mirrored = has_reflection(gl_volume->get_volume_transformation().get_matrix());
473 bool is_instance_mirrored = has_reflection(gl_volume->get_instance_transformation().get_matrix());
474 if (is_volume_mirrored != is_instance_mirrored)
475 new_angle = -gizmo_angle + *start_angle;
476
477 // move to range <-M_PI, M_PI>
478 Geometry::to_range_pi_pi(new_angle);
479
480 const Transform3d* fix = get_fix_transformation(selection);
481 double z_rotation = (fix!=nullptr) ? (new_angle - current_angle.value_or(0.f)) : // relative angle
482 gizmo_angle; // relativity is keep by selection cache
483
484 auto selection_rotate_fnc = [z_rotation, &selection]() {
485 selection.rotate(Vec3d(0., 0., z_rotation), get_drag_transformation_type(selection));
486 };
487 selection_transform(selection, selection_rotate_fnc);
488
489 // propagate angle into property
490 current_angle = static_cast<float>(new_angle);
491
492 // do not store zero
493 if (is_approx(*current_angle, 0.f))
494 current_angle.reset();
495}
const Geometry::Transformation & get_volume_transformation() const
Definition 3DScene.hpp:306
const Geometry::Transformation & get_instance_transformation() const
Definition 3DScene.hpp:278
const Transform3d & get_matrix() const
Definition Geometry.hpp:477
void to_range_pi_pi(T &angle)
Definition Geometry.hpp:331

References get_drag_transformation_type(), Slic3r::GUI::Selection::get_first_volume(), Slic3r::GLVolume::get_instance_transformation(), Slic3r::Geometry::Transformation::get_matrix(), Slic3r::GLVolume::get_volume_transformation(), Slic3r::has_reflection(), Slic3r::is_approx(), PI, Slic3r::GUI::Selection::rotate(), selection_transform(), and Slic3r::Geometry::to_range_pi_pi().

Referenced by Slic3r::GUI::GLGizmoEmboss::on_mouse_for_rotation(), and Slic3r::GUI::GLGizmoSVG::on_mouse_for_rotation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw()

void Slic3r::GUI::draw ( const IconManager::Icon & icon,
const ImVec2 & size = ImVec2(0, 0),
const ImVec4 & tint_col = ImVec4(1, 1, 1, 1),
const ImVec4 & border_col = ImVec4(0, 0, 0, 0) )

Draw imgui image with icon.

Parameters
iconPlace in texture
size[optional]Size of image, wen zero than use same size as stored texture
tint_colviz ImGui::Image
border_colviz ImGui::Image
374{
375 // Check input
376 if (!icon.is_valid()) {
377 assert(false);
378 BOOST_LOG_TRIVIAL(warning) << "Drawing invalid Icon.";
379 ImGui::Text("?");
380 return;
381 }
382 ImTextureID id = (void *)static_cast<intptr_t>(icon.tex_id);
383 const ImVec2 &s = (size.x < 1 || size.y < 1) ? icon.size : size;
384
385 // Orca: Align icon center vertically
386 ImGuiWindow *window = ImGui::GetCurrentWindow();
387 ImGuiContext &g = *GImGui;
388 float cursor_y = window->DC.CursorPos.y;
389 float line_height = ImGui::GetTextLineHeight() + g.Style.FramePadding.y * 2;
390 int offset_y = (line_height - s.y) / 2; // Make sure its int otherwise it will be pixelated
391 window->DC.CursorPos.y += offset_y;
392
393 ImGui::Image(id, s, icon.tl, icon.br, tint_col, border_col);
394
395 // Reset offset
396 window->DC.CursorPosPrevLine.y = cursor_y;
397}
ImVec2 br
Definition IconManager.hpp:59
ImVec2 size
Definition IconManager.hpp:55
bool is_valid() const
Definition IconManager.hpp:63
ImVec2 tl
Definition IconManager.hpp:58
unsigned int tex_id
Definition IconManager.hpp:62

References Slic3r::GUI::IconManager::Icon::br, Slic3r::GUI::IconManager::Icon::is_valid(), Slic3r::GUI::IconManager::Icon::size, Slic3r::GUI::IconManager::Icon::tex_id, and Slic3r::GUI::IconManager::Icon::tl.

Referenced by button(), clickable(), Slic3r::GUI::GLGizmoEmboss::draw_advanced(), Slic3r::GUI::GLGizmoEmboss::draw_bold_button(), Slic3r::GUI::GLGizmoSVG::draw_filename(), anonymous_namespace{GLGizmoSVG.cpp}::draw_filled(), Slic3r::GUI::GLGizmoEmboss::draw_italic_button(), anonymous_namespace{GLGizmoSVG.cpp}::draw_side_outline(), Slic3r::GUI::GLGizmoEmboss::draw_text_input(), priv::draw_transparent_icon(), Slic3r::GUI::UVEditorCanvas::render(), Slic3r::GUI::DesignSketchTool::render_face_outline(), Slic3r::GUI::GCodeViewer::render_markers(), Slic3r::GUI::GLGizmoTextureDisplacement::render_preview_mesh(), and Slic3r::GUI::GLGizmoEmboss::revertible().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_mixed_gradient_plot()

void Slic3r::GUI::draw_mixed_gradient_plot ( wxDC & raw_dc,
const wxSize & canvas,
const std::vector< MixedGradientCurve > & curves,
const std::vector< wxPoint2DDouble > & anchors,
const MixedGradientTheme & theme )
541{
542 // Draw into an internal opaque buffer so wxGCDC text/curves anti-alias against a solid
543 // background (never a transparent one), then blit the finished image onto the caller's
544 // buffered paint DC. wxGCDC cannot wrap a generic wxDC&, so the buffer is always a
545 // wxMemoryDC -- the one type wxGCDC accepts on every platform.
546 if (canvas.x <= 0 || canvas.y <= 0)
547 return;
548 const wxRect rc = mixed_gradient_plot_rect(canvas);
549 if (rc.width <= 0 || rc.height <= 0)
550 return;
551
552 wxBitmap buf(canvas);
553 wxMemoryDC memdc(buf);
554 memdc.SetBackground(wxBrush(theme.background));
555 memdc.Clear();
556 wxGCDC dc(memdc);
557 wxGraphicsContext* gc = dc.GetGraphicsContext();
558
559 // 10x10 light grid (10 lines including outer borders, 9 equal divisions).
560 dc.SetPen(wxPen(theme.grid, 1));
561 for (int i = 0; i <= kGridDivisions; ++i) {
562 const int x = rc.x + rc.width * i / kGridDivisions;
563 const int y = rc.y + rc.height * i / kGridDivisions;
564 dc.DrawLine(x, rc.y, x, rc.y + rc.height);
565 dc.DrawLine(rc.x, y, rc.x + rc.width, y);
566 }
567
568 // Set the label font first so text width measurements drive arrow / label placement.
569 wxFont label_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
570 label_font.SetPointSize(std::max(7, label_font.GetPointSize() - 1));
571 dc.SetFont(label_font);
572
573 const wxString axis_y_title = _L("Material Ratio");
574 const wxString axis_x_title = _L("Model Height");
575 const wxString pct_text = wxT("100%");
576 const wxSize x_title_sz = dc.GetTextExtent(axis_x_title);
577 const wxSize y_title_sz = dc.GetTextExtent(axis_y_title);
578
579 wxFont strong_font = label_font;
580 strong_font.SetWeight(wxFONTWEIGHT_SEMIBOLD);
581 dc.SetFont(strong_font);
582 const wxSize pct_text_sz = dc.GetTextExtent(pct_text);
583 dc.SetFont(label_font);
584
585 // Axes (grey 700) with filled triangle arrows. Y-axis extends above the plot top to the
586 // canvas top edge; X-axis extends past the plot right toward the canvas right edge.
587 const int arrow_half = dip_px(kAxisArrowHalf);
588 const int arrow_len = dip_px(kAxisArrowLen);
589 dc.SetPen(wxPen(theme.axis, kStrokeAxis));
590 dc.SetBrush(wxBrush(theme.axis));
591
592 const int y_axis_x = rc.x;
593 const int y_title_pct_gap = dip_px(1);
594 const int y_title_bottom_pad = dip_px(2);
595 const int y_title_y = std::max(0, rc.y - y_title_sz.y - y_title_pct_gap - pct_text_sz.y - y_title_bottom_pad);
596 const int y_arrow_tip_y = y_title_y;
597 const int y_arrow_ty = y_arrow_tip_y + arrow_len;
598 dc.DrawLine(y_axis_x, y_arrow_ty, y_axis_x, rc.y + rc.height);
599 {
600 wxPoint tri[3] = {
601 wxPoint(y_axis_x, y_arrow_tip_y),
602 wxPoint(y_axis_x - arrow_half, y_arrow_ty),
603 wxPoint(y_axis_x + arrow_half, y_arrow_ty),
604 };
605 dc.DrawPolygon(3, tri);
606 }
607
608 const int x_axis_y = rc.y + rc.height;
609 const int x_label_gap = dip_px(4);
610 const int x_edge_pad = dip_px(6);
611 const int x_arrow_ideal = rc.x + rc.width + dip_px(10);
612 const int x_arrow_max = canvas.x - x_title_sz.x - x_label_gap - x_edge_pad - arrow_len;
613 const int x_arrow_tx = std::max(rc.x + rc.width + arrow_len, std::min(x_arrow_ideal, x_arrow_max));
614 const int x_arrow_tip_x = x_arrow_tx + arrow_len;
615 const int x_title_x = x_arrow_tip_x + x_label_gap;
616 dc.DrawLine(rc.x, x_axis_y, x_arrow_tx, x_axis_y);
617 {
618 wxPoint tri[3] = {
619 wxPoint(x_arrow_tip_x, x_axis_y),
620 wxPoint(x_arrow_tx, x_axis_y - arrow_half),
621 wxPoint(x_arrow_tx, x_axis_y + arrow_half),
622 };
623 dc.DrawPolygon(3, tri);
624 }
625
626 // Labels: "Material Ratio" and the leading "100%" share the same left x; the trailing
627 // "Model Height" follows the X-axis arrow tip (already clamped to make room).
628 const int label_left_x = y_axis_x + dip_px(10);
629 dc.SetTextForeground(theme.label);
630 dc.DrawText(axis_y_title, label_left_x, y_title_y);
631
632 dc.SetFont(strong_font);
633 dc.SetTextForeground(theme.label_strong);
634 dc.DrawText(pct_text, label_left_x, y_title_y + y_title_sz.y + y_title_pct_gap);
635
636 dc.DrawText(pct_text, rc.x + rc.width - pct_text_sz.x, x_axis_y);
637 dc.SetFont(label_font);
638 dc.SetTextForeground(theme.label);
639 dc.DrawText(axis_x_title, x_title_x, x_axis_y - x_title_sz.y / 2);
640
641 if (!gc)
642 return;
643
644 // Outline only when the curve colour is perceptually close to the background; otherwise the
645 // plain filament colour reads fine and the extra stroke would look heavy.
646 auto needs_outline = [&](const wxColour& c) {
648 };
649
650 // Only the geometry goes through the graphics context: dc.DrawLines() takes integer wxPoint
651 // and would quantize the curve back to whole pixels. The pen is still set on the dc, which
652 // forwards it here while keeping its own cached state in sync for later dc drawing.
653 auto draw_polyline = [&](const MixedGradientCurve& curve) {
654 if (curve.points.size() < 2)
655 return;
656 dc.SetPen(wxPen(curve.colour, dip_px(curve.stroke_dip)));
657 gc->StrokeLines(curve.points.size(), curve.points.data());
658 };
659
660 for (const MixedGradientCurve& curve : curves) {
661 if (needs_outline(curve.colour))
662 draw_polyline({curve.points, theme.outline, curve.stroke_dip + kOutlineExtraDip});
663 draw_polyline(curve);
664 }
665
666 // Control points: hollow circle with axis-colour border, theme-aware fill, drawn with a
667 // sub-pixel centre so the ring stays centred on the curve.
668 if (!anchors.empty()) {
669 const double r = dip_px(kPointRadius);
670 dc.SetPen(wxPen(theme.axis, 1));
671 dc.SetBrush(wxBrush(theme.point_fill));
672 for (const wxPoint2DDouble& p : anchors)
673 gc->DrawEllipse(p.m_x - r, p.m_y - r, r * 2, r * 2);
674 }
675
676 memdc.SelectObject(wxNullBitmap);
677 raw_dc.DrawBitmap(buf, 0, 0);
678}
int dip_px(int v)
Definition FilamentBitmapUtils.cpp:523
constexpr float kBgSimilarThreshold
Definition FilamentBitmapUtils.cpp:507
constexpr int kOutlineExtraDip
Definition FilamentBitmapUtils.cpp:508
wxColour outline
Definition FilamentBitmapUtils.hpp:108
wxColour label
Definition FilamentBitmapUtils.hpp:106
wxColour grid
Definition FilamentBitmapUtils.hpp:104
wxColour background
Definition FilamentBitmapUtils.hpp:103
float calc_color_distance(wxColour c1, wxColour c2)
Definition GuiColor.cpp:28
wxColour axis
Definition FilamentBitmapUtils.hpp:105
wxColour label_strong
Definition FilamentBitmapUtils.hpp:107
wxRect mixed_gradient_plot_rect(const wxSize &sz)
Definition FilamentBitmapUtils.cpp:527
wxColour point_fill
Definition FilamentBitmapUtils.hpp:109
Definition FilamentBitmapUtils.hpp:94

References _L, Slic3r::GUI::MixedGradientTheme::axis, Slic3r::GUI::MixedGradientTheme::background, calc_color_distance(), Slic3r::GUI::MixedGradientTheme::grid, Slic3r::GUI::MixedGradientTheme::label, Slic3r::GUI::MixedGradientTheme::label_strong, mixed_gradient_plot_rect(), Slic3r::GUI::MixedGradientTheme::outline, and Slic3r::GUI::MixedGradientTheme::point_fill.

Referenced by Slic3r::GUI::PublishSettingsDialog::add_mixed_visual(), and Slic3r::GUI::GradientCurveEditor::on_paint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_mixed_ratio_blend_bar()

void Slic3r::GUI::draw_mixed_ratio_blend_bar ( wxDC & dc,
const wxRect & rect,
const wxColour & first,
const wxColour & second,
double second_fraction )
682{
683 if (rect.width <= 0 || rect.height <= 0)
684 return;
685 for (int x = 0; x < rect.width; ++x) {
686 const double t = rect.width > 1 ? double(x) / rect.width : 0.0;
687 const wxColour c = lerp_blend(first, second, 1.0 - t);
688 dc.SetPen(wxPen(c));
689 dc.DrawLine(rect.x + x, rect.y, rect.x + x, rect.y + rect.height);
690 }
691
692 // Fixed in both themes, like the triangle picker's drag handle: the divider is drawn over
693 // blended filament colour, so it has to keep its contrast against data rather than chrome.
694 const int div_x = rect.x + static_cast<int>(second_fraction * rect.width);
695 dc.SetPen(wxPen(wxColour(80, 80, 80), dip_px(4)));
696 dc.DrawLine(div_x, rect.y, div_x, rect.y + rect.height);
697 dc.SetPen(wxPen(*wxWHITE, dip_px(2)));
698 dc.DrawLine(div_x, rect.y, div_x, rect.y + rect.height);
699}

Referenced by Slic3r::GUI::PublishSettingsDialog::add_mixed_visual(), and Slic3r::GUI::MixedFilamentDialog::create_ratio_slider().

Here is the caller graph for this function:

◆ draw_mixed_ratio_segments()

void Slic3r::GUI::draw_mixed_ratio_segments ( wxDC & dc,
const wxRect & rect,
const std::vector< wxColour > & colours,
const std::vector< double > & shares )
703{
704 const size_t n = std::min(colours.size(), shares.size());
705 if (n == 0 || rect.width <= 0 || rect.height <= 0)
706 return;
707 std::vector<double> norm = shares;
708 double total = 0.0;
709 for (double s : norm)
710 total += s;
711 if (total <= 0.0) {
712 norm.assign(n, 1.0 / n);
713 total = 1.0;
714 }
715 auto share_to_px = [&](double share_sum) { return rect.x + int(std::lround(share_sum / total * double(rect.width))); };
716 int x0 = rect.x;
717 std::vector<wxRect> segs(n);
718 for (size_t i = 0; i < n; ++i) {
719 int x1 = rect.x + rect.width;
720 if (i + 1 < n)
721 x1 = share_to_px(std::accumulate(norm.begin(), norm.begin() + i + 1, 0.0));
722 segs[i] = wxRect(x0, rect.y, std::max(1, x1 - x0), rect.height);
723 x0 = segs[i].GetRight() + 1;
724 }
725 for (size_t i = 0; i < n; ++i) {
726 dc.SetPen(*wxTRANSPARENT_PEN);
727 dc.SetBrush(wxBrush(colours[i]));
728 dc.DrawRectangle(segs[i]);
729 }
730 dc.SetBrush(*wxTRANSPARENT_BRUSH);
731 dc.SetPen(wxPen(StateColor::darkModeColorFor(wxColour("#ACACAC")), 1));
732 dc.DrawRectangle(rect);
733}

References StateColor::darkModeColorFor().

Referenced by Slic3r::GUI::PublishSettingsDialog::add_mixed_visual().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_mixed_triangle_labels()

void Slic3r::GUI::draw_mixed_triangle_labels ( wxDC & dc,
const wxSize & size,
const std::array< double, 3 > & weights,
const MixedTriangleTheme & theme )
847{
848 const std::array<TriPoint, 3> v = mixed_triangle_vertices(size, kTriangleMarginDip);
849 dc.SetFont(::Label::Body_12);
850 dc.SetTextForeground(theme.label);
851
852 // "Ratio" title, sitting above the top vertex.
853 const wxString title = _L("Ratio");
854 dc.DrawText(title, dip_px(2), std::max(0, int(v[0].y - dc.GetTextExtent(title).GetHeight() - dip_px(4))));
855
856 for (int i = 0; i < 3; ++i) {
857 const wxString text = wxString::Format("%d%%", int(std::lround(weights[i] * 100.0)));
858 const wxSize tsz = dc.GetTextExtent(text);
859 int lx = int(v[i].x - tsz.GetWidth() / 2.0);
860 int ly = (i == 0) ? int(v[i].y - tsz.GetHeight() - dip_px(4)) : int(v[i].y + dip_px(3));
861 ly = std::clamp(ly, 0, size.GetHeight() - tsz.GetHeight());
862 lx = std::clamp(lx, 0, size.GetWidth() - tsz.GetWidth());
863 dc.DrawText(text, lx, ly);
864 }
865}
static wxFont Body_12
Definition Label.hpp:55
std::array< TriPoint, 3 > mixed_triangle_vertices(const wxSize &size, double margin_dip)
Definition FilamentBitmapUtils.cpp:757
wxColour label
Definition FilamentBitmapUtils.hpp:142

References _L, Label::Body_12, Slic3r::GUI::MixedTriangleTheme::label, and mixed_triangle_vertices().

Referenced by Slic3r::GUI::PublishSettingsDialog::add_mixed_visual().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_mixed_triangle_picker()

void Slic3r::GUI::draw_mixed_triangle_picker ( wxDC & dc,
const wxSize & size,
const std::array< wxColour, 3 > & colours,
const std::array< double, 3 > & weights,
const MixedTriangleTheme & theme )
771{
772 if (size.GetWidth() <= 0 || size.GetHeight() <= 0)
773 return;
774 const std::array<TriPoint, 3> v = mixed_triangle_vertices(size, kTriangleMarginDip);
775
776 dc.SetBrush(wxBrush(theme.background));
777 dc.SetPen(*wxTRANSPARENT_PEN);
778 dc.DrawRectangle(0, 0, size.GetWidth(), size.GetHeight());
779
780 const wxColour& c0 = colours[0];
781 const wxColour& c1 = colours[1];
782 const wxColour& c2 = colours[2];
783 const TriCacheKey key{size.GetWidth(), size.GetHeight(),
784 c0.Red(), c0.Green(), c0.Blue(),
785 c1.Red(), c1.Green(), c1.Blue(),
786 c2.Red(), c2.Green(), c2.Blue(),
787 theme.background.Red(), theme.background.Green(), theme.background.Blue(),
788 theme.outline.Red(), theme.outline.Green(), theme.outline.Blue()};
789
790 wxBitmap& bmp = tri_cache()[key];
791 if (!bmp.IsOk()) {
792 bmp = wxBitmap(size.GetWidth(), size.GetHeight(), 24);
793 wxMemoryDC mdc(bmp);
794 mdc.SetBrush(wxBrush(theme.background));
795 mdc.SetPen(*wxTRANSPARENT_PEN);
796 mdc.DrawRectangle(0, 0, size.GetWidth(), size.GetHeight());
797
798 const int min_y = int(std::min({v[0].y, v[1].y, v[2].y}));
799 const int max_y = int(std::max({v[0].y, v[1].y, v[2].y}));
800 const int min_x = int(std::min({v[0].x, v[1].x, v[2].x}));
801 const int max_x = int(std::max({v[0].x, v[1].x, v[2].x}));
802 for (int py = min_y; py <= max_y; ++py) {
803 for (int px = min_x; px <= max_x; ++px) {
804 const TriPoint p = {double(px), double(py)};
805 if (!tri_contains(p, v[0], v[1], v[2]))
806 continue;
807 double w0, w1, w2;
808 tri_barycentric(p, v[0], v[1], v[2], w0, w1, w2);
809 unsigned char mr, mg, mb;
810 if (w0 + w1 > 1e-6) {
811 float t01 = float(w1 / (w0 + w1));
812 Slic3r::filament_mixer_lerp(c0.Red(), c0.Green(), c0.Blue(), c1.Red(), c1.Green(), c1.Blue(), t01, &mr, &mg, &mb);
813 Slic3r::filament_mixer_lerp(mr, mg, mb, c2.Red(), c2.Green(), c2.Blue(), float(w2), &mr, &mg, &mb);
814 } else {
815 mr = c2.Red(); mg = c2.Green(); mb = c2.Blue();
816 }
817 mdc.SetPen(wxPen(wxColour(mr, mg, mb)));
818 mdc.DrawPoint(px, py);
819 }
820 }
821
822 mdc.SetPen(wxPen(theme.outline, 1));
823 mdc.SetBrush(*wxTRANSPARENT_BRUSH);
824 const wxPoint pts[3] = {{int(v[0].x), int(v[0].y)}, {int(v[1].x), int(v[1].y)}, {int(v[2].x), int(v[2].y)}};
825 mdc.DrawPolygon(3, pts);
826 mdc.SelectObject(wxNullBitmap);
827
828 // Keep the cache from growing without bound across DPI/size changes.
829 if (tri_cache().size() > 6) {
830 auto& cache = tri_cache();
831 cache.erase(cache.begin());
832 }
833 }
834 dc.DrawBitmap(bmp, 0, 0);
835
836 // Published-ratio marker (read-only twin of the editor's drag handle).
837 const double w0 = weights[0], w1 = weights[1], w2 = weights[2];
838 const int hx = int(w0 * v[0].x + w1 * v[1].x + w2 * v[2].x);
839 const int hy = int(w0 * v[0].y + w1 * v[1].y + w2 * v[2].y);
840 dc.SetBrush(*wxWHITE_BRUSH);
841 dc.SetPen(wxPen(theme.ring, dip_px(2)));
842 dc.DrawCircle(hx, hy, dip_px(5));
843}
std::map< TriCacheKey, wxBitmap > & tri_cache()
Definition FilamentBitmapUtils.cpp:749
wxColour outline
Definition FilamentBitmapUtils.hpp:140
wxColour ring
Definition FilamentBitmapUtils.hpp:141
void tri_barycentric(TriPoint p, TriPoint v0, TriPoint v1, TriPoint v2, double &w0, double &w1, double &w2)
Definition FilamentBitmapUtils.cpp:53
wxColour background
Definition FilamentBitmapUtils.hpp:139
bool tri_contains(TriPoint p, TriPoint v0, TriPoint v1, TriPoint v2)
Definition FilamentBitmapUtils.cpp:43
Definition FilamentBitmapUtils.hpp:22
int64_t py(const Point &pt)
Definition ClipperUtils.cpp:208
int64_t px(const Point &pt)
Definition ClipperUtils.cpp:207

References Slic3r::GUI::MixedTriangleTheme::background, Slic3r::filament_mixer_lerp(), mixed_triangle_vertices(), Slic3r::GUI::MixedTriangleTheme::outline, Slic3r::GUI::MixedTriangleTheme::ring, tri_barycentric(), and tri_contains().

Referenced by Slic3r::GUI::PublishSettingsDialog::add_mixed_visual(), and Slic3r::GUI::MixedFilamentDialog::create_triangle_picker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw_title()

void Slic3r::GUI::draw_title ( wxDC & dc,
wxPoint pos,
const wxString & text,
const wxColour * color,
int width )
static
298{
299 wxString multiline_text;
300 if (width > 0 && dc.GetTextExtent(text).x > width) {
301 multiline_text = text;
302
303 size_t idx = size_t(-1);
304 size_t start = 0;
305 for (size_t i = 0; i < multiline_text.Len(); i++)
306 {
307 if (multiline_text[i] == ' ')
308 {
309 if (dc.GetTextExtent(multiline_text.SubString(start, i)).x < width)
310 idx = i;
311 else {
312 if (idx == size_t(-1))
313 idx = i;
314 multiline_text[idx] = '\n';
315 start = idx + 1;
316 idx = size_t(-1);
317 }
318 }
319 }
320 if (idx != size_t(-1))
321 multiline_text[idx] = '\n';
322 }
323
324 if (!text.IsEmpty()) {
325 const wxString& out_text = multiline_text.IsEmpty() ? text : multiline_text;
326 wxCoord text_width, text_height;
327 dc.GetMultiLineTextExtent(out_text, &text_width, &text_height);
328
329 wxColour old_clr = dc.GetTextForeground();
330 wxFont old_font = dc.GetFont();
331 dc.SetTextForeground(color ? *color :
332#ifdef _WIN32
333 wxGetApp().get_label_clr_default());
334#else
335 wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
336#endif /* _WIN32 */
337 dc.DrawText(out_text, pos);
338 dc.SetTextForeground(old_clr);
339 dc.SetFont(old_font);
340
341 if (width < 1)
342 width = text_width;
343 }
344}
coord_t width(const BoundingBox &box)
Definition Arrange.cpp:1184

Referenced by Slic3r::GUI::OG_CustomCtrl::OnPaint().

Here is the caller graph for this function:

◆ drawn_last_frame()

bool Slic3r::GUI::drawn_last_frame ( const ImGuiWindow * popup)
static
2162{
2163 return popup != nullptr && (ImGui::GetCurrentContext()->WithinFrameScope ? popup->WasActive : popup->Active);
2164}

Referenced by Slic3r::GUI::ImGuiWrapper::close_top_popup(), and Slic3r::GUI::ImGuiWrapper::modal_popup_open().

Here is the caller graph for this function:

◆ DrawRoundedRect()

void Slic3r::GUI::DrawRoundedRect ( float x,
float y,
float width,
float height,
float radius,
const ColorRGB & color,
int segments = 16 )
212{
213 glColor3f(color.r(), color.g(), color.b());
214
215 // 1. Draw center rectangle
217 glVertex2f(x + radius, y + radius);
218 glVertex2f(x + width - radius, y + radius);
219 glVertex2f(x + width - radius, y + height - radius);
220 glVertex2f(x + radius, y + height - radius);
221 glEnd();
222
223 // 2. Draw side rectangles (excluding corners)
225 // Left
226 glVertex2f(x, y + radius);
227 glVertex2f(x + radius, y + radius);
228 glVertex2f(x + radius, y + height - radius);
229 glVertex2f(x, y + height - radius);
230
231 // Right
232 glVertex2f(x + width - radius, y + radius);
233 glVertex2f(x + width, y + radius);
234 glVertex2f(x + width, y + height - radius);
235 glVertex2f(x + width - radius, y + height - radius);
236
237 // Top
238 glVertex2f(x + radius, y + height - radius);
239 glVertex2f(x + width - radius, y + height - radius);
240 glVertex2f(x + width - radius, y + height);
241 glVertex2f(x + radius, y + height);
242
243 // Bottom
244 glVertex2f(x + radius, y);
245 glVertex2f(x + width - radius, y);
246 glVertex2f(x + width - radius, y + radius);
247 glVertex2f(x + radius, y + radius);
248 glEnd();
249
250 // 3. Draw corners
251 auto drawCorner = [&](float cx, float cy, float startAngle) {
253 glVertex2f(cx, cy);
254 for (int i = 0; i <= segments; ++i) {
255 float angle = startAngle + (M_PI * 0.5f) * (float)i / segments;
256 glVertex2f(cx + cosf(angle) * radius, cy + sinf(angle) * radius);
257 }
258 glEnd();
259 };
260
261 drawCorner(x + radius, y + radius, M_PI); // bottom-left
262 drawCorner(x + width - radius, y + radius, 1.5f * M_PI); // bottom-right
263 drawCorner(x + width - radius, y + height - radius, 0.0f); // top-right
264 drawCorner(x + radius, y + height - radius, 0.5f * M_PI); // top-left
265}
float b() const
Definition Color.hpp:40
float g() const
Definition Color.hpp:39
float r() const
Definition Color.hpp:38
#define glVertex2f
Definition gl.h:5097
#define glColor3f
Definition gl.h:3415
#define glBegin
Definition gl.h:3255
#define GL_QUADS
Definition gl.h:1368
#define GL_TRIANGLE_FAN
Definition gl.h:1889
#define glEnd
Definition gl.h:3677

References Slic3r::angle(), Slic3r::ColorRGB::b(), Slic3r::ColorRGB::g(), GL_QUADS, GL_TRIANGLE_FAN, glBegin, glColor3f, glEnd, glVertex2f, M_PI, and Slic3r::ColorRGB::r().

Referenced by Slic3r::GUI::SkipPartCanvas::Render().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drop_unchanged_added_entries()

void Slic3r::GUI::drop_unchanged_added_entries ( std::vector< std::string > & options,
const DynamicPrintConfig & current,
const Preset * reference )
static
1188{
1189 if (reference == nullptr)
1190 return;
1191 // deep_diff() lists a key's entries one after another, so serialize each key's vectors once.
1192 std::string serialized_key;
1193 std::vector<std::string> cur_values;
1194 std::string ref_first;
1195 options.erase(std::remove_if(options.begin(), options.end(), [&](const std::string &opt) {
1196 const auto pos = opt.find('#');
1197 if (pos == std::string::npos)
1198 return false;
1199 const std::string key = opt.substr(0, pos);
1200 const size_t idx = size_t(std::atoi(opt.c_str() + pos + 1));
1201 auto ref = dynamic_cast<const ConfigOptionVectorBase *>(reference->config.option(key));
1202 auto cur = dynamic_cast<const ConfigOptionVectorBase *>(current.option(key));
1203 if (ref == nullptr || cur == nullptr || idx < ref->size() || ref->size() == 0 || idx >= cur->size())
1204 return false;
1205 if (key != serialized_key) {
1206 serialized_key = key;
1207 cur_values = cur->vserialize();
1208 ref_first = ref->vserialize().front();
1209 }
1210 return cur_values[idx] == ref_first;
1211 }), options.end());
1212}

Referenced by Slic3r::GUI::TabPrinter::update_custom_dirty().

Here is the caller graph for this function:

◆ ellipse_axes()

void Slic3r::GUI::ellipse_axes ( const Vec2d & center,
const Vec2d & major_end,
const Vec2d & minor_pt,
double & a,
double & b,
double & phi )
static
3229{
3230 const Vec2d maj = major_end - center;
3231 a = std::max(maj.norm(), 1e-6);
3232 phi = std::atan2(maj.y(), maj.x());
3233 const Vec2d n(-std::sin(phi), std::cos(phi)); // minor-axis direction
3234 b = std::min(std::abs((minor_pt - center).dot(n)), a);
3235}
T dot(const boost::geometry::model::d2::point_xy< T > &v1, const boost::geometry::model::d2::point_xy< T > &v2)
Definition ExtrusionSimulator.cpp:154

References Slic3r::center(), Slic3r::dot(), and ellipse_axes().

Referenced by ellipse_axes(), Slic3r::GUI::DesignSketchTool::make_ellipse(), and Slic3r::GUI::DesignSketchTool::make_ellipse_arc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipse_param_of()

double Slic3r::GUI::ellipse_param_of ( const Vec2d & center,
double a,
double b,
double phi,
const Vec2d & q )
static
3239{
3240 const Vec2d d = q - center;
3241 const double cu = std::cos(phi), su = std::sin(phi);
3242 const double u = d.x() * cu + d.y() * su; // along major
3243 const double v = -d.x() * su + d.y() * cu; // along minor
3244 return std::atan2(v / std::max(b, 1e-9), u / std::max(a, 1e-9));
3245}

References Slic3r::center(), and ellipse_param_of().

Referenced by Slic3r::GUI::DesignSketchTool::drag_ellipsearc_handle(), ellipse_param_of(), and Slic3r::GUI::DesignSketchTool::make_ellipse_arc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipse_point()

Vec2d Slic3r::GUI::ellipse_point ( const Vec2d & c,
double a,
double b,
double phi,
double t )
static
2818{
2819 const double cu = std::cos(phi), su = std::sin(phi);
2820 const double x = a * std::cos(t), y = b * std::sin(t);
2821 return Vec2d(c.x() + x * cu - y * su, c.y() + x * su + y * cu);
2822}

References ellipse_point().

Referenced by Slic3r::GUI::DesignSketchTool::drag_ellipsearc_handle(), ellipse_point(), ellipse_polyline(), Slic3r::GUI::DesignSketchTool::make_ellipse_arc(), Slic3r::GUI::DesignSketchTool::render_live_quotes(), Slic3r::GUI::DesignSketchTool::set_ellipse_axis(), Slic3r::GUI::DesignSketchTool::set_ellipsearc_sweep(), and Slic3r::GUI::DesignSketchTool::set_handle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ellipse_polyline()

std::vector< Vec2d > Slic3r::GUI::ellipse_polyline ( const Vec2d & c,
double a,
double b,
double phi,
double t0,
double t1,
int n = 48 )
static
2827{
2828 std::vector<Vec2d> v; v.reserve(n + 1);
2829 for (int i = 0; i <= n; ++i)
2830 v.push_back(ellipse_point(c, a, b, phi, t0 + (t1 - t0) * double(i) / double(n)));
2831 return v;
2832}
static Vec2d ellipse_point(const Vec2d &c, double a, double b, double phi, double t)
Definition DesignSketchTool.cpp:2817

References ellipse_point(), and ellipse_polyline().

Referenced by ellipse_polyline(), and Slic3r::GUI::DesignSketchTool::entity_polyline().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ empty_tray_config()

DynamicPrintConfig Slic3r::GUI::empty_tray_config ( )
static
885{
886 DynamicPrintConfig config;
887 config.set_key_value("filament_id", new ConfigOptionStrings{""});
888 config.set_key_value("tag_uid", new ConfigOptionStrings{""});
889 config.set_key_value("filament_type", new ConfigOptionStrings{""});
890 config.set_key_value("tray_name", new ConfigOptionStrings{""});
891 config.set_key_value("filament_colour", new ConfigOptionStrings{""});
892 config.set_key_value("filament_exist", new ConfigOptionBools{false});
893 return config;
894}

References Slic3r::DynamicConfig::set_key_value().

Referenced by Slic3r::GUI::CalibrationPresetPage::sync_ams_info(), and Slic3r::GUI::CalibrationPresetPage::update_multi_extruder_filament_combobox().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ en_format()

wxString Slic3r::GUI::en_format ( double v,
int digits = 2 )
static
175{
176 char fmt[16];
177 std::snprintf(fmt, sizeof(fmt), "%%.%df", digits);
178 char buf[64];
179 std::snprintf(buf, sizeof(buf), fmt, v);
180 for (char* c = buf; *c; ++c) if (*c == ',') *c = '.';
181 return wxString::FromUTF8(buf);
182}

Referenced by Slic3r::GUI::DesignPanel::constraint_label(), and Slic3r::GUI::DesignPanel::request_value().

Here is the caller graph for this function:

◆ en_parse()

bool Slic3r::GUI::en_parse ( const wxString & text,
double & out )
static
185{
186 wxString t(text);
187 t.Replace(wxT(","), wxT("."));
188 return t.ToCDouble(&out);
189}

Referenced by Slic3r::GUI::DesignPanel::confirm_value().

Here is the caller graph for this function:

◆ enable_screensaver()

void Slic3r::GUI::enable_screensaver ( )
84{
85 #if __APPLE__
86 IOPMAssertionRelease(assertionID);
87 #elif _WIN32
88 SetThreadExecutionState(ES_CONTINUOUS);
89 #endif
90}

◆ end_menu()

void Slic3r::GUI::end_menu ( )
1799{
1800 ImGui::EndMenu();
1801}

Referenced by Slic3r::GUI::IMSlider::render_add_menu(), and Slic3r::GUI::IMSlider::render_edit_menu().

Here is the caller graph for this function:

◆ ensure_belt_purge_tower()

bool Slic3r::GUI::ensure_belt_purge_tower ( Model & model,
PartPlateList & partplate_list,
ObjectList * obj_list,
std::vector< BeltPurgeSignature > & sigs )
44{
45 auto is_prism = [](const ModelObject *mo) {
46 const ConfigOption *opt = mo->config.option("belt_purge_tower_object");
47 return opt != nullptr && opt->getBool();
48 };
49
50 // Every plate gets its own prism. A prism belongs to the plate it lies on; one
51 // that lies on no plate is stale.
52 const int plate_count = partplate_list.get_plate_count();
53 sigs.resize(size_t(plate_count));
54 std::vector<std::vector<int>> prisms_by_plate(static_cast<size_t>(plate_count));
55 std::vector<int> stale_prisms;
56 for (int i = 0; i < (int) model.objects.size(); ++i)
57 if (is_prism(model.objects[i])) {
58 const int plate_idx = model.objects[i]->instances.empty() ? -1 : partplate_list.find_instance(i, 0);
59 if (plate_idx >= 0 && plate_idx < plate_count)
60 prisms_by_plate[size_t(plate_idx)].push_back(i);
61 else
62 stale_prisms.push_back(i);
63 }
64
65 // Deletes prism objects, keeping the sidebar and part plates in sync
66 // (same primitives as Plater::priv::remove(), minus scene update — the
67 // caller refreshes the scene). Highest index first, so the others stay valid.
68 auto remove_prisms = [&](std::vector<int> idxs) {
69 std::sort(idxs.begin(), idxs.end());
70 for (auto it = idxs.rbegin(); it != idxs.rend(); ++it) {
71 model.delete_object(size_t(*it));
72 partplate_list.notify_instance_removed(*it, -1);
74 }
75 };
76 auto all_prisms = [&]() {
77 std::vector<int> all = stale_prisms;
78 for (const auto &v : prisms_by_plate)
79 all.insert(all.end(), v.begin(), v.end());
80 return all;
81 };
82
83 // Cheap early-out for non-belt printers: only belt printers ever get a belt
84 // purge tower, and this runs on every background-process tick — so avoid the
85 // full_config() merge below unless this is actually a belt printer. (Also
86 // tidies up a stale prism if the user switched away from a belt printer.)
87 {
88 const auto *belt_pre = wxGetApp().preset_bundle->printers.get_edited_preset().config.option<ConfigOptionBool>("belt_printer");
89 if (belt_pre == nullptr || !belt_pre->value) {
90 std::fill(sigs.begin(), sigs.end(), BeltPurgeSignature{});
91 const std::vector<int> all = all_prisms();
92 if (all.empty())
93 return false;
94 remove_prisms(all);
95 return true;
96 }
97 }
98
99 // Read every sizing input from the MERGED full config — the exact same
100 // config the backend slices with (BackgroundSlicingProcess::apply uses
101 // preset_bundle->full_config()). Reading from the individual presets caused
102 // GUI/backend mismatches: e.g. purge_in_prime_tower or a populated
103 // flush_volumes_matrix present in the merged config but false/empty in the
104 // preset the GUI happened to read, so the tower was sized for the small
105 // prime_volume instead of the real color-change flush and could not absorb
106 // it. The three names below alias the one merged config so the rest of the
107 // function is unchanged.
108 const DynamicPrintConfig full_cfg = wxGetApp().preset_bundle->full_config();
109 const DynamicPrintConfig &printer_config = full_cfg;
110 const DynamicPrintConfig &print_config = full_cfg;
111 const DynamicPrintConfig &project_config = full_cfg;
112
113 const auto *belt_opt = printer_config.option<ConfigOptionBool>("belt_printer");
114 const bool belt = belt_opt != nullptr && belt_opt->value;
115 // Belt purge tower is its own type, gated by the belt-only printer option
116 // enable_belt_purge_tower (not the classic process enable_prime_tower).
117 const bool prime_tower_enabled = printer_config.has("enable_belt_purge_tower") && printer_config.opt_bool("enable_belt_purge_tower");
118 const auto *seq_opt = print_config.option<ConfigOptionEnum<PrintSequence>>("print_sequence");
119 const bool by_object = seq_opt != nullptr && seq_opt->value == PrintSequence::ByObject;
120
121 // Mixed filament slots are expanded to their physical components below.
122 std::vector<unsigned char> is_mixed;
123 std::vector<std::string> comp_strs;
124 if (const auto *o = full_cfg.option<ConfigOptionBools>("filament_is_mixed"))
125 is_mixed = o->values;
126 if (const auto *o = full_cfg.option<ConfigOptionStrings>("filament_mixed_components"))
127 comp_strs = o->values;
128
129 const double gap = 1.0;
130 const double layer_h = print_config.has("layer_height") ? print_config.opt_float("layer_height") : 0.2;
131
132 // Belt geometry. The rotation axis is the gantry tilt axis; the belt
133 // travels along the *other* horizontal axis (X-rotation -> belt along Y,
134 // the CR-30 default). The purge prism is a long bar laid along the belt
135 // travel direction, beside the parts. For no/Z rotation we fall back to
136 // vertical slicing geometry (theta = 90 deg).
137 const auto *axis_opt = printer_config.option<ConfigOptionEnum<BeltRotationAxis>>("belt_slice_rotation");
138 const auto *angle_opt = printer_config.option<ConfigOptionFloat>("belt_slice_rotation_angle");
139 const BeltRotationAxis rot = axis_opt != nullptr ? axis_opt->value : BeltRotationAxis::X;
140 const bool belt_is_y = (rot != BeltRotationAxis::Y); // X / None / Z -> belt along Y
141 double theta = M_PI / 2.;
142 if ((rot == BeltRotationAxis::X || rot == BeltRotationAxis::Y) && angle_opt != nullptr && std::abs(angle_opt->value) > EPSILON)
143 theta = std::clamp(Geometry::deg2rad(std::abs(angle_opt->value)), Geometry::deg2rad(5.), M_PI / 2.);
144 const double sin_t = std::sin(theta);
145 const double cot_t = std::cos(theta) / sin_t;
146
147 // NOTE: both purge_in_prime_tower and single_extruder_multi_material are
148 // PRINTER options (Preset.cpp s_Preset_printer_options) — read them from the
149 // printer preset. Reading purge_in_prime_tower from the print preset returns
150 // has()==false, collapsing use_matrix to false and sizing the tower for the
151 // small prime_volume instead of the real color-change flush. This must match
152 // the backend Print::_plan_belt_purge() which reads both from the merged config.
153 const bool use_matrix = (printer_config.has("purge_in_prime_tower") && printer_config.opt_bool("purge_in_prime_tower"))
154 && (printer_config.has("single_extruder_multi_material") && printer_config.opt_bool("single_extruder_multi_material"));
155 const double prime_volume = print_config.has("prime_volume") ? print_config.opt_float("prime_volume") : 45.;
156 const double printable_height = printer_config.has("printable_height") ? printer_config.opt_float("printable_height") : 250.;
157
158 // The bed (printable_area) is plate-local but model instances live in the
159 // plate's world frame, so the plate origin is added to every bed coordinate.
160 const double inset = 1.;
161 BoundingBoxf bed_ext;
162 if (const auto *bed_opt = printer_config.option<ConfigOptionPoints>("printable_area");
163 bed_opt != nullptr && !bed_opt->values.empty())
164 bed_ext = get_extents(bed_opt->values);
165
166 // What each plate needs, decided before anything is deleted or created.
167 struct Plan
168 {
169 bool wanted = false;
170 BeltPurgeSignature sig;
171 int n_islands = 1;
172 double w_sub = 0., length = 0., height = 0.;
173 Vec3d center = Vec3d::Zero();
174 };
175 std::vector<Plan> plans(static_cast<size_t>(plate_count));
176
177 for (int plate_idx = 0; plate_idx < plate_count; ++plate_idx) {
178 Plan &plan = plans[size_t(plate_idx)];
179 PartPlate *plate = partplate_list.get_plate(plate_idx);
180
181 // Filaments used and bounding extent of the non-prism objects on this
182 // plate (1-based filament ids; volume extruder 0 = object default).
183 std::set<int> filaments;
184 double x_min = std::numeric_limits<double>::max();
185 double x_max = -std::numeric_limits<double>::max();
186 double y_min = std::numeric_limits<double>::max();
187 double y_max = -std::numeric_limits<double>::max();
188 double z_max = 0.;
189 bool have_objects = false;
190 if (belt && plate != nullptr) {
191 for (int obj_idx = 0; obj_idx < (int) model.objects.size(); ++obj_idx) {
192 const ModelObject *mo = model.objects[obj_idx];
193 if (is_prism(mo))
194 continue;
195 int obj_extruder = 1;
196 if (const ConfigOption *opt = mo->config.option("extruder"); opt != nullptr && opt->getInt() > 0)
197 obj_extruder = opt->getInt();
198 bool any_instance_on_plate = false;
199 for (int inst_idx = 0; inst_idx < (int) mo->instances.size(); ++inst_idx) {
200 if (!plate->contain_instance_totally(obj_idx, inst_idx))
201 continue;
202 any_instance_on_plate = true;
203 const BoundingBoxf3 bb = mo->instance_bounding_box(inst_idx);
204 x_min = std::min(x_min, bb.min.x());
205 x_max = std::max(x_max, bb.max.x());
206 y_min = std::min(y_min, bb.min.y());
207 y_max = std::max(y_max, bb.max.y());
208 z_max = std::max(z_max, bb.max.z());
209 }
210 if (!any_instance_on_plate)
211 continue;
212 have_objects = true;
213 for (const ModelVolume *mv : mo->volumes)
214 for (int e : mv->get_extruders())
215 filaments.insert(e > 0 ? e : obj_extruder);
216 }
217 }
218
219 // A mixed filament slot is VIRTUAL: it never reaches a nozzle. At slice time
220 // ToolOrdering::resolve_mixed_filaments() replaces it with its physical
221 // components, so the toolchanges the prism has to absorb are between those
222 // components, not to the mixed slot itself. Counting the slot as a filament
223 // of its own therefore over-provisions the prism by one island per mixed slot
224 // -- the "extra purge tower" -- and, when every component is already used by
225 // another object, by an island that can never be reached at all.
226 //
227 // Expand here with the same helper the backend uses (Print.cpp's sequential
228 // path), so the GUI sizes the prism against the same filament set the slicer
229 // will actually produce. No-op when no filament is mixed.
230 if (has_any_mixed_filament(is_mixed)) {
231 std::vector<unsigned int> zero_based;
232 zero_based.reserve(filaments.size());
233 for (int f : filaments)
234 if (f > 0)
235 zero_based.push_back((unsigned int) (f - 1));
236 zero_based = expand_mixed_filaments(zero_based, is_mixed, comp_strs);
237 filaments.clear();
238 for (unsigned int f : zero_based)
239 filaments.insert((int) f + 1);
240 }
241
242 plan.wanted = belt && prime_tower_enabled && !by_object && have_objects && filaments.size() > 1;
243 if (!plan.wanted)
244 continue;
245
246 // --- Sizing -----------------------------------------------------------
247 const int n_islands = std::max(1, (int) filaments.size() - 1);
248 // Every disconnected island needs at least 1 mm of printable width. Honor
249 // the configured total width whenever possible, but never let the island
250 // layout silently grow past the footprint used for placement.
251 const double min_width = n_islands + (n_islands - 1) * gap;
252 const double width = std::max(min_width,
253 print_config.has("belt_purge_tower_width") ? print_config.opt_float("belt_purge_tower_width") : 35.);
254 const double printable_width = width - (n_islands - 1) * gap;
255
256 // Parts' extent along the belt-travel axis and the lateral (across-belt) axis.
257 const double belt_min = belt_is_y ? y_min : x_min;
258 const double belt_max = belt_is_y ? y_max : x_max;
259 const double lat_min = belt_is_y ? x_min : y_min;
260 const double lat_max = belt_is_y ? x_max : y_max;
261
262 // Worst-case purge volume of one layer: up to (filament count - 1)
263 // toolchanges, each needing the worst flush matrix entry (mirrors the
264 // volume selection in Print::_plan_belt_purge()).
265 double max_flush = prime_volume;
266 if (use_matrix) {
267 const size_t extruder_nums = wxGetApp().preset_bundle->get_printer_extruder_count();
268 const std::vector<double> matrix = get_flush_volumes_matrix(
269 project_config.option<ConfigOptionFloats>("flush_volumes_matrix")->values, 0, extruder_nums);
270 const auto * multi_opt = project_config.option<ConfigOptionFloats>("flush_multiplier");
271 const double multiplier = multi_opt != nullptr && !multi_opt->values.empty() ? multi_opt->get_at(0) : 1.;
272 const int n_total = (int) (std::sqrt(double(matrix.size())) + 0.5);
273 double m = 0.;
274 for (int i : filaments)
275 for (int j : filaments)
276 if (i != j && i <= n_total && j <= n_total)
277 m = std::max(m, matrix[size_t(i - 1) * n_total + size_t(j - 1)]);
278 if (m > 0.)
279 max_flush = m * multiplier;
280 }
281 const double v_layer = double(filaments.size() - 1) * max_flush;
282
283 // Height from the per-layer purge demand. A tilted slicing plane cuts a
284 // printable_width x (height/sin) rectangle out of the bars, so one layer
285 // slab absorbs printable_width * (height/sin) * layer_height of purge. Solve for the height that
286 // holds the worst-case per-layer purge, with eta (infill/perimeter packing)
287 // and a safety margin for the tilt ramps / grid-alignment slop, plus a
288 // minimum so the tower is a real printable body rather than a sliver.
289 const double eta = 0.85;
290 const double safety = 1.6;
291 double height = safety * v_layer * sin_t / (printable_width * layer_h * eta);
292 height = std::clamp(height, 8.0, std::max(8.0, printable_height));
293
294 // --- Idempotence (input-keyed) ----------------------------------------
295 auto q = [](double v) { return std::lround(v * 10.0); }; // 0.1 mm quantization
296 BeltPurgeSignature &new_sig = plan.sig;
297 new_sig.valid = true;
298 new_sig.filament_count = (int) filaments.size();
299 new_sig.key[0] = q(width);
300 new_sig.key[1] = q(layer_h);
301 new_sig.key[2] = q(height);
302 new_sig.key[3] = q(belt_min);
303 new_sig.key[4] = q(belt_max);
304 new_sig.key[5] = q(lat_min);
305 new_sig.key[6] = q(z_max);
306 new_sig.key[7] = static_cast<long>(rot);
307 new_sig.key[8] = std::lround(theta * 10000.0);
308 new_sig.key[9] = q(lat_max);
309 const Vec3d plate_origin = plate->get_origin();
310 new_sig.key[10] = q(plate_origin.x());
311 new_sig.key[11] = q(plate_origin.y());
312 if (bed_ext.defined) {
313 new_sig.key[12] = q(bed_ext.max.x());
314 new_sig.key[13] = q(bed_ext.max.y());
315 }
316
317 // --- Position ----------------------------------------------------------
318 // Belt-travel axis. With the mesh rotated by theta before slicing, a machine
319 // point (y,z) maps to slicing-Z = y*sin(theta) + z*cos(theta). The parts
320 // occupy slicing-Z in [y_min*sin, y_max*sin + z_max*cos], and the bar's
321 // FULL-cross-section region (the part not in a triangular end ramp) spans
322 // slicing-Z [belt_start*sin + H*cos, belt_end*sin]. Covering the parts'
323 // whole band needs belt_start <= y_min - H*cot (bar's own leading ramp) and
324 // belt_end >= y_max + z_max*cot (parts' top features print further up the
325 // belt). The trailing z_max*cot term dominates the bar's own ramp.
326 //
327 // Along the belt the bar stops at the end of the plate: a longer bar cannot be
328 // printed, and the cross-sections it loses there are reported by the purge
329 // planner when the parts' last layers then purge more than the bar holds.
330 const double margin = 5.;
331 const double ramp_compensation = height / sin_t;
332 const double belt_origin = plate_origin[belt_is_y ? 1 : 0];
333 double belt_end = belt_max + margin + ramp_compensation + z_max * cot_t; // + parts' top-feature belt reach
334 if (bed_ext.defined)
335 belt_end = std::min(belt_end, belt_origin + (belt_is_y ? bed_ext.max.y() : bed_ext.max.x()) - inset);
336 const double belt_start = std::max(belt_origin, std::min(belt_min - ramp_compensation, belt_end - 10.)); // leading ramp, toward belt origin
337 const double length = std::max(belt_end - belt_start, 10.);
338 belt_end = belt_start + length;
339 const double belt_center = 0.5 * (belt_start + belt_end);
340
341 // Across-belt: flush against the bed's maximum edge, inset by half the bar
342 // width so the bar's far edge sits on the boundary and the whole bar stays
343 // on the bed. lat_min/lat_max come from instance_bounding_box (world frame).
344 const double lat_origin = plate_origin[belt_is_y ? 0 : 1];
345 double lat_center = lat_max + 5. + 0.5 * width; // fallback: just past the parts
346 if (bed_ext.defined) {
347 const double bed_lat_max = belt_is_y ? bed_ext.max.x() : bed_ext.max.y();
348 lat_center = lat_origin + bed_lat_max - inset - 0.5 * width;
349 }
350
351 plan.n_islands = n_islands;
352 plan.w_sub = (width - (n_islands - 1) * gap) / n_islands;
353 plan.length = length;
354 plan.height = height;
355 plan.center = Vec3d(belt_is_y ? lat_center : belt_center,
356 belt_is_y ? belt_center : lat_center,
357 0.5 * height);
358 }
359
360 // --- Decide ---------------------------------------------------------------
361 // A plate whose prism exists and matches its recorded inputs is left alone, so
362 // subsequent ticks are no-ops until the parts/config actually change.
363 std::vector<int> to_delete = stale_prisms;
364 std::vector<int> to_create;
365 for (int plate_idx = 0; plate_idx < plate_count; ++plate_idx) {
366 const Plan &plan = plans[size_t(plate_idx)];
367 const std::vector<int> &existing = prisms_by_plate[size_t(plate_idx)];
368 BeltPurgeSignature &sig = sigs[size_t(plate_idx)];
369 if (!plan.wanted) {
370 sig = BeltPurgeSignature{};
371 to_delete.insert(to_delete.end(), existing.begin(), existing.end());
372 } else if (existing.size() == 1 && model.objects[size_t(existing.front())]->instances.size() == 1 && plan.sig == sig) {
373 continue;
374 } else {
375 to_delete.insert(to_delete.end(), existing.begin(), existing.end());
376 to_create.push_back(plate_idx);
377 }
378 }
379 if (to_delete.empty() && to_create.empty())
380 return false;
381
382 remove_prisms(to_delete);
383
384 // --- (Re)create -----------------------------------------------------------
385 // Build the prism as N DISCONNECTED sub-bars side by side across the belt,
386 // N = (filaments - 1) = the worst-case number of toolchanges on one layer.
387 // Why: mark_wiping_extrusions overrides whole extrusion-entity COLLECTIONS,
388 // and each disconnected island slices into its own infill collection. With a
389 // single solid box there is one collection per layer, so the FIRST toolchange
390 // on a layer grabs the entire collection (consuming all of it for one swap)
391 // and any further swaps on that layer find nothing left and go unabsorbed
392 // (the classic wipe tower hides this by spilling leftover into the real
393 // tower; the belt prism has no fallback). One island per simultaneous swap
394 // lets each swap claim its own island. Total lateral footprint stays `width`
395 // (each island width/N wide, separated by a small gap), so per-layer capacity
396 // per island ~= max_flush, matching the height sizing.
397 // Minimal gap between sub-bars: they must stay just-separated so the slicer
398 // keeps them as distinct islands (hence distinct infill collections, one per
399 // simultaneous swap). Zero gap would union them into one collection and
400 // reintroduce the multi-swap-per-layer absorption bug; a hair over ~2 line
401 // widths also keeps gap-fill from bridging them. 1 mm is about as close as
402 // they can butt up while staying individually purgeable.
403 for (int plate_idx : to_create) {
404 const Plan &plan = plans[size_t(plate_idx)];
405
406 TriangleMesh prism_mesh;
407 for (int i = 0; i < plan.n_islands; ++i) {
408 const double lat_off = i * (plan.w_sub + gap);
409 // Box dims: lateral = w_sub, along-belt = length, vertical = height.
410 TriangleMesh box = belt_is_y ? make_cube(plan.w_sub, plan.length, plan.height) // X = lateral, Y = belt
411 : make_cube(plan.length, plan.w_sub, plan.height); // X = belt, Y = lateral
412 box.translate(belt_is_y ? Vec3f((float) lat_off, 0.f, 0.f) : Vec3f(0.f, (float) lat_off, 0.f));
413 prism_mesh.merge(box);
414 }
415
416 ModelObject *new_object = model.add_object();
417 new_object->name = _u8L("Belt Purge Tower");
418 new_object->add_instance();
419 ModelVolume *new_volume = new_object->add_volume(std::move(prism_mesh));
420 new_volume->name = new_object->name;
421
422 auto &cfg = new_object->config;
423 cfg.set_key_value("belt_purge_tower_object", new ConfigOptionBool(true));
424 cfg.set_key_value("flush_into_objects", new ConfigOptionBool(true));
425 cfg.set_key_value("extruder", new ConfigOptionInt(1));
426 // Sacrificial solid prism: one wall, no shells, dense rectilinear infill —
427 // every extrusion is overriddable, so the absorbed volume matches the
428 // cross-section x layer-height estimate used for the height above.
429 cfg.set_key_value("wall_loops", new ConfigOptionInt(1));
430 cfg.set_key_value("top_shell_layers", new ConfigOptionInt(0));
431 cfg.set_key_value("bottom_shell_layers", new ConfigOptionInt(0));
432 cfg.set_key_value("sparse_infill_density", new ConfigOptionPercent(100));
433 cfg.set_key_value("sparse_infill_pattern", new ConfigOptionEnum<InfillPattern>(ipRectilinear));
434 cfg.set_key_value("enable_support", new ConfigOptionBool(false));
435 cfg.set_key_value("brim_type", new ConfigOptionEnum<BrimType>(btNoBrim));
436 cfg.set_key_value("seam_slope_type", new ConfigOptionEnum<SeamScarfType>(SeamScarfType::None));
437 cfg.set_key_value("precise_z_height", new ConfigOptionBool(false));
438
439 // Position by the belt-calibration pattern: drop to the bed, then translate
440 // the instance by the delta between the object's ACTUAL bbox center and the
441 // target. Setting the instance offset directly is unreliable here — the
442 // freshly added cube's local frame is not centered, so set_offset() lands
443 // the min corner (not the center) on the target, leaving the bar centered
444 // on the bed edge with half of it hanging off.
445 new_object->invalidate_bounding_box();
446 new_object->ensure_on_bed();
447 const BoundingBoxf3 cur = new_object->bounding_box_exact();
448 new_object->translate_instances(Vec3d(plan.center.x() - cur.center().x(),
449 plan.center.y() - cur.center().y(),
450 0.0));
451 new_object->instances.front()->set_assemble_transformation(new_object->instances.front()->get_transformation());
452
453 const size_t obj_idx = model.objects.size() - 1;
454 // Registers the object in the sidebar and notifies the part plates;
455 // selection is left untouched (auto-managed object).
456 obj_list->add_object_to_list(obj_idx, /*call_selection_changed=*/false);
457
458 sigs[size_t(plate_idx)] = plan.sig;
459 }
460
461 return true;
462}
Definition Config.hpp:284
virtual int getInt() const
Definition Config.hpp:294
void delete_object_from_list()
Definition GUI_ObjectList.cpp:4352
PartPlate * get_plate(int index)
Definition PartPlate.cpp:6874
int notify_instance_removed(int obj_id, int instance_id)
Definition PartPlate.cpp:7372
int get_plate_count() const
Definition PartPlate.cpp:7042
int find_instance(int obj_id, int instance_id)
Definition PartPlate.cpp:7176
std::string name
Definition Model.hpp:384
void translate(float x, float y, float z)
Definition TriangleMesh.cpp:297
BoundingBox inset(BoundingBox box, const Point &by)
Definition IMEXArrange.cpp:38
coord_t height(const BoundingBox &box)
Definition Arrange.cpp:1185
@ btNoBrim
Definition PrintConfig.hpp:461
bool has_any_mixed_filament(const std::vector< unsigned char > &is_mixed)
Definition FilamentMixer.cpp:486
TriangleMesh make_cube(double x, double y, double z)
Definition TriangleMesh.hpp:378
double length(const Points &pts)
Definition MultiPoint.hpp:181
BeltRotationAxis
Definition PrintConfig.hpp:341
BoundingBox get_extents(const ExPolygonsWithIds &e)
Definition Emboss.cpp:1374
static std::vector< T > get_flush_volumes_matrix(const std::vector< T > &fv_matrix, size_t extruder_id=-1, size_t nozzle_nums=1)
Definition PrintConfig.hpp:2685
@ ByObject
Definition PrintConfig.hpp:312
static double f(double x, double z_sin, double z_cos, bool vertical, bool flip)
Definition FillGyroid.cpp:124
zaa_minimize_perimeter_height prime_volume((ConfigOptionFloats, filament_prime_volume))((ConfigOptionFloats
std::vector< unsigned int > expand_mixed_filaments(const std::vector< unsigned int > &extruders_0based, const std::vector< unsigned char > &is_mixed, const std::vector< std::string > &comp_strs)
Definition FilamentMixer.cpp:520
@ all
Definition MarchingSquares.hpp:194
Definition BeltPurgeTower.hpp:24

References _u8L, Slic3r::ModelObject::add_instance(), Slic3r::Model::add_object(), Slic3r::ModelObject::add_volume(), Slic3r::ModelObject::bounding_box_exact(), Slic3r::btNoBrim, Slic3r::ByObject, Slic3r::BoundingBox3Base< PointType >::center(), Slic3r::center(), Slic3r::ModelObject::config, Slic3r::GUI::PartPlate::contain_instance_totally(), Slic3r::BoundingBoxBase< PointType, APointsType >::defined, Slic3r::Geometry::deg2rad(), Slic3r::Model::delete_object(), Slic3r::ModelObject::ensure_on_bed(), EPSILON, Slic3r::expand_mixed_filaments(), Slic3r::f(), Slic3r::GUI::BeltPurgeSignature::filament_count, Slic3r::GUI::PartPlateList::find_instance(), Slic3r::get_extents(), Slic3r::ModelVolume::get_extruders(), Slic3r::get_flush_volumes_matrix(), Slic3r::GUI::PartPlate::get_origin(), Slic3r::GUI::PartPlateList::get_plate(), Slic3r::GUI::PartPlateList::get_plate_count(), Slic3r::ConfigOptionResolver::has(), Slic3r::has_any_mixed_filament(), Slic3r::ModelObject::instance_bounding_box(), Slic3r::ModelObject::instances, Slic3r::ModelObject::invalidate_bounding_box(), Slic3r::ipRectilinear, Slic3r::GUI::BeltPurgeSignature::key, Slic3r::length(), M_PI, Slic3r::make_cube(), Slic3r::BoundingBoxBase< PointType, APointsType >::max, Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::max, Slic3r::TriangleMesh::merge(), Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::min, Slic3r::ModelObject::name, Slic3r::ModelVolume::name, Slic3r::None, Slic3r::GUI::PartPlateList::notify_instance_removed(), obj_list(), Slic3r::Model::objects, Slic3r::DynamicConfig::opt_float(), Slic3r::ConfigBase::option(), Slic3r::ModelConfig::option(), Slic3r::prime_volume(), Slic3r::printable_height(), printer_config(), Slic3r::ModelConfig::set_key_value(), Slic3r::ModelObject::translate_instances(), Slic3r::GUI::BeltPurgeSignature::valid, Slic3r::ConfigOptionSingle< T >::value, Slic3r::ConfigOptionVector< T >::values, Slic3r::ModelObject::volumes, Slic3r::X, and Slic3r::Y.

Referenced by Slic3r::GUI::Plater::priv::ensure_belt_purge_tower(), and Slic3r::GUI::Plater::priv::update_background_process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ensure_model_info()

std::shared_ptr< ModelInfo > Slic3r::GUI::ensure_model_info ( )
static
96{
97 auto& model = wxGetApp().plater()->model();
98 if (model.model_info == nullptr) {
99 model.model_info = std::make_shared<ModelInfo>();
100 }
101 return model.model_info;
102}

Referenced by Slic3r::GUI::DesignerPanel::on_input_enter_description(), Slic3r::GUI::DesignerPanel::on_input_enter_model(), Slic3r::GUI::DesignerPanel::on_select_license(), and Slic3r::GUI::AuFile::on_set_cover().

Here is the caller graph for this function:

◆ entity_endpoints()

void Slic3r::GUI::entity_endpoints ( const SketchEntity & e,
std::vector< Vec2d > & out )
static
10395{
10396 out.clear();
10397 if (e.type == SketchEntity::Type::Line) {
10398 out.push_back(e.p0);
10399 out.push_back(e.p1);
10400 } else if (e.type == SketchEntity::Type::Arc) {
10401 out.push_back(e.center + e.radius * Vec2d(std::cos(e.start_angle), std::sin(e.start_angle)));
10402 out.push_back(e.center + e.radius * Vec2d(std::cos(e.end_angle), std::sin(e.end_angle)));
10403 }
10404}
Vec2d p0
Definition SketchEngine.hpp:33
double start_angle
Definition SketchEngine.hpp:37
double end_angle
Definition SketchEngine.hpp:38
@ Arc
Definition SketchEngine.hpp:31
@ Line
Definition SketchEngine.hpp:31
Type type
Definition SketchEngine.hpp:32
Vec2d center
Definition SketchEngine.hpp:35
double radius
Definition SketchEngine.hpp:36
Vec2d p1
Definition SketchEngine.hpp:34

References Slic3r::SketchEntity::Arc, Slic3r::SketchEntity::center, Slic3r::SketchEntity::end_angle, entity_endpoints(), Slic3r::SketchEntity::Line, Slic3r::SketchEntity::p0, Slic3r::SketchEntity::p1, Slic3r::SketchEntity::radius, Slic3r::SketchEntity::start_angle, and Slic3r::SketchEntity::type.

Referenced by Slic3r::GUI::DesignSketchTool::connected_loop(), and entity_endpoints().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ entity_moved()

bool Slic3r::GUI::entity_moved ( const SketchEntity & a,
const SketchEntity & b,
double tol )
static
8923{
8924 if (a.type != b.type) return true;
8925 auto moved = [tol](const Vec2d& p, const Vec2d& q) { return (p - q).norm() > tol; };
8926 if (moved(a.p0, b.p0)) return true;
8927 switch (a.type) {
8929 return false;
8931 return moved(a.p1, b.p1);
8933 return moved(a.center, b.center) || std::abs(a.radius - b.radius) > tol;
8935 return moved(a.p1, b.p1) || moved(a.center, b.center)
8936 || std::abs(a.radius - b.radius) > tol
8937 || std::abs((a.end_angle - a.start_angle) - (b.end_angle - b.start_angle)) > tol;
8940 return moved(a.center, b.center) || std::abs(a.radius - b.radius) > tol
8941 || std::abs(a.rminor - b.rminor) > tol || std::abs(a.rotation - b.rotation) > tol;
8942 default:
8943 return moved(a.p1, b.p1);
8944 }
8945}
@ Ellipse
Definition SketchEngine.hpp:31
@ EllipseArc
Definition SketchEngine.hpp:31
@ Point
Definition SketchEngine.hpp:31
@ Circle
Definition SketchEngine.hpp:31
double rotation
Definition SketchEngine.hpp:41
double rminor
Definition SketchEngine.hpp:40

References Slic3r::SketchEntity::Arc, Slic3r::SketchEntity::center, Slic3r::SketchEntity::Circle, Slic3r::SketchEntity::Ellipse, Slic3r::SketchEntity::EllipseArc, Slic3r::SketchEntity::end_angle, entity_moved(), Slic3r::SketchEntity::Line, Slic3r::SketchEntity::p0, Slic3r::SketchEntity::p1, Slic3r::SketchEntity::Point, Slic3r::SketchEntity::radius, Slic3r::SketchEntity::rminor, Slic3r::SketchEntity::rotation, Slic3r::SketchEntity::start_angle, and Slic3r::SketchEntity::type.

Referenced by Slic3r::GUI::DesignSketchTool::confirm_op(), and entity_moved().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ entity_pick_dist()

double Slic3r::GUI::entity_pick_dist ( const Vec2d & p,
const SketchEntity & e )
static
10354{
10355 switch (e.type) {
10356 case SketchEntity::Type::Line: return point_segment_dist(p, e.p0, e.p1);
10357 case SketchEntity::Type::Point: return (p - e.p0).norm();
10359 case SketchEntity::Type::Arc: return std::abs((p - e.center).norm() - e.radius);
10362 // Accurate edge pick: sample the true ellipse outline as a polyline and take the
10363 // min segment distance. The crude mean-radius circle mis-picks eccentric ellipses
10364 // (the outline at the major/minor extremes is far from that circle), which made the
10365 // face-fill swallow edge clicks. Full ellipse sweeps 0..2pi; an arc its param range.
10366 const double cu = std::cos(e.rotation), su = std::sin(e.rotation);
10367 const bool full = (e.type == SketchEntity::Type::Ellipse);
10368 const double t0 = full ? 0.0 : e.start_angle;
10369 const double t1 = full ? 2.0 * M_PI : e.end_angle;
10370 const int n = 48;
10371 double best = 1e30; Vec2d prev;
10372 for (int i = 0; i <= n; ++i) {
10373 const double t = t0 + (t1 - t0) * double(i) / n;
10374 const double lx = e.radius * std::cos(t), ly = e.rminor * std::sin(t); // local
10375 const Vec2d q(e.center.x() + lx * cu - ly * su,
10376 e.center.y() + lx * su + ly * cu); // world
10377 if (i > 0) best = std::min(best, point_segment_dist(p, prev, q));
10378 prev = q;
10379 }
10380 return best;
10381 }
10383 const std::vector<Vec2d> poly = bspline_polyline(e.ctrl);
10384 double best = 1e30;
10385 for (size_t i = 1; i < poly.size(); ++i)
10386 best = std::min(best, point_segment_dist(p, poly[i - 1], poly[i]));
10387 return best;
10388 }
10389 }
10390 return 1e30;
10391}
static double point_segment_dist(const Vec2d &p, const Vec2d &a, const Vec2d &b)
Definition DesignSketchTool.cpp:10276
static std::vector< Vec2d > bspline_polyline(const std::vector< Vec2d > &ctrl, int samples=0)
Definition DesignSketchTool.cpp:2868
std::vector< Vec2d > ctrl
Definition SketchEngine.hpp:42
@ BSpline
Definition SketchEngine.hpp:31

References Slic3r::SketchEntity::Arc, Slic3r::SketchEntity::BSpline, bspline_polyline(), Slic3r::SketchEntity::center, Slic3r::SketchEntity::Circle, Slic3r::SketchEntity::ctrl, Slic3r::SketchEntity::Ellipse, Slic3r::SketchEntity::EllipseArc, Slic3r::SketchEntity::end_angle, entity_pick_dist(), Slic3r::SketchEntity::Line, M_PI, Slic3r::SketchEntity::p0, Slic3r::SketchEntity::p1, Slic3r::SketchEntity::Point, point_segment_dist(), Slic3r::SketchEntity::radius, Slic3r::SketchEntity::rminor, Slic3r::SketchEntity::rotation, Slic3r::SketchEntity::start_angle, and Slic3r::SketchEntity::type.

Referenced by Slic3r::GUI::DesignSketchTool::apply_live_trim(), Slic3r::GUI::DesignSketchTool::compute_trim_preview(), entity_pick_dist(), Slic3r::GUI::DesignSketchTool::hit_display_sketch(), Slic3r::GUI::DesignSketchTool::hit_test(), and Slic3r::GUI::DesignSketchTool::on_mouse_impl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ entity_ref_point()

bool Slic3r::GUI::entity_ref_point ( const SketchEntity & e,
Vec2d & out )
static
10409{
10410 switch (e.type) {
10411 case SketchEntity::Type::Point: out = e.p0; return true;
10415 case SketchEntity::Type::EllipseArc: out = e.center; return true;
10416 default: return false; // Line
10417 }
10418}

References Slic3r::SketchEntity::Arc, Slic3r::SketchEntity::center, Slic3r::SketchEntity::Circle, Slic3r::SketchEntity::Ellipse, Slic3r::SketchEntity::EllipseArc, entity_ref_point(), Slic3r::SketchEntity::p0, Slic3r::SketchEntity::Point, and Slic3r::SketchEntity::type.

Referenced by Slic3r::GUI::DesignSketchTool::apply_dimension(), Slic3r::GUI::DesignSketchTool::dimension_current(), Slic3r::GUI::DesignSketchTool::dimension_kind(), and entity_ref_point().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ epsilon()

double Slic3r::GUI::epsilon ( )
constexpr
31{ return 0.0011; }

Referenced by contains(), Slic3r::GUI::IMSlider::get_label(), Slic3r::GUI::IMSlider::get_tick_from_value(), and Slic3r::GUI::Preview::update_layers_slider().

Here is the caller graph for this function:

◆ equivalent_areas()

bool Slic3r::GUI::equivalent_areas ( const double & bottom_area,
const double & top_area )
82{
83 return fabs(bottom_area - top_area) <= miscalculation();
84}
double miscalculation()
Definition IMSlider.cpp:56

References miscalculation().

Referenced by check_color_change(), and Slic3r::GUI::Preview::update_layers_slider().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_wipe_tower_info()

arrangement::ArrangePolygon Slic3r::GUI::estimate_wipe_tower_info ( int plate_index,
std::set< int > & extruder_ids )
417{
418 PartPlateList& ppl = wxGetApp().plater()->get_partplate_list();
419 const auto& full_config = wxGetApp().preset_bundle->full_config();
420 int plate_count = ppl.get_plate_count();
421 int plate_index_valid = std::min(plate_index, plate_count - 1);
422
423 // we have to estimate the depth using the extruder number of all plates
424 int extruder_size = extruder_ids.size();
425
426 Vec3d wipe_tower_size, wipe_tower_pos;
427 auto arrange_poly = ppl.get_plate(plate_index_valid)->estimate_wipe_tower_polygon(full_config, plate_index, wipe_tower_pos, wipe_tower_size, extruder_size);
428 arrange_poly.bed_idx = plate_index;
429 return arrange_poly;
430}
Definition PartPlate.hpp:769
arrangement::ArrangePolygon estimate_wipe_tower_polygon(const DynamicPrintConfig &config, int plate_index, Vec3d &wt_pos, Vec3d &wt_size, int plate_extruder_size=0, bool use_global_objects=false, WipeTowerRelocation *relocation=nullptr) const
Definition PartPlate.cpp:4065
int bed_idx
Arrange with inflated polygon.
Definition Arrange.hpp:63

References Slic3r::arrangement::ArrangePolygon::bed_idx, Slic3r::GUI::PartPlate::estimate_wipe_tower_polygon(), Slic3r::GUI::PartPlateList::get_plate(), and Slic3r::GUI::PartPlateList::get_plate_count().

Referenced by Slic3r::GUI::ArrangeJob::prepare_wipe_tower().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ expolygon_from_polygon()

ExPolygon Slic3r::GUI::expolygon_from_polygon ( const Polygon & polygon)
static
1474{
1475 ExPolygon expolygon;
1476 expolygon.contour = polygon;
1477 expolygon.contour.make_counter_clockwise();
1478 return expolygon;
1479}
Definition ExPolygon.hpp:23
Polygon contour
Definition ExPolygon.hpp:42
bool make_counter_clockwise()
Definition Polygon.cpp:94

References Slic3r::ExPolygon::contour, and Slic3r::Polygon::make_counter_clockwise().

Referenced by init_exclusion_volume_prism_model(), init_model_from_polygons(), and Slic3r::GUI::PartPlate::update_exclusion_volume_preview_models().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ extract_remote_filename()

std::string Slic3r::GUI::extract_remote_filename ( const std::string & str)
128 {
129 std::regex r("filename=\"([^\"]*)\"");
130 std::smatch match;
131 if (std::regex_search(str.begin(), str.end(), match, r)) {
132 return match.str(1);
133 } else {
134 return "";
135 }
136}

Referenced by Slic3r::GUI::FileGet::priv::get_perform().

Here is the caller graph for this function:

◆ extruder_group_chip_bg()

wxColour Slic3r::GUI::extruder_group_chip_bg ( )
static
610{
611 return StateColor::darkModeColorFor(*wxWHITE);
612}

References StateColor::darkModeColorFor().

Referenced by Slic3r::GUI::ExtruderGroup::ExtruderGroup(), Slic3r::GUI::HoverLabel::HoverLabel(), Slic3r::GUI::ExtruderGroup::sys_color_changed(), and Slic3r::GUI::HoverLabel::sys_color_changed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ extruder_supports_tpu_high_flow()

bool Slic3r::GUI::extruder_supports_tpu_high_flow ( PresetBundle * preset_bundle,
int extruder_id )
255{
256 if (!preset_bundle)
257 return false;
258 const auto *nozzle_diameter = preset_bundle->printers.get_edited_preset().config.option<ConfigOptionFloats>("nozzle_diameter");
259 return nozzle_diameter != nullptr && extruder_id >= 0 && extruder_id < (int) nozzle_diameter->values.size() &&
261}
bool nozzle_diameter_supports_tpu_high_flow(double nozzle_diameter)
Definition MultiNozzleSync.cpp:247

References Slic3r::Preset::config, Slic3r::PresetCollection::get_edited_preset(), Slic3r::nozzle_diameter(), nozzle_diameter_supports_tpu_high_flow(), Slic3r::ConfigBase::option(), and Slic3r::PresetBundle::printers.

Referenced by Slic3r::GUI::Sidebar::priv::get_nozzle_options(), and tryPopUpMultiNozzleDialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ eye_action()

DesignRowList::Action Slic3r::GUI::eye_action ( bool shown)
static
285{
286 return { RowVisibility, shown ? "design_eye" : "design_eye_off", shown ? _L("Hide") : _L("Show") };
287}

References _L, and RowVisibility.

Referenced by Slic3r::GUI::DesignPanel::refresh_parts(), Slic3r::GUI::DesignPanel::refresh_pinned(), and Slic3r::GUI::DesignPanel::refresh_tree().

Here is the caller graph for this function:

◆ face_plane_inward()

SketchPlane Slic3r::GUI::face_plane_inward ( const TopoDS_Face & face)
static
385{
386 SketchPlane p;
388 p.normal = (-GeometryEngine::face_normal_world(face)).normalized(); // inward
389 // Align the in-plane x-axis with the face's LONGEST straight edge so the (u,v) frame matches
390 // the face sides — then "distance from a side" (the hole construction dims) reads correctly.
391 Vec3d x(0, 0, 0); double best = 0;
392 for (const TopoDS_Edge& e : GeometryEngine::edges_of_face(face)) {
393 const std::vector<Vec3d> pts = GeometryEngine::sample_edge_world(e);
394 if (pts.size() < 2) continue;
395 Vec3d d = pts.back() - pts.front();
396 d = d - p.normal * d.dot(p.normal); // project the edge direction into the plane
397 const double len = d.norm();
398 if (len > best) { best = len; x = d / len; }
399 }
400 if (best < 1e-9) { // curved/edgeless face: fall back to an arbitrary in-plane basis
401 const Vec3d ref = std::abs(p.normal.z()) < 0.9 ? Vec3d(0, 0, 1) : Vec3d(1, 0, 0);
402 x = ref.cross(p.normal).normalized();
403 }
404 p.x_axis = x.normalized();
405 p.y_axis = p.normal.cross(p.x_axis).normalized();
406 return p;
407}
static Vec3d face_normal_world(const TopoDS_Face &face)
Definition GeometryEngine.cpp:627
static std::vector< TopoDS_Edge > edges_of_face(const TopoDS_Face &face)
Definition GeometryEngine.cpp:565
static std::vector< Vec3d > sample_edge_world(const TopoDS_Edge &edge, double chord_tol=0.05)
Definition GeometryEngine.cpp:575
static Vec3d face_centroid_world(const TopoDS_Face &face)
Definition GeometryEngine.cpp:619
Definition SketchEngine.hpp:50
Vec3d y_axis
Definition SketchEngine.hpp:54
Vec3d x_axis
Definition SketchEngine.hpp:53
Vec3d normal
Definition SketchEngine.hpp:52
Vec3d origin
Definition SketchEngine.hpp:51

References Slic3r::GeometryEngine::edges_of_face(), Slic3r::GeometryEngine::face_centroid_world(), Slic3r::GeometryEngine::face_normal_world(), Slic3r::SketchPlane::normal, Slic3r::SketchPlane::origin, Slic3r::GeometryEngine::sample_edge_world(), Slic3r::SketchPlane::x_axis, and Slic3r::SketchPlane::y_axis.

Referenced by Slic3r::GUI::DesignPanel::DesignPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ face_selected_volume_to_camera()

bool Slic3r::GUI::face_selected_volume_to_camera ( const Camera & camera,
GLCanvas3D & canvas,
const std::optional< double > & wanted_up_limit = {} )

Apply camera direction for emboss direction.

Parameters
cameraDefine view vector
canvasContaine Selected ModelVolume to modify orientation
wanted_up_limit[Optional]Limit for direction of up vector
Returns
True when apply change otherwise false
330{
331 GLVolume *gl_volume_ptr = get_selected_gl_volume(canvas);
332 if (gl_volume_ptr == nullptr)
333 return false;
334 GLVolume &gl_volume = *gl_volume_ptr;
335
336 const ModelObjectPtrs &objects = canvas.get_model()->objects;
337 ModelObject *object_ptr = get_model_object(gl_volume, objects);
338 assert(object_ptr != nullptr);
339 if (object_ptr == nullptr)
340 return false;
341 ModelObject &object = *object_ptr;
342
343 const ModelInstance *instance_ptr = get_model_instance(gl_volume, object);
344 assert(instance_ptr != nullptr);
345 if (instance_ptr == nullptr)
346 return false;
347 const ModelInstance &instance = *instance_ptr;
348
349 ModelVolume *volume_ptr = get_model_volume(gl_volume, object);
350 assert(volume_ptr != nullptr);
351 if (volume_ptr == nullptr)
352 return false;
353 ModelVolume &volume = *volume_ptr;
354
355 // Calculate new volume transformation
356 Transform3d volume_tr = volume.get_matrix();
357 std::optional<Transform3d> fix;
358 if (volume.emboss_shape.has_value()) {
359 fix = volume.emboss_shape->fix_3mf_tr;
360 if (fix.has_value())
361 volume_tr = volume_tr * fix->inverse();
362 }
363
364 Transform3d instance_tr = instance.get_matrix();
365 Transform3d instance_tr_inv = instance_tr.inverse();
366 Transform3d world_tr = instance_tr * volume_tr; // without sla !!!
367 std::optional<float> current_angle;
368 if (wanted_up_limit.has_value())
369 current_angle = Emboss::calc_up(world_tr, *wanted_up_limit);
370
371 Vec3d world_position = gl_volume.world_matrix()*Vec3d::Zero();
372
373 assert(camera.get_type() == Camera::EType::Perspective ||
374 camera.get_type() == Camera::EType::Ortho);
375 Vec3d wanted_direction = (camera.get_type() == Camera::EType::Perspective) ?
376 Vec3d(camera.get_position() - world_position) :
377 (-camera.get_dir_forward());
378
379 Transform3d new_volume_tr = get_volume_transformation(world_tr, wanted_direction, world_position,
380 fix, instance_tr_inv, current_angle, wanted_up_limit);
381
382 Selection &selection = canvas.get_selection();
383 if (is_embossed_object(selection)) {
384 // transform instance instead of volume
385 Transform3d new_instance_tr = instance_tr * new_volume_tr * volume.get_matrix().inverse();
386 gl_volume.set_instance_transformation(new_instance_tr);
387
388 // set same transformation to other instances when instance is embossed object
389 if (selection.is_single_full_instance())
391 } else {
392 // write result transformation
393 gl_volume.set_volume_transformation(new_volume_tr);
394 }
395
396 if (volume.type() == ModelVolumeType::MODEL_PART) {
397 object.invalidate_bounding_box();
398 object.ensure_on_bed();
399 }
400
401 canvas.do_rotate(L("Face the camera"));
402 wxGetApp().obj_manipul()->set_dirty();
403 return true;
404}
void set_volume_transformation(const Geometry::Transformation &transformation)
Definition 3DScene.hpp:307
void set_instance_transformation(const Geometry::Transformation &transformation)
Definition 3DScene.hpp:279
void do_rotate(const std::string &snapshot_type)
Definition GLCanvas3D.cpp:5773
const Selection & get_selection() const
Definition GLCanvas3D.hpp:1028
Definition Selection.hpp:47
bool is_single_full_instance() const
Definition Selection.cpp:848
void synchronize_unselected_instances(SyncRotationType sync_rotation_type)
Definition Selection.cpp:3045
@ GENERAL
Definition Selection.hpp:459
ModelVolumeType type() const
Definition Model.hpp:1023
EType get_type() const
Definition Camera.hpp:83
@ Ortho
Definition Camera.hpp:39
@ Perspective
Definition Camera.hpp:40
Vec3d get_position() const
Definition Camera.hpp:126

References Slic3r::Emboss::calc_up(), Slic3r::GUI::GLCanvas3D::do_rotate(), Slic3r::ModelVolume::emboss_shape, Slic3r::GUI::Selection::GENERAL, Slic3r::GUI::Camera::get_dir_forward(), Slic3r::ModelInstance::get_matrix(), Slic3r::ModelVolume::get_matrix(), Slic3r::GUI::GLCanvas3D::get_model(), get_model_instance(), get_model_object(), get_model_volume(), Slic3r::GUI::Camera::get_position(), get_selected_gl_volume(), Slic3r::GUI::GLCanvas3D::get_selection(), Slic3r::GUI::Camera::get_type(), Slic3r::GUI::Selection::is_single_full_instance(), L, Slic3r::MODEL_PART, Slic3r::Model::objects, Slic3r::GUI::Camera::Ortho, Slic3r::GUI::Camera::Perspective, Slic3r::GLVolume::set_instance_transformation(), Slic3r::GLVolume::set_volume_transformation(), Slic3r::GUI::Selection::synchronize_unselected_instances(), Slic3r::ModelVolume::type(), and Slic3r::GLVolume::world_matrix().

Referenced by Slic3r::GUI::GLGizmoEmboss::draw_advanced(), and Slic3r::GUI::GLGizmoSVG::draw_face_the_camera().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fatal_error()

void Slic3r::GUI::fatal_error ( wxWindow * parent)
5109{
5110 show_error(parent, "");
5111 // exit 1; // #ys_FIXME
5112}
void show_error(wxWindow *parent, const wxString &message, bool has_code_excerpts)
Definition GUI.cpp:296

References fatal_error(), and show_error().

Referenced by fatal_error().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ filament_color_picker_changed()

bool Slic3r::GUI::filament_color_picker_changed ( const ColorSelection & initial,
const std::optional< ColorSelection > & result )
274{
275 // Compare encoded bytes, not ColorRGBA's tolerant floating point equality.
276 // An unchanged seed also leaves unrepresentable multi-color data untouched.
277 return result && color_selection_to_json(initial) != color_selection_to_json(*result);
278}

Referenced by Slic3r::GUI::FilamentPickerDialog::BindEvents(), and Slic3r::GUI::PlaterPresetComboBox::show_default_color_picker().

Here is the caller graph for this function:

◆ filament_color_picker_initial()

ColorSelection Slic3r::GUI::filament_color_picker_initial ( const FilamentColorPickerValue & value)
247{
248 if (const auto exact = filament_color_picker_selection(value))
249 return *exact;
250 if (!value.colors.empty()) {
251 if (const auto primary = color_selection_from_json({{"type", "solid"}, {"colors", {value.colors.front()}}}, {false, true}))
252 return *primary;
253 }
254 if (const auto primary = color_selection_from_json({{"type", "solid"}, {"colors", {value.primary}}}, {false, true}))
255 return *primary;
256 return ColorRGBA(0.f, 0.f, 0.f, 1.f);
257}
std::optional< ColorSelection > color_selection_from_json(const nlohmann::json &value, ColorPickerOptions options)
Definition ColorPickerDialog.cpp:116
std::vector< std::string > colors
Definition ColorPickerDialog.hpp:38
std::string primary
Definition ColorPickerDialog.hpp:40
std::optional< ColorSelection > filament_color_picker_selection(const FilamentColorPickerValue &value)
Definition ColorPickerDialog.cpp:241

References Slic3r::GUI::FilamentColorPickerValue::colors, filament_color_picker_selection(), and Slic3r::GUI::FilamentColorPickerValue::primary.

Referenced by Slic3r::GUI::FilamentPickerDialog::BindEvents(), and Slic3r::GUI::PlaterPresetComboBox::show_default_color_picker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ filament_color_picker_result()

FilamentColorPickerValue Slic3r::GUI::filament_color_picker_result ( const ColorSelection & selection)
260{
261 // Keep legacy RGB spelling for opaque colors; retain RGBA for transparency.
262 const auto canonical = color_selection_to_json(selection);
264 value.gradient = canonical.at("type") == "gradient";
265 for (const auto& color : canonical.at("colors")) {
266 auto hex = color.get<std::string>();
267 if (hex.compare(7, 2, "FF") == 0) hex.resize(7);
268 value.colors.push_back(std::move(hex));
269 }
270 return value;
271}
bool gradient
Definition ColorPickerDialog.hpp:39
Definition ColorPickerDialog.hpp:37

References Slic3r::GUI::FilamentColorPickerValue::colors, and Slic3r::GUI::FilamentColorPickerValue::gradient.

Referenced by Slic3r::GUI::PlaterPresetComboBox::PlaterPresetComboBox(), Slic3r::GUI::FilamentPickerDialog::BindEvents(), and Slic3r::GUI::PlaterPresetComboBox::show_default_color_picker().

Here is the caller graph for this function:

◆ filament_color_picker_selection()

std::optional< ColorSelection > Slic3r::GUI::filament_color_picker_selection ( const FilamentColorPickerValue & value)
242{
243 return color_selection_from_json({{"type", value.gradient ? "gradient" : "solid"}, {"colors", value.colors}}, {true, true});
244}

References Slic3r::GUI::FilamentColorPickerValue::colors, and Slic3r::GUI::FilamentColorPickerValue::gradient.

Referenced by Slic3r::GUI::FilamentPickerDialog::BindEvents(), filament_color_picker_initial(), and Slic3r::GUI::PlaterPresetComboBox::show_default_color_picker().

Here is the caller graph for this function:

◆ filament_color_picker_value()

FilamentColorPickerValue Slic3r::GUI::filament_color_picker_value ( const DynamicPrintConfig & config,
std::size_t index )
static
89{
91 if (const auto* primary = config.opt<ConfigOptionStrings>("filament_colour"); primary && index < primary->values.size())
92 value.primary = primary->values[index];
93 if (const auto* multi = config.opt<ConfigOptionStrings>("filament_multi_colour"); multi && index < multi->values.size()) {
94 std::istringstream stream(multi->values[index]);
95 for (std::string color; stream >> color;)
96 value.colors.push_back(std::move(color));
97 }
98 if (value.colors.empty() && !value.primary.empty())
99 value.colors.push_back(value.primary);
100 if (const auto* types = config.opt<ConfigOptionStrings>("filament_colour_type"); types && index < types->values.size())
101 value.gradient = value.colors.size() > 1 && types->values[index] == "0";
102 return value;
103}
T * opt(const t_config_option_key &opt_key, bool create=false)
Definition Config.hpp:3007

References Slic3r::GUI::FilamentColorPickerValue::colors, Slic3r::GUI::FilamentColorPickerValue::gradient, Slic3r::DynamicConfig::opt(), Slic3r::GUI::FilamentColorPickerValue::primary, and Slic3r::ConfigOptionVector< T >::size().

Referenced by Slic3r::GUI::PlaterPresetComboBox::PlaterPresetComboBox(), and Slic3r::GUI::PlaterPresetComboBox::show_default_color_picker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ filament_name_to_wx_string()

wxString Slic3r::GUI::filament_name_to_wx_string ( const std::string & name)
static
378{
379 wxString utf8_name = wxString::FromUTF8(name.c_str());
380 if (!utf8_name.empty() || name.empty())
381 return utf8_name;
382 return wxString(name);
383}

Referenced by Slic3r::GUI::FilamentSelectPopup::create_item_row(), Slic3r::GUI::FilamentSelectPopup::create_mixed_item_row(), Slic3r::GUI::TextureImportDialog::rebuild_mapping_rows(), and Slic3r::GUI::TextureImportDialog::show_filament_popup().

Here is the caller graph for this function:

◆ filament_type_for_color_decompose()

std::string Slic3r::GUI::filament_type_for_color_decompose ( Preset * preset)
222{
223 if (!preset)
225
226 std::string display_type;
227 std::string ft = preset->config.get_filament_type(display_type);
228 const std::string basic = official_basic_type_from_preset_name(preset->name);
229 if (!basic.empty())
230 ft = basic;
231 if (ft.empty())
233 return ft;
234}
std::string official_basic_type_from_preset_name(const std::string &preset_name)
Definition ColorDecomposeSupport.cpp:212

References Slic3r::Preset::config, Slic3r::DynamicPrintConfig::get_filament_type(), kDecomposePlaShortType, Slic3r::Preset::name, and official_basic_type_from_preset_name().

Referenced by Slic3r::GUI::TextureImportDialog::add_decomposed_mixed_filament(), and Slic3r::GUI::Sidebar::decompose_filament_color().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ filaments_count() [1/2]

◆ filaments_count() [2/2]

int Slic3r::GUI::filaments_count ( )
static
137{
138 return wxGetApp().filaments_cnt();
139}

◆ file_url_from_path()

wxString Slic3r::GUI::file_url_from_path ( const boost::filesystem::path & path)

◆ file_wildcards()

wxString Slic3r::GUI::file_wildcards ( FileType file_type,
const std::string & custom_extension )
696{
697 const FileWildcards& data = file_wildcards_by_type[file_type];
698 std::string title;
699 std::string mask;
700 std::string custom_ext_lower;
701
702 if (! custom_extension.empty()) {
703 // Generate an extension into the title mask and into the list of extensions.
704 custom_ext_lower = boost::to_lower_copy(custom_extension);
705 const std::string custom_ext_upper = boost::to_upper_copy(custom_extension);
706 if (custom_ext_lower == custom_extension) {
707 // Add a lower case version.
708 title = std::string("*") + custom_ext_lower;
709 mask = title;
710 // Add an upper case version.
711 mask += ";*";
712 mask += custom_ext_upper;
713 } else if (custom_ext_upper == custom_extension) {
714 // Add an upper case version.
715 title = std::string("*") + custom_ext_upper;
716 mask = title;
717 // Add a lower case version.
718 mask += ";*";
719 mask += custom_ext_lower;
720 } else {
721 // Add the mixed case version only.
722 title = std::string("*") + custom_extension;
723 mask = title;
724 }
725 }
726
727 for (const std::string_view &ext : data.file_extensions)
728 // Only add an extension if it was not added first as the custom extension.
729 if (ext != custom_ext_lower) {
730 if (title.empty()) {
731 title = "*";
732 title += ext;
733 mask = title;
734 } else {
735 title += ", *";
736 title += ext;
737 mask += ";*";
738 mask += ext;
739 }
740 mask += ";*";
741 mask += boost::to_upper_copy(std::string(ext));
742 }
743 const wxString translated_title = Slic3r::GUI::I18N::translate(data.title_id);
744 return GUI::format_wxstr("%s (%s)|%s", translated_title, title, mask);
745}
wxString translate(const char *s)
Definition I18N.hpp:47
static const FileWildcards file_wildcards_by_type[FT_SIZE]
Definition GUI_App.cpp:665
std::vector< std::string_view > file_extensions
Definition GUI_App.cpp:662
const char * title_id
Definition GUI_App.cpp:661
Definition GUI_App.cpp:660

References Slic3r::GUI::FileWildcards::file_extensions, file_wildcards_by_type, format_wxstr(), Slic3r::GUI::FileWildcards::title_id, and Slic3r::GUI::I18N::translate().

Referenced by anonymous_namespace{GLGizmoSVG.cpp}::choose_svg_file(), Slic3r::GUI::GLGizmoSVG::draw_filename(), Slic3r::GUI::Plater::export_gcode(), Slic3r::GUI::Plater::export_gcode_3mf(), Slic3r::GUI::Plater::priv::get_export_file(), Slic3r::GUI::GUI_App::import_model(), Slic3r::GUI::GUI_App::import_zip(), Slic3r::GUI::GUI_App::load_gcode(), Slic3r::GUI::BedShapePanel::load_model(), Slic3r::GUI::CreatePrinterPresetDialog::load_model_stl(), Slic3r::GUI::GUI_App::load_project(), Slic3r::GUI::BedShapePanel::load_stl(), Slic3r::GUI::BedShapePanel::load_texture(), Slic3r::GUI::CreatePrinterPresetDialog::load_texture(), Slic3r::GUI::Plater::priv::reload_from_disk(), Slic3r::GUI::Plater::priv::replace_with_stl(), and start_new_gcodeviewer_open_file().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_gradient_ramp_rect()

void Slic3r::GUI::fill_gradient_ramp_rect ( wxDC & dc,
const wxRect & rect,
const std::vector< wxColour > & ramp )
190{
191 if (rect.width <= 0 || rect.height <= 0 || ramp.empty()) return;
192
193 dc.SetPen(*wxTRANSPARENT_PEN);
194 for (int y = 0; y < rect.height; ++y) {
195 // Row 0 is the top of the rect and so takes the ramp's last entry, the model's top.
196 // Mapping over height - 1 puts both ends of the ramp on screen even in a short swatch.
197 const double t = (rect.height > 1) ? (double) (rect.height - 1 - y) / (rect.height - 1) : 0.5;
198 dc.SetBrush(wxBrush(ramp[static_cast<size_t>(t * (ramp.size() - 1) + 0.5)]));
199 dc.DrawRectangle(rect.x, rect.y + y, rect.width, 1);
200 }
201}

Referenced by create_gradient_ramp_bitmap(), Slic3r::GUI::MixedFilamentDialog::create_preview_panel(), and Slic3r::GUI::Sidebar::update_mixed_filament_list().

Here is the caller graph for this function:

◆ fill_gradient_rect_east()

void Slic3r::GUI::fill_gradient_rect_east ( wxDC & dc,
const wxRect & rect,
const wxColour & from,
const wxColour & to )
77{
78 if (rect.width <= 0 || rect.height <= 0) return;
79
80 auto mix_channel = [](unsigned char a, unsigned char b, double t) {
81 return static_cast<unsigned char>(a + (b - a) * t + 0.5);
82 };
83
84 dc.SetPen(*wxTRANSPARENT_PEN);
85 for (int x = 0; x < rect.width; ++x) {
86 const double t = rect.width > 1 ? static_cast<double>(x) / (rect.width - 1) : 0.0;
87 const wxColour col(mix_channel(from.Red(), to.Red(), t),
88 mix_channel(from.Green(), to.Green(), t),
89 mix_channel(from.Blue(), to.Blue(), t),
90 mix_channel(from.Alpha(), to.Alpha(), t));
91 dc.SetBrush(wxBrush(col));
92 dc.DrawRectangle(rect.x + x, rect.y, 1, rect.height);
93 }
94}

Referenced by Slic3r::GUI::AMSPreview::doRender(), Slic3r::GUI::MappingItem::doRender(), Slic3r::GUI::MaterialItem::doRender(), Slic3r::GUI::MaterialSyncItem::doRender(), Slic3r::GUI::AMSLib::render_generic_lib(), and Slic3r::GUI::AMSLib::render_lite_lib().

Here is the caller graph for this function:

◆ fill_nozzle_volume_combo()

void Slic3r::GUI::fill_nozzle_volume_combo ( ComboBox * combo)
static
873{
874 combo->Clear();
875 const ConfigOptionDef *nozzle_volume_type_def = print_config_def.get("nozzle_volume_type");
876 if (nozzle_volume_type_def && nozzle_volume_type_def->enum_keys_map) {
877 for (size_t i = 0; i < nozzle_volume_type_def->enum_labels.size(); ++i)
878 combo->Append(_L(nozzle_volume_type_def->enum_labels[i]), wxNullBitmap,
879 (void *) (intptr_t) nozzle_volume_type_def->enum_keys_map->at(nozzle_volume_type_def->enum_values[i]));
880 }
882}
static void select_nozzle_volume(ComboBox *combo, NozzleVolumeType volume_type)
Definition CalibrationWizardPresetPage.cpp:863
@ nvtStandard
Definition PrintConfig.hpp:619
const PrintConfigDef print_config_def
Definition PrintConfig.cpp:10099

References _L, ComboBox::Append(), Slic3r::ConfigOptionDef::enum_keys_map, Slic3r::ConfigOptionDef::enum_labels, Slic3r::ConfigOptionDef::enum_values, Slic3r::nvtStandard, Slic3r::print_config_def, and select_nozzle_volume().

Referenced by Slic3r::GUI::CalibrationPresetPage::init_selection_values().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_close_layer_idx() [1/2]

int Slic3r::GUI::find_close_layer_idx ( const std::vector< double > & zs,
double & z,
double eps )
static
209{
210 if (zs.empty()) return -1;
211 auto it_h = std::lower_bound(zs.begin(), zs.end(), z);
212 if (it_h == zs.end()) {
213 auto it_l = it_h;
214 --it_l;
215 if (z - *it_l < eps) return int(zs.size() - 1);
216 } else if (it_h == zs.begin()) {
217 if (*it_h - z < eps) return 0;
218 } else {
219 auto it_l = it_h;
220 --it_l;
221 double dist_l = z - *it_l;
222 double dist_h = *it_h - z;
223 if (std::min(dist_l, dist_h) < eps) { return (dist_l < dist_h) ? int(it_l - zs.begin()) : int(it_h - zs.begin()); }
224 }
225 return -1;
226}

Referenced by Slic3r::GUI::Preview::update_layers_slider().

Here is the caller graph for this function:

◆ find_close_layer_idx() [2/2]

int Slic3r::GUI::find_close_layer_idx ( const std::vector< double > & zs,
double & z,
double eps )
static
480{
481 if (zs.empty()) return -1;
482 auto it_h = std::lower_bound(zs.begin(), zs.end(), z);
483 if (it_h == zs.end()) {
484 auto it_l = it_h;
485 --it_l;
486 if (z - *it_l < eps) return int(zs.size() - 1);
487 } else if (it_h == zs.begin()) {
488 if (*it_h - z < eps) return 0;
489 } else {
490 auto it_l = it_h;
491 --it_l;
492 double dist_l = z - *it_l;
493 double dist_h = *it_h - z;
494 if (std::min(dist_l, dist_h) < eps) { return (dist_l < dist_h) ? int(it_l - zs.begin()) : int(it_h - zs.begin()); }
495 }
496 return -1;
497}

◆ find_decompose_standard_preset_name()

std::string Slic3r::GUI::find_decompose_standard_preset_name ( size_t source_config_idx,
const std::string & basic_type )
195{
196 const PresetBundle& preset_bundle = *wxGetApp().preset_bundle;
197 if (source_config_idx < preset_bundle.filament_presets.size()) {
198 const std::string& source_name = preset_bundle.filament_presets[source_config_idx];
199 if (source_name.find(std::string(kDecomposeBambuPresetPrefix) + basic_type) != std::string::npos)
200 return source_name;
201 }
202
203 const std::string prefix = std::string(kDecomposeBambuPresetPrefix) + basic_type + " @BBL ";
204 for (const std::string& preset_name : preset_bundle.filament_presets) {
205 if (preset_name.find(prefix) == 0)
206 return preset_name;
207 }
208
209 return {};
210}
constexpr const char * kDecomposeBambuPresetPrefix
Definition ColorDecomposeSupport.hpp:25

References Slic3r::PresetBundle::filament_presets, and kDecomposeBambuPresetPrefix.

Referenced by prepare_decompose_mixed_result().

Here is the caller graph for this function:

◆ find_existing_decompose_component()

int Slic3r::GUI::find_existing_decompose_component ( const DecomposeOfficialComponent & component,
const std::vector< std::string > & physical_colors,
const std::vector< size_t > & physical_config_indices,
size_t source_config_idx )
241{
242 auto& project_config = wxGetApp().preset_bundle->project_config;
243 auto* filament_id_opt = project_config.option<ConfigOptionStrings>("filament_id");
244 auto* type_opt = project_config.option<ConfigOptionStrings>("filament_type");
245 const PresetBundle& preset_bundle = *wxGetApp().preset_bundle;
246 const size_t num_physical = physical_colors.size();
247 // component.filament_id is our OF id; the two constants are the printer's own ids.
248 auto* agent = wxGetApp().getAgent();
249 const std::string printer_filament_id = agent ? agent->from_orca_filament_id(component.filament_id) : component.filament_id;
250 const std::string expected_basic_type = printer_filament_id == kDecomposePetgFilamentId ? kDecomposePetgBasicType :
251 printer_filament_id == kDecomposePlaFilamentId ? kDecomposePlaBasicType : "";
252 const std::string expected_short_type = expected_basic_type == kDecomposePetgBasicType ? kDecomposePetgShortType :
253 expected_basic_type == kDecomposePlaBasicType ? kDecomposePlaShortType : "";
254 const std::string expected_preset_part = expected_basic_type.empty() ? "" : std::string(kDecomposeBambuPresetPrefix) + expected_basic_type;
255 for (size_t i = 0; i < num_physical && i < physical_config_indices.size(); ++i) {
256 const size_t config_idx = physical_config_indices[i];
257 const std::string slot_color = decompose_normalize_color_hex(physical_colors[i]);
258 const std::string slot_filament_id = (filament_id_opt && config_idx < filament_id_opt->values.size()) ? filament_id_opt->values[config_idx] : "";
259 const std::string slot_type = (type_opt && config_idx < type_opt->values.size()) ? type_opt->values[config_idx] : "";
260 const std::string preset_name = config_idx < preset_bundle.filament_presets.size() ? preset_bundle.filament_presets[config_idx] : "";
261 if (config_idx == source_config_idx) {
262 continue;
263 }
264 if (slot_color != component.color_hex) {
265 continue;
266 }
267
268 if (!component.filament_id.empty() && slot_filament_id == component.filament_id) {
269 return static_cast<int>(config_idx + 1);
270 }
271
272 if (!expected_basic_type.empty() && (slot_type == expected_basic_type || slot_type == expected_short_type)) {
273 return static_cast<int>(config_idx + 1);
274 }
275
276 if (!expected_preset_part.empty() && preset_name.find(expected_preset_part) != std::string::npos) {
277 return static_cast<int>(config_idx + 1);
278 }
279
280 const bool has_material_hint = !slot_filament_id.empty() || !slot_type.empty() || !preset_name.empty();
281 if (!expected_basic_type.empty() && has_material_hint)
282 continue;
283
284 return static_cast<int>(config_idx + 1);
285 }
286 return -1;
287}
std::string color_hex
Definition ColorDecomposeSupport.hpp:31
std::string decompose_normalize_color_hex(std::string color)
Definition ColorDecomposeSupport.cpp:34
std::string filament_id
Definition ColorDecomposeSupport.hpp:32

References Slic3r::GUI::DecomposeOfficialComponent::color_hex, decompose_normalize_color_hex(), Slic3r::GUI::DecomposeOfficialComponent::filament_id, kDecomposeBambuPresetPrefix, kDecomposePetgBasicType, kDecomposePetgFilamentId, kDecomposePetgShortType, kDecomposePlaBasicType, kDecomposePlaFilamentId, kDecomposePlaShortType, and Slic3r::ConfigOptionVector< T >::values.

Referenced by count_decompose_new_physical_filaments(), and prepare_decompose_mixed_result().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_font()

wxFont * Slic3r::GUI::find_font ( const std::string & text_str,
int max_size = 32 )
180{
181 auto is_font_suitable = [](std::string str, wxFont &font, int max_size) {
182 wxString msg(str);
183 wxCoord w, h;
184 get_text_extent(msg, w, h, &font);
185
186 if (w <= max_size)
187 return true;
188 else
189 return false;
190 };
191 wxFont *font = nullptr;
192 if (is_font_suitable(text_str, Label::Head_24, max_size))
193 font = &Label::Head_24;
194 else if (is_font_suitable(text_str, Label::Head_20, max_size))
195 font = &Label::Head_20;
196 else if (is_font_suitable(text_str, Label::Head_18, max_size))
197 font = &Label::Head_18;
198 else if (is_font_suitable(text_str, Label::Head_16, max_size))
199 font = &Label::Head_16;
200 else if (is_font_suitable(text_str, Label::Head_14, max_size))
201 font = &Label::Head_14;
202 else
203 font = &Label::Head_12;
204
205 return font;
206}
static wxFont Head_14
Definition Label.hpp:45
static wxFont Head_18
Definition Label.hpp:42
static wxFont Head_16
Definition Label.hpp:43
static wxFont Head_12
Definition Label.hpp:47
static wxFont Head_24
Definition Label.hpp:40
static wxFont Head_20
Definition Label.hpp:41
void get_text_extent(const wxString &msg, wxCoord &w, wxCoord &h, wxFont *font)
Definition PartPlate.cpp:170

References get_text_extent(), Label::Head_12, Label::Head_14, Label::Head_16, Label::Head_18, Label::Head_20, and Label::Head_24.

Here is the call graph for this function:

◆ find_toplevel_parent()

wxTopLevelWindow * Slic3r::GUI::find_toplevel_parent ( wxWindow * window)
156{
157 for (; window != nullptr; window = window->GetParent()) {
158 if (window->IsTopLevel()) {
159 return dynamic_cast<wxTopLevelWindow*>(window);
160 }
161 }
162
163 return nullptr;
164}

Referenced by em_unit(), Slic3r::GUI::ObjectList::fix_through_cgal(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::Tab::OnActivate(), and Slic3r::GUI::GLGizmoCut3D::perform_cut().

Here is the caller graph for this function:

◆ fit_in_display()

void Slic3r::GUI::fit_in_display ( wxTopLevelWindow & window,
wxSize desired_size )

Make sure the given window fits inside current display.

552{
553 const auto display_size = wxDisplay(window.GetParent()).GetClientArea();
554 if (desired_size.GetWidth() > display_size.GetWidth()) {
555 desired_size.SetWidth(display_size.GetWidth() * 4 / 5);
556 }
557 if (desired_size.GetHeight() > display_size.GetHeight()) {
558 desired_size.SetHeight(display_size.GetHeight() * 4 / 5);
559 }
560
561 window.SetSize(desired_size);
562}

Referenced by Slic3r::GUI::EditGCodeDialog::EditGCodeDialog().

Here is the caller graph for this function:

◆ float_to_string_with_precision()

std::string Slic3r::GUI::float_to_string_with_precision ( float value,
int precision = 3 )
static
79{
80 if (value < 0)
81 return std::string();
82
83 std::stringstream stream;
84 stream << std::fixed << std::setprecision(precision) << value;
85 return stream.str();
86}

Referenced by Slic3r::GUI::AMSMaterialsSetting::on_select_cali_result(), and Slic3r::GUI::AMSMaterialsSetting::on_select_filament().

Here is the caller graph for this function:

◆ focus_event()

void Slic3r::GUI::focus_event ( wxFocusEvent & e,
wxTextCtrl * ctrl,
double def_value )
static
1320{
1321 e.Skip();
1322 wxString str = ctrl->GetValue();
1323
1324 const char dec_sep = is_decimal_separator_point() ? '.' : ',';
1325 const char dec_sep_alt = dec_sep == '.' ? ',' : '.';
1326 // Replace the first incorrect separator in decimal number.
1327 bool was_replaced = str.Replace(dec_sep_alt, dec_sep, false) != 0;
1328
1329 double val = 0.0;
1330 if (!str.ToDouble(&val)) {
1331 if (val == 0.0)
1332 val = def_value;
1333 ctrl->SetValue(double_to_string(val));
1334 show_error(nullptr, _L("Invalid numeric input."));
1335 ctrl->SetFocus();
1336 }
1337 else if (was_replaced)
1338 ctrl->SetValue(double_to_string(val));
1339}
wxString double_to_string(double const value, const int max_precision)
Definition Field.cpp:99

References _L, double_to_string(), Slic3r::is_decimal_separator_point(), and show_error().

Referenced by Slic3r::GUI::PageDiameters::PageDiameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ font_faces()

const wxArrayString & Slic3r::GUI::font_faces ( )
static
47{
48 static wxArrayString faces = [] {
49 // '@' faces are the vertical-writing aliases GTK/MSW list twice.
50 wxArrayString f = wxFontEnumerator::GetFacenames(wxFONTENCODING_SYSTEM, false);
51 f.erase(std::remove_if(f.begin(), f.end(), [](const wxString& n) { return n.StartsWith("@"); }), f.end());
52 f.Sort();
53 return f;
54 }();
55 return faces;
56}

References Slic3r::f().

Referenced by Slic3r::GUI::DesignTextDialog::DesignTextDialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ format() [1/3]

template<typename... TArgs>
std::string Slic3r::GUI::format ( const char * fmt,
TArgs &&... args )
inline
36 {
37 return Slic3r::format(fmt, std::forward<TArgs>(args)...);
38}
std::string format(const char *fmt, TArgs &&... args)
Definition format.hpp:45

References Slic3r::format().

Referenced by Slic3r::GUI::AboutDialog::AboutDialog(), Slic3r::GUI::CopyrightsDialog::CopyrightsDialog(), Slic3r::GUI::NetworkTestDialog::NetworkTestDialog(), Slic3r::GUI::PageWelcome::PageWelcome(), Slic3r::GUI::ProjectDropDialog::ProjectDropDialog(), Slic3r::GUI::GLGizmoSimplify::add_simplify_suggestion_notification(), Slic3r::GUI::NotificationManager::UpdatedItemsInfoNotification::add_type(), Slic3r::plugin_loader::anonymous_namespace{PluginLoader.cpp}::add_wheel_dependencies_to_sys_path(), Slic3r::GUI::GLGizmoSimplify::apply_simplify(), Slic3r::GUI::ImGuiWrapper::bbl_input_double(), Slic3r::GUI::ImGuiWrapper::bbl_slider_float(), Slic3r::GUI::ImGuiWrapper::bbl_slider_float_style(), Slic3r::GUI::ImGuiWrapper::bbl_sliderin(), Slic3r::GUI::GUI_App::check_bundle_updates(), Slic3r::GUI::PartPlate::check_compatible_of_nozzle_and_filament(), Slic3r::GUI::PartPlate::check_mixture_filament_compatible(), Slic3r::PresetUpdater::priv::check_new_vendors(), Slic3r::GUI::GUI_App::check_new_version_sf(), Slic3r::PluginManager::check_registry_locked(), Slic3r::GUI::TextureImportDialog::compact_used_virtual_filaments(), Slic3r::GUI::Config::copy_config_dir_single_level(), Slic3r::copy_file_fix(), anonymous_namespace{GLGizmoSVG.cpp}::create_fill_warning(), Slic3r::GUI::GLGizmoEmboss::create_notification_not_valid_font(), anonymous_namespace{GLGizmoSVG.cpp}::create_shape_warnings(), anonymous_namespace{GLGizmoSVG.cpp}::create_stroke_warning(), Slic3r::PluginManager::delete_and_unsubscribe_cloud_plugin(), Slic3r::PluginManager::delete_plugin(), Slic3r::delete_plugin_root(), Slic3r::GUI::TextureImportDialog::do_auto_match(), Slic3r::PluginManager::download_and_install_cloud_plugin(), Slic3r::CloudPluginService::download_cloud_plugin(), Slic3r::GUI::GUI_App::download_plugin(), Slic3r::GUI::ImGuiWrapper::drag_optional_float(), Slic3r::GUI::GLGizmoEmboss::draw_delete_style_button(), Slic3r::GUI::GLGizmoSVG::draw_filename(), Slic3r::GUI::GLGizmoSVG::draw_size(), Slic3r::GUI::GLGizmoEmboss::draw_style_list(), Slic3r::GUI::GLGizmoEmboss::draw_style_rename_popup(), Slic3r::GUI::GLGizmoEmboss::draw_style_save_button(), Slic3r::GUI::ArrangeJob::finalize(), Slic3r::GUI::Emboss::CreateFontStyleImagesJob::finalize(), Slic3r::BackgroundSlicingProcess::finalize_gcode(), Slic3r::find_installed_plugin_entry(), Slic3r::SlicingProcessCompletedEvent::format_error_message(), get_curr_time(), Slic3r::GUI::FileGet::priv::get_perform(), get_primitive_mode(), Slic3r::Obico::get_printers(), Slic3r::Repetier::get_printers(), Slic3r::PrusaLink::get_storage(), Slic3r::GUI::GLGizmoMmuSegmentation::handle_snapshot_action_name(), Slic3r::GUI::Plater::import_model_id(), Slic3r::GUI::ImGuiWrapper::input_double(), Slic3r::GUI::ImGuiWrapper::input_double(), Slic3r::GUI::ImGuiWrapper::input_optional_float(), Slic3r::GUI::ImGuiWrapper::input_vec3(), Slic3r::plugin_loader::install_plugin(), Slic3r::plugin_hooks::anonymous_namespace{PluginHooks.cpp}::install_slicing_pipeline_hook(), Slic3r::PluginManager::keep_installed_plugin_as_local(), Slic3r::plugin_loader::load(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::Plater::load_gcode(), Slic3r::GUI::HintDatabase::load_hints_from_file(), Slic3r::PluginManager::load_plugin(), Slic3r::PluginManager::load_plugin_impl(), Slic3r::PluginManager::merge_discovered_plugins(), Slic3r::GUI::TextureImportDialog::on_computation_complete(), Slic3r::GUI::GUI_App::on_http_error(), Slic3r::GUI::GUI_App::on_init_inner(), Slic3r::GUI::GLGizmoSimplify::on_render_input_window(), Slic3r::GUI::GLGizmoTextureDisplacement::on_render_input_window(), Slic3r::GUI::Plater::post_process_string_object_exception(), Slic3r::GUI::Plater::preview_zip_archive(), Slic3r::GUI::ArrangeJob::process(), Slic3r::GUI::FillBedJob::process(), Slic3r::GUI::OrientJob::process(), Slic3r::GUI::PrintJob::process(), Slic3r::GUI::SendJob::process(), Slic3r::plugin_loader::anonymous_namespace{PluginLoader.cpp}::read_local_plugin_package_metadata(), refresh_plugin_metadata_blocking(), Slic3r::NetworkAgentFactory::register_python_printer_agent(), Slic3r::GUI::PluginsDialog::reload_local_plugin(), Slic3r::GUI::GLCanvas3D::reload_scene(), Slic3r::GUI::GLGizmoCut3D::render_angle_input(), Slic3r::GUI::GLCanvas3D::CenterOfMass::render_details(), Slic3r::GUI::GLGizmoCut3D::render_groove_float_input(), Slic3r::GUI::GLGizmoCut3D::render_groove_int_input(), Slic3r::GUI::GLGizmoCut3D::render_groove_two_float_input(), Slic3r::GUI::GLGizmoTextureDisplacement::render_image_adjust_window(), Slic3r::report_install_failure(), Slic3r::resolve_allowed_plugin_root(), Slic3r::GUI::DesignSketchTool::resolve_live_drag(), Slic3r::resolve_missing_plugins(), Slic3r::GUI::ConfigWizard::priv::select_default_materials_for_printer_models(), anonymous_namespace{GLGizmoSVG.cpp}::select_shape(), Slic3r::GUI::Plater::send_gcode_finish(), anonymous_namespace{3DPrinterOS.cpp}::TokenAuthDialog::SendRequest(), Slic3r::PrusaConnect::set_http_post_header_args(), show_notification_extruders_limit_exceeded(), Slic3r::GUI::ImGuiWrapper::slider_float(), Slic3r::GUI::ImGuiWrapper::slider_float(), Slic3r::GUI::ImGuiWrapper::slider_float(), Slic3r::GUI::ImGuiWrapper::slider_optional_float(), Slic3r::GUI::ImGuiWrapper::slider_optional_int(), Slic3r::GUI::GUI_App::start_sync_user_preset(), Slic3r::GUI::PrintHostSendDialog::storage(), Slic3r::GUI::GUI_App::sync_bundle(), Slic3r::PluginManager::unsubscribe_cloud_plugin(), Slic3r::PluginManager::update_cloud_plugin(), Slic3r::GUI::GUI_App::update_single_bundle(), validate_thumbnails_string(), and wxBEGIN_EVENT_TABLE().

Here is the call graph for this function:

◆ format() [2/3]

template<typename... TArgs>
std::string Slic3r::GUI::format ( const std::string & fmt,
TArgs &&... args )
inline
40 {
41 return Slic3r::format(fmt, std::forward<TArgs>(args)...);
42}

References Slic3r::format().

Here is the call graph for this function:

◆ format() [3/3]

template<typename... TArgs>
std::string Slic3r::GUI::format ( const wxString & fmt,
TArgs &&... args )
inline
44 {
45 return Slic3r::format(fmt.ToUTF8().data(), std::forward<TArgs>(args)...);
46}

References Slic3r::format().

Here is the call graph for this function:

◆ format_compact_weight()

std::string Slic3r::GUI::format_compact_weight ( double value_in_grams,
bool imperial_units )
static
229{
230 char buffer[64];
231 if (imperial_units) {
232 ::sprintf(buffer, "%.2f oz", value_in_grams / GizmoObjectManipulation::oz_to_g);
233 return buffer;
234 }
235
236 const double abs_value = value_in_grams < 0.0 ? -value_in_grams : value_in_grams;
237 const char* unit = "g";
238 double scaled_value = abs_value;
239 if (scaled_value >= 1000000.0) {
240 scaled_value /= 1000000.0;
241 unit = "t";
242 } else if (scaled_value >= 1000.0) {
243 scaled_value /= 1000.0;
244 unit = "kg";
245 }
246
247 ::sprintf(buffer, "%s%.2f%s", value_in_grams < 0.0 ? "-" : "", scaled_value, unit);
248 return buffer;
249}
static const double oz_to_g
Definition GizmoObjectManipulation.hpp:33

References Slic3r::GUI::GizmoObjectManipulation::oz_to_g.

Referenced by Slic3r::GUI::GCodeViewer::render_all_plates_stats().

Here is the caller graph for this function:

◆ format_nozzle_diameter()

wxString Slic3r::GUI::format_nozzle_diameter ( float diameter)
63{
64 if (diameter <= 0.0f) {
65 return _L("Unknown");
66 }
67
68 return wxString::Format("%smm", wxString::FromDouble(diameter));
69}

References _L.

Referenced by _get_tips(), Slic3r::GUI::PrinterPartsDialog::Show(), and Slic3r::GUI::PrinterPartsDialog::UpdateNozzleInfo().

Here is the caller graph for this function:

◆ format_number()

std::string Slic3r::GUI::format_number ( float value)
static
296{
297 std::ostringstream oss;
298 oss << std::fixed << std::setprecision((static_cast<int>(value * 10) % 10 == 0) ? 0 : 1) << value;
299 return oss.str();
300}

References format_number().

Referenced by construct_extruder_unprintable_error(), and format_number().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ format_parser_error_html()

std::string Slic3r::GUI::format_parser_error_html ( const std::string & msg)
static
311{
312 std::string out;
313 for (const auto &[text, is_code] : classify_code_lines(msg)) {
314 if (!out.empty()) out += "<br>"; // join, not trail; a trailing <br> forces a scrollbar
315 std::string escaped = xml_escape(text);
316 if (is_code)
317 out += "<code><excerpt>" + escaped + "</excerpt></code>";
318 else
319 out += escaped;
320 }
321 return out;
322}
static std::vector< std::pair< std::string, bool > > classify_code_lines(const std::string &msg)
Definition MsgDialog.cpp:276

References classify_code_lines(), and Slic3r::xml_escape().

Referenced by add_msg_content().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ format_wxstr() [1/3]

template<typename... TArgs>
wxString Slic3r::GUI::format_wxstr ( const char * fmt,
TArgs &&... args )
inline
22 {
23 boost::format message(fmt);
24 return wxString::FromUTF8(Slic3r::internal::format::format_recursive(message, std::forward<TArgs>(args)...).c_str());
25}
std::string format_recursive(boost::format &message)
Definition format.hpp:31

References Slic3r::internal::format::format_recursive().

Referenced by Slic3r::GUI::EditGCodeDialog::EditGCodeDialog(), Slic3r::IPListDialog::IPListDialog(), RammingPanel::RammingPanel(), Slic3r::GUI::SendSystemInfoDialog::SendSystemInfoDialog(), Slic3r::GUI::Plater::_calib_pa_pattern(), add_config_substitutions(), Slic3r::GUI::UnsavedChangesDialog::build(), Slic3r::GUI::Plater::calib_temp(), change_opt_value(), Slic3r::GUI::GUI_App::check_legacy_user_filament_presets(), check_objects_after_cut(), Slic3r::GUI::GUI_App::check_print_host_queue(), Slic3r::GUI::Tab::delete_preset(), Slic3r::GUI::GLGizmoEmboss::draw_delete_style_button(), Slic3r::GUI::GLGizmoEmboss::draw_font_list(), Slic3r::GUI::GLGizmoEmboss::draw_style_list(), file_wildcards(), Slic3r::GUI::ObjectList::fix_through_cgal(), format_wxstr(), Slic3r::UltiMaker::generate_auth_creds(), generic_exception_handle(), Slic3r::PluginConfig::get_config_response(), get_default_name(), Slic3r::GUI::CopyrightsDialog::get_html_text(), Slic3r::GUI::ObjectList::get_mesh_errors_info(), Slic3r::GUI::FileGet::priv::get_perform(), Slic3r::PrusaLink::get_storage(), Slic3r::C3DPrinterOS::get_test_failed_msg(), Slic3r::CrealityPrint::get_test_failed_msg(), Slic3r::ElegooLink::get_test_failed_msg(), Slic3r::Moonraker::get_test_failed_msg(), Slic3r::Obico::get_test_failed_msg(), Slic3r::OctoPrint::get_test_failed_msg(), Slic3r::PrusaConnect::get_test_failed_msg(), Slic3r::PrusaLink::get_test_failed_msg(), Slic3r::SimplyPrint::get_test_failed_msg(), Slic3r::SL1Host::get_test_failed_msg(), Slic3r::C3DPrinterOS::get_test_ok_msg(), Slic3r::GUI::Field::get_value_by_opt_type(), GUI_Run(), highlight(), Slic3r::GUI::EditGCodeDialog::init_params_list(), is_same_nozzle_type(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::Plater::load_gcode(), make_bold(), Slic3r::GUI::Downloader::on_error(), Slic3r::GUI::PrintHostQueueDialog::on_error(), Slic3r::GUI::GUI_App::on_http_error(), Slic3r::GUI::GLGizmoFdmSupports::on_render_input_window(), Slic3r::GUI::FeedDirectionDialog::OnRadioClicked(), prepare_decompose_mixed_result(), Slic3r::GUI::Plater::preview_zip_archive(), Slic3r::GUI::Sidebar::remove_all_mixed_filaments(), Slic3r::GUI::GLGizmoCut3D::render_input_window_warning(), Slic3r::GUI::GCodeViewer::render_legend_color_arr_recommen(), Slic3r::PluginConfig::restore_config_response(), Slic3r::GUI::Plater::priv::save_project_if_dirty(), Slic3r::GUI::EditGCodeDialog::selection_changed(), Slic3r::GUI::PluginsConfigDialog::send_capability_config(), Slic3r::GUI::PageMaterials::set_compatible_printers_html_window(), Slic3r::GUI::PrinterAgentChoice::set_value(), Slic3r::GUI::UnsavedChangesDialog::show_info_line(), show_substitutions_info(), show_substitutions_info(), Slic3r::Moonraker::test(), Slic3r::OctoPrint::test(), Slic3r::PrusaLink::test(), Slic3r::PrusaLink::test_with_method_check(), Slic3r::GUI::UnsavedChangesDialog::update(), Slic3r::GUI::ColorDecomposeDialog::update_filament_limit_warning(), Slic3r::GUI::SavePresetDialog::update_info_for_edit_ph_printer(), Slic3r::GUI::DiffPresetDialog::update_tree(), Slic3r::ElegooLink::upload(), Slic3r::OctoPrint::upload(), Slic3r::GUI::Tab::validate_custom_gcode(), and validate_thumbnails_string().

Here is the call graph for this function:

◆ format_wxstr() [2/3]

template<typename... TArgs>
wxString Slic3r::GUI::format_wxstr ( const std::string & fmt,
TArgs &&... args )
inline
27 {
28 boost::format message(fmt);
29 return wxString::FromUTF8(Slic3r::internal::format::format_recursive(message, std::forward<TArgs>(args)...).c_str());
30}

References Slic3r::internal::format::format_recursive().

Here is the call graph for this function:

◆ format_wxstr() [3/3]

template<typename... TArgs>
wxString Slic3r::GUI::format_wxstr ( const wxString & fmt,
TArgs &&... args )
inline
32 {
33 return format_wxstr(fmt.ToUTF8().data(), std::forward<TArgs>(args)...);
34}

References format_wxstr().

Here is the call graph for this function:

◆ frame_time_stats()

FrameTimeStats Slic3r::GUI::frame_time_stats ( std::vector< double > frame_ms)
69{
70 FrameTimeStats stats;
71 if (frame_ms.empty())
72 return stats;
73
74 std::sort(frame_ms.begin(), frame_ms.end());
75 const double total_ms = std::accumulate(frame_ms.begin(), frame_ms.end(), 0.0);
76 auto percentile = [&frame_ms](double p) {
77 const size_t rank = size_t(std::ceil(p * double(frame_ms.size()) / 100.0));
78 return frame_ms[std::clamp<size_t>(rank, 1, frame_ms.size()) - 1];
79 };
80 stats.fps = total_ms > 0.0 ? 1000.0 * double(frame_ms.size()) / total_ms : 0.0;
81 stats.average_ms = total_ms / double(frame_ms.size());
82 stats.median_ms = percentile(50.0);
83 stats.p95_ms = percentile(95.0);
84 stats.p99_ms = percentile(99.0);
85 stats.max_ms = frame_ms.back();
86 return stats;
87}
double fps
Definition SceneBenchmark.hpp:10
double median_ms
Definition SceneBenchmark.hpp:12
double p99_ms
Definition SceneBenchmark.hpp:14
double max_ms
Definition SceneBenchmark.hpp:15
double average_ms
Definition SceneBenchmark.hpp:11
double p95_ms
Definition SceneBenchmark.hpp:13
Definition SceneBenchmark.hpp:9

References Slic3r::GUI::FrameTimeStats::average_ms, Slic3r::GUI::FrameTimeStats::fps, Slic3r::GUI::FrameTimeStats::max_ms, Slic3r::GUI::FrameTimeStats::median_ms, Slic3r::GUI::FrameTimeStats::p95_ms, and Slic3r::GUI::FrameTimeStats::p99_ms.

Referenced by Slic3r::GUI::anonymous_namespace{SceneBenchmark.cpp}::SceneBenchmarkDialog::report().

Here is the caller graph for this function:

◆ framed_input()

wxPanel * Slic3r::GUI::framed_input ( wxWindow * parent)
static
95{
96 wxColour clr(0xDB, 0xDB, 0xDB);
97 if (wxGetApp().dark_mode())
99 auto* frame = new wxPanel(parent, wxID_ANY);
100 frame->SetBackgroundColour(clr);
101 frame->SetSizer(new wxBoxSizer(wxVERTICAL));
102 return frame;
103}

References StateColor::darkModeColorFor().

Here is the call graph for this function:

◆ free_print_volumes()

std::vector< BoundingBoxf3 > Slic3r::GUI::free_print_volumes ( const BoundingBoxf3 & bed,
const std::vector< BoundingBoxf3 > & excludes )
static
11049{
11050 std::vector<double> xs{ bed.min.x(), bed.max.x() };
11051 std::vector<double> ys{ bed.min.y(), bed.max.y() };
11052 for (const BoundingBoxf3& ex : excludes) {
11053 for (const double x : { ex.min.x(), ex.max.x() })
11054 if (x > bed.min.x() && x < bed.max.x())
11055 xs.push_back(x);
11056 for (const double y : { ex.min.y(), ex.max.y() })
11057 if (y > bed.min.y() && y < bed.max.y())
11058 ys.push_back(y);
11059 }
11060 std::sort(xs.begin(), xs.end());
11061 std::sort(ys.begin(), ys.end());
11062 xs.erase(std::unique(xs.begin(), xs.end()), xs.end());
11063 ys.erase(std::unique(ys.begin(), ys.end()), ys.end());
11064
11065 const double min_size = 2. * Slic3r::BuildVolume::SceneEpsilon;
11066 std::vector<BoundingBoxf3> free_volumes;
11067 for (size_t i = 0; i < xs.size(); ++i)
11068 for (size_t j = i + 1; j < xs.size(); ++j)
11069 for (size_t k = 0; k < ys.size(); ++k)
11070 for (size_t l = k + 1; l < ys.size(); ++l) {
11071 const double min_x = xs[i], max_x = xs[j], min_y = ys[k], max_y = ys[l];
11072 if (max_x - min_x <= min_size || max_y - min_y <= min_size)
11073 continue;
11074
11075 const bool blocked = std::any_of(excludes.begin(), excludes.end(), [&](const BoundingBoxf3& ex) {
11076 return min_x < ex.max.x() && max_x > ex.min.x() && min_y < ex.max.y() && max_y > ex.min.y();
11077 });
11078 if (blocked)
11079 continue;
11080
11081 BoundingBoxf3 box = bed;
11082 box.min.x() = min_x;
11083 box.min.y() = min_y;
11084 box.max.x() = max_x;
11085 box.max.y() = max_y;
11086 free_volumes.push_back(box);
11087 }
11088 return free_volumes;
11089}
static constexpr const double SceneEpsilon
Definition BuildVolume.hpp:110

References Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::max, Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::min, and Slic3r::BuildVolume::SceneEpsilon.

Referenced by Slic3r::GUI::Plater::priv::scale_selection_to_fit_print_volume().

Here is the caller graph for this function:

◆ free_window()

void Slic3r::GUI::free_window ( wxWindow * win)
938{
939#if !defined(__WXGTK__)
940 unbind_events(win);
941 for (auto c : win->GetChildren())
942 if (dynamic_cast<wxTextCtrl*>(c))
943 unbind_events(c);
944 win->Hide();
945 if (auto sizer = win->GetContainingSizer())
946 sizer->Clear();
947 win->Reparent(wxGetApp().mainframe);
948 if (win->GetClientData())
949 reinterpret_cast<std::deque<wxWindow *>*>(win->GetClientData())->push_back(win);
950#else
951 delete win;
952#endif
953}
static void unbind_events(wxEvtHandler *h)
Definition Field.cpp:932

References unbind_events().

Referenced by Slic3r::GUI::OptionsGroup::clear().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ from_path()

wxString Slic3r::GUI::from_path ( const boost::filesystem::path & path)

◆ from_u8()

wxString Slic3r::GUI::from_u8 ( const std::string & str)
545{
546 return wxString::FromUTF8(str.c_str());
547}

Referenced by Slic3r::GUI::AboutDialog::AboutDialog(), Slic3r::GUI::CopyrightsDialog::CopyrightsDialog(), Slic3r::GUI::EditCalibrationHistoryDialog::EditCalibrationHistoryDialog(), Slic3r::GUI::InputIpAddressDialog::InputIpAddressDialog(), Slic3r::GUI::SavePresetDialog::Item::Item(), Slic3r::GUI::MediaPlayCtrl::MediaPlayCtrl(), Slic3r::GUI::MsgUpdateConfig::MsgUpdateConfig(), Slic3r::GUI::MsgUpdateForced::MsgUpdateForced(), Slic3r::GUI::NetworkTestDialog::NetworkTestDialog(), Slic3r::GUI::PagePrinters::PagePrinters(), Slic3r::GUI::PageWelcome::PageWelcome(), Slic3r::GUI::ParamsNode::ParamsNode(), Slic3r::GUI::PhysicalPrinterDialog::PhysicalPrinterDialog(), Slic3r::GUI::PrinterPicker::PrinterPicker(), Slic3r::GUI::PrivacyUpdateDialog::PrivacyUpdateDialog(), Slic3r::GUI::ProjectDropDialog::ProjectDropDialog(), Slic3r::GUI::SLAImportDialog::SLAImportDialog(), Slic3r::GUI::SyncAmsInfoDialog::SyncAmsInfoDialog(), add_config_substitutions(), Slic3r::GUI::PresetComboBox::add_connected_printers(), Slic3r::GUI::Plater::add_file(), Slic3r::GUI::SavePresetDialog::add_info_for_edit_ph_printer(), Slic3r::GUI::Plater::add_model(), Slic3r::GUI::ObjectList::add_object_to_list(), Slic3r::GUI::IMEXModesCtrl::add_row(), Slic3r::GUI::ObjectList::add_volumes_to_object_in_list(), Slic3r::GUI::MultiSendMachineModel::AddMachine(), Slic3r::GUI::ObjectDataViewModel::AddObject(), Slic3r::GUI::ObjectDataViewModel::AddPlate(), Slic3r::GUI::DataList< wxListBox, std::string >::append(), Slic3r::GUI::OptionsGroup::append_line(), Slic3r::GUI::MenuFactory::append_menu_item_change_extruder(), Slic3r::GUI::MenuFactory::append_menu_item_change_filament(), Slic3r::GUI::MenuFactory::append_menu_item_clone(), apply_extruder_selector(), Slic3r::GUI::StaticText::BUILD(), Slic3r::GUI::UnsavedChangesDialog::build(), Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::build_command_catalog(), Slic3r::GUI::PublishSettingsDialog::build_option_model(), Slic3r::GUI::PhysicalPrinterDialog::build_printhost_settings(), Slic3r::GUI::PluginPickerDialog::build_ui(), Slic3r::GUI::ConfigManipulation::check_adaptive_pressure_advance_model(), Slic3r::GUI::ConfigWizard::priv::check_and_install_missing_materials(), Slic3r::GUI::CalibrationPresetPage::check_filament_compatible(), Slic3r::GUI::GUI_App::check_legacy_user_filament_presets(), check_objects_after_cut(), cloud_page_url(), Slic3r::GUI::GUI_App::cloud_webview_handoff(), color_string(), copy_file_gui(), Slic3r::GUI::NotificationManager::PopNotification::count_lines(), create_combochecklist(), Slic3r::GUI::CreateFilamentPresetDialog::create_dialog_buttons(), Slic3r::GUI::CreatePresetForPrinterDialog::create_dialog_buttons(), Slic3r::GUI::MenuFactory::create_filament_action_menu(), Slic3r::GUI::EditFilamentPresetDialog::create_filament_basic_info(), Slic3r::GUI::PreferencesDialog::create_items(), Slic3r::GUI::CreatePrinterPresetDialog::create_page2_dialog_buttons(), Slic3r::GUI::CreatePresetForPrinterDialog::create_selected_printer_preset_sizer(), Slic3r::GUI::OptionsGroup::create_single_option_line(), custom_gcode_group_title(), Slic3r::GUI::PluginsDialog::delete_local_plugin(), Slic3r::GUI::EditFilamentPresetDialog::delete_preset(), desktop_open_any_folder(), desktop_open_datadir_folder(), Slic3r::GUI::PluginField::display_name_for_value(), Slic3r::GUI::GizmoObjectManipulation::do_render_move_window(), Slic3r::GUI::MachineObjectPanel::doRender(), Slic3r::GUI::MObjectPanel::doRender(), Slic3r::GUI::MultiMachineItem::doRender(), Slic3r::GUI::GLGizmoSVG::draw_filename(), Slic3r::ElegooLink::elegoo_cc2_test(), Slic3r::ElegooLink::elegoo_test(), Slic3r::anonymous_namespace{PluginHostApp.cpp}::export_3mf_copy(), Slic3r::GUI::MainFrame::export_config(), Slic3r::GUI::Plater::export_stl(), Slic3r::GUI::KBShortcutsDialog::fill_pages(), Slic3r::GUI::PlaterWorker< WorkerSubclass >::PlaterJob::finalize(), Slic3r::GUI::IMEXModesCtrl::fix_row_name(), Slic3r::GUI::ObjectList::fix_through_cgal(), Slic3r::SlicingProcessCompletedEvent::format_error_message(), from_path(), Slic3r::GUI::GLTexture::generate_from_text(), Slic3r::GUI::PartPlate::generate_plate_name_texture(), Slic3r::GUI::PresetTree::get_child_item(), Slic3r::PluginConfig::get_config_response(), Slic3r::GUI::ConfigOptionsGroup::get_config_value(), Slic3r::GUI::ConfigOptionsGroup::get_config_value2(), get_default_name(), get_error_message(), Slic3r::GUI::Plater::priv::get_export_file(), Slic3r::GUI::Plater::priv::get_export_gcode_filename(), Slic3r::GUI::CreateFilamentPresetDialog::get_filament_preset_choices(), get_formatted_tooltip_text(), Slic3r::Repetier::get_groups(), Slic3r::GUI::PrintJob::get_http_error_msg(), Slic3r::GUI::SendJob::get_http_error_msg(), Slic3r::GUI::GUI_App::get_login_info(), Slic3r::GUI::FileGet::priv::get_perform(), Slic3r::GUI::PresetComboBox::get_preset_item_name(), Slic3r::GUI::PlaterPresetComboBox::get_preset_name(), Slic3r::GUI::PresetComboBox::get_preset_name(), Slic3r::GUI::TabPresetComboBox::get_preset_name(), get_preset_name_by_filament_id(), Slic3r::Obico::get_printers(), Slic3r::Repetier::get_printers(), Slic3r::GUI::PresetTree::get_root_item(), get_string_from_enum(), get_string_value(), Slic3r::AstroBox::get_test_failed_msg(), Slic3r::Duet::get_test_failed_msg(), Slic3r::ESP3D::get_test_failed_msg(), Slic3r::FlashAir::get_test_failed_msg(), Slic3r::Flashforge::get_test_failed_msg(), Slic3r::MKS::get_test_failed_msg(), Slic3r::Repetier::get_test_failed_msg(), Slic3r::UltiMaker::get_test_failed_msg(), Slic3r::GUI::PresetComboBox::get_tooltip(), Slic3r::GUI::OptionsGroup::get_url(), Slic3r::GUI::Field::get_value_by_opt_type(), Slic3r::GUI::ObjectGridTable::GetValue(), Slic3r::GUI::anonymous_namespace{KBShortcutsDialog.cpp}::global_key_advice(), Slic3r::GUI::PluginsConfigDialog::handle_web_command(), Slic3r::GUI::GUI_App::handle_web_request(), Slic3r::GUI::GUI_App::import_model(), Slic3r::GUI::Plater::import_model_id(), import_texture_to_library(), Slic3r::GUI::GUI_App::import_zip(), Slic3r::GUI::ElegooPrintHostSendDialog::init(), Slic3r::GUI::FlashforgePrintHostSendDialog::init(), Slic3r::GUI::PrintHostSendDialog::init(), Slic3r::GUI::OpenGLManager::init_gl(), Slic3r::GUI::MainFrame::init_menubar_as_editor(), Slic3r::GUI::PluginsDialog::install_cloud_plugin(), install_local_plugin_package(), Slic3r::GUI::Plater::install_missing_cloud_plugins(), Slic3r::GUI::MainFrame::load_config_file(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::GUI_App::load_language(), Slic3r::GUI::BitmapCache::load_png(), Slic3r::GUI::MainFrame::load_printer_url(), load_texture_image_data(), Slic3r::GUI::GuideFrame::LoadProfileData(), Slic3r::GUI::MarkdownTip::LoadTip(), make_string_bold(), Slic3r::GUI::anonymous_namespace{PublishSettingsDialog.cpp}::material_title(), Slic3r::GUI::GUI_App::maybe_migrate_user_presets_on_login(), Slic3r::GUI::ImageGrid::mouseMoved(), Slic3r::GUI::Choice::msw_rescale(), Slic3r::GUI::GUI_App::on_cloud_web_session_minted(), Slic3r::GUI::EditDevNameDialog::on_edit_name(), Slic3r::GUI::GUI_App::on_init_inner(), Slic3r::GUI::AuFile::on_input_enter(), Slic3r::GUI::SelectMachineDialog::on_rename_enter(), Slic3r::GUI::SendMultiMachinePage::on_rename_enter(), Slic3r::GUI::SendToPrinterDialog::on_rename_enter(), Slic3r::GUI::GLGizmoTextureDisplacement::on_render_input_window(), Slic3r::BonjourDialog::on_reply(), Slic3r::GUI::AMSMaterialsSetting::on_select_filament(), Slic3r::GUI::BindMachineDialog::on_show(), Slic3r::GUI::UnBindMachineDialog::on_show(), Slic3r::GUI::Plater::priv::on_tab_selection_changing(), Slic3r::GUI::ObjectList::OnStartEditing(), Slic3r::GUI::anonymous_namespace{Downloader.cpp}::open_folder(), Slic3r::GUI::anonymous_namespace{NotificationManager.cpp}::open_folder(), Slic3r::open_missing_plugins_on_cloud(), Slic3r::GUI::Plater::open_platesettings_dialog(), Slic3r::GUI::GUI_App::open_plugins_dialog(), Slic3r::GUI::SpeedDialWebDialog::open_wiki(), Slic3r::GUI::anonymous_namespace{PrintHostDialogs.cpp}::FlashforgeSlotCard::parse_color(), Slic3r::PresetUpdater::priv::parse_version_string(), Slic3r::GUI::GLGizmoCut3D::perform_cut(), Slic3r::GUI::OptionsGroup::pick_plugin(), Slic3r::GUI::MediaPlayCtrl::Play(), Slic3r::GUI::PluginsDialog::plugin_display_name(), Slic3r::GUI::AMSMaterialsSetting::Popup(), Slic3r::GUI::GUI_App::post_init(), Slic3r::GUI::MainFrame::preview_only_hint(), Slic3r::GUI::Plater::preview_zip_archive(), Slic3r::GUI::CreatePrinterPresetDialog::printer_preset_sort_with_nozzle_diameter(), Slic3r::GUI::SendJob::process(), Slic3r::GUI::GLGizmoTextureDisplacement::push_uv_pane_state(), Slic3r::GUI::FlashforgePrintHostSendDialog::rebuild_mapping_rows(), Slic3r::GUI::GUI_App::refresh_plugins(), Slic3r::GUI::PluginsDialog::reinstall_cloud_plugin(), Slic3r::GUI::Plater::priv::reload_from_disk(), Slic3r::GUI::PrinterAgentChoice::reload_rows(), Slic3r::GUI::GLGizmoCut3D::render_angle_input(), Slic3r::GUI::GLGizmoTextureDisplacement::render_debug_stage_panel(), Slic3r::GUI::GCodeViewer::render_legend_color_arr_recommen(), Slic3r::GUI::GLGizmoTextureDisplacement::render_texture_library_popup(), Slic3r::GUI::ImageGrid::renderContent2(), Slic3r::GUI::Plater::priv::replace_all_with_stl(), Slic3r::GUI::Plater::priv::replace_volume_with_stl(), Slic3r::GUI::Plater::priv::replace_with_stl(), Slic3r::GUI::GUI_App::request_new_version(), Slic3r::GUI::GUI_App::request_user_logout(), Slic3r::GUI::PluginsDialog::restore_capability_config(), Slic3r::PluginConfig::restore_config_response(), Slic3r::GUI::SpeedDialWebDialog::run_action(), Slic3r::GUI::PluginsDialog::run_script_plugin_capability(), Slic3r::GUI::Plater::priv::save_project_if_dirty(), Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::script_outcome_to_action_result(), Slic3r::GUI::Plater::select_plate_by_hover_id(), Slic3r::GUI::PluginsConfigDialog::send_capability_config(), Slic3r::GUI::SideToolsPanel::set_current_printer_name(), Slic3r::GUI::CreatePrinterPresetDialog::set_current_visible_printer(), Slic3r::GUI::SelectMachineDialog::set_default(), Slic3r::GUI::SendMultiMachinePage::set_default(), Slic3r::GUI::SendToPrinterDialog::set_default(), Slic3r::GUI::SyncAmsInfoDialog::set_default(), Slic3r::GUI::EditDevNameDialog::set_machine_obj(), Slic3r::GUI::Plater::priv::set_project_filename(), Slic3r::GUI::anonymous_namespace{PrintHostDialogs.cpp}::FlashforgeSlotCard::set_slot(), Slic3r::GUI::ObjectDataViewModel::SetCurSelectedPlateFullName(), Slic3r::GUI::MediaPlayCtrl::SetMachineObject(), Slic3r::GUI::ExtruderGroup::SetRowDiameters(), Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::setting_text(), Slic3r::GUI::FilamentPickerDialog::SetupLabelsContent(), Slic3r::GUI::MainFrame::shortcut_label(), Slic3r::GUI::BoostThreadWorker::show_error_info(), Slic3r::GUI::anonymous_namespace{SceneBenchmark.cpp}::SceneBenchmarkDialog::show_report(), show_substitutions_info(), Slic3r::GUI::PageMaterials::sort_list_data(), Slic3r::GUI::ObjectList::split(), start_new_gcodeviewer_open_file(), Slic3r::GUI::IMEXModesCtrl::suggested_mode_names(), Slic3r::GUI::Sidebar::sync_ams_list(), Slic3r::GUI::CaliPASaveAutoPanel::sync_cali_result(), Slic3r::GUI::CaliPASaveAutoPanel::sync_cali_result_for_multi_extruder(), Slic3r::GUI::HistoryWindow::sync_history_data(), Slic3r::GUI::Config::take_config_snapshot_cancel_on_error(), Slic3r::GUI::Config::take_config_snapshot_report_error(), Slic3r::AstroBox::test(), Slic3r::CrealityPrint::test(), Slic3r::Obico::test(), Slic3r::OctoPrint::test(), Slic3r::PrusaLink::test(), Slic3r::Repetier::test(), Slic3r::UltiMaker::test(), Slic3r::PrusaLink::test_with_method_check(), Slic3r::GUI::anonymous_namespace{KBShortcutsDialog.cpp}::to_wx(), Slic3r::GUI::PluginsDialog::toggle_plugin(), Slic3r::GUI::PluginsDialog::toggle_plugin_capability(), Slic3r::GUI::MediaPlayCtrl::ToggleStream(), Slic3r::GUI::PluginsDialog::unsubscribe_cloud_plugin(), Slic3r::GUI::MachineInfoPanel::update(), Slic3r::GUI::PlaterPresetComboBox::update(), Slic3r::GUI::SavePresetDialog::Item::update(), Slic3r::GUI::TabPresetComboBox::update(), Slic3r::GUI::Sidebar::update_all_preset_comboboxes(), Slic3r::GUI::PluginPickerDialog::update_description(), Slic3r::GUI::TabPresetComboBox::update_dirty(), Slic3r::GUI::UpdatePluginDialog::update_info(), Slic3r::GUI::Sidebar::update_mixed_filament_list(), Slic3r::GUI::ObjectList::update_name_in_list(), Slic3r::GUI::PluginsDialog::update_plugin(), Slic3r::GUI::PhysicalPrinterDialog::update_preset_input(), Slic3r::GUI::PhysicalPrinterDialog::update_printers(), Slic3r::GUI::ObjectSettings::update_settings_list(), Slic3r::GUI::ObjectTableSettings::update_settings_list(), Slic3r::GUI::CalibrationCaliPage::update_subtask(), Slic3r::GUI::StatusPanel::update_subtask(), Slic3r::GUI::DiffPresetDialog::update_tree(), Slic3r::GUI::UnsavedChangesDialog::update_tree(), Slic3r::GUI::UnsavedChangesDialog::update_tree(), Slic3r::GUI::SendToPrinterDialog::update_user_printer(), Slic3r::GUI::SyncAmsInfoDialog::update_user_printer(), Slic3r::GUI::ModelNode::UpdateEnabling(), Slic3r::GUI::ObjectDataViewModel::UpdateItemNames(), Slic3r::anonymous_namespace{Flashforge.cpp}::validate_local_api_response(), Slic3r::GUI::Plater::priv::warnings_dialog(), and Slic3r::wxDEFINE_EVENT().

◆ gcode()

std::string Slic3r::GUI::gcode ( Type type)
static
112{
113 Slic3r::DynamicPrintConfig config = wxGetApp().preset_bundle->full_config();
114 switch (type) {
115 //BBS
116 case Template: return config.opt_string("template_custom_gcode");
117 case PausePrint: return config.opt_string("machine_pause_gcode");
118
119 default: return "";
120 }
121
122 //const PrintConfig& config = GUI::wxGetApp().plater()->fff_print().config();
123 //switch (type) {
126 //case PausePrint: return config.machine_pause_gcode;
127 //case Template: return config.template_custom_gcode;
128 //default: return "";
129 //}
130}
std::string & opt_string(const t_config_option_key &opt_key, bool create=false)
Definition Config.hpp:3042
@ PausePrint
Definition CustomGCode.hpp:20
@ Template
Definition CustomGCode.hpp:22

References Slic3r::DynamicConfig::opt_string(), Slic3r::CustomGCode::PausePrint, and Slic3r::CustomGCode::Template.

Referenced by Slic3r::GUI::Plater::_calib_pa_pattern_gen_gcode(), Slic3r::GUI::IMSlider::add_code_as_tick(), Slic3r::GUI::IMEXModesCtrl::add_row(), Slic3r::GUI::PartPlateList::clear(), Slic3r::GUI::PartPlateList::create_plate(), Slic3r::GUI::PartPlateList::init(), Slic3r::GUI::PartPlateList::rebuild_plates_after_deserialize(), Slic3r::GUI::IMSlider::render_add_menu(), Slic3r::GUI::IMSlider::render_edit_menu(), Slic3r::GUI::IMSlider::show_tooltip(), and Slic3r::GUI::Tab::validate_custom_gcode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_image()

bool Slic3r::GUI::generate_image ( const std::string & filename,
wxImage & image,
wxSize img_size,
int method )
509{
510 wxInitAllImageHandlers();
511
512 bool result = true;
513 wxImage img;
514 result = load_image(filename, img);
515 if (!result) return result;
516
517 image = wxImage(img_size);
518 image.SetType(wxBITMAP_TYPE_PNG);
519 if (!image.HasAlpha()) {
520 image.InitAlpha();
521 }
522
523 //image.Clear(0);
524 //unsigned char *alpha = image.GetAlpha();
525 unsigned char* alpha = new unsigned char[image.GetWidth() * image.GetHeight()];
526 if (alpha) { ::memset(alpha, wxIMAGE_ALPHA_TRANSPARENT, image.GetWidth() * image.GetHeight()); }
527 if (method == GERNERATE_IMAGE_RESIZE) {
528 float h_factor = img.GetHeight() / (float) image.GetHeight();
529 float w_factor = img.GetWidth() / (float) image.GetWidth();
530 float factor = std::min(h_factor, w_factor);
531 int tar_height = (int) ((float) img.GetHeight() / factor);
532 int tar_width = (int) ((float) img.GetWidth() / factor);
533 img = img.Rescale(tar_width, tar_height);
534 image.Paste(img, (image.GetWidth() - tar_width) / 2, (image.GetHeight() - tar_height) / 2);
535 } else if (method == GERNERATE_IMAGE_CROP_VERTICAL) {
536 float w_factor = img.GetWidth() / (float) image.GetWidth();
537 int tar_height = (int) ((float) img.GetHeight() / w_factor);
538 int tar_width = (int) ((float) img.GetWidth() / w_factor);
539 img = img.Rescale(tar_width, tar_height);
540 image.Paste(img, (image.GetWidth() - tar_width) / 2, (image.GetHeight() - tar_height) / 2);
541 } else {
542 return false;
543 }
544
545 //image.ConvertAlphaToMask(image.GetMaskRed(), image.GetMaskGreen(), image.GetMaskBlue());
546 return true;
547}
#define GERNERATE_IMAGE_CROP_VERTICAL
Definition GUI_Utils.hpp:486
#define GERNERATE_IMAGE_RESIZE
Definition GUI_Utils.hpp:485
bool load_image(const std::string &filename, wxImage &image)
Definition GUI_Utils.cpp:490

References GERNERATE_IMAGE_CROP_VERTICAL, GERNERATE_IMAGE_RESIZE, and load_image().

Referenced by Slic3r::GUI::AuFile::on_set_cover().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_max_speed_parameter_value()

std::vector< double > Slic3r::GUI::generate_max_speed_parameter_value ( const std::string & key,
const float line_width,
const float layer_height,
const bool linear,
const int pass )
186{
187 auto preset_bundle = wxGetApp().preset_bundle;
188 auto &printer_config = preset_bundle->printers.get_edited_preset().config;
189 auto &filament_config = preset_bundle->filaments.get_edited_preset().config;
190 auto &print_config = preset_bundle->prints.get_edited_preset().config;
191
192 int extruder_nums = preset_bundle->get_printer_extruder_count();
193 std::vector<int> extruder_types = printer_config.option<ConfigOptionEnumsGeneric>("extruder_type")->values;
194 std::vector<int> nozzle_volume_types = preset_bundle->project_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type")->values;
195
196 float nozzle_diameter = printer_config.option<ConfigOptionFloats>("nozzle_diameter")->values[0];
197
198 Flow flow = Flow(line_width, layer_height, nozzle_diameter);
199
200 std::vector<double> speed_values;
201 speed_values.reserve(extruder_nums * nozzle_volume_types.size());
202
203 for (size_t i = 0; i < extruder_nums; ++i) {
204 int index = get_index_for_extruder_parameter(filament_config, "filament_max_volumetric_speed", i, ExtruderType(extruder_types[i]),
205 NozzleVolumeType(nozzle_volume_types[i]));
206 double filament_max_volumetric_speed = filament_config.option<ConfigOptionFloats>("filament_max_volumetric_speed")->get_at(index);
207 double cur_flowrate = filament_config.option<ConfigOptionFloats>("filament_flow_ratio")->get_at(index);
208 double max_speed = linear ? filament_max_volumetric_speed / (flow.mm3_per_mm() * (cur_flowrate + (pass == 2 ? 0.035 : 0.05)) / cur_flowrate) :
209 filament_max_volumetric_speed / (flow.mm3_per_mm() * (pass == 1 ? 1.2 : 1));
210
211 index = get_index_for_extruder_parameter(print_config, key, i, ExtruderType(extruder_types[i]), NozzleVolumeType(nozzle_volume_types[i]));
212 ConfigOptionFloatsNullable *speed_opt = print_config.option<ConfigOptionFloatsNullable>(key);
213 double speed_value = std::floor(std::min(speed_opt->values[index], max_speed));
214 for (size_t v_id = 0; v_id < nozzle_volume_types.size(); ++v_id) {
215 speed_values.emplace_back(speed_value);
216 }
217 }
218 return speed_values;
219}
Definition Flow.hpp:55
ExtruderType
Definition PrintConfig.hpp:612
int get_index_for_extruder_parameter(const DynamicPrintConfig &config, const std::string &opt_key, int cur_extruder_id, ExtruderType extruder_type, NozzleVolumeType nozzle_volume_type)
Definition ParameterUtils.cpp:51

References Slic3r::get_index_for_extruder_parameter(), layer_height, Slic3r::nozzle_diameter(), printer_config(), and Slic3r::ConfigOptionVector< double >::values.

Referenced by adjust_settings_for_flowrate_calib().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_system_info_json()

std::string Slic3r::GUI::generate_system_info_json ( )
static
420{
421 // Calculate hash of username so it is possible to identify duplicates.
422 // The result is mod 10000 so most of the information is lost and it is
423 // not possible to unhash the username. It is more than enough to help
424 // identify duplicate entries.
425 std::string unique_id = get_unique_id();
426
427 // Get system language.
428 std::string sys_language = "Unknown"; // important to init, see the __APPLE__ block.
429 #ifndef __APPLE__
430 // Following apparently does not work on macOS.
431 const wxLanguage lang_system = wxLanguage(wxLocale::GetSystemLanguage());
432 if (lang_system != wxLANGUAGE_UNKNOWN)
433 sys_language = wxLocale::GetLanguageInfo(lang_system)->CanonicalName.ToUTF8().data();
434 #else // __APPLE__
435 CFLocaleRef cflocale = CFLocaleCopyCurrent();
436 CFStringRef value = (CFStringRef)CFLocaleGetValue(cflocale, kCFLocaleLanguageCode);
437 char temp[10] = "";
438 CFStringGetCString(value, temp, 10, kCFStringEncodingUTF8);
439 sys_language = temp;
440 CFRelease(cflocale);
441 #endif
442 // Build a property tree with all the information.
443 namespace pt = boost::property_tree;
444
445 pt::ptree data_node;
446 data_node.put("OrcaSlicerVersion", SLIC3R_VERSION);
447 data_node.put("BuildID", SLIC3R_BUILD_ID);
448 data_node.put("UniqueID", unique_id);
449 data_node.put("Platform", platform_to_string(platform()));
450 data_node.put("PlatformFlavor", platform_flavor_to_string(platform_flavor()));
451 data_node.put("OSDescription", wxPlatformInfo::Get().GetOperatingSystemDescription().ToUTF8().data());
452#ifdef __linux__
453 std::string distro_id = wxGetLinuxDistributionInfo().Id.ToUTF8().data(); // uses lsb-release
454 std::string distro_ver = wxGetLinuxDistributionInfo().Release.ToUTF8().data();
455 if (distro_id.empty()) { // lsb-release probably not available
456 std::map<std::string, std::string> dist_info = parse_lscpu_etc("cat /etc/*release", '=');
457 distro_id = dist_info["ID"];
458 distro_ver = dist_info["VERSION_ID"];
459 }
460 data_node.put("Linux_DistroID", distro_id);
461 data_node.put("Linux_DistroVer", distro_ver);
462 data_node.put("Linux_Wayland", wxGetEnv("WAYLAND_DISPLAY", nullptr));
463#ifdef __WXGTK__
464 const LinuxDisplayBackend display_backend = get_linux_display_backend();
465 const char* display_backend_name = "unknown";
466 const char* gl_backend_hint = "Unknown";
467 switch (display_backend) {
468 case LinuxDisplayBackend::Wayland:
469 display_backend_name = "wayland";
470 gl_backend_hint = "EGL";
471 break;
472 case LinuxDisplayBackend::X11:
473 display_backend_name = "x11";
474 gl_backend_hint = "GLX";
475 break;
476 default:
477 break;
478 }
479 data_node.put("Linux_DisplayBackend", display_backend_name);
480 data_node.put("Linux_GLBackendHint", gl_backend_hint);
481#else
482 data_node.put("Linux_DisplayBackend", "unknown");
483 data_node.put("Linux_GLBackendHint", "Unknown");
484#endif
485#endif
486 data_node.put("wxWidgets", wxVERSION_NUM_DOT_STRING);
487#ifdef __WXGTK__
488 data_node.put("GTK",
489 #if defined(__WXGTK2__)
490 2
491 #elif defined(__WXGTK3__)
492 3
493 #elif defined(__WXGTK4__)
494 4
495 #elif defined(__WXGTK5__)
496 5
497 #else
498 "Unknown"
499 #endif
500 );
501#endif // __WXGTK__
502 data_node.put("SystemLanguage", sys_language);
503 data_node.put("TranslationLanguage: ", wxGetApp().current_language_code_safe());
504
505
506 pt::ptree hw_node;
507 {
508 hw_node.put("ArchName", wxPlatformInfo::Get().GetBitnessName());
509 size_t num = std::round(Slic3r::total_physical_memory()/107374100.);
510 hw_node.put("RAM_GiB", std::to_string(num / 10) + "." + std::to_string(num % 10));
511 }
512
513 // Now get some CPU info:
514 pt::ptree cpu_node;
515#ifdef _WIN32
516 std::map<std::string, std::string> cpu_info = get_cpu_info_from_registry();
517 cpu_node.put("Cores", cpu_info["Cores"]);
518 cpu_node.put("Model", cpu_info["Model"]);
519 cpu_node.put("Vendor", cpu_info["Vendor"]);
520#elif __APPLE__
521 std::map<std::string, std::string> sysctl = parse_lscpu_etc("sysctl -a", ':');
522 cpu_node.put("Cores", sysctl["hw.ncpu"]);
523 cpu_node.put("Model", sysctl["machdep.cpu.brand_string"]);
524 cpu_node.put("Vendor", sysctl["machdep.cpu.vendor"]);
525#else // linux/BSD
526 std::map<std::string, std::string> lscpu = parse_lscpu_etc("cat /proc/cpuinfo", ':');
527 if (auto ncpu_it = lscpu.find("processor"); ncpu_it != lscpu.end()) {
528 std::string& ncpu = ncpu_it->second;
529 if (int num=0; std::from_chars(ncpu.data(), ncpu.data() + ncpu.size(), num).ec != std::errc::invalid_argument)
530 ncpu = std::to_string(num + 1);
531 }
532 cpu_node.put("Cores", lscpu["processor"]);
533 cpu_node.put("Model", lscpu["model name"]);
534 cpu_node.put("Vendor", lscpu["vendor_id"]);
535#endif
536 hw_node.add_child("CPU", cpu_node);
537
538 pt::ptree monitors_node;
539 for (int i=0; i<int(wxDisplay::GetCount()); ++i) {
540 wxDisplay display(i);
541 pt::ptree monitor_node; // Create an unnamed node containing the value
542 monitor_node.put("width", display.GetGeometry().GetWidth());
543 monitor_node.put("height", display.GetGeometry().GetHeight());
544
545 // Only get the scaling on Win, it is not reliable on other platforms.
546 #if defined(_WIN32)
547 double scaling = display.GetPPI().GetWidth() / 96.;
548 std::stringstream ss;
549 ss << std::setprecision(3) << scaling;
550 monitor_node.put("scaling", ss.str() );
551 #endif
552 monitors_node.push_back(std::make_pair("", monitor_node));
553 }
554 hw_node.add_child("Monitors", monitors_node);
555 data_node.add_child("Hardware", hw_node);
556
557#ifdef _WIN32
558 {
559 pt::ptree blacklisted_node;
560 std::vector<std::wstring> blacklisted_libraries;
561 BlacklistedLibraryCheck::get_instance().get_blacklisted(blacklisted_libraries);
562 for (const std::wstring& wstr : blacklisted_libraries) {
563 std::string utf8 = into_u8(wstr);
564 if (size_t last_bs_pos = utf8.find_last_of("\\"); last_bs_pos < utf8.size() - 1) {
565 // Remove anything before last backslash so we don't send the path to the DLL.
566 utf8.erase(0, last_bs_pos + 1);
567 }
568 pt::ptree node; // Create an unnamed node containing the value
569 node.put("", utf8);
570 blacklisted_node.push_back(std::make_pair("", node)); // Add this node to the list.
571 }
572 if (! blacklisted_libraries.empty())
573 data_node.add_child("Blacklisted libraries", blacklisted_node);
574 }
575#endif // _WIN32
576
577 pt::ptree opengl_node;
578 opengl_node.put("Version", OpenGLManager::get_gl_info().get_version());
579 opengl_node.put("GLSLVersion", OpenGLManager::get_gl_info().get_glsl_version());
580 opengl_node.put("Vendor", OpenGLManager::get_gl_info().get_vendor());
581 opengl_node.put("Renderer", OpenGLManager::get_gl_info().get_renderer());
582 // Generate list of OpenGL extensions:
583 std::string extensions_str = gl_get_string_safe(GL_EXTENSIONS, "");
584 std::vector<std::string> extensions_list;
585 boost::split(extensions_list, extensions_str, boost::is_any_of(" "), boost::token_compress_off);
586 std::sort(extensions_list.begin(), extensions_list.end());
587 pt::ptree extensions_node;
588 for (const std::string& s : extensions_list) {
589 if (s.empty())
590 continue;
591 pt::ptree ext_node; // Create an unnamed node containing the value
592 ext_node.put("", s);
593 extensions_node.push_back(std::make_pair("", ext_node)); // Add this node to the list.
594 }
595 opengl_node.add_child("Extensions", extensions_node);
596 data_node.add_child("OpenGL", opengl_node);
597
598 pt::ptree root;
599 root.add_child("data", data_node);
600
601 // Now go through all the values and trim leading/trailing whitespace.
602 // Some CPU names etc apparently have trailing spaces...
603 std::function<void(pt::ptree&)> remove_whitespace;
604 remove_whitespace = [&remove_whitespace](pt::ptree& t) -> void
605 {
606 if (t.empty()) // Trim whitespace
607 boost::algorithm::trim(t.data());
608 else
609 for (auto it = t.begin(); it != t.end(); ++it)
610 remove_whitespace(it->second);
611 };
612 remove_whitespace(root);
613
614 // Serialize the tree into JSON and return it.
615 std::stringstream ss;
616 pt::write_json(ss, root);
617 return ss.str();
618}
static const GLInfo & get_gl_info()
Definition OpenGLManager.hpp:106
#define GL_EXTENSIONS
Definition gl.h:645
static std::string get_unique_id()
Definition SendSystemInfoDialog.cpp:328
static std::map< std::string, std::string > parse_lscpu_etc(const std::string &name, char delimiter)
Definition SendSystemInfoDialog.cpp:299
Semver get_version(const std::string &str, const std::regex &regexp)
Definition GUI_App.cpp:6282
std::string gl_get_string_safe(GLenum param, const std::string &default_value)
Definition OpenGLManager.cpp:52
PlatformFlavor platform_flavor()
Definition Platform.cpp:108
std::string platform_flavor_to_string(PlatformFlavor pf)
Definition Platform.cpp:157
size_t total_physical_memory()
Definition utils.cpp:1819
std::string platform_to_string(Platform platform)
Definition Platform.cpp:141
Platform platform()
Definition Platform.cpp:103

References Slic3r::GUI::OpenGLManager::get_gl_info(), get_unique_id(), get_version(), GL_EXTENSIONS, gl_get_string_safe(), into_u8(), parse_lscpu_etc(), Slic3r::platform(), Slic3r::platform_flavor(), Slic3r::platform_flavor_to_string(), Slic3r::platform_to_string(), and Slic3r::total_physical_memory().

Referenced by Slic3r::GUI::SendSystemInfoDialog::SendSystemInfoDialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generic_exception_handle()

void Slic3r::GUI::generic_exception_handle ( )
static
853{
854 // Note: Some wxWidgets APIs use wxLogError() to report errors, eg. wxImage
855 // - see https://docs.wxwidgets.org/3.1/classwx_image.html#aa249e657259fe6518d68a5208b9043d0
856 //
857 // wxLogError typically goes around exception handling and display an error dialog some time
858 // after an error is logged even if exception handling and OnExceptionInMainLoop() take place.
859 // This is why we use wxLogError() here as well instead of a custom dialog, because it accumulates
860 // errors if multiple have been collected and displays just one error message for all of them.
861 // Otherwise we would get multiple error messages for one missing png, for example.
862 //
863 // If a custom error message window (or some other solution) were to be used, it would be necessary
864 // to turn off wxLogError() usage in wx APIs, most notably in wxImage
865 // - see https://docs.wxwidgets.org/trunk/classwx_image.html#aa32e5d3507cc0f8c3330135bc0befc6a
866/*#ifdef WIN32
867 //LPEXCEPTION_POINTERS exception_pointers = nullptr;
868 __try {
869 throw;
870 }
871 __except (CBaseException::UnhandledExceptionFilter2(GetExceptionInformation()), EXCEPTION_EXECUTE_HANDLER) {
872 //__except (exception_pointers = GetExceptionInformation(), EXCEPTION_EXECUTE_HANDLER) {
873 // if (exception_pointers) {
874 // CBaseException::UnhandledExceptionFilter(exception_pointers);
875 // }
876 // else
877 throw;
878 }
879#else*/
880 try {
881 throw;
882 } catch (const std::bad_alloc& ex) {
883 // bad_alloc in main thread is most likely fatal. Report immediately to the user (wxLogError would be delayed)
884 // and terminate the app so it is at least certain to happen now.
885 BOOST_LOG_TRIVIAL(error) << boost::format("std::bad_alloc exception: %1%") % ex.what();
886 flush_logs();
887 wxString errmsg = wxString::Format(_L("OrcaSlicer will terminate because of running out of memory. "
888 "It may be a bug. It will be appreciated if you report the issue to our team."));
889 wxMessageBox(errmsg + "\n\n" + wxString(ex.what()), _L("Fatal error"), wxOK | wxICON_ERROR);
890
891 std::terminate();
892 //throw;
893 } catch (const boost::io::bad_format_string& ex) {
894 BOOST_LOG_TRIVIAL(error) << boost::format("Uncaught exception: %1%") % ex.what();
895 flush_logs();
896 wxString errmsg = _L("OrcaSlicer will terminate because of a localization error. "
897 "It will be appreciated if you report the specific scenario this issue happened.");
898 wxMessageBox(errmsg + "\n\n" + wxString(ex.what()), _L("Critical error"), wxOK | wxICON_ERROR);
899 std::terminate();
900 //throw;
901 } catch (const std::exception& ex) {
902 BOOST_LOG_TRIVIAL(error) << boost::format("Uncaught exception: %1%") % ex.what();
903 flush_logs();
904 wxLogError(format_wxstr(_L("OrcaSlicer got an unhandled exception: %1%"), ex.what()));
905 throw;
906 }
907//#endif
908}
void flush_logs()
Definition utils.cpp:480

References _L, Slic3r::flush_logs(), and format_wxstr().

Referenced by Slic3r::GUI::GUI_App::OnExceptionInMainLoop(), and Slic3r::GUI::GUI_App::OnInit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_all_camera_view_type()

wxArrayString Slic3r::GUI::get_all_camera_view_type ( )
24158 {
24159 wxArrayString all_types;
24160 for (size_t i = 0; i < (int)Camera::ViewAngleType::Count_ViewAngleType; i++) {
24161 all_types.Add(get_view_type_string((Camera::ViewAngleType) i));
24162 }
24163 return all_types;
24164}
static std::string get_view_type_string(libvgcode::EViewType view_type)
Definition GCodeViewer.cpp:141
ViewAngleType
Definition Camera.hpp:43
@ Count_ViewAngleType
Definition Camera.hpp:52

References Slic3r::GUI::Camera::Count_ViewAngleType, and get_view_type_string().

Here is the call graph for this function:

◆ get_app_config()

◆ get_applied_map()

std::vector< int > Slic3r::GUI::get_applied_map ( DynamicConfig & proj_config,
const Plater * plater_ref,
const PartPlate * partplate_ref,
const bool sync_plate )
static
48{
49 if (sync_plate)
50 return partplate_ref->get_real_filament_maps(proj_config);
51 return plater_ref->get_global_filament_map();
52}
std::vector< int > get_real_filament_maps(const DynamicConfig &g_config, bool *use_global_param=nullptr) const
Definition PartPlate.cpp:384
std::vector< int > get_global_filament_map() const
Definition Plater.cpp:21986

References Slic3r::GUI::Plater::get_global_filament_map(), and Slic3r::GUI::PartPlate::get_real_filament_maps().

Referenced by try_pop_up_before_slice().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_applied_map_mode()

FilamentMapMode Slic3r::GUI::get_applied_map_mode ( DynamicConfig & proj_config,
const Plater * plater_ref,
const PartPlate * partplate_ref,
const bool sync_plate )
static
41{
42 if (sync_plate)
43 return partplate_ref->get_real_filament_map_mode(proj_config);
44 return plater_ref->get_global_filament_map_mode();
45}
FilamentMapMode get_real_filament_map_mode(const DynamicConfig &g_config, bool *use_global_param=nullptr) const
Definition PartPlate.cpp:408
FilamentMapMode get_global_filament_map_mode() const
Definition Plater.cpp:21999

References Slic3r::GUI::Plater::get_global_filament_map_mode(), and Slic3r::GUI::PartPlate::get_real_filament_map_mode().

Referenced by try_pop_up_before_slice().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_applied_volume_map()

std::vector< int > Slic3r::GUI::get_applied_volume_map ( DynamicConfig & proj_config,
const Plater * plater_ref,
const PartPlate * partplate_ref,
const bool sync_plate )
static
55{
56 if (sync_plate)
57 return partplate_ref->get_real_filament_volume_maps(proj_config);
58 return plater_ref->get_global_filament_volume_map();
59}
std::vector< int > get_real_filament_volume_maps(const DynamicConfig &g_config, bool *use_global_param=nullptr) const
Definition PartPlate.cpp:396
std::vector< int > get_global_filament_volume_map() const
Definition Plater.cpp:21992

References Slic3r::GUI::Plater::get_global_filament_volume_map(), and Slic3r::GUI::PartPlate::get_real_filament_volume_maps().

Referenced by try_pop_up_before_slice().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_bitmap_size()

wxSize Slic3r::GUI::get_bitmap_size ( const wxBitmap & bmp)
static
49{
50#ifdef __APPLE__
51 return bmp.GetScaledSize();
52#else
53 return bmp.GetSize();
54#endif
55}

Referenced by Slic3r::GUI::OG_CustomCtrl::OG_CustomCtrl(), Slic3r::GUI::OG_CustomCtrl::CtrlLine::draw_act_bmps(), Slic3r::GUI::OG_CustomCtrl::CtrlLine::draw_blinking_bmp(), Slic3r::GUI::OG_CustomCtrl::CtrlLine::msw_rescale(), and Slic3r::GUI::OG_CustomCtrl::CtrlLine::render().

Here is the caller graph for this function:

◆ get_brightness_value()

int Slic3r::GUI::get_brightness_value ( wxImage image)
static
133 {
134
135 wxImage grayImage = image.ConvertToGreyscale();
136
137 int width = grayImage.GetWidth();
138 int height = grayImage.GetHeight();
139
140 int totalLuminance = 0;
141 unsigned char alpha;
142 int num_none_transparent = 0;
143 for (int y = 0; y < height; y += 2) {
144
145 for (int x = 0; x < width; x += 2) {
146
147 alpha = image.GetAlpha(x, y);
148 if (alpha != 0) {
149 wxColour pixelColor = grayImage.GetRed(x, y);
150 totalLuminance += pixelColor.Red();
151 num_none_transparent = num_none_transparent + 1;
152 }
153 }
154 }
155 if (totalLuminance <= 0 || num_none_transparent <= 0) {
156 return 0;
157 }
158 return totalLuminance / num_none_transparent;
159}

Referenced by Slic3r::GUI::StatusPanel::load_thumbnail_from_url(), Slic3r::GUI::StatusPanel::on_webrequest_state(), and Slic3r::GUI::ThumbnailPanel::set_thumbnail().

Here is the caller graph for this function:

◆ get_cached_selected_filament()

std::map< int, Preset * > Slic3r::GUI::get_cached_selected_filament ( MachineObject * obj)
51 {
52 std::map<int, Preset*> selected_filament_map;
53 if (!obj) return selected_filament_map;
54
55 PresetCollection* filament_presets = &wxGetApp().preset_bundle->filaments;
56 for (auto selected_prest : obj->selected_cali_preset) {
57 Preset* preset = filament_presets->find_preset(selected_prest.name);
58 if (!preset)
59 continue;
60
61 selected_filament_map.emplace(std::make_pair(selected_prest.tray_id, preset));
62 }
63 return selected_filament_map;
64}
std::vector< CaliPresetInfo > selected_cali_preset
Definition DeviceManager.hpp:486

References Slic3r::PresetCollection::find_preset(), and Slic3r::MachineObject::selected_cali_preset.

Referenced by Slic3r::GUI::FlowRateWizard::on_cali_save(), Slic3r::GUI::MaxVolumetricSpeedWizard::on_cali_save(), Slic3r::GUI::PressureAdvanceWizard::on_cali_save(), and Slic3r::GUI::FlowRateWizard::on_cali_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_cached_selected_filament_for_multi_extruder()

std::map< int, TrayInfo > Slic3r::GUI::get_cached_selected_filament_for_multi_extruder ( MachineObject * obj)
73{
74 std::map<int, TrayInfo> selected_filament_map;
75 if (!obj)
76 return selected_filament_map;
77
78 PresetCollection *filament_presets = &wxGetApp().preset_bundle->filaments;
79 for (auto selected_prest : obj->selected_cali_preset) {
80 TrayInfo tray_info;
81 tray_info.preset = filament_presets->find_preset(selected_prest.name);
82 if (!tray_info.preset)
83 continue;
84
85 tray_info.extruder_id = selected_prest.extruder_id;
86 tray_info.nozzle_volume_type = selected_prest.nozzle_volume_type;
87 selected_filament_map.emplace(std::make_pair(selected_prest.tray_id, tray_info));
88 }
89 return selected_filament_map;
90}
NozzleVolumeType nozzle_volume_type
Definition CalibrationWizard.cpp:69
Preset * preset
Definition CalibrationWizard.cpp:70
int extruder_id
Definition CalibrationWizard.cpp:68
Definition CalibrationWizard.cpp:67

References Slic3r::GUI::TrayInfo::extruder_id, Slic3r::PresetCollection::find_preset(), Slic3r::GUI::TrayInfo::nozzle_volume_type, Slic3r::GUI::TrayInfo::preset, and Slic3r::MachineObject::selected_cali_preset.

Referenced by Slic3r::GUI::FlowRateWizard::generate_index_key_value(), Slic3r::GUI::FlowRateWizard::on_cali_save(), and Slic3r::GUI::FlowRateWizard::on_cali_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_cali_filament_mode()

CalibrationFilamentMode Slic3r::GUI::get_cali_filament_mode ( MachineObject * obj,
CalibMode mode )
87{
88 // default
90
91
92 if (mode == CalibMode::Calib_PA_Line) {
97 }
98 else if (mode == CalibMode::Calib_Flow_Rate) {
103 }
104
106}
@ SERIES_P1P
Definition DevDefs.h:36
@ SERIES_X1
Definition DevDefs.h:35
PrinterSeries get_printer_series() const
Definition DeviceManager.cpp:589
@ Calib_PA_Line
Definition calib.hpp:25
@ Calib_Flow_Rate
Definition calib.hpp:29

References CALI_MODEL_MULITI, CALI_MODEL_SINGLE, Slic3r::Calib_Flow_Rate, Slic3r::Calib_PA_Line, Slic3r::MachineObject::get_printer_series(), SERIES_P1P, and SERIES_X1.

Referenced by Slic3r::GUI::FlowRateWizard::on_cali_action(), and Slic3r::GUI::PressureAdvanceWizard::on_cali_action().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_cali_mode_caption_string()

wxString Slic3r::GUI::get_cali_mode_caption_string ( CalibMode mode)
53{
54 if (mode == CalibMode::Calib_PA_Line)
55 return _L("Flow Dynamics Calibration");
57 return _L("Flow Rate Calibration");
59 return _L("Max Volumetric Speed Calibration");
60 return "no cali_mode_caption";
61}
@ Calib_Vol_speed_Tower
Definition calib.hpp:31

References _L, Slic3r::Calib_Flow_Rate, Slic3r::Calib_PA_Line, and Slic3r::Calib_Vol_speed_Tower.

Referenced by Slic3r::GUI::CaliPageCaption::CaliPageCaption().

Here is the caller graph for this function:

◆ get_cali_style()

CalibrationStyle Slic3r::GUI::get_cali_style ( MachineObject * obj)

References CALI_STYLE_DEFAULT, CALI_STYLE_P1P, CALI_STYLE_X1, Slic3r::MachineObject::get_printer_series(), SERIES_P1P, and SERIES_X1.

Here is the call graph for this function:

◆ get_calib_mode_name()

std::string Slic3r::GUI::get_calib_mode_name ( CalibMode cali_mode,
int stage )
251{
252 switch(cali_mode) {
254 return "pa_line_calib_mode";
256 return "auto_pa_line_calib_mode";
258 return "pa_pattern_calib_mode";
260 if (stage == 1)
261 return "flow_rate_coarse_calib_mode";
262 else if (stage == 2)
263 return "flow_rate_fine_calib_mode";
264 else
265 return "flow_rate_coarse_calib_mode";
267 return "temp_tower_calib_mode";
269 return "vol_speed_tower_calib_mode";
271 return "vfa_tower_calib_mode";
273 return "retration_tower_calib_mode";
275 return "input_shaping_freq_calib_mode";
277 return "input_shaping_damp_calib_mode";
279 return "cornering_calib_mode";
280 default:
281 assert(false);
282 return "";
283 }
284}
@ Calib_Input_shaping_freq
Definition calib.hpp:34
@ Calib_Temp_Tower
Definition calib.hpp:30
@ Calib_Cornering
Definition calib.hpp:36
@ Calib_Input_shaping_damp
Definition calib.hpp:35
@ Calib_VFA_Tower
Definition calib.hpp:32
@ Calib_PA_Pattern
Definition calib.hpp:26
@ Calib_Auto_PA_Line
Definition calib.hpp:28
@ Calib_Retraction_tower
Definition calib.hpp:33

References Slic3r::Calib_Auto_PA_Line, Slic3r::Calib_Cornering, Slic3r::Calib_Flow_Rate, Slic3r::Calib_Input_shaping_damp, Slic3r::Calib_Input_shaping_freq, Slic3r::Calib_PA_Line, Slic3r::Calib_PA_Pattern, Slic3r::Calib_Retraction_tower, Slic3r::Calib_Temp_Tower, Slic3r::Calib_VFA_Tower, and Slic3r::Calib_Vol_speed_Tower.

Referenced by Slic3r::GUI::CalibUtils::send_to_print(), and Slic3r::GUI::CalibUtils::send_to_print().

Here is the caller graph for this function:

◆ get_calibration_type_name()

wxString Slic3r::GUI::get_calibration_type_name ( CalibMode cali_mode)
52{
53 switch (cali_mode) {
55 return _L("Flow Dynamics");
57 return _L("Flow ratio");
59 return _L("Max Volumetric Speed");
61 return _L("Temperature");
63 return _L("Retraction");
64 default:
65 return "";
66 }
67}

References _L, Slic3r::Calib_Flow_Rate, Slic3r::Calib_PA_Line, Slic3r::Calib_Retraction_tower, Slic3r::Calib_Temp_Tower, and Slic3r::Calib_Vol_speed_Tower.

Referenced by Slic3r::GUI::CalibrationPanel::init_tabpanel().

Here is the caller graph for this function:

◆ get_calibration_wiki_page()

wxString Slic3r::GUI::get_calibration_wiki_page ( CalibMode cali_mode)
64{
65 std::string language = wxGetApp().app_config->get("language");
66 wxString region = "en";
67 if (language.find("zh") == 0)
68 region = "zh";
69
70 switch (cali_mode) {
72 return wxString::Format("https://wiki.bambulab.com/%s/software/bambu-studio/calibration_pa", region);
74 return wxString::Format("https://wiki.bambulab.com/%s/software/bambu-studio/calibration_flow_rate", region);
76 return wxString::Format("https://wiki.bambulab.com/%s/software/bambu-studio/calibration_volumetric", region);
78 return wxString::Format("https://wiki.bambulab.com/%s/software/bambu-studio/calibration_temperature", region);
80 return wxString::Format("https://wiki.bambulab.com/%s/software/bambu-studio/calibration_retraction", region);
81 default:
82 return "";
83 }
84}

References Slic3r::Calib_Flow_Rate, Slic3r::Calib_PA_Line, Slic3r::Calib_Retraction_tower, Slic3r::Calib_Temp_Tower, and Slic3r::Calib_Vol_speed_Tower.

Referenced by Slic3r::GUI::CaliPageCaption::CaliPageCaption().

Here is the caller graph for this function:

◆ get_cannot_reason_text()

wxString Slic3r::GUI::get_cannot_reason_text ( DevAms::CannotDryReason reason)
1357{
1358 wxString cannot_reason_text;
1359 switch (reason)
1360 {
1362 cannot_reason_text = "*" + _L("Insufficient power") + "\n";
1363 cannot_reason_text += _L(" Too many AMS drying simultaneously. Please plug in the power or stop other drying processes before starting.") + "\n";
1364 break;
1366 cannot_reason_text = "*" + _L("AMS is busy") + "\n";
1367 cannot_reason_text += _L(" AMS is calibrating | reading RFID | loading/unloading material, please wait.") + "\n";
1368 break;
1370 cannot_reason_text = "*" + _L("Filament in AMS outlet") + "\n";
1371 cannot_reason_text += _L(" The high drying temperature may cause AMS blockage, please unload first.");
1372 break;
1374 cannot_reason_text = "*" + _L("Initiating AMS drying") + "\n";
1375 break;
1377 cannot_reason_text = "*" + _L("Not supported in 2D mode") + "\n";
1378 break;
1380 cannot_reason_text = "*" + _L("Task in progress") + "\n";
1381 cannot_reason_text += _L(" The AMS might be in use during Task.") + "\n";
1382 break;
1384 cannot_reason_text = "*" + _L("Upgrading") + "\n";
1385 cannot_reason_text += _L(" Firmware update in progress, please wait...") + "\n";
1386 break;
1388 cannot_reason_text = "*" + _L("Insufficient power") + "\n";
1389 cannot_reason_text += _L(" Please plug in the power and then use the drying function.") + "\n";
1390 break;
1392 cannot_reason_text = "*" + _L("Filament in AMS outlet") + "\n";
1393 cannot_reason_text += _L(" The high drying temperature may cause AMS blockage. Please unload the filament manually before proceeding.") + "\n";
1394 break;
1395 default:
1396 cannot_reason_text = "*" + _L("System is busy") + "\n";
1397 cannot_reason_text += _L(" Initiating other drying processes, please wait a few seconds...") + "\n";
1398 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": unknown cannot dry reason";
1399 break;
1400 }
1401 return cannot_reason_text;
1402}
@ DryingInProgress
Definition DevFilaSystem.h:192
@ AmsBusy
Definition DevFilaSystem.h:188
@ FilamentAtAmsOutletManualUnload
Definition DevFilaSystem.h:195
@ NotSupportedIn2dMode
Definition DevFilaSystem.h:191
@ InsufficientPower
Definition DevFilaSystem.h:187
@ InsufficientPowerNeedPluginPower
Definition DevFilaSystem.h:194
@ ConsumableAtAmsOutlet
Definition DevFilaSystem.h:189
@ Upgrading
Definition DevFilaSystem.h:193
@ InitiatingAmsDrying
Definition DevFilaSystem.h:190

References _L, Slic3r::DevAms::AmsBusy, Slic3r::DevAms::ConsumableAtAmsOutlet, Slic3r::DevAms::DryingInProgress, Slic3r::DevAms::FilamentAtAmsOutletManualUnload, Slic3r::DevAms::InitiatingAmsDrying, Slic3r::DevAms::InsufficientPower, Slic3r::DevAms::InsufficientPowerNeedPluginPower, Slic3r::DevAms::NotSupportedIn2dMode, and Slic3r::DevAms::Upgrading.

Referenced by organize_cannot_reasons_text().

Here is the caller graph for this function:

◆ get_color()

ColorRGBA Slic3r::GUI::get_color ( Axis axis)
static
2792{
2793 return GLGizmoBase::AXES_COLOR[axis];
2794}
static std::array< ColorRGBA, 3 > AXES_COLOR
Definition GLGizmoBase.hpp:60

References Slic3r::GUI::GLGizmoBase::AXES_COLOR.

Referenced by Slic3r::GUI::Selection::render_sidebar_position_hints(), Slic3r::GUI::Selection::render_sidebar_rotation_hints(), and Slic3r::GUI::Selection::render_sidebar_scale_hints().

Here is the caller graph for this function:

◆ get_config_json()

json Slic3r::GUI::get_config_json ( const Preset * preset)
static
615 {
616 json j;
617 // record the headers
619 j[BBL_JSON_KEY_NAME] = preset->name;
620 j[BBL_JSON_KEY_FROM] = "";
621
622 DynamicPrintConfig config = preset->config;
623
624 // record all the key-values
625 for (const std::string &opt_key : config.keys()) {
626 const ConfigOption *opt = config.option(opt_key);
627 if (opt->is_scalar()) {
628 if (opt->type() == coString)
629 // keep \n, \r, \t
630 j[opt_key] = (dynamic_cast<const ConfigOptionString *>(opt))->value;
631 else
632 j[opt_key] = opt->serialize();
633 } else {
634 const ConfigOptionVectorBase *vec = static_cast<const ConfigOptionVectorBase *>(opt);
635 std::vector<std::string> string_values = vec->vserialize();
636
637 json j_array(string_values);
638 j[opt_key] = j_array;
639 }
640 }
641
642 return j;
643}
#define BBL_JSON_KEY_VERSION
Definition Preset.hpp:55
#define BBL_JSON_KEY_NAME
Definition Preset.hpp:58
#define BBL_JSON_KEY_FROM
Definition Preset.hpp:67
Definition Config.hpp:363
virtual std::vector< std::string > vserialize() const =0
t_config_option_keys keys() const override
Definition Config.cpp:1919
Semver version
Definition Preset.hpp:323
std::string to_string() const
Definition Semver.hpp:158

References BBL_JSON_KEY_FROM, BBL_JSON_KEY_NAME, BBL_JSON_KEY_VERSION, Slic3r::Preset::config, Slic3r::coString, Slic3r::DynamicConfig::keys(), Slic3r::Preset::name, Slic3r::ConfigBase::option(), Slic3r::Semver::to_string(), Slic3r::Preset::version, and Slic3r::ConfigOptionVectorBase::vserialize().

Here is the call graph for this function:

◆ get_curr_radio_type()

wxString Slic3r::GUI::get_curr_radio_type ( std::vector< std::pair< RadioBox *, wxString > > & radio_btns)
static
516{
517 for (std::pair<RadioBox *, wxString> radio_string : radio_btns) {
518 if (radio_string.first->GetValue()) {
519 return radio_string.second;
520 }
521 }
522 return "";
523}

Referenced by Slic3r::GUI::ExportConfigsDialog::create_dialog_buttons(), and Slic3r::GUI::ExportConfigsDialog::update_include_bed_assets_enabled().

Here is the caller graph for this function:

◆ get_curr_time() [1/2]

std::string Slic3r::GUI::get_curr_time ( const char * format = "%Y_%m_%d_%H_%M_%S")
static
328{
329 std::chrono::system_clock::time_point now = std::chrono::system_clock::now();
330
331 std::time_t time = std::chrono::system_clock::to_time_t(now);
332
333 std::tm local_time = *std::localtime(&time);
334 std::ostringstream time_stream;
335 time_stream << std::put_time(&local_time, format);
336
337 std::string current_time = time_stream.str();
338 return current_time;
339}
std::string format(const char *fmt, TArgs &&... args)
Definition format.hpp:36

References format().

Referenced by get_curr_timestmp(), get_filament_id(), Slic3r::GUI::ExportConfigsDialog::initial_file_name(), and Slic3r::GUI::ExportPresetBundleDialog::OnExportData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_curr_time() [2/2]

std::string Slic3r::GUI::get_curr_time ( const char * format = "%Y_%m_%d_%H_%M_%S")
static
143{
144 std::chrono::system_clock::time_point now = std::chrono::system_clock::now();
145
146 std::time_t time = std::chrono::system_clock::to_time_t(now);
147
148 std::tm local_time = *std::localtime(&time);
149 std::ostringstream time_stream;
150 time_stream << std::put_time(&local_time, format);
151
152 std::string current_time = time_stream.str();
153 return current_time;
154}

References format().

Here is the call graph for this function:

◆ get_curr_timestmp()

std::string Slic3r::GUI::get_curr_timestmp ( )
static
342{
343 return get_curr_time("%Y%m%d%H%M%S");
344 // std::time_t currentTime = std::time(nullptr);
345 // std::ostringstream oss;
346 // oss << currentTime;
347 // std::string timestampString = oss.str();
348 // return timestampString;
349}
static std::string get_curr_time(const char *format="%Y_%m_%d_%H_%M_%S")
Definition CreatePresetsDialog.cpp:327

References get_curr_time().

Referenced by Slic3r::GUI::ExportConfigsDialog::archive_filament_bundle_to_file(), and Slic3r::GUI::ExportConfigsDialog::archive_preset_bundle_to_file().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_cut_plane_points()

std::array< Vec3d, 4 > Slic3r::GUI::get_cut_plane_points ( const BoundingBoxf3 & bbox,
const double & cut_height )
552{
553 std::array<Vec3d, 4> plane_pts;
554 plane_pts[0] = Vec3d(bbox.min(0), bbox.min(1), cut_height);
555 plane_pts[1] = Vec3d(bbox.max(0), bbox.min(1), cut_height);
556 plane_pts[2] = Vec3d(bbox.max(0), bbox.max(1), cut_height);
557 plane_pts[3] = Vec3d(bbox.min(0), bbox.max(1), cut_height);
558 return plane_pts;
559}

References Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::max, and Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::min.

◆ get_data_from_svg()

bool Slic3r::GUI::get_data_from_svg ( const std::string & filename,
unsigned int max_size_px,
ThumbnailData & thumbnail_data )
228{
229 bool compression_enabled = false;
230
231 NSVGimage *image = nsvgParseFromFile(filename.c_str(), "px", 96.0f);
232 if (image == nullptr) { return false; }
233
234 float scale = (float) max_size_px / std::max(image->width, image->height);
235
236 thumbnail_data.width = (int) (scale * image->width);
237 thumbnail_data.height = (int) (scale * image->height);
238
239 int n_pixels = thumbnail_data.width * thumbnail_data.height;
240
241 if (n_pixels <= 0) {
242 nsvgDelete(image);
243 return false;
244 }
245
246 NSVGrasterizer *rast = nsvgCreateRasterizer();
247 if (rast == nullptr) {
248 nsvgDelete(image);
249 return false;
250 }
251
252 // creates the temporary buffer only once, with max size, and reuse it for all the levels, if generating mipmaps
253 std::vector<unsigned char> data(n_pixels * 4, 0);
254 thumbnail_data.pixels = data;
255 nsvgRasterize(rast, image, 0, 0, scale, thumbnail_data.pixels.data(), thumbnail_data.width, thumbnail_data.height, thumbnail_data.width * 4);
256
257 // we manually generate mipmaps because glGenerateMipmap() function is not reliable on all graphics cards
258 int lod_w = thumbnail_data.width;
259 int lod_h = thumbnail_data.height;
260 GLint level = 0;
261 while (lod_w > 1 || lod_h > 1) {
262 ++level;
263
264 lod_w = std::max(lod_w / 2, 1);
265 lod_h = std::max(lod_h / 2, 1);
266 scale /= 2.0f;
267
268 data.resize(lod_w * lod_h * 4);
269
270 nsvgRasterize(rast, image, 0, 0, scale, data.data(), lod_w, lod_h, lod_w * 4);
271 }
272
273 nsvgDeleteRasterizer(rast);
274 nsvgDelete(image);
275
276 return true;
277}
int scale(const int val)
Definition WipeTowerDialog.cpp:58
int GLint
Definition gl.h:2062
NSVGimage_ptr nsvgParseFromFile(const std::string &filename, const char *units, float dpi)
Definition NSVGUtils.cpp:106
unsigned int height
Definition ThumbnailData.hpp:19
std::vector< unsigned char > pixels
Definition ThumbnailData.hpp:20
unsigned int width
Definition ThumbnailData.hpp:18

References Slic3r::ThumbnailData::height, Slic3r::nsvgParseFromFile(), Slic3r::ThumbnailData::pixels, scale(), and Slic3r::ThumbnailData::width.

Referenced by Slic3r::GUI::IMReturnToolbar::init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_default_font()

wxFont Slic3r::GUI::get_default_font ( const wxWindow * window)
inline
96{ return get_default_font_for_dpi(window, get_dpi_for_window(window)); }
wxFont get_default_font_for_dpi(const wxWindow *window, int dpi)
Definition GUI_Utils.cpp:287

References get_default_font_for_dpi(), and get_dpi_for_window().

Referenced by Slic3r::GUI::AboutDialog::AboutDialog(), and Slic3r::GUI::CopyrightsDialog::CopyrightsDialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_default_font_for_dpi()

wxFont Slic3r::GUI::get_default_font_for_dpi ( const wxWindow * window,
int dpi )
288{
289#ifdef _WIN32
290 // First try to load the font with the Windows 10 specific way.
291 struct SystemParametersInfoForDpi_t { typedef BOOL (WINAPI *FN)(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni, UINT dpi); };
292 static auto SystemParametersInfoForDpi_fn = winapi_get_function<SystemParametersInfoForDpi_t>(L"User32.dll", "SystemParametersInfoForDpi");
293 if (SystemParametersInfoForDpi_fn != nullptr) {
294 NONCLIENTMETRICS nm;
295 memset(&nm, 0, sizeof(NONCLIENTMETRICS));
296 nm.cbSize = sizeof(NONCLIENTMETRICS);
297 if (SystemParametersInfoForDpi_fn(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &nm, 0, dpi))
298 return wxFont(wxNativeFontInfo(nm.lfMessageFont, window));
299 }
300 // Then try to guesstimate the font DPI scaling on Windows 8.
301 // Let's hope that the font returned by the SystemParametersInfo(), which is used by wxWidgets internally, makes sense.
302 int dpi_primary = get_dpi_for_window(nullptr);
303 if (dpi_primary != dpi) {
304 // Rescale the font.
305 return wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).Scaled(float(dpi) / float(dpi_primary));
306 }
307#endif
308 return wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
309}

References get_dpi_for_window(), and L.

Referenced by Slic3r::GUI::DPIAware< wxFrame >::DPIAware(), get_default_font(), and Slic3r::GUI::PageMaterials::set_compatible_printers_html_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_default_k_n_value()

void Slic3r::GUI::get_default_k_n_value ( const std::string & filament_id,
float & k,
float & n )
104{
105 // filament_id is our OF id; the literals below are the printer's own. An id the agent has
106 // no mapping for (e.g. a caller still on the old id) passes through unchanged.
107 auto* agent = wxGetApp().getAgent();
108 const std::string printer_filament_id = agent ? agent->from_orca_filament_id(filament_id) : filament_id;
109 if (printer_filament_id.compare("GFU01") == 0) {
110 /* TPU 95A */
111 k = 0.25;
112 n = 1.0;
113 } else if (printer_filament_id.compare("GFU03") == 0) {
114 /* TPU 90A */
115 k = 0.35;
116 n = 1.0;
117 } else if (printer_filament_id.compare("GFU04") == 0) {
118 /* TPU 85A */
119 k = 0.65;
120 n = 1.0;
121 } else if (printer_filament_id.compare("GFG00") == 0 || printer_filament_id.compare("GFG01") == 0 ||
122 printer_filament_id.compare("GFG60") == 0 || printer_filament_id.compare("GFL06") == 0 ||
123 printer_filament_id.compare("GFL55") == 0 || printer_filament_id.compare("GFG99") == 0 ||
124 printer_filament_id.compare("GFG98") == 0 || printer_filament_id.compare("GFG97") == 0 ||
125 printer_filament_id.compare("GFG50") == 0 || printer_filament_id.compare("GFU02") == 0 ||
126 printer_filament_id.compare("GFU98") == 0 || printer_filament_id.compare("GFS00") == 0 ||
127 printer_filament_id.compare("GFS02") == 0) {
128 /* 0.04 filaments */
129 k = 0.04;
130 n = 1.0;
131 } else {
132 /* other */
133 k = 0.02;
134 n = 1.0;
135 }
136}

Referenced by Slic3r::GUI::AMSMaterialsSetting::on_select_filament(), and Slic3r::GUI::AMSLib::render_generic_text().

Here is the caller graph for this function:

◆ get_default_name()

wxString Slic3r::GUI::get_default_name ( wxString filament_name,
CalibMode mode )
static
48 {
49 PresetBundle* preset_bundle = wxGetApp().preset_bundle;
50 for (auto it = preset_bundle->filaments.begin(); it != preset_bundle->filaments.end(); it++) {
51 if (filament_name.compare(it->name) == 0) {
52 if (!it->alias.empty())
53 filament_name = from_u8(it->alias);
54 else
55 filament_name = from_u8(it->name);
56 }
57 }
58
59 switch (mode)
60 {
62 break;
64 if (filament_name.StartsWith("Generic")) {
65 filament_name.Replace("Generic", "Brand", false);
66 }
67 break;
69 break;
71 filament_name = format_wxstr(_L("%1% Flow Rate Calibrated"), filament_name);
72 break;
74 filament_name = format_wxstr(_L("%1% Temperature Calibrated"), filament_name);
75 break;
77 filament_name = format_wxstr(_L("%1% Max Vol Speed Calibrated"), filament_name);
78 break;
80 break;
82 break;
84 break;
86 break;
88 break;
89 default:
90 break;
91 }
92 return filament_name;
93}
Iterator begin()
Definition Preset.hpp:583
Iterator end()
Definition Preset.hpp:586
@ Calib_None
Definition calib.hpp:24
@ Calib_PA_Tower
Definition calib.hpp:27

References _L, Slic3r::PresetCollection::begin(), Slic3r::Calib_Cornering, Slic3r::Calib_Flow_Rate, Slic3r::Calib_Input_shaping_damp, Slic3r::Calib_Input_shaping_freq, Slic3r::Calib_None, Slic3r::Calib_PA_Line, Slic3r::Calib_PA_Tower, Slic3r::Calib_Retraction_tower, Slic3r::Calib_Temp_Tower, Slic3r::Calib_VFA_Tower, Slic3r::Calib_Vol_speed_Tower, Slic3r::PresetCollection::end(), Slic3r::PresetBundle::filaments, format_wxstr(), and from_u8().

Referenced by Slic3r::GUI::CaliPASaveAutoPanel::default_naming(), Slic3r::GUI::CalibrationFlowCoarseSavePage::Show(), Slic3r::GUI::CalibrationFlowFineSavePage::Show(), Slic3r::GUI::CalibrationMaxVolumetricSpeedSavePage::Show(), Slic3r::GUI::CaliPASaveManualPanel::Show(), Slic3r::GUI::CalibrationFlowX1SavePage::sync_cali_result(), and Slic3r::GUI::CaliPASaveAutoPanel::sync_cali_result_for_multi_extruder().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_diameter_string()

std::string Slic3r::GUI::get_diameter_string ( float diameter)
static
367{
368 std::ostringstream stream; // ORCA ensure 0.25 returned as 0.25. previous code returned as 0.2 because of std::setprecision(1)
369 stream << std::fixed << std::setprecision(2) << diameter; // Use 2 decimals to capture 0.25 / 0.15 reliably
370 std::string s = stream.str();
371 if (s.find('.') != std::string::npos) { // Remove trailing zeros, but keep at least one decimal if needed
372 s.erase(s.find_last_not_of('0') + 1);
373 if (s.back() == '.') s += '0'; // Ensure "1." → "1.0"
374 }
375 return s;
376}

Referenced by Slic3r::GUI::ExtruderGroup::SetRowDiameters(), Slic3r::GUI::Sidebar::priv::switch_diameter_to(), Slic3r::GUI::Sidebar::priv::sync_extruder_list(), and Slic3r::GUI::Sidebar::update_presets().

Here is the caller graph for this function:

◆ get_dpi_for_window()

int Slic3r::GUI::get_dpi_for_window ( const wxWindow * window)
235{
236#ifdef _WIN32
237 enum MONITOR_DPI_TYPE_ {
238 // This enum is inlined here to avoid build-time dependency
239 MDT_EFFECTIVE_DPI_ = 0,
240 MDT_ANGULAR_DPI_ = 1,
241 MDT_RAW_DPI_ = 2,
242 MDT_DEFAULT_ = MDT_EFFECTIVE_DPI_,
243 };
244
245 // Need strong types for winapi_get_function() to work
246 struct GetDpiForWindow_t { typedef HRESULT (WINAPI *FN)(HWND hwnd); };
247 struct GetDpiForMonitor_t { typedef HRESULT (WINAPI *FN)(HMONITOR hmonitor, MONITOR_DPI_TYPE_ dpiType, UINT *dpiX, UINT *dpiY); };
248
249 static auto GetDpiForWindow_fn = winapi_get_function<GetDpiForWindow_t>(L"User32.dll", "GetDpiForWindow");
250 static auto GetDpiForMonitor_fn = winapi_get_function<GetDpiForMonitor_t>(L"Shcore.dll", "GetDpiForMonitor");
251
252 // Desktop Window is the window of the primary monitor.
253 const HWND hwnd = (window == nullptr) ? ::GetDesktopWindow() : window->GetHandle();
254
255 if (GetDpiForWindow_fn != nullptr) {
256 // We're on Windows 10, we have per-screen DPI settings
257 return GetDpiForWindow_fn(hwnd);
258 } else if (GetDpiForMonitor_fn != nullptr) {
259 // We're on Windows 8.1, we have per-system DPI
260 // Note: MonitorFromWindow() is available on all Windows.
261
262 const HMONITOR monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);
263 UINT dpiX;
264 UINT dpiY;
265 return GetDpiForMonitor_fn(monitor, MDT_EFFECTIVE_DPI_, &dpiX, &dpiY) == S_OK ? dpiX : DPI_DEFAULT;
266 } else {
267 // We're on Windows earlier than 8.1, use DC
268
269 const HDC hdc = GetDC(hwnd);
270 if (hdc == NULL) { return DPI_DEFAULT; }
271 const int dpi = GetDeviceCaps(hdc, LOGPIXELSX);
272 ReleaseDC(hwnd, hdc); // GetDC's handle must be released, unlike GetWindowDC's
273 return dpi;
274 }
275#elif defined __linux__
276 // TODO
277 return DPI_DEFAULT;
278#elif defined __APPLE__
279 // TODO
280 return DPI_DEFAULT;
281#else // freebsd and others
282 // TODO
283 return DPI_DEFAULT;
284#endif
285}

References DPI_DEFAULT, and L.

Referenced by Slic3r::GUI::DPIAware< wxFrame >::DPIAware(), Slic3r::GUI::GLCanvas3D::_check_and_update_toolbar_icon_scale(), Slic3r::GUI::GLCanvas3D::_render_3d_navigator(), Slic3r::GUI::GLCanvas3D::_render_assembly_tooltip_button(), Slic3r::GUI::GLCanvas3D::_render_canvas_toolbar(), Slic3r::GUI::GLCanvas3D::_render_frame(), Slic3r::GUI::GLCanvas3D::_render_imgui_select_plate_toolbar(), Slic3r::GUI::GLCanvas3D::_render_plate_switcher(), add_msg_content(), Slic3r::GUI::GizmoObjectManipulation::do_render_move_window(), Slic3r::GUI::GLCanvas3D::get_canvas_toolbar_right(), get_default_font(), get_default_font_for_dpi(), Slic3r::GUI::Emboss::StyleManager::init_style_images(), marker_scale(), Slic3r::GUI::GLGizmoFdmSupports::on_render_input_window(), Slic3r::GUI::GLGizmoFuzzySkin::on_render_input_window(), Slic3r::GUI::GLGizmoMmuSegmentation::on_render_input_window(), Slic3r::GUI::GLGizmoSeam::on_render_input_window(), Slic3r::GUI::GLGizmoTextureDisplacement::on_render_input_window(), Slic3r::GUI::GLGizmoUtils::render_tooltip_button(), Slic3r::GUI::GizmoObjectManipulation::reset_button(), Slic3r::GUI::GizmoObjectManipulation::reset_zero_button(), Slic3r::GUI::SplashScreen::scale_font(), and Slic3r::GUI::PageMaterials::set_compatible_printers_html_window().

Here is the caller graph for this function:

◆ get_drag_transformation_type()

TransformationType Slic3r::GUI::get_drag_transformation_type ( const Selection & selection)

Distiguish between object and volume Differ in possible transformation type.

Parameters
selectionContain selected volume/object
Returns
Transformation to use
451{
452 return is_embossed_object(selection) ?
455}
@ Local_Relative_Joint
Definition GUI_Geometry.hpp:41
@ Instance_Relative_Joint
Definition GUI_Geometry.hpp:37

References Slic3r::GUI::TransformationType::Instance_Relative_Joint, and Slic3r::GUI::TransformationType::Local_Relative_Joint.

Referenced by do_local_z_rotate(), Slic3r::GUI::GLGizmoEmboss::do_mirror(), dragging_rotate_gizmo(), Slic3r::GUI::GLGizmoSVG::draw_mirroring(), and Slic3r::GUI::GLGizmoSVG::draw_size().

Here is the caller graph for this function:

◆ get_dragging_half_size()

double Slic3r::GUI::get_dragging_half_size ( double size)
static
1138{
1139 return get_half_size(size) * 1.25;
1140}
static double get_half_size(double size)
Definition GLGizmoCut.cpp:1132

References get_half_size().

Referenced by Slic3r::GUI::GLGizmoCut3D::render_cut_plane_grabbers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_dry_status_img_path()

std::string Slic3r::GUI::get_dry_status_img_path ( DevAmsType type,
DevAms::DryStatus status,
DevAms::DrySubStatus sub_status )
static
85{
86 std::string img_name = "dev_ams_dry_ctr_";
87 switch (type) {
88 case DevAmsType::N3S:
89 img_name += "n3s";
90 break;
91 case DevAmsType::N3F:
92 img_name += "n3f";
93 break;
94 default:
95 return "";
96 }
97
98 img_name += "_";
99 switch (status) {
101 img_name += "error";
102 return img_name;
103 }
104
105 switch (sub_status) {
107 img_name += "heating";
108 return img_name;
110 img_name += "dehumidifying";
111 return img_name;
112 }
113
114 return "";
115}
@ Heating
Definition DevFilaSystem.h:174
@ Dehumidify
Definition DevFilaSystem.h:175
@ Error
Definition DevFilaSystem.h:166

References Slic3r::DevAms::Dehumidify, Slic3r::DevAms::Error, Slic3r::DevAms::Heating, Slic3r::N3F, and Slic3r::N3S.

Referenced by Slic3r::GUI::AMSDryCtrWin::update_image().

Here is the caller graph for this function:

◆ get_error_message()

std::string Slic3r::GUI::get_error_message ( int error_code)
702{
703 if (should_disable_hms()) return "";
704
705 char buf[64];
706 std::string result_str = "";
707 std::sprintf(buf,"%08X",error_code);
708 std::string hms_host = wxGetApp().app_config->get_hms_host();
709 std::string get_lang = wxGetApp().app_config->get_language_code();
710
711 std::string url = (boost::format("https://%1%/query.php?lang=%2%&e=%3%")
712 %hms_host
713 %get_lang
714 %buf).str();
715
717 http.header("accept", "application/json")
718 .timeout_max(10)
719 .on_complete([get_lang, &result_str](std::string body, unsigned status) {
720 try {
721 json j = json::parse(body);
722 if (j.contains("result")) {
723 if (j["result"].get<int>() == 0) {
724 if (j.contains("data")) {
725 json jj = j["data"];
726 if (jj.contains("device_error")) {
727 if (jj["device_error"].contains(get_lang)) {
728 if (jj["device_error"][get_lang].size() > 0) {
729 if (!jj["device_error"][get_lang][0]["intro"].empty() || !jj["device_error"][get_lang][0]["ecode"].empty()) {
730 std::string error_info = jj["device_error"][get_lang][0]["intro"].get<std::string>();
731 std::string error_code = jj["device_error"][get_lang][0]["ecode"].get<std::string>();
732 error_code.insert(4, " ");
733 result_str = from_u8(error_info).ToStdString() + "[" + error_code + "]";
734 }
735 }
736 }
737 }
738 }
739 }
740 }
741 } catch (...) {
742 ;
743 }
744 })
745 .on_error([](std::string body, std::string error, unsigned status) {
746 BOOST_LOG_TRIVIAL(info) << boost::format("[BBL ErrorMessage]: status=%1%, error=%2%, body=%3%") % status % error % body;
747 }).perform_sync();
748
749 return result_str;
750}
static bool should_disable_hms()
Definition HMS.cpp:39
Represetns a Http request.
Definition Http.hpp:38
static Http get(std::string url)
Definition Http.cpp:886
bool contains(const std::vector< T > &vector, const Point &point)
Definition Geometry.cpp:55
@ http
Definition IPrinterAgent.hpp:64

References Slic3r::Geometry::contains(), Slic3r::empty(), from_u8(), Slic3r::Http::get(), Slic3r::http, and should_disable_hms().

Here is the call graph for this function:

◆ get_exist_vendor_choices()

wxArrayString Slic3r::GUI::get_exist_vendor_choices ( VendorMap & vendors)
static
396{
397 wxArrayString choices;
398 PresetBundle temp_preset_bundle;
400 PresetBundle *preset_bundle = wxGetApp().preset_bundle;
401
402 VendorProfile users_models = preset_bundle->get_custom_vendor_models();
403
404 vendors = temp_preset_bundle.vendors;
405
406 if (!users_models.models.empty()) {
407 vendors[users_models.name] = users_models;
408 }
409
410 for (const auto& vendor : vendors) {
411 if (vendor.second.models.empty() || vendor.second.id.empty()) continue;
412 choices.Add(vendor.first);
413 }
414 return choices;
415}
std::pair< PresetsConfigSubstitutions, std::string > load_system_models_from_json(ForwardCompatibilitySubstitutionRule compatibility_rule)
Definition PresetBundle.cpp:3525
VendorProfile get_custom_vendor_models() const
Definition PresetBundle.cpp:3602
VendorMap vendors
Definition PresetBundle.hpp:525
Definition Preset.hpp:134
std::string name
Definition Preset.hpp:136
std::vector< PrinterModel > models
Definition Preset.hpp:193
@ EnableSystemSilent
Definition Config.hpp:249

References Slic3r::EnableSystemSilent, Slic3r::PresetBundle::get_custom_vendor_models(), Slic3r::PresetBundle::load_system_models_from_json(), Slic3r::VendorProfile::models, Slic3r::VendorProfile::name, and Slic3r::PresetBundle::vendors.

Referenced by Slic3r::GUI::CreatePrinterPresetDialog::create_printer_preset_item(), and Slic3r::GUI::CreatePrinterPresetDialog::on_select_printer_model().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_extruder_id_for_volumes()

std::vector< int > Slic3r::GUI::get_extruder_id_for_volumes ( const ModelObject & model_object)
static
97{
98 std::vector<int> extruders_idx;
99 extruders_idx.reserve(model_object.volumes.size());
100 for (const ModelVolume *model_volume : model_object.volumes) {
101 if (!model_volume->is_model_part())
102 continue;
103
104 extruders_idx.emplace_back(model_volume->extruder_id());
105 }
106
107 return extruders_idx;
108}
int extruder_id() const
Definition Model.cpp:2690

References Slic3r::ModelVolume::extruder_id(), Slic3r::ModelVolume::is_model_part(), and Slic3r::ModelObject::volumes.

Referenced by Slic3r::GUI::GLGizmoMmuSegmentation::data_changed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_fail_reason()

wxString Slic3r::GUI::get_fail_reason ( int code)
62{
64 return _L("Failed to create socket");
65
67 return _L("Failed to connect socket");
68
70 return _L("Failed to publish login request");
71
73 return _L("Timeout getting ticket from device");
74
76 return _L("Timeout getting ticket from server");
77
79 return _L("Failed to post ticket to server");
80
82 return _L("Failed to parse login report reason");
83
85 return _L("Failed to parse login report reason");
86
88 return _L("Receive login report timeout");
89
90 else
91 return _L("Unknown Failure");
92}
#define BAMBU_NETWORK_ERR_BIND_CREATE_SOCKET_FAILED
Definition bambu_networking.hpp:45
#define BAMBU_NETWORK_ERR_BIND_PUBLISH_LOGIN_REQUEST
Definition bambu_networking.hpp:47
#define BAMBU_NETWORK_ERR_BIND_RECEIVE_LOGIN_REPORT_TIMEOUT
Definition bambu_networking.hpp:53
#define BAMBU_NETWORK_ERR_BIND_ECODE_LOGIN_REPORT_FAILED
Definition bambu_networking.hpp:52
#define BAMBU_NETWORK_ERR_BIND_GET_PRINTER_TICKET_TIMEOUT
Definition bambu_networking.hpp:48
#define BAMBU_NETWORK_ERR_BIND_POST_TICKET_TO_CLOUD_FAILED
Definition bambu_networking.hpp:50
#define BAMBU_NETWORK_ERR_BIND_GET_CLOUD_TICKET_TIMEOUT
Definition bambu_networking.hpp:49
#define BAMBU_NETWORK_ERR_BIND_PARSE_LOGIN_REPORT_FAILED
Definition bambu_networking.hpp:51
#define BAMBU_NETWORK_ERR_BIND_SOCKET_CONNECT_FAILED
Definition bambu_networking.hpp:46

References _L, BAMBU_NETWORK_ERR_BIND_CREATE_SOCKET_FAILED, BAMBU_NETWORK_ERR_BIND_ECODE_LOGIN_REPORT_FAILED, BAMBU_NETWORK_ERR_BIND_GET_CLOUD_TICKET_TIMEOUT, BAMBU_NETWORK_ERR_BIND_GET_PRINTER_TICKET_TIMEOUT, BAMBU_NETWORK_ERR_BIND_PARSE_LOGIN_REPORT_FAILED, BAMBU_NETWORK_ERR_BIND_POST_TICKET_TO_CLOUD_FAILED, BAMBU_NETWORK_ERR_BIND_PUBLISH_LOGIN_REQUEST, BAMBU_NETWORK_ERR_BIND_RECEIVE_LOGIN_REPORT_TIMEOUT, and BAMBU_NETWORK_ERR_BIND_SOCKET_CONNECT_FAILED.

Referenced by Slic3r::GUI::BindMachineDialog::on_bind_fail().

Here is the caller graph for this function:

◆ get_filament_compatible_printer()

void Slic3r::GUI::get_filament_compatible_printer ( Preset * preset,
std::vector< std::string > & printers )
static
352{
353 auto compatible_printers = dynamic_cast<ConfigOptionStrings *>(preset->config.option("compatible_printers"));
354 if (compatible_printers == nullptr) return;
355 for (const std::string &printer_name : compatible_printers->values) {
356 printers.push_back(printer_name);
357 }
358}

References Slic3r::Preset::config, and Slic3r::ConfigBase::option().

Referenced by Slic3r::GUI::EditFilamentPresetDialog::get_same_filament_id_presets().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_filament_id()

std::string Slic3r::GUI::get_filament_id ( std::string vendor_typr_serial,
const PresetBundle & temp_preset_bundle )
static
557{
558 std::unordered_map<std::string, std::set<std::string>> filament_id_to_filament_name;
559
560 // temp filament presets
561 const std::deque<Preset> &filament_presets = temp_preset_bundle.filaments.get_presets();
562
563 for (const Preset &preset : filament_presets) {
564 std::string preset_name = preset.name;
565 size_t index_at = preset_name.find_first_of('@');
566 if (index_at == std::string::npos) {
567 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " filament preset name has no @ and name is: " << preset_name;
568 continue;
569 }
570 std::string filament_name = preset_name.substr(0, index_at - 1);
571 if (filament_name == vendor_typr_serial && preset.filament_id != "null")
572 return preset.filament_id;
573 filament_id_to_filament_name[preset.filament_id].insert(filament_name);
574 }
575 // global filament presets
576 PresetBundle * preset_bundle = wxGetApp().preset_bundle;
577 std::map<std::string, std::vector<Preset const *>> temp_filament_id_to_presets = preset_bundle->filaments.get_filament_presets();
578 for (std::pair<std::string, std::vector<Preset const *>> filament_id_to_presets : temp_filament_id_to_presets) {
579 if (filament_id_to_presets.first.empty()) continue;
580 for (const Preset *preset : filament_id_to_presets.second) {
581 std::string preset_name = preset->name;
582 size_t index_at = preset_name.find_first_of('@');
583 if (index_at == std::string::npos) {
584 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " filament preset name has no @ and name is: " << preset_name;
585 continue;
586 }
587 std::string filament_name = preset_name.substr(0, index_at - 1);
588 if (filament_name == vendor_typr_serial && preset->filament_id != "null")
589 return preset->filament_id;
590 filament_id_to_filament_name[preset->filament_id].insert(filament_name);
591 }
592 }
593
594 std::string user_filament_id = "P" + calculate_md5(vendor_typr_serial).substr(0, 7);
595
596 while (filament_id_to_filament_name.find(user_filament_id) != filament_id_to_filament_name.end()) {//find same filament id
597 bool have_same_filament_name = false;
598 for (const std::string &name : filament_id_to_filament_name.find(user_filament_id)->second) {
599 if (name == vendor_typr_serial) {
600 have_same_filament_name = true;
601 break;
602 }
603 }
604 if (have_same_filament_name) {
605 break;
606 }
607 else { //Different names correspond to the same filament id
608 user_filament_id = "P" + calculate_md5(vendor_typr_serial + get_curr_time()).substr(0, 7);
609 }
610 }
611 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " filament name is: " << vendor_typr_serial << "and create filament_id is: " << user_filament_id;
612 return user_filament_id;
613}
static std::string calculate_md5(const std::string &input)
Definition CreatePresetsDialog.cpp:525

References calculate_md5(), Slic3r::Preset::filament_id, Slic3r::PresetBundle::filaments, get_curr_time(), Slic3r::PresetCollection::get_filament_presets(), Slic3r::PresetCollection::get_presets(), and Slic3r::Preset::name.

Referenced by Slic3r::GUI::CreateFilamentPresetDialog::create_dialog_buttons(), and Slic3r::GUI::CreatePrinterPresetDialog::create_page2_dialog_buttons().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_filament_mixture_warning_text()

std::string & Slic3r::GUI::get_filament_mixture_warning_text ( )
284 {
285 static std::string filament_mixture_warning_text;
286 return filament_mixture_warning_text;
287}

References get_filament_mixture_warning_text().

Referenced by Slic3r::GUI::GLCanvas3D::_set_warning_notification(), get_filament_mixture_warning_text(), and Slic3r::GUI::GLCanvas3D::reload_scene().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_filament_name() [1/2]

std::string Slic3r::GUI::get_filament_name ( std::string & preset_name)
static
428{
429 size_t index_at = preset_name.find_last_of("@");
430 if (std::string::npos == index_at) {
431 return preset_name;
432 } else {
433 return preset_name.substr(0, index_at - 1);
434 }
435}

Referenced by Slic3r::GUI::EditFilamentPresetDialog::EditFilamentPresetDialog(), Slic3r::GUI::ExportConfigsDialog::data_init(), has_filaments(), and Slic3r::GUI::ExportPresetBundleDialog::InitExportData().

Here is the caller graph for this function:

◆ get_filament_name() [2/2]

std::string Slic3r::GUI::get_filament_name ( std::string & preset_name)
static
119{
120 size_t index_at = preset_name.find_last_of("@");
121 if (std::string::npos == index_at) {
122 return preset_name;
123 } else {
124 return preset_name.substr(0, index_at - 1);
125 }
126}

◆ get_first_added_preset() [1/2]

std::string Slic3r::GUI::get_first_added_preset ( const std::map< std::string, std::string > & old_data,
const std::map< std::string, std::string > & new_data )
static
2368{
2369 std::set<std::string> diff = get_new_added_presets(old_data, new_data);
2370 if (diff.empty())
2371 return std::string();
2372 return *diff.begin();
2373}
static std::set< std::string > get_new_added_presets(const std::map< std::string, std::string > &old_data, const std::map< std::string, std::string > &new_data)
Definition ConfigWizard.cpp:2347
Slic3r::Polygons diff(const Slic3r::Polygon &subject, const Slic3r::Polygon &clip, ApplySafetyOffset do_safety_offset)
Definition ClipperUtils.cpp:731

References Slic3r::diff(), and get_new_added_presets().

Referenced by Slic3r::GUI::ConfigWizard::priv::apply_config(), and Slic3r::GUI::GuideFrame::apply_config().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_first_added_preset() [2/2]

std::string Slic3r::GUI::get_first_added_preset ( const std::map< std::string, std::string > & old_data,
const std::map< std::string, std::string > & new_data )
static
998{
999 std::set<std::string> diff = get_new_added_presets(old_data, new_data);
1000 if (diff.empty())
1001 return std::string();
1002 return *diff.begin();
1003}

References Slic3r::diff(), and get_new_added_presets().

Here is the call graph for this function:

◆ get_first_hovered_gl_volume()

GLVolume * Slic3r::GUI::get_first_hovered_gl_volume ( const GLCanvas3D & canvas)
12990 {
12991 int hovered_id_signed = canvas.get_first_hover_volume_idx();
12992 if (hovered_id_signed < 0)
12993 return nullptr;
12994
12995 size_t hovered_id = static_cast<size_t>(hovered_id_signed);
12996 const GLVolumePtrs &volumes = canvas.get_volumes().volumes;
12997 if (hovered_id >= volumes.size())
12998 return nullptr;
12999
13000 return volumes[hovered_id];
13001}
int get_first_hover_volume_idx() const
Definition GLCanvas3D.hpp:1333

References Slic3r::GUI::GLCanvas3D::get_first_hover_volume_idx(), get_first_hovered_gl_volume(), Slic3r::GUI::GLCanvas3D::get_volumes(), and Slic3r::GLVolumeCollection::volumes.

Referenced by anonymous_namespace{GLGizmoEmboss.cpp}::create_input(), anonymous_namespace{GLGizmoSVG.cpp}::create_input(), and get_first_hovered_gl_volume().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_flow_ratio()

bool Slic3r::GUI::get_flow_ratio ( const DynamicConfig & config,
float & flow_ratio )
static
692{
693 const ConfigOptionFloatsNullable *flow_ratio_opt = config.option<ConfigOptionFloatsNullable>("filament_flow_ratio");
694 if (flow_ratio_opt) {
695 flow_ratio = flow_ratio_opt->get_at(0);
696 if (flow_ratio > 0)
697 return true;
698 }
699 return false;
700}
const double & get_at(size_t i) const
Definition Config.hpp:676

References Slic3r::ConfigOptionVector< double >::get_at(), and Slic3r::ConfigBase::option().

Referenced by Slic3r::GUI::FlowRateWizard::on_cali_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_formatted_tooltip_text()

wxString Slic3r::GUI::get_formatted_tooltip_text ( const ConfigOptionDef & opt,
const t_config_option_key & id )
164{
165 wxString tooltip = _(opt.tooltip);
166
167 std::string parameter_name = id;
168 std::string opt_key = id;
169 int opt_idx = 0;
170
171 const size_t hash_pos = static_cast<std::string>(id).find("#");
172
173 if (hash_pos != std::string::npos) {
174 parameter_name.replace(hash_pos, 1, "[");
175 parameter_name += "]";
176
177 std::string temp_str = id;
178 boost::erase_head(temp_str, hash_pos + 1);
179 size_t orig_opt_idx = atoi(temp_str.c_str());
180 opt_idx = orig_opt_idx >= 0 ? orig_opt_idx : 0;
181
182 boost::erase_tail(opt_key, opt_key.size() - hash_pos);
183 }
184
185 tooltip += (tooltip.empty() ? "" : "\n\n") + _(L("parameter name")) + ": " + parameter_name;
186
187 // Orca:
188 // We can't use Orca's default values as-is because they sometimes depend on other values.
189 // Parent preset configuration values will be used instead.
190 if (const Preset* print_parent_preset = wxGetApp().preset_bundle->prints.get_selected_preset_parent()) {
191 const DynamicPrintConfig& parent_config = print_parent_preset->config;
192
193 if (!parent_config.has(opt_key))
194 return tooltip;
195
196 wxString side_text = from_u8(opt.sidetext);
197
198 // Orca: a small hack for `layers` side text: adding a space before it for better looking text
199 if (opt.sidetext == L("layers"))
200 side_text = " " + _(side_text);
201
202 if (opt.type == coFloat || opt.type == coInt || opt.type == coPercent || opt.type == coFloatOrPercent ||
203 opt.type == coFloats || opt.type == coInts || opt.type == coPercents || opt.type == coFloatsOrPercents) {
204 double default_value = std::numeric_limits<double>::quiet_NaN();
205
206 if (opt.type == coFloat)
207 default_value = parent_config.option<ConfigOptionFloat>(opt_key)->value;
208 else if (opt.type == coFloats) {
209 if (opt.nullable) {
210 auto opt_floats_nullable = parent_config.option<ConfigOptionFloatsNullable>(opt_key);
211 if (!opt_floats_nullable->values.empty())
212 default_value = opt_floats_nullable->get_at(opt_idx);
213 } else {
214 auto opt_floats = parent_config.option<ConfigOptionFloats>(opt_key);
215 if (!opt_floats->values.empty())
216 default_value = opt_floats->get_at(opt_idx);
217 }
218 }
219 else if (opt.type == coInt)
220 default_value = parent_config.option<ConfigOptionInt>(opt_key)->value;
221 else if(opt.type == coInts) {
222 if (opt.nullable) {
223 auto opt_ints_nullable = parent_config.option<ConfigOptionIntsNullable>(opt_key);
224 if (!opt_ints_nullable->values.empty())
225 default_value = opt_ints_nullable->get_at(opt_idx);
226 } else {
227 auto opt_ints = parent_config.option<ConfigOptionInts>(opt_key);
228 if (!opt_ints->values.empty())
229 default_value = opt_ints->get_at(opt_idx);
230 }
231 }
232 else if (opt.type == coPercent)
233 default_value = parent_config.option<ConfigOptionPercent>(opt_key)->value;
234 else if (opt.type == coPercents) {
235 if (opt.nullable) {
236 auto opt_percents_nullable = parent_config.option<ConfigOptionPercentsNullable>(opt_key);
237 if (!opt_percents_nullable->values.empty())
238 default_value = opt_percents_nullable->get_at(opt_idx);
239 } else {
240 auto opt_percents = parent_config.option<ConfigOptionPercents>(opt_key);
241 if (!opt_percents->values.empty())
242 default_value = opt_percents->get_at(opt_idx);
243 }
244 }
245 else if (opt.type == coFloatOrPercent || opt.type == coFloatsOrPercents) {
246 bool is_percent = false;
247 if (opt.type == coFloatOrPercent) {
248 default_value = parent_config.option<ConfigOptionFloatOrPercent>(opt_key)->value;
249 is_percent = parent_config.option<ConfigOptionFloatOrPercent>(opt_key)->percent;
250 } else if (opt.type == coFloatsOrPercents) {
251 if (opt.nullable) {
252 auto opt_floats_or_percents_nullable = parent_config.option<ConfigOptionFloatsOrPercentsNullable>(opt_key);
253 if (!opt_floats_or_percents_nullable->values.empty()) {
254 default_value = opt_floats_or_percents_nullable->get_at(opt_idx).value;
255 is_percent = opt_floats_or_percents_nullable->get_at(opt_idx).percent;
256 }
257 } else {
258 auto opt_floats_or_percents = parent_config.option<ConfigOptionFloatsOrPercents>(opt_key);
259 if (!opt_floats_or_percents->values.empty()) {
260 default_value = opt_floats_or_percents->get_at(opt_idx).value;
261 is_percent = opt_floats_or_percents->get_at(opt_idx).percent;
262 }
263 }
264 }
265
266 if (is_percent)
267 side_text = "%";
268 else if (!side_text.empty()) {
269 static std::string postfix = " or %";
270 auto postfix_pos = side_text.find(postfix);
271 if (postfix_pos != std::string::npos)
272 side_text.erase(postfix_pos, postfix.length());
273 }
274 }
275
276 if (!std::isnan(default_value))
277 tooltip += "\n\n" + _(L("Default")) + ": " + _(double_to_string(default_value)) + _(side_text);
278
279 if (opt.min > -FLT_MAX && opt.max < FLT_MAX) {
280 tooltip += "\n" + _(L("Range")) + ": [" +
281 _(double_to_string(opt.min)) + _(side_text) + ", " +
282 _(double_to_string(opt.max)) + _(side_text) + "]";
283 }
284 } else if (opt.type == coBool || opt.type == coBools || opt.type == coString || opt.type == coStrings) {
285 std::string default_value = "";
286
287 if (opt.type == coString)
288 default_value = parent_config.option<ConfigOptionString>(opt_key)->value;
289 else if (opt.type == coStrings) {
290 auto opt_strings = parent_config.option<ConfigOptionStrings>(opt_key);
291
292 if (!opt_strings->values.empty())
293 default_value = opt_strings->get_at(opt_idx);
294 }
295 else if (opt.type == coBool)
296 default_value = parent_config.option<ConfigOptionBool>(opt_key)->value != 0 ? "true" : "false";
297 else if (opt.type == coBools) {
298 if (opt.nullable) {
299 auto opt_bools_nullable = parent_config.option<ConfigOptionBoolsNullable>(opt_key);
300 if (!opt_bools_nullable->values.empty())
301 default_value = opt_bools_nullable->get_at(opt_idx) != 0 ? "true" : "false";
302 } else {
303 auto opt_bools = parent_config.option<ConfigOptionBools>(opt_key);
304 if (!opt_bools->values.empty())
305 default_value = opt_bools->get_at(opt_idx) != 0 ? "true" : "false";
306 }
307 }
308
309 tooltip += "\n\n" + _(L("Default")) + ": " +
310 (default_value.empty() ? _(L("Empty string")) : _(default_value) + _(side_text));
311 }
312 }
313
314 edit_tooltip(tooltip);
315
316 return tooltip;
317}
float min
Definition Config.hpp:2601
float max
Definition Config.hpp:2602
ConfigOptionPercentsTempl< true > ConfigOptionPercentsNullable
Definition Config.hpp:1335
ConfigOptionIntsTempl< true > ConfigOptionIntsNullable
Definition Config.hpp:1155
ConfigOptionFloatsOrPercentsTempl< true > ConfigOptionFloatsOrPercentsNullable
Definition Config.hpp:1532
void edit_tooltip(wxString &tooltip)
Definition wxExtensions.cpp:398

References _, Slic3r::coBool, Slic3r::coBools, Slic3r::coFloat, Slic3r::coFloatOrPercent, Slic3r::coFloats, Slic3r::coFloatsOrPercents, Slic3r::coInt, Slic3r::coInts, Slic3r::coPercent, Slic3r::coPercents, Slic3r::coString, Slic3r::coStrings, double_to_string(), edit_tooltip(), from_u8(), Slic3r::ConfigOptionResolver::has(), L, and Slic3r::ConfigBase::option().

Referenced by Slic3r::GUI::OptionsGroup::create_single_option_line(), and Slic3r::GUI::Field::get_tooltip_text().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_full_label()

wxString Slic3r::GUI::get_full_label ( const std::string & opt_key,
const DynamicPrintConfig & config )
62{
63 const std::string pure_key = get_pure_opt_key(opt_key);
64 auto option = config.option(pure_key);
65
66 if (!option || option->is_nil())
67 return _L("N/A");
68
69 const ConfigOptionDef* opt = config.def()->get(pure_key);
70 return opt->full_label.empty() ? opt->label : opt->full_label;
71}
std::string get_pure_opt_key(const std::string &opt_key)
Definition ConfigValueFormatter.cpp:24

References _L, Slic3r::DynamicPrintConfig::def(), Slic3r::ConfigDef::get(), get_pure_opt_key(), and Slic3r::ConfigBase::option().

Referenced by Slic3r::GUI::DiffPresetDialog::update_tree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_full_settings_hierarchy()

void Slic3r::GUI::get_full_settings_hierarchy ( FullSettingsHierarchy & settings_menu,
const bool is_part )
static
423{
424 auto options = SettingsFactory::get_options(is_part);
425
426 const int filaments_cnt = filaments_count();
427
428 DynamicPrintConfig config;
429 for (auto& option : options)
430 {
431 auto const opt = config.def()->get(option);
432 auto category = opt->category;
433 if (is_improper_category(category, filaments_cnt, !is_part))
434 continue;
435
436 const std::string& label = !opt->full_label.empty() ? opt->full_label : opt->label;
437 std::pair<std::string, std::string> option_label(option, label);
438 std::vector< std::pair<std::string, std::string> > new_category;
439 auto& cat_opt_label = settings_menu.find(category) == settings_menu.end() ? new_category : settings_menu.at(category);
440 cat_opt_label.push_back(option_label);
441 if (cat_opt_label.size() == 1)
442 settings_menu[category] = cat_opt_label;
443 }
444}
static std::vector< std::string > get_options(bool is_part)
Definition GUI_Factories.cpp:201

References Slic3r::DynamicPrintConfig::def(), filaments_count(), Slic3r::ConfigDef::get(), Slic3r::GUI::SettingsFactory::get_options(), and is_improper_category().

Referenced by create_settings_popupmenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_grabber_mean_size()

double Slic3r::GUI::get_grabber_mean_size ( const BoundingBoxf3 & bb)
static
792{
793#if ENABLE_FIXED_GRABBER
794 // Orca: make grabber larger
795 return 32. * GLGizmoBase::INV_ZOOM;
796#else
797 return (bb.size().x() + bb.size().y() + bb.size().z()) / 30.;
798#endif
799}
static float INV_ZOOM
Definition GLGizmoBase.hpp:54

References Slic3r::GUI::GLGizmoBase::INV_ZOOM, and Slic3r::BoundingBox3Base< PointType >::size().

Referenced by Slic3r::GUI::GLGizmoCut3D::init_picking_models(), Slic3r::GUI::GLGizmoCut3D::render_cut_plane_grabbers(), Slic3r::GUI::GLGizmoCut3D::update_bb(), and Slic3r::GUI::GLGizmoCut3D::update_raycasters_for_picking_transform().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_half_size()

double Slic3r::GUI::get_half_size ( double size)
static
1133{
1134 return std::max(size * 0.35, 0.05);
1135}

Referenced by get_dragging_half_size(), Slic3r::GUI::GLGizmoBase::Grabber::get_dragging_half_size(), Slic3r::GUI::GLGizmoCut3D::render_cut_plane_grabbers(), and Slic3r::GUI::GLGizmoCut3D::update_raycasters_for_picking_transform().

Here is the caller graph for this function:

◆ get_hms_info_version()

int Slic3r::GUI::get_hms_info_version ( std::string & version)
50{
51 AppConfig* config = wxGetApp().app_config;
52 if (!config)
53 return -1;
55 return -1;
56 std::string hms_host = config->get_hms_host();
57 if(hms_host.empty()) {
58 BOOST_LOG_TRIVIAL(error) << "hms_host is empty";
59 return -1;
60 }
61 int result = -1;
62 version = "";
63 std::string lang;
64 std::string query_params = HMSQuery::build_query_params(lang);
65 std::string url = (boost::format("https://%1%/GetVersion.php?%2%") % hms_host % query_params).str();
67 http.timeout_max(10)
68 .on_complete([&version](std::string body, unsigned status){
69 try {
70 json j = json::parse(body);
71 if (j.contains("ver")) {
72 version = DevJsonValParser::get_longlong_val(j["ver"]);
73 }
74 } catch (...) {
75 ;
76 }
77 })
78 .on_error([&result](std::string body, std::string error, unsigned status) {
79 BOOST_LOG_TRIVIAL(error) << "get_hms_info_version: body = " << body << ", status = " << status << ", error = " << error;
80 result = -1;
81 })
82 .perform_sync();
83 return result;
84}
Definition AppConfig.hpp:100
std::string get_hms_host()
Definition AppConfig.cpp:89
static std::string get_longlong_val(const nlohmann::json &j)
Definition DevUtil.cpp:173
static std::string build_query_params(std::string &lang)
Definition HMS.cpp:309

References Slic3r::GUI::HMSQuery::build_query_params(), Slic3r::Http::get(), Slic3r::AppConfig::get_hms_host(), Slic3r::DevJsonValParser::get_longlong_val(), Slic3r::http, and should_disable_hms().

Here is the call graph for this function:

◆ get_hms_wiki_url()

std::string Slic3r::GUI::get_hms_wiki_url ( std::string error_code)
674{
675 AppConfig* config = wxGetApp().app_config;
676 if (!config) return "";
677 if (should_disable_hms()) return "";
678
679 std::string hms_host = wxGetApp().app_config->get_hms_host();
680 std::string lang_code = HMSQuery::hms_language_code();
681 std::string url = (boost::format("https://%1%/index.php?e=%2%&s=device_hms&lang=%3%")
682 % hms_host
683 % error_code
684 % lang_code).str();
685
686 DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
687 if (!dev) return url;
689 if (!obj) return url;
690
691 if (!obj->get_dev_id().empty()) {
692 url = (boost::format("https://%1%/index.php?e=%2%&d=%3%&s=device_hms&lang=%4%")
693 % hms_host
694 % error_code
695 % obj->get_dev_id()
696 % lang_code).str();
697 }
698 return url;
699}
static std::string hms_language_code()
Definition HMS.cpp:283
std::string get_dev_id() const
Definition DeviceManager.hpp:206

References Slic3r::MachineObject::get_dev_id(), Slic3r::AppConfig::get_hms_host(), Slic3r::DeviceManager::get_selected_machine(), Slic3r::GUI::HMSQuery::hms_language_code(), and should_disable_hms().

Referenced by Slic3r::GUI::HMSNotifyItem::HMSNotifyItem().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_humidity_level_img_path()

std::string Slic3r::GUI::get_humidity_level_img_path ( int humidity_percent)
static
60{
61 const int num_levels = 5;
62 int hum_level;
63
64 if (humidity_percent <= 100 / num_levels) {
65 hum_level = 5;
66 } else if (humidity_percent <= 100 / num_levels * 2) {
67 hum_level = 4;
68 } else if (humidity_percent <= 100 / num_levels * 3) {
69 hum_level = 3;
70 } else if (humidity_percent <= 100 / num_levels * 4) {
71 hum_level = 2;
72 } else {
73 hum_level = 1;
74 }
75
76 if (wxGetApp().dark_mode()) {
77 return "hum_level" + std::to_string(hum_level) + "_no_num_dark"; // Orca: use the dark-mode humidity glyph in dark mode
78 } else {
79 return "hum_level" + std::to_string(hum_level) + "_no_num_light";
80 }
81
82}

Referenced by Slic3r::GUI::AMSDryCtrWin::update_image().

Here is the caller graph for this function:

◆ get_icon_name()

std::string Slic3r::GUI::get_icon_name ( Preset::Type type,
PrinterTechnology pt )
static
93 {
94 return pt == ptSLA && type == Preset::TYPE_PRINTER ? "sla_printer" : type_icon_names.at(type);
95}
static const std::map< Preset::Type, std::string > type_icon_names
Definition UnsavedChangesDialog.cpp:85
@ ptSLA
Definition Config.hpp:233

References Slic3r::ptSLA, type_icon_names, and Slic3r::Preset::TYPE_PRINTER.

Referenced by Slic3r::GUI::DiffModel::AddPreset().

Here is the caller graph for this function:

◆ get_index_type()

GLenum Slic3r::GUI::get_index_type ( const GLModel::Geometry & data)
static
593{
594 switch (data.index_type)
595 {
596 default:
600 }
601}
#define GL_UNSIGNED_SHORT
Definition gl.h:1975
#define GL_UNSIGNED_INT
Definition gl.h:1940
#define GL_UNSIGNED_BYTE
Definition gl.h:1937
EIndexType index_type
Definition GLModel.hpp:67

References GL_UNSIGNED_BYTE, GL_UNSIGNED_INT, GL_UNSIGNED_SHORT, Slic3r::GUI::GLModel::Geometry::index_type, Slic3r::GUI::GLModel::Geometry::UBYTE, Slic3r::GUI::GLModel::Geometry::UINT, and Slic3r::GUI::GLModel::Geometry::USHORT.

Referenced by Slic3r::GUI::GLModel::render(), and Slic3r::GUI::GLModel::render_instanced().

Here is the caller graph for this function:

◆ get_left_extruder_unprintable_text()

std::string & Slic3r::GUI::get_left_extruder_unprintable_text ( )
extern
269 {
270 static std::string left_unprintable_text;
271 return left_unprintable_text;
272}

References get_left_extruder_unprintable_text().

Referenced by Slic3r::GUI::GLCanvas3D::_set_warning_notification(), Slic3r::GUI::GLCanvas3D::check_volumes_outside_state(), get_left_extruder_unprintable_text(), Slic3r::GUI::GLCanvas3D::reload_scene(), try_pop_up_before_slice(), and Slic3r::GUI::Plater::validate_current_plate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_machine_name() [1/2]

std::string Slic3r::GUI::get_machine_name ( const std::string & preset_name)
static
418{
419 size_t index_at = preset_name.find_last_of("@");
420 if (std::string::npos == index_at) {
421 return "";
422 } else {
423 return preset_name.substr(index_at + 1);
424 }
425}

Referenced by Slic3r::GUI::ExportConfigsDialog::data_init(), and Slic3r::GUI::ExportPresetBundleDialog::InitExportData().

Here is the caller graph for this function:

◆ get_machine_name() [2/2]

std::string Slic3r::GUI::get_machine_name ( const std::string & preset_name)
static
109{
110 size_t index_at = preset_name.find_last_of("@");
111 if (std::string::npos == index_at) {
112 return "";
113 } else {
114 return preset_name.substr(index_at + 1);
115 }
116}

◆ get_max_layer_height()

double Slic3r::GUI::get_max_layer_height ( const int extruder_idx)
static
4657{
4658 const DynamicPrintConfig& config = wxGetApp().preset_bundle->printers.get_edited_preset().config;
4659 int extruder_idx_zero_based = std::max(0, extruder_idx - 1);
4660 double max_layer_height = config.opt_float("max_layer_height", extruder_idx_zero_based);
4661
4662 // In case max_layer_height is set to zero, it should default to 75 % of nozzle diameter:
4663 if (max_layer_height < EPSILON)
4664 max_layer_height = 0.75 * config.opt_float("nozzle_diameter", extruder_idx_zero_based);
4665
4666 return max_layer_height;
4667}

References EPSILON, and Slic3r::DynamicConfig::opt_float().

Referenced by Slic3r::GUI::ObjectList::edit_layer_range().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_min_flush_volumes()

std::vector< int > Slic3r::GUI::get_min_flush_volumes ( const DynamicPrintConfig & full_config,
size_t nozzle_id )
1247{
1248 std::vector<int>extra_flush_volumes;
1249 //const auto& full_config = wxGetApp().preset_bundle->full_config();
1250 //auto& printer_config = wxGetApp().preset_bundle->printers.get_edited_preset().config;
1251
1252 const ConfigOptionFloatsNullable* nozzle_volume_opt = full_config.option<ConfigOptionFloatsNullable>("nozzle_volume");
1253 int nozzle_volume_val = nozzle_volume_opt ? (int)nozzle_volume_opt->get_at(nozzle_id) : 0;
1254
1255 const ConfigOptionInt* enable_long_retraction_when_cut_opt = full_config.option<ConfigOptionInt>("enable_long_retraction_when_cut");
1256 int machine_enabled_level = 0;
1257 if (enable_long_retraction_when_cut_opt) {
1258 machine_enabled_level = enable_long_retraction_when_cut_opt->value;
1259 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": get enable_long_retraction_when_cut from config, value=%1%")%machine_enabled_level;
1260 }
1261 const ConfigOptionBools* long_retractions_when_cut_opt = full_config.option<ConfigOptionBools>("long_retractions_when_cut");
1262 bool machine_activated = false;
1263 if (long_retractions_when_cut_opt) {
1264 machine_activated = long_retractions_when_cut_opt->values[nozzle_id] == 1;
1265 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": get long_retractions_when_cut from config, value=%1%, activated=%2%")%long_retractions_when_cut_opt->values[0] %machine_activated;
1266 }
1267
1268 size_t filament_size = full_config.option<ConfigOptionFloats>("filament_diameter")->values.size();
1269 std::vector<double> filament_retraction_distance_when_cut(filament_size, 18.0f), printer_retraction_distance_when_cut(filament_size, 18.0f);
1270 std::vector<unsigned char> filament_long_retractions_when_cut(filament_size, 0);
1271 const ConfigOptionFloats* filament_retraction_distances_when_cut_opt = full_config.option<ConfigOptionFloats>("filament_retraction_distances_when_cut");
1272 if (filament_retraction_distances_when_cut_opt) {
1273 filament_retraction_distance_when_cut = filament_retraction_distances_when_cut_opt->values;
1274 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": get filament_retraction_distance_when_cut from config, size=%1%, values=%2%")%filament_retraction_distance_when_cut.size() %filament_retraction_distances_when_cut_opt->serialize();
1275 }
1276
1277 const ConfigOptionFloats* printer_retraction_distance_when_cut_opt = full_config.option<ConfigOptionFloats>("retraction_distances_when_cut");
1278 if (printer_retraction_distance_when_cut_opt) {
1279 printer_retraction_distance_when_cut = printer_retraction_distance_when_cut_opt->values;
1280 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": get retraction_distances_when_cut from config, size=%1%, values=%2%")%printer_retraction_distance_when_cut.size() %printer_retraction_distance_when_cut_opt->serialize();
1281 }
1282
1283 const ConfigOptionBools* filament_long_retractions_when_cut_opt = full_config.option<ConfigOptionBools>("filament_long_retractions_when_cut");
1284 if (filament_long_retractions_when_cut_opt) {
1285 filament_long_retractions_when_cut = filament_long_retractions_when_cut_opt->values;
1286 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": get filament_long_retractions_when_cut from config, size=%1%, values=%2%")%filament_long_retractions_when_cut.size() %filament_long_retractions_when_cut_opt->serialize();
1287 }
1288
1289 for (size_t idx = 0; idx < filament_size; ++idx) {
1290 int extra_flush_volume = nozzle_volume_val;
1291 int retract_length = machine_enabled_level && machine_activated ? printer_retraction_distance_when_cut[nozzle_id] : 0;
1292
1293 unsigned char filament_activated = filament_long_retractions_when_cut[idx];
1294 double filament_retract_length = filament_retraction_distance_when_cut[idx];
1295
1296 if (filament_activated == 0)
1297 retract_length = 0;
1298 else if (filament_activated == 1 && machine_enabled_level == LongRectrationLevel::EnableFilament) {
1299 if (!std::isnan(filament_retract_length))
1300 retract_length = (int)filament_retraction_distance_when_cut[idx];
1301 else
1302 retract_length = printer_retraction_distance_when_cut[nozzle_id];
1303 }
1304
1305 extra_flush_volume -= PI * 1.75 * 1.75 / 4 * retract_length;
1306 extra_flush_volumes.emplace_back(extra_flush_volume);
1307 }
1308 return extra_flush_volumes;
1309}
Definition Config.hpp:1019
@ EnableFilament
Definition PrintConfig.hpp:370

References Slic3r::EnableFilament, Slic3r::ConfigOptionVector< double >::get_at(), Slic3r::ConfigBase::option(), PI, Slic3r::ConfigOptionBoolsTempl< NULLABLE >::serialize(), Slic3r::ConfigOptionFloatsTempl< NULLABLE >::serialize(), Slic3r::ConfigOptionSingle< T >::value, Slic3r::ConfigOptionVector< double >::values, and Slic3r::ConfigOptionVector< unsigned char >::values.

Referenced by Slic3r::GUI::Sidebar::auto_calc_flushing_volumes_internal(), WipingDialog::BuildTableObjStr(), WipingDialog::CalcFlushingVolumes(), Slic3r::CLI::run(), and Slic3r::GUI::CalibUtils::set_for_auto_pa_model_and_config().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_min_layer_height()

double Slic3r::GUI::get_min_layer_height ( const int extruder_idx)
static
4651{
4652 const DynamicPrintConfig& config = wxGetApp().preset_bundle->printers.get_edited_preset().config;
4653 return config.opt_float("min_layer_height", std::max(0, extruder_idx - 1));
4654}

References Slic3r::DynamicConfig::opt_float().

Referenced by Slic3r::GUI::ObjectList::add_layer_range_after_current(), and Slic3r::GUI::ObjectList::edit_layer_range().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_model_instance() [1/3]

ModelInstance * Slic3r::GUI::get_model_instance ( const GLVolume & gl_volume,
const Model & model )
13028 {
13029 return get_model_instance(gl_volume, model.objects);
13030}

References get_model_instance(), and Slic3r::Model::objects.

Referenced by calc_distance(), calc_surface_offset(), do_local_z_rotate(), face_selected_volume_to_camera(), get_model_instance(), get_model_instance(), get_model_instance(), anonymous_namespace{EmbossJob.cpp}::start_create_volume_on_surface_job(), and anonymous_namespace{SurfaceDrag.cpp}::start_dragging().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_model_instance() [2/3]

ModelInstance * Slic3r::GUI::get_model_instance ( const GLVolume & gl_volume,
const ModelObject & object )
13039 {
13040 if (gl_volume.instance_idx() < 0)
13041 return nullptr;
13042 size_t instance_idx = static_cast<size_t>(gl_volume.instance_idx());
13043 if (instance_idx >= object.instances.size())
13044 return nullptr;
13045 return object.instances[instance_idx];
13046}
int instance_idx() const
Definition 3DScene.hpp:346

References get_model_instance(), and Slic3r::GLVolume::instance_idx().

Here is the call graph for this function:

◆ get_model_instance() [3/3]

ModelInstance * Slic3r::GUI::get_model_instance ( const GLVolume & gl_volume,
const ModelObjectPtrs & objects )
13032 {
13033 if (gl_volume.instance_idx() < 0)
13034 return nullptr;
13035 ModelObject *object = get_model_object(gl_volume, objects);
13036 return get_model_instance(gl_volume, *object);
13037}

References get_model_instance(), get_model_object(), and Slic3r::GLVolume::instance_idx().

Here is the call graph for this function:

◆ get_model_object() [1/2]

ModelObject * Slic3r::GUI::get_model_object ( const GLVolume & gl_volume,
const Model & model )
13015 {
13016 return get_model_object(gl_volume, model.objects);
13017}

References get_model_object(), and Slic3r::Model::objects.

Referenced by calc_distance(), face_selected_volume_to_camera(), get_model_instance(), get_model_object(), get_model_object(), and anonymous_namespace{SurfaceDrag.cpp}::start_dragging().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_model_object() [2/2]

ModelObject * Slic3r::GUI::get_model_object ( const GLVolume & gl_volume,
const ModelObjectPtrs & objects )
13019 {
13020 if (gl_volume.object_idx() < 0)
13021 return nullptr;
13022 size_t objext_idx = static_cast<size_t>(gl_volume.object_idx());
13023 if (objext_idx >= objects.size())
13024 return nullptr;
13025 return objects[objext_idx];
13026}
int object_idx() const
Definition 3DScene.hpp:344

References get_model_object(), and Slic3r::GLVolume::object_idx().

Here is the call graph for this function:

◆ get_model_volume() [1/6]

const ModelVolume * Slic3r::GUI::get_model_volume ( const GLVolume & v,
const Model & model )
12946{
12947 const ModelVolume * ret = nullptr;
12948
12949 if (v.object_idx() < (int)model.objects.size()) {
12950 const ModelObject *obj = model.objects[v.object_idx()];
12951 if (v.volume_idx() < (int)obj->volumes.size())
12952 ret = obj->volumes[v.volume_idx()];
12953 }
12954
12955 return ret;
12956}
int volume_idx() const
Definition 3DScene.hpp:345

References get_model_volume(), Slic3r::GLVolume::object_idx(), Slic3r::Model::objects, Slic3r::GLVolume::volume_idx(), and Slic3r::ModelObject::volumes.

Here is the call graph for this function:

◆ get_model_volume() [2/6]

ModelVolume * Slic3r::GUI::get_model_volume ( const GLVolume & v,
const ModelObject & object )
12967 {
12968 if (v.volume_idx() < 0)
12969 return nullptr;
12970
12971 size_t volume_idx = static_cast<size_t>(v.volume_idx());
12972 if (volume_idx >= object.volumes.size())
12973 return nullptr;
12974
12975 return object.volumes[volume_idx];
12976}

References get_model_volume(), and Slic3r::GLVolume::volume_idx().

Here is the call graph for this function:

◆ get_model_volume() [3/6]

ModelVolume * Slic3r::GUI::get_model_volume ( const GLVolume & v,
const ModelObjectPtrs & objects )
12979{
12980 if (v.object_idx() < 0)
12981 return nullptr;
12982 size_t objext_idx = static_cast<size_t>(v.object_idx());
12983 if (objext_idx >= objects.size())
12984 return nullptr;
12985 if (objects[objext_idx] == nullptr)
12986 return nullptr;
12987 return get_model_volume(v, *objects[objext_idx]);
12988}

References get_model_volume(), and Slic3r::GLVolume::object_idx().

Here is the call graph for this function:

◆ get_model_volume() [4/6]

ModelVolume * Slic3r::GUI::get_model_volume ( const ObjectID & volume_id,
const ModelObjectPtrs & objects )
12959{
12960 for (const ModelObject *obj : objects)
12961 for (ModelVolume *vol : obj->volumes)
12962 if (vol->id() == volume_id)
12963 return vol;
12964 return nullptr;
12965}

References get_model_volume(), and Slic3r::ObjectBase::id().

Here is the call graph for this function:

◆ get_model_volume() [5/6]

ModelVolume * Slic3r::GUI::get_model_volume ( const Selection & selection,
Model & model )
static
67{
68 const Selection::IndicesList &idxs = selection.get_volume_idxs();
69 // only one selected volume
70 if (idxs.size() != 1) return nullptr;
71 const GLVolume *selected_volume = selection.get_volume(*idxs.begin());
72 if (selected_volume == nullptr) return nullptr;
73
74 const GLVolume::CompositeID &cid = selected_volume->composite_id;
75 const ModelObjectPtrs &objs = model.objects;
76 if (cid.object_id < 0 || objs.size() <= static_cast<size_t>(cid.object_id)) return nullptr;
77 const ModelObject *obj = objs[cid.object_id];
78 if (cid.volume_id < 0 || obj->volumes.size() <= static_cast<size_t>(cid.volume_id)) return nullptr;
79 return obj->volumes[cid.volume_id];
80}
CompositeID composite_id
Definition 3DScene.hpp:191
std::set< unsigned int > IndicesList
Definition Selection.hpp:49
const IndicesList & get_volume_idxs() const
Definition Selection.hpp:315
const GLVolume * get_volume(unsigned int volume_idx) const
Definition Selection.cpp:984
Definition 3DScene.hpp:174
int volume_id
Definition 3DScene.hpp:183
int object_id
Definition 3DScene.hpp:178

References Slic3r::GLVolume::composite_id, Slic3r::GUI::Selection::get_volume(), Slic3r::GUI::Selection::get_volume_idxs(), Slic3r::GLVolume::CompositeID::object_id, Slic3r::Model::objects, Slic3r::GLVolume::CompositeID::volume_id, and Slic3r::ModelObject::volumes.

Referenced by Slic3r::GUI::MenuFactory::append_menu_item_edit_svg(), Slic3r::GUI::MenuFactory::append_menu_item_edit_text(), Slic3r::GUI::GLGizmoSimplify::apply_simplify(), calc_angle(), calc_distance(), calc_surface_offset(), Slic3r::GUI::GLGizmoSVG::calculate_scale(), anonymous_namespace{EmbossJob.cpp}::check(), create_meshes(), do_local_z_rotate(), anonymous_namespace{SurfaceDrag.cpp}::dragging(), face_selected_volume_to_camera(), Slic3r::GUI::TextureDisplacementPrepareJob::finalize(), anonymous_namespace{EmbossJob.cpp}::find_closest(), Slic3r::GUI::GLGizmoBrimEars::first_layer_slicer(), anonymous_namespace{SurfaceDrag.cpp}::get_fix_transformation(), get_model_volume(), get_model_volume(), get_model_volume(), get_model_volume(), get_selected_volume(), anonymous_namespace{GLGizmoEmboss.cpp}::init_text_lines(), Slic3r::GUI::GLGizmoEmboss::on_mouse(), Slic3r::GUI::GLGizmoSVG::on_mouse(), Slic3r::GUI::GLGizmoEmboss::on_mouse_change_selection(), Slic3r::GUI::GLGizmoEmboss::on_render(), Slic3r::GUI::GLGizmoSimplify::on_render(), Slic3r::GUI::GLGizmoSVG::on_render(), Slic3r::GUI::GLGizmoEmboss::on_render_input_window(), Slic3r::GUI::GLGizmoSimplify::on_render_input_window(), Slic3r::GUI::Plater::priv::on_right_click(), Slic3r::GUI::GLGizmoBrimEars::register_single_mesh_pick(), Slic3r::GUI::GLGizmoEmboss::set_volume_by_selection(), Slic3r::GUI::GLGizmoSVG::set_volume_by_selection(), Slic3r::GUI::ObjectList::set_volume_type(), anonymous_namespace{EmbossJob.cpp}::start_create_volume_on_surface_job(), anonymous_namespace{SurfaceDrag.cpp}::start_dragging(), anonymous_namespace{EmbossJob.cpp}::update_volume(), and world_matrix_fixed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_model_volume() [6/6]

ModelVolume * Slic3r::GUI::get_model_volume ( const Selection & selection,
Model & model )
static
63{
64 const Selection::IndicesList& idxs = selection.get_volume_idxs();
65 // only one selected volume
66 if (idxs.size() != 1)
67 return nullptr;
68 const GLVolume* selected_volume = selection.get_volume(*idxs.begin());
69 if (selected_volume == nullptr)
70 return nullptr;
71
72 const GLVolume::CompositeID& cid = selected_volume->composite_id;
73 const ModelObjectPtrs& objs = model.objects;
74 if (cid.object_id < 0 || objs.size() <= static_cast<size_t>(cid.object_id))
75 return nullptr;
76 const ModelObject* obj = objs[cid.object_id];
77 if (cid.volume_id < 0 || obj->volumes.size() <= static_cast<size_t>(cid.volume_id))
78 return nullptr;
79 return obj->volumes[cid.volume_id];
80}

References Slic3r::GLVolume::composite_id, Slic3r::GUI::Selection::get_volume(), Slic3r::GUI::Selection::get_volume_idxs(), Slic3r::GLVolume::CompositeID::object_id, Slic3r::Model::objects, Slic3r::GLVolume::CompositeID::volume_id, and Slic3r::ModelObject::volumes.

Here is the call graph for this function:

◆ get_name_from_gizmo_etype()

std::string Slic3r::GUI::get_name_from_gizmo_etype ( GLGizmosManager::EType type)
1561{
1562 switch (type) {
1564 return "Move";
1566 return "Rotate";
1568 return "Scale";
1570 return "Flatten";
1572 return "Cut";
1574 return "MeshBoolean";
1576 return "FdmSupports";
1578 return "Seam";
1580 return "Text";
1582 return "Color Painting";
1584 return "Fuzzy Skin Painting";
1586 return "Texture Displacement";
1587 default:
1588 return "";
1589 }
1590 return "";
1591}
@ MeshBoolean
Definition GLGizmosManager.hpp:93
@ Move
Definition GLGizmosManager.hpp:88
@ Flatten
Definition GLGizmosManager.hpp:91
@ MmSegmentation
Definition GLGizmosManager.hpp:97
@ FuzzySkin
Definition GLGizmosManager.hpp:96
@ Seam
Definition GLGizmosManager.hpp:95
@ TextureDisplacement
Definition GLGizmosManager.hpp:98
@ Scale
Definition GLGizmosManager.hpp:90
@ Rotate
Definition GLGizmosManager.hpp:89
@ Cut
Definition GLGizmosManager.hpp:92
@ FdmSupports
Definition GLGizmosManager.hpp:94

References Slic3r::GUI::GLGizmosManager::Cut, Slic3r::GUI::GLGizmosManager::Emboss, Slic3r::GUI::GLGizmosManager::FdmSupports, Slic3r::GUI::GLGizmosManager::Flatten, Slic3r::GUI::GLGizmosManager::FuzzySkin, Slic3r::GUI::GLGizmosManager::MeshBoolean, Slic3r::GUI::GLGizmosManager::MmSegmentation, Slic3r::GUI::GLGizmosManager::Move, Slic3r::GUI::GLGizmosManager::Rotate, Slic3r::GUI::GLGizmosManager::Scale, Slic3r::GUI::GLGizmosManager::Seam, and Slic3r::GUI::GLGizmosManager::TextureDisplacement.

◆ get_new_added_presets() [1/2]

std::set< std::string > Slic3r::GUI::get_new_added_presets ( const std::map< std::string, std::string > & old_data,
const std::map< std::string, std::string > & new_data )
static
2348{
2349 auto get_aliases = [](const std::map<std::string, std::string>& data) {
2350 std::set<std::string> old_aliases;
2351 for (auto item : data) {
2352 const std::string& name = item.first;
2353 size_t pos = name.find("@");
2354 old_aliases.emplace(pos == std::string::npos ? name : name.substr(0, pos-1));
2355 }
2356 return old_aliases;
2357 };
2358
2359 std::set<std::string> old_aliases = get_aliases(old_data);
2360 std::set<std::string> new_aliases = get_aliases(new_data);
2361 std::set<std::string> diff;
2362 std::set_difference(new_aliases.begin(), new_aliases.end(), old_aliases.begin(), old_aliases.end(), std::inserter(diff, diff.begin()));
2363
2364 return diff;
2365}

References Slic3r::diff(), and Slic3r::GUI::ConfigWizard::name().

Referenced by get_first_added_preset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_new_added_presets() [2/2]

std::set< std::string > Slic3r::GUI::get_new_added_presets ( const std::map< std::string, std::string > & old_data,
const std::map< std::string, std::string > & new_data )
static
978{
979 auto get_aliases = [](const std::map<std::string, std::string>& data) {
980 std::set<std::string> old_aliases;
981 for (auto item : data) {
982 const std::string& name = item.first;
983 size_t pos = name.find("@");
984 old_aliases.emplace(pos == std::string::npos ? name : name.substr(0, pos-1));
985 }
986 return old_aliases;
987 };
988
989 std::set<std::string> old_aliases = get_aliases(old_data);
990 std::set<std::string> new_aliases = get_aliases(new_data);
991 std::set<std::string> diff;
992 std::set_difference(new_aliases.begin(), new_aliases.end(), old_aliases.begin(), old_aliases.end(), std::inserter(diff, diff.begin()));
993
994 return diff;
995}

References Slic3r::diff().

Here is the call graph for this function:

◆ get_nozzle_filament_incompatible_text()

std::string & Slic3r::GUI::get_nozzle_filament_incompatible_text ( )
279 {
280 static std::string nozzle_filament_incompatible_text;
281 return nozzle_filament_incompatible_text;
282}

References get_nozzle_filament_incompatible_text().

Referenced by Slic3r::GUI::GLCanvas3D::_set_warning_notification(), get_nozzle_filament_incompatible_text(), and Slic3r::GUI::GLCanvas3D::reload_scene().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_nozzle_volume_type_cloud_string()

std::string Slic3r::GUI::get_nozzle_volume_type_cloud_string ( NozzleVolumeType nozzle_volume_type)
158{
160 return "standard_flow";
161 }
163 return "high_flow";
164 }
166 return "tpu_high_flow";
167 }
169 return "e3d_high_flow";
170 }
172 // to be supported
173 return "hybrid_flow";
174 }
175 else {
176 assert(false);
177 return "";
178 }
179}
@ nvtE3DHighFlow
Definition PrintConfig.hpp:626
@ nvtHybrid
Definition PrintConfig.hpp:621
@ nvtHighFlow
Definition PrintConfig.hpp:620
@ nvtTPUHighFlow
Definition PrintConfig.hpp:624
zaa_minimize_perimeter_height nozzle_volume_type((ConfigOptionStrings, extruder_ams_count))((ConfigOptionStrings

References Slic3r::nozzle_volume_type(), Slic3r::nvtE3DHighFlow, Slic3r::nvtHighFlow, Slic3r::nvtHybrid, Slic3r::nvtStandard, and Slic3r::nvtTPUHighFlow.

Referenced by Slic3r::GUI::SelectMachineDialog::build_nozzles_info(), and Slic3r::GUI::SyncAmsInfoDialog::build_nozzles_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_nozzle_volume_type_name()

wxString Slic3r::GUI::get_nozzle_volume_type_name ( NozzleVolumeType type)
139{
140 if (NozzleVolumeType::nvtStandard == type) {
141 return _L("Standard");
142 } else if (NozzleVolumeType::nvtHighFlow == type) {
143 return _L("High Flow");
144 } else if (NozzleVolumeType::nvtHybrid == type) {
145 return _L("Hybrid");
146 } else if (NozzleVolumeType::nvtTPUHighFlow == type) {
147 return _L("TPU High Flow");
148 } else if (NozzleVolumeType::nvtE3DHighFlow == type) {
149 return _L("E3D High Flow");
150 } else if (NozzleVolumeType::nvtExtraHighFlow == type) {
151 return _L("Extra High Flow");
152 }
153 return wxString();
154}
@ nvtExtraHighFlow
Definition PrintConfig.hpp:627

References _L, Slic3r::nvtE3DHighFlow, Slic3r::nvtExtraHighFlow, Slic3r::nvtHighFlow, Slic3r::nvtHybrid, Slic3r::nvtStandard, and Slic3r::nvtTPUHighFlow.

Referenced by Slic3r::GUI::UnsavedChangesDialog::build(), Slic3r::GUI::CaliPASaveAutoPanel::sync_cali_result_for_multi_extruder(), and Slic3r::GUI::HistoryWindow::sync_history_data().

Here is the caller graph for this function:

◆ get_obj_calibration_mode() [1/3]

CalibMode Slic3r::GUI::get_obj_calibration_mode ( const MachineObject * obj)
109{
110 CalibrationMethod method;
111 int cali_stage;
112 return get_obj_calibration_mode(obj, method, cali_stage);
113}
CalibrationMethod
Definition CalibrationWizardPage.hpp:63
CalibMode get_obj_calibration_mode(const MachineObject *obj)
Definition CalibrationWizardPage.cpp:108

References get_obj_calibration_mode().

Referenced by get_obj_calibration_mode(), get_obj_calibration_mode(), Slic3r::GUI::CalibrationWizard::on_cali_go_home(), Slic3r::GUI::FlowRateWizard::on_cali_start(), Slic3r::GUI::FlowRateWizard::on_device_connected(), Slic3r::GUI::MaxVolumetricSpeedWizard::on_device_connected(), Slic3r::GUI::PressureAdvanceWizard::on_device_connected(), Slic3r::GUI::CalibrationCaliPage::set_cali_img(), Slic3r::GUI::CalibrationCaliPage::update(), and Slic3r::GUI::StatusPanel::update_subtask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_obj_calibration_mode() [2/3]

CalibMode Slic3r::GUI::get_obj_calibration_mode ( const MachineObject * obj,
CalibrationMethod & method,
int & cali_stage )
122{
124
125 if (!obj) return CalibMode::Calib_None;
126
127 if (boost::contains(obj->m_gcode_file, "auto_filament_cali")) {
130 }
131 if (boost::contains(obj->m_gcode_file, "user_cali_manual_pa")) {
134 }
135 if (boost::contains(obj->m_gcode_file, "extrusion_cali")) {
138 }
139
140 if (boost::contains(obj->m_gcode_file, "abs_flowcalib_cali")) {
143 }
144
146 if (boost::contains(obj->subtask_name, "auto_filament_cali")) {
149 }
150 if (boost::contains(obj->subtask_name, "user_cali_manual_pa")) {
153 }
154 if (boost::contains(obj->subtask_name, "extrusion_cali")) {
157 }
158
159 if (boost::contains(obj->subtask_name, "abs_flowcalib_cali")) {
162 }
163 }
164
165 CalibMode cali_mode = CalibUtils::get_calib_mode_by_name(obj->subtask_name, cali_stage);
166 if (cali_mode == CalibMode::Calib_PA_Line && cali_stage == 2) {
168 }
169 else if (cali_mode != CalibMode::Calib_None) {
171 }
172 return cali_mode;
173}
static CalibMode get_calib_mode_by_name(const std::string name, int &cali_stage)
Definition CalibUtils.cpp:395
std::string m_gcode_file
Definition DeviceManager.hpp:727
std::string subtask_name
Definition DeviceManager.hpp:736
CalibMode
Definition calib.hpp:23

References CALI_METHOD_AUTO, CALI_METHOD_MANUAL, CALI_METHOD_NEW_AUTO, Slic3r::Calib_Flow_Rate, Slic3r::Calib_None, Slic3r::Calib_PA_Line, Slic3r::GUI::CalibUtils::get_calib_mode_by_name(), Slic3r::MachineObject::get_printer_series(), Slic3r::MachineObject::m_gcode_file, SERIES_P1P, and Slic3r::MachineObject::subtask_name.

Here is the call graph for this function:

◆ get_obj_calibration_mode() [3/3]

CalibMode Slic3r::GUI::get_obj_calibration_mode ( const MachineObject * obj,
int & cali_stage )
116{
117 CalibrationMethod method;
118 return get_obj_calibration_mode(obj, method, cali_stage);
119}

References get_obj_calibration_mode().

Here is the call graph for this function:

◆ get_object_clashed_text()

std::string & Slic3r::GUI::get_object_clashed_text ( )
263 {
264 static std::string object_clashed_text = _u8L("An object is laid over the boundary of plate or exceeds the height limit.\n"
265 "Please solve the problem by moving it totally on or off the plate, and confirming that the height is within the build volume.");
266 return object_clashed_text;
267}

References _u8L, and get_object_clashed_text().

Referenced by Slic3r::GUI::GLCanvas3D::_set_warning_notification(), Slic3r::GUI::GLCanvas3D::check_volumes_outside_state(), get_object_clashed_text(), Slic3r::GUI::GLCanvas3D::reload_scene(), and Slic3r::GUI::Plater::validate_current_plate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_object_limited_text()

std::string & Slic3r::GUI::get_object_limited_text ( )
257 {
258 static std::string object_limited_text = _u8L("An object is placed in the left/right nozzle-only area or exceeds the printable height of the left nozzle.\n"
259 "Please ensure the filaments used by this object are not arranged to other nozzles.");
260 return object_limited_text;
261}

References _u8L, and get_object_limited_text().

Referenced by Slic3r::GUI::GLCanvas3D::_set_warning_notification(), and get_object_limited_text().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_option_label()

std::string Slic3r::GUI::get_option_label ( BedShape::Parameter param)
static
57{
58 switch (param) {
59 case BedShape::Parameter::RectSize : return L("Size");
60 case BedShape::Parameter::RectOrigin: return L("Origin");
61 case BedShape::Parameter::Diameter : return L("Diameter");
62 default: assert(false); return {};
63 }
64}
@ RectOrigin
Definition BedShapeDialog.hpp:44
@ RectSize
Definition BedShapeDialog.hpp:43
@ Diameter
Definition BedShapeDialog.hpp:45

References Slic3r::GUI::BedShape::Diameter, L, Slic3r::GUI::BedShape::RectOrigin, and Slic3r::GUI::BedShape::RectSize.

Referenced by Slic3r::GUI::BedShape::append_option_line(), and Slic3r::GUI::BedShape::get_full_name_with_params().

Here is the caller graph for this function:

◆ get_orca_cloud_agent()

std::shared_ptr< OrcaCloudServiceAgent > Slic3r::GUI::get_orca_cloud_agent ( NetworkAgent * agent)
static
339{
340 return agent ? std::dynamic_pointer_cast<OrcaCloudServiceAgent>(agent->get_cloud_agent()) : nullptr;
341}
std::shared_ptr< ICloudServiceAgent > get_cloud_agent(const std::string &provider=ORCA_CLOUD_PROVIDER) const
Definition NetworkAgent.cpp:189

References Slic3r::NetworkAgent::get_cloud_agent().

Referenced by cloud_page_url(), Slic3r::GUI::GUI_App::cloud_webview_handoff(), Slic3r::GUI::GUI_App::mint_cloud_web_session(), Slic3r::GUI::GUI_App::on_cloud_web_session_minted(), Slic3r::GUI::GUI_App::request_cloud_web_session(), and Slic3r::GUI::GUI_App::request_user_logout().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_physical_extruder_idx()

int Slic3r::GUI::get_physical_extruder_idx ( std::vector< int > physical_extruder_maps,
int extruder_id )
static
222{
223 for (size_t index = 0; index < physical_extruder_maps.size(); ++index) {
224 if (physical_extruder_maps[index] == extruder_id) {
225 return index;
226 }
227 }
228 return extruder_id;
229}

◆ get_pop_up_remind_flag()

bool Slic3r::GUI::get_pop_up_remind_flag ( )
static
29{
30 auto &app_config = wxGetApp().app_config;
31 return app_config->get_bool("pop_up_filament_map_dialog");
32}

◆ get_position()

void Slic3r::GUI::get_position ( wxWindowBase * child,
wxWindowBase * until_parent,
int & x,
int & y )
static
14166 {
14167 int res_x = 0, res_y = 0;
14168
14169 while (child != until_parent && child != nullptr) {
14170 int _x, _y;
14171 child->GetPosition(&_x, &_y);
14172 res_x += _x;
14173 res_y += _y;
14174
14175 child = child->GetParent();
14176 }
14177
14178 x = res_x;
14179 y = res_y;
14180}

Referenced by Slic3r::GUI::Plater::priv::show_right_click_menu().

Here is the caller graph for this function:

◆ get_prefered_map_mode()

FilamentMapMode Slic3r::GUI::get_prefered_map_mode ( )
static
49{
50 const static std::map<std::string, int> enum_keys_map = ConfigOptionEnum<FilamentMapMode>::get_enum_values();
51 auto &app_config = wxGetApp().app_config;
52 std::string mode_str = app_config->get("prefered_filament_map_mode");
53 auto iter = enum_keys_map.find(mode_str);
54 if (iter == enum_keys_map.end()) {
55 BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format("Could not get prefered_filament_map_mode from app config, use AutoForFlsuh mode");
57 }
58 return FilamentMapMode(iter->second);
59}
static const t_config_enum_values & get_enum_values()
FilamentMapMode
Definition PrintConfig.hpp:632
@ fmmAutoForFlush
Definition PrintConfig.hpp:633

References Slic3r::fmmAutoForFlush, and Slic3r::ConfigOptionEnum< T >::get_enum_values().

Referenced by Slic3r::GUI::FilamentGroupPopup::FilamentGroupPopup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_preset_collection()

PresetCollection * Slic3r::GUI::get_preset_collection ( Preset::Type type,
PresetBundle * preset_bundle = nullptr )
static
1774 {
1775 if (!preset_bundle)
1776 preset_bundle = wxGetApp().preset_bundle;
1777 return type == Preset::Type::TYPE_PRINTER ? &preset_bundle->printers :
1778 type == Preset::Type::TYPE_FILAMENT ? &preset_bundle->filaments :
1779 type == Preset::Type::TYPE_SLA_MATERIAL ? &preset_bundle->sla_materials :
1780 type == Preset::Type::TYPE_PRINT ? &preset_bundle->prints :
1781 type == Preset::Type::TYPE_SLA_PRINT ? &preset_bundle->sla_prints :
1782 nullptr;
1783}
PresetCollection sla_prints
Definition PresetBundle.hpp:498
PresetCollection sla_materials
Definition PresetBundle.hpp:500
PresetCollection prints
Definition PresetBundle.hpp:497
@ TYPE_SLA_PRINT
Definition Preset.hpp:247
@ TYPE_SLA_MATERIAL
Definition Preset.hpp:249

References Slic3r::Preset::TYPE_FILAMENT, Slic3r::Preset::TYPE_PRINT, Slic3r::Preset::TYPE_PRINTER, Slic3r::Preset::TYPE_SLA_MATERIAL, and Slic3r::Preset::TYPE_SLA_PRINT.

Referenced by Slic3r::GUI::DiffPresetDialog::create_buttons(), Slic3r::GUI::DiffPresetDialog::create_presets_sizer(), Slic3r::GUI::DiffPresetDialog::update_compatibility(), and Slic3r::GUI::DiffPresetDialog::update_tree().

Here is the caller graph for this function:

◆ get_preset_info()

bool Slic3r::GUI::get_preset_info ( const DynamicConfig & config,
const BedType plate_type,
int & nozzle_temp,
int & bed_temp,
float & max_volumetric_speed )
static
676{
677 const ConfigOptionInts* nozzle_temp_opt = config.option<ConfigOptionInts>("nozzle_temperature");
678 const ConfigOptionInts* opt_bed_temp_ints = config.option<ConfigOptionInts>(get_bed_temp_key(plate_type));
679 const ConfigOptionFloats* speed_opt = config.option<ConfigOptionFloats>("filament_max_volumetric_speed");
680 if (nozzle_temp_opt && speed_opt && opt_bed_temp_ints) {
681 nozzle_temp = nozzle_temp_opt->get_at(0);
682 max_volumetric_speed = speed_opt->get_at(0);
683 bed_temp = opt_bed_temp_ints->get_at(0);
684 if (bed_temp >= 0 && nozzle_temp >= 0 && max_volumetric_speed >= 0) {
685 return true;
686 }
687 }
688 return false;
689}

References Slic3r::ConfigOptionVector< int >::get_at(), Slic3r::get_bed_temp_key(), and Slic3r::ConfigBase::option().

Referenced by Slic3r::GUI::PressureAdvanceWizard::on_cali_save(), Slic3r::GUI::FlowRateWizard::on_cali_start(), and Slic3r::GUI::PressureAdvanceWizard::on_cali_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_preset_name_by_filament_id()

wxString Slic3r::GUI::get_preset_name_by_filament_id ( std::string filament_id)
static
104{
105 auto preset_bundle = wxGetApp().preset_bundle;
106 auto collection = &preset_bundle->filaments;
107 wxString preset_name = "";
108 for (auto it = preset_bundle->filaments.begin(); it != preset_bundle->filaments.end(); it++) {
109 if (filament_id.compare(it->filament_id) == 0) {
110 auto preset_parent = collection->get_preset_parent(*it);
111 if (preset_parent) {
112 if (preset_parent->is_system) {
113 if (!preset_parent->alias.empty())
114 preset_name = from_u8(preset_parent->alias);
115 else
116 preset_name = from_u8(preset_parent->name);
117 }
118 else { // is custom created filament
119 std::string name_str = preset_parent->name;
120 preset_name = from_u8(name_str.substr(0, name_str.find(" @")));
121 }
122 }
123 else {
124 if (it->is_system) {
125 if (!it->alias.empty())
126 preset_name = from_u8(it->alias);
127 else
128 preset_name = from_u8(it->name);
129 }
130 else { // is custom created filament
131 std::string name_str = it->name;
132 preset_name = from_u8(name_str.substr(0, name_str.find(" @")));
133 }
134 }
135 }
136 }
137 return preset_name;
138}

References from_u8().

Referenced by Slic3r::GUI::EditCalibrationHistoryDialog::EditCalibrationHistoryDialog(), and Slic3r::GUI::HistoryWindow::sync_history_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_primitive_mode()

GLenum Slic3r::GUI::get_primitive_mode ( const GLModel::Geometry::Format & format)
static
578{
579 switch (format.type)
580 {
582 default:
589 }
590}
#define GL_LINE_STRIP
Definition gl.h:944
#define GL_LINES
Definition gl.h:934
#define GL_TRIANGLES
Definition gl.h:1887
#define GL_POINTS
Definition gl.h:1299
#define GL_LINE_LOOP
Definition gl.h:937
#define GL_TRIANGLE_STRIP
Definition gl.h:1890

References format(), GL_LINE_LOOP, GL_LINE_STRIP, GL_LINES, GL_POINTS, GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP, GL_TRIANGLES, Slic3r::GUI::GLModel::Geometry::LineLoop, Slic3r::GUI::GLModel::Geometry::Lines, Slic3r::GUI::GLModel::Geometry::LineStrip, Slic3r::GUI::GLModel::Geometry::Points, Slic3r::GUI::GLModel::Geometry::TriangleFan, Slic3r::GUI::GLModel::Geometry::Triangles, and Slic3r::GUI::GLModel::Geometry::TriangleStrip.

Referenced by Slic3r::GUI::GLModel::render(), and Slic3r::GUI::GLModel::render_instanced().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_printer_nozzle_diameter()

std::string Slic3r::GUI::get_printer_nozzle_diameter ( std::string printer_name)
static
671 {
672 // Create a lowercase version of the printer_name for case-insensitive search
673 std::string printer_name_lower = printer_name;
674 std::transform(printer_name_lower.begin(), printer_name_lower.end(), printer_name_lower.begin(), ::tolower);
675
676 size_t index = printer_name_lower.find(" nozzle)");
677 if (std::string::npos == index) {
678 size_t index = printer_name_lower.find(" nozzle");
679 if (std::string::npos == index) {
680 return "";
681 }
682 std::string nozzle = printer_name_lower.substr(0, index);
683 size_t last_space_index = nozzle.find_last_of(" ");
684 if (std::string::npos == index) {
685 return "";
686 }
687 return nozzle.substr(last_space_index + 1);
688 } else {
689 std::string nozzle = printer_name_lower.substr(0, index);
690 size_t last_bracket_index = nozzle.find_last_of("(");
691 if (std::string::npos == index) {
692 return "";
693 }
694 return nozzle.substr(last_bracket_index + 1);
695 }
696}

Referenced by Slic3r::GUI::CreateFilamentPresetDialog::create_filament_preset_item(), and Slic3r::GUI::CreateFilamentPresetDialog::get_filament_presets_by_machine().

Here is the caller graph for this function:

◆ get_printer_preset()

Preset * Slic3r::GUI::get_printer_preset ( const MachineObject * obj)
19914{
19915 if (!obj)
19916 return nullptr;
19917
19918 Preset *printer_preset = nullptr;
19919
19920 PresetBundle *preset_bundle = wxGetApp().preset_bundle;
19921 for (auto printer_it = preset_bundle->printers.begin(); printer_it != preset_bundle->printers.end(); printer_it++) {
19922 // only use system printer preset
19923 if (!printer_it->is_system)
19924 continue;
19925
19926 ConfigOption *printer_nozzle_opt = printer_it->config.option("nozzle_diameter");
19927 ConfigOptionFloats *printer_nozzle_vals = nullptr;
19928 if (printer_nozzle_opt) printer_nozzle_vals = dynamic_cast<ConfigOptionFloats *>(printer_nozzle_opt);
19929 std::string model_id = printer_it->get_current_printer_type(preset_bundle);
19930
19931 std::string printer_type = obj->get_show_printer_type();
19932 bool nozzle_diameter_matches_or_unknown = printer_nozzle_vals && obj->GetExtderSystem()->NozzleDiameterMatchesOrUnknown(0, printer_nozzle_vals->get_at(0));
19933 if (model_id.compare(printer_type) == 0 && nozzle_diameter_matches_or_unknown) {
19934 printer_preset = &(*printer_it);
19935 }
19936 }
19937 return printer_preset;
19938}
bool NozzleDiameterMatchesOrUnknown(int extder_id, float target_diameter) const
Definition DevExtruderSystem.h:158
std::string get_show_printer_type() const
Definition DeviceManager.cpp:582

References Slic3r::PresetCollection::begin(), Slic3r::PresetCollection::end(), Slic3r::ConfigOptionVector< double >::get_at(), Slic3r::MachineObject::get_show_printer_type(), Slic3r::MachineObject::GetExtderSystem(), Slic3r::DevExtderSystem::NozzleDiameterMatchesOrUnknown(), and Slic3r::PresetBundle::printers.

Referenced by Slic3r::GUI::PresetComboBox::add_connected_printers(), Slic3r::check_filaments_printable(), Slic3r::GUI::PresetComboBox::get_preset_item_name(), Slic3r::GUI::Plater::is_same_printer_for_connected_and_selected(), support_nozzle_volume(), and Slic3r::GUI::Sidebar::priv::sync_extruder_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_pure_opt_key()

std::string Slic3r::GUI::get_pure_opt_key ( const std::string & opt_key)
25{
26 std::string pure_key = opt_key;
27 const int pos = pure_key.find("#");
28 if (pos > 0)
29 boost::erase_tail(pure_key, pure_key.size() - pos);
30 return pure_key;
31}

Referenced by get_full_label(), get_string_value(), Slic3r::GUI::DiffViewCtrl::options(), Slic3r::GUI::DiffViewCtrl::selected_options(), Slic3r::GUI::DiffPresetDialog::update_tree(), and Slic3r::GUI::UnsavedChangesDialog::update_tree().

Here is the caller graph for this function:

◆ get_right_extruder_unprintable_text()

std::string & Slic3r::GUI::get_right_extruder_unprintable_text ( )
extern
274 {
275 static std::string right_unprintable_text;
276 return right_unprintable_text;
277}

References get_right_extruder_unprintable_text().

Referenced by Slic3r::GUI::GLCanvas3D::_set_warning_notification(), Slic3r::GUI::GLCanvas3D::check_volumes_outside_state(), get_right_extruder_unprintable_text(), Slic3r::GUI::GLCanvas3D::reload_scene(), try_pop_up_before_slice(), and Slic3r::GUI::Plater::validate_current_plate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_root_idx()

int Slic3r::GUI::get_root_idx ( ObjectDataViewModelNode * parent_node,
const ItemType root_type )
static
463{
464 // because of istance_root and layers_root are at the end of the list, so
465 // start locking from the end
466 for (int root_idx = parent_node->GetChildCount() - 1; root_idx >= 0; root_idx--)
467 {
468 // if there is SettingsItem or VolumeItem, then RootItems don't exist in current ObjectItem
469 if (parent_node->GetNthChild(root_idx)->GetType() & (itSettings | itVolume))
470 break;
471 if (parent_node->GetNthChild(root_idx)->GetType() & root_type)
472 return root_idx;
473 }
474
475 return -1;
476}
ObjectDataViewModelNode * GetNthChild(unsigned int n)
Definition ObjectDataViewModel.hpp:200
ItemType GetType() const
Definition ObjectDataViewModel.hpp:255
size_t GetChildCount() const
Definition ObjectDataViewModel.hpp:242

References Slic3r::GUI::ObjectDataViewModelNode::GetChildCount(), Slic3r::GUI::ObjectDataViewModelNode::GetNthChild(), Slic3r::GUI::ObjectDataViewModelNode::GetType(), itSettings, and itVolume.

Referenced by Slic3r::GUI::ObjectDataViewModel::AddLayersChild(), Slic3r::GUI::ObjectDataViewModel::AddVolumeChild(), append_root_node(), and Slic3r::GUI::ObjectDataViewModel::DeleteLastInstance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_search_inputs()

std::vector< Search::InputInfo > Slic3r::GUI::get_search_inputs ( ConfigOptionMode mode)
static
6816{
6817 std::vector<Search::InputInfo> ret {};
6818
6819 auto& tabs_list = wxGetApp().tabs_list;
6820 auto print_tech = wxGetApp().preset_bundle->printers.get_selected_preset().printer_technology();
6821 for (auto tab : tabs_list)
6822 if (tab->supports_printer_technology(print_tech))
6823 ret.emplace_back(Search::InputInfo {tab->get_config(), tab->type(), mode});
6824
6825 return ret;
6826}
Definition SettingsIndex.hpp:20

Referenced by Slic3r::GUI::Sidebar::update_searcher().

Here is the caller graph for this function:

◆ get_selected_gl_volume() [1/2]

GLVolume * Slic3r::GUI::get_selected_gl_volume ( const GLCanvas3D & canvas)
13003 {
13004 const GLVolume *gl_volume = get_selected_gl_volume(canvas.get_selection());
13005 if (gl_volume == nullptr)
13006 return nullptr;
13007
13008 const GLVolumePtrs &gl_volumes = canvas.get_volumes().volumes;
13009 for (GLVolume *v : gl_volumes)
13010 if (v->composite_id == gl_volume->composite_id)
13011 return v;
13012 return nullptr;
13013}

References Slic3r::GLVolume::composite_id, get_selected_gl_volume(), Slic3r::GUI::GLCanvas3D::get_selection(), Slic3r::GUI::GLCanvas3D::get_volumes(), and Slic3r::GLVolumeCollection::volumes.

Referenced by calc_surface_offset(), Slic3r::GUI::GLGizmoEmboss::draw_advanced(), face_selected_volume_to_camera(), anonymous_namespace{SurfaceDrag.cpp}::get_fix_transformation(), get_selected_gl_volume(), get_selected_volume(), Slic3r::GUI::GLGizmoEmboss::on_mouse_for_translate(), Slic3r::GUI::GLGizmoEmboss::set_volume_by_selection(), Slic3r::GUI::GLGizmoSVG::set_volume_by_selection(), anonymous_namespace{SurfaceDrag.cpp}::start_dragging(), and world_matrix_fixed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_selected_gl_volume() [2/2]

const GLVolume * Slic3r::GUI::get_selected_gl_volume ( const Selection & selection)
3416{
3417 int object_idx = selection.get_object_idx();
3418 // is more object selected?
3419 if (object_idx == -1)
3420 return nullptr;
3421
3422 const auto &list = selection.get_volume_idxs();
3423 // is more volumes selected?
3424 if (list.size() != 1)
3425 return nullptr;
3426
3427 unsigned int volume_idx = *list.begin();
3428 return selection.get_volume(volume_idx);
3429}
int get_object_idx() const
Definition Selection.cpp:962

References Slic3r::GUI::Selection::get_object_idx(), Slic3r::GUI::Selection::get_volume(), and Slic3r::GUI::Selection::get_volume_idxs().

Here is the call graph for this function:

◆ get_selected_volume() [1/2]

ModelVolume * Slic3r::GUI::get_selected_volume ( const ObjectID & volume_id,
const Selection & selection )
3431 {
3432 const Selection::IndicesList &volume_ids = selection.get_volume_idxs();
3433 const ModelObjectPtrs &model_objects = selection.get_model()->objects;
3434 for (auto id : volume_ids) {
3435 const GLVolume *selected_volume = selection.get_volume(id);
3436 const GLVolume::CompositeID &cid = selected_volume->composite_id;
3437 ModelObject *obj = model_objects[cid.object_id];
3438 ModelVolume *volume = obj->volumes[cid.volume_id];
3439 if (volume_id == volume->id())
3440 return volume;
3441 }
3442 return nullptr;
3443}

References Slic3r::GLVolume::composite_id, Slic3r::GUI::Selection::get_model(), Slic3r::GUI::Selection::get_volume(), Slic3r::GUI::Selection::get_volume_idxs(), Slic3r::ObjectBase::id(), Slic3r::GLVolume::CompositeID::object_id, Slic3r::Model::objects, Slic3r::GLVolume::CompositeID::volume_id, and Slic3r::ModelObject::volumes.

Here is the call graph for this function:

◆ get_selected_volume() [2/2]

ModelVolume * Slic3r::GUI::get_selected_volume ( const Selection & selection)
3407{
3408 const GLVolume *gl_volume = get_selected_gl_volume(selection);
3409 if (gl_volume == nullptr)
3410 return nullptr;
3411 const ModelObjectPtrs &objects = selection.get_model()->objects;
3412 return get_model_volume(*gl_volume, objects);
3413}

References Slic3r::GUI::Selection::get_model(), get_model_volume(), get_selected_gl_volume(), and Slic3r::Model::objects.

Referenced by Slic3r::GUI::GLGizmoEmboss::draw_advanced().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_selection() [1/2]

const Selection & Slic3r::GUI::get_selection ( )
static
416{
417 return plater()->get_current_canvas3D(true)->get_selection();
418}
GLCanvas3D * get_current_canvas3D(bool exclude_preview=false)
Definition Plater.cpp:22126

References Slic3r::GUI::Plater::get_current_canvas3D(), Slic3r::GUI::GLCanvas3D::get_selection(), and plater().

Referenced by Slic3r::GUI::MenuFactory::append_menu_item_settings(), Slic3r::GUI::MenuFactory::append_menu_items_flush_options(), Slic3r::GUI::DiffPresetDialog::create_presets_sizer(), Slic3r::GUI::DiffPresetDialog::get_left_preset_name(), Slic3r::GUI::DiffPresetDialog::get_right_preset_name(), and Slic3r::GUI::DiffPresetDialog::update_tree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_selection() [2/2]

std::string Slic3r::GUI::get_selection ( PresetComboBox * preset_combo)
static
1789{
1790 return into_u8(preset_combo->GetString(preset_combo->GetSelection()));
1791}
int GetSelection() const override
Definition ComboBox.cpp:98
wxString GetString(unsigned int n) const override
Definition ComboBox.cpp:320

References ComboBox::GetSelection(), ComboBox::GetString(), and into_u8().

Here is the call graph for this function:

◆ get_single_extruder_mixed_filament_warning_text()

std::string & Slic3r::GUI::get_single_extruder_mixed_filament_warning_text ( )
289 {
290 static std::string single_extruder_mixed_filament_warning_text;
291 return single_extruder_mixed_filament_warning_text;
292}

References get_single_extruder_mixed_filament_warning_text().

Referenced by Slic3r::GUI::GLCanvas3D::_set_warning_notification(), get_single_extruder_mixed_filament_warning_text(), and Slic3r::GUI::GLCanvas3D::reload_scene().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_string_from_enum()

wxString Slic3r::GUI::get_string_from_enum ( const std::string & opt_key,
const DynamicPrintConfig & config,
bool is_infill,
int idx )
34{
35 const ConfigOptionDef& def = config.def()->options.at(opt_key);
36 const std::vector<std::string>& names = def.enum_labels;//ConfigOptionEnum<T>::get_enum_names();
37 int val = 0;
38
39 if (idx >= 0)
40 val = dynamic_cast<const ConfigOptionInts*>(config.option(opt_key))->get_at(idx);
41 else
42 val = config.option(opt_key)->getInt();
43
44 // Each infill doesn't use all list of infill declared in PrintConfig.hpp.
45 // So we should "convert" val to the correct one
46 if (is_infill) {
47 for (auto key_val : *def.enum_keys_map)
48 if (int(key_val.second) == val) {
49 auto it = std::find(def.enum_values.begin(), def.enum_values.end(), key_val.first);
50 if (it == def.enum_values.end())
51 return "";
52 return from_u8(_utf8(names[it - def.enum_values.begin()]));
53 }
54 return _L("Undefined");
55 }
56 if (val < 0 || val >= int(names.size()))
57 return _L("Undefined");
58 return from_u8(_utf8(names[val]));
59}
t_optiondef_map options
Definition Config.hpp:2658

References _L, _utf8, Slic3r::DynamicPrintConfig::def(), Slic3r::ConfigOptionDef::enum_keys_map, Slic3r::ConfigOptionDef::enum_labels, Slic3r::ConfigOptionDef::enum_values, from_u8(), Slic3r::ConfigOption::getInt(), Slic3r::is_infill(), Slic3r::ConfigBase::option(), and Slic3r::ConfigDef::options.

Referenced by get_string_value().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_string_value()

wxString Slic3r::GUI::get_string_value ( const std::string & opt_key,
const DynamicPrintConfig & config )
74{
75 int orig_opt_idx = -1;
76 int opt_idx = -1;
77 int pos = opt_key.find("#");
78 std::string temp_str = opt_key;
79 if (pos > 0) {
80 boost::erase_head(temp_str, pos + 1);
81 orig_opt_idx = std::atoi(temp_str.c_str());
82 }
83 opt_idx = orig_opt_idx >= 0 ? orig_opt_idx : 0;
84 const std::string pure_key = get_pure_opt_key(opt_key);
85 auto option = config.option(pure_key);
86 if (!option) {
87 return _L("N/A");
88 }
89 auto opt_vector = dynamic_cast<const ConfigOptionVectorBase *>(option);
90
91 if ((option->is_scalar() && option->is_nil()) ||
92 (option->is_vector() && opt_vector && opt_idx >= 0 && opt_idx < opt_vector->size() && opt_vector->is_nil(opt_idx)))
93 return _L("N/A");
94
95 wxString out;
96
97 const ConfigOptionDef* opt = config.def()->get(pure_key);
98 bool is_nullable = opt->nullable;
99
100 switch (opt->type) {
101 case coInt:
102 return from_u8((boost::format("%1%") % config.opt_int(pure_key)).str());
103 case coInts: {
104 if (is_nullable) {
105 auto values = config.opt<ConfigOptionIntsNullable>(pure_key);
106 if (opt_idx < values->size())
107 return from_u8((boost::format("%1%") % values->get_at(opt_idx)).str());
108 }
109 else {
110 auto values = config.opt<ConfigOptionInts>(pure_key);
111 if (orig_opt_idx >= 0 && orig_opt_idx < values->size()) {
112 return from_u8((boost::format("%1%") % values->get_at(opt_idx)).str());
113 }
114 else {
115 std::string value_str;
116 for (int i = 0; i < values->size(); i++) {
117 value_str += std::to_string(values->get_at(i));
118 if (i != values->size() - 1) {
119 value_str += ",";
120 }
121 }
122 return from_u8(value_str);
123 }
124 }
125 return _L("Undefined");
126 }
127 case coBool:
128 return config.opt_bool(pure_key) ? "true" : "false";
129 case coBools: {
130 if (is_nullable) {
131 auto values = config.opt<ConfigOptionBoolsNullable>(pure_key);
132 if (opt_idx < values->size())
133 return values->get_at(opt_idx) ? "true" : "false";
134 }
135 else {
136 auto values = config.opt<ConfigOptionBools>(pure_key);
137 if (opt_idx < values->size())
138 return values->get_at(opt_idx) ? "true" : "false";
139 }
140 return _L("Undefined");
141 }
142 case coPercent:
143 return from_u8((boost::format("%1%%%") % int(config.optptr(pure_key)->getFloat())).str());
144 case coPercents: {
145 if (is_nullable) {
146 auto values = config.opt<ConfigOptionPercentsNullable>(pure_key);
147 if (opt_idx < values->size())
148 return from_u8((boost::format("%1%%%") % values->get_at(opt_idx)).str());
149 }
150 else {
151 auto values = config.opt<ConfigOptionPercents>(pure_key);
152 if (opt_idx < values->size())
153 return from_u8((boost::format("%1%%%") % values->get_at(opt_idx)).str());
154 }
155 return _L("Undefined");
156 }
157 case coFloat:
158 return double_to_string(config.opt_float(pure_key));
159 case coFloats: {
160 if (is_nullable) {
161 auto values = config.opt<ConfigOptionFloatsNullable>(pure_key);
162 if (opt_idx < values->size())
163 return double_to_string(values->get_at(opt_idx));
164 }
165 else {
166 auto values = config.opt<ConfigOptionFloats>(pure_key);
167 if (values && opt_idx < values->size())
168 return double_to_string(values->get_at(opt_idx));
169 }
170 return _L("Undefined");
171 }
172 case coString:
173 return from_u8(config.opt_string(pure_key));
174 case coStrings: {
175 const ConfigOptionStrings* strings = config.opt<ConfigOptionStrings>(pure_key);
176 if (strings) {
177 if (pure_key == "compatible_printers" || pure_key == "compatible_prints") {
178 if (strings->empty())
179 return _L("All");
180 for (size_t id = 0; id < strings->size(); id++)
181 out += from_u8(strings->get_at(id)) + "\n";
182 out.RemoveLast(1);
183 return out;
184 }
185 if (!strings->empty() && opt_idx < strings->values.size())
186 return from_u8(strings->get_at(opt_idx));
187 }
188 break;
189 }
190 case coFloatOrPercent: {
191 const ConfigOptionFloatOrPercent* opt = config.opt<ConfigOptionFloatOrPercent>(pure_key);
192 if (opt)
193 out = double_to_string(opt->value) + (opt->percent ? "%" : "");
194 return out;
195 }
196 case coFloatsOrPercents: {
197 const auto* values = static_cast<const ConfigOptionVector<FloatOrPercent>*>(option);
198 // Orca: Preset comparison may request the entire vector instead of an indexed entry.
199 if (orig_opt_idx < 0)
200 return from_u8(option->serialize());
201 if (opt_idx < values->size()) {
202 const FloatOrPercent& value = values->get_at(opt_idx);
203 return double_to_string(value.value) + (value.percent ? "%" : "");
204 }
205 return _L("Undefined");
206 }
207 case coEnum: {
208 return get_string_from_enum(pure_key, config,
209 pure_key == "top_surface_pattern" ||
210 pure_key == "bottom_surface_pattern" ||
211 pure_key == "internal_solid_infill_pattern" ||
212 pure_key == "sparse_infill_pattern" ||
213 pure_key == "ironing_pattern" ||
214 pure_key == "support_ironing_pattern" ||
215 pure_key == "support_pattern" ||
216 pure_key == "support_interface_pattern")
217 ;
218 }
219 case coEnums: {
220 if (!opt_vector || opt_idx >= opt_vector->size())
221 return _L("Undefined");
222 return get_string_from_enum(pure_key, config,
223 pure_key == "top_surface_pattern" ||
224 pure_key == "bottom_surface_pattern" ||
225 pure_key == "internal_solid_infill_pattern" ||
226 pure_key == "sparse_infill_pattern" ||
227 pure_key == "ironing_pattern" ||
228 pure_key == "support_ironing_pattern" ||
229 pure_key == "support_pattern" ||
230 pure_key == "support_interface_pattern"
231 , opt_idx);
232 }
233 case coPoint: {
234 Vec2d val = config.opt<ConfigOptionPoint>(pure_key)->value;
235 return from_u8((boost::format("[%1%]") % ConfigOptionPoint(val).serialize()).str());
236 }
237 case coPoints: {
238 //BBS: add bed_exclude_area
239 if (pure_key == "printable_area" || pure_key == "thumbnails") {
240 ConfigOptionPoints points = *config.option<ConfigOptionPoints>(pure_key);
241 //BuildVolume build_volume = {points.values, 0.};
242 return get_thumbnails_string(points.values);
243 }
244 else if (pure_key == "bed_exclude_area") {
245 return from_u8(config.option<ConfigOptionPoints>(pure_key)->serialize());
246 }
247 else if (pure_key == "head_wrap_detect_zone") {
248 return get_thumbnails_string(config.option<ConfigOptionPoints>(pure_key)->values);
249 }
250 else if (pure_key == "wrapping_exclude_area") {
251 return get_thumbnails_string(config.option<ConfigOptionPoints>(pure_key)->values);
252 }
253 Vec2d val = config.opt<ConfigOptionPoints>(pure_key)->get_at(opt_idx);
254 return from_u8((boost::format("[%1%]") % ConfigOptionPoint(val).serialize()).str());
255 }
256 default:
257 break;
258 }
259 return out;
260}
void serialize(Archive &ar, FacenamesSerializer &t, const std::uint32_t version)
Definition GLGizmoEmboss.cpp:3407
bool & get_at(size_t i)
Definition Config.hpp:1986
virtual double getFloat() const
Definition Config.hpp:295
virtual std::string serialize() const =0
const ConfigOption * optptr(const t_config_option_key &opt_key) const override
Definition Config.cpp:1744
bool opt_bool(const t_config_option_key &opt_key) const
Definition Config.hpp:3072
int & opt_int(const t_config_option_key &opt_key)
Definition Config.hpp:3056
wxString get_string_from_enum(const std::string &opt_key, const DynamicPrintConfig &config, bool is_infill, int idx)
Definition ConfigValueFormatter.cpp:33
wxString get_thumbnails_string(const std::vector< Vec2d > &values)
Definition Field.cpp:135

References _L, Slic3r::coBool, Slic3r::coBools, Slic3r::coEnum, Slic3r::coEnums, Slic3r::coFloat, Slic3r::coFloatOrPercent, Slic3r::coFloats, Slic3r::coFloatsOrPercents, Slic3r::coInt, Slic3r::coInts, Slic3r::coPercent, Slic3r::coPercents, Slic3r::coPoint, Slic3r::coPoints, Slic3r::coString, Slic3r::coStrings, Slic3r::DynamicPrintConfig::def(), double_to_string(), Slic3r::ConfigOptionVector< T >::empty(), from_u8(), Slic3r::ConfigDef::get(), Slic3r::ConfigOptionVector< T >::get_at(), get_pure_opt_key(), get_string_from_enum(), get_thumbnails_string(), Slic3r::ConfigOption::getFloat(), Slic3r::DynamicConfig::opt(), Slic3r::DynamicConfig::opt_bool(), Slic3r::DynamicConfig::opt_float(), Slic3r::DynamicConfig::opt_int(), Slic3r::DynamicConfig::opt_string(), Slic3r::ConfigBase::option(), Slic3r::DynamicConfig::optptr(), Slic3r::FloatOrPercent::percent, serialize(), Slic3r::ConfigOptionPoints::serialize(), Slic3r::ConfigOptionVector< T >::size(), Slic3r::FloatOrPercent::value, and Slic3r::ConfigOptionVector< T >::values.

Referenced by Slic3r::GUI::PublishSettingsDialog::build_option_model(), Slic3r::GUI::DiffPresetDialog::update_tree(), and Slic3r::GUI::UnsavedChangesDialog::update_tree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_system_info()

std::string Slic3r::GUI::get_system_info ( )
2990{
2991 std::stringstream out;
2992
2993 std::string b_start = "";
2994 std::string b_end = "";
2995 std::string line_end = "\n";
2996
2997 out << b_start << "Operating System: " << b_end << wxPlatformInfo::Get().GetOperatingSystemFamilyName() << line_end;
2998 out << b_start << "System Architecture: " << b_end << wxPlatformInfo::Get().GetBitnessName() << line_end;
2999 out << b_start <<
3000#if defined _WIN32
3001 "Windows Version: "
3002#else
3003 // Hopefully some kind of unix / linux.
3004 "System Version: "
3005#endif
3006 << b_end << wxPlatformInfo::Get().GetOperatingSystemDescription() << line_end;
3007 out << b_start << "Total RAM size [MB]: " << b_end << Slic3r::format_memsize_MB(Slic3r::total_physical_memory());
3008
3009 return out.str();
3010}
std::string format_memsize_MB(size_t n)
Definition utils.cpp:1677

References Slic3r::format_memsize_MB(), get_system_info(), and Slic3r::total_physical_memory().

Referenced by get_system_info(), and Slic3r::GUI::GUI_App::on_init_inner().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_text_extent()

void Slic3r::GUI::get_text_extent ( const wxString & msg,
wxCoord & w,
wxCoord & h,
wxFont * font )
171{
172 wxMemoryDC memDC;
173 if (font)
174 memDC.SetFont(*font);
175 memDC.GetTextExtent(msg, &w, &h);
176}

Referenced by find_font().

Here is the caller graph for this function:

◆ get_thumbnail_string()

wxString Slic3r::GUI::get_thumbnail_string ( const Vec2d & value)
130{
131 wxString ret_str = wxString::Format("%.2fx%.2f", value[0], value[1]);
132 return ret_str;
133}

Referenced by Slic3r::GUI::TextCtrl::BUILD(), and Slic3r::GUI::Field::get_value_by_opt_type().

Here is the caller graph for this function:

◆ get_thumbnails_string()

wxString Slic3r::GUI::get_thumbnails_string ( const std::vector< Vec2d > & values)
136{
137 wxString ret_str;
138 for (size_t i = 0; i < values.size(); ++ i) {
139 const Vec2d& el = values[i];
140 ret_str += wxString::Format((i == 0) ? "%ix%i" : ", %ix%i", int(el[0]), int(el[1]));
141 }
142 return ret_str;
143}

Referenced by Slic3r::GUI::TextCtrl::BUILD(), Slic3r::GUI::ConfigOptionsGroup::get_config_value(), Slic3r::GUI::ConfigOptionsGroup::get_config_value2(), get_string_value(), and Slic3r::GUI::Field::get_value_by_opt_type().

Here is the caller graph for this function:

◆ get_transform_string()

std::string Slic3r::GUI::get_transform_string ( int bytes)
inline
106{
107 float ms = (float)bytes / 1024.0f / 1024.0f;
108 float ks = (float)bytes / 1024.0f;
109 char buffer[32];
110 if (ms > 0)
111 ::sprintf(buffer, "%.1fM", ms);
112 else if (ks > 0)
113 ::sprintf(buffer, "%.1fK", ks);
114 else
115 ::sprintf(buffer, "%.1fK", ks);
116 return buffer;
117}

◆ get_tray_ams_and_slot_id()

void Slic3r::GUI::get_tray_ams_and_slot_id ( MachineObject * obj,
int in_tray_id,
int & ams_id,
int & slot_id,
int & tray_id )
232{
233 assert(obj);
234 if (!obj)
235 return;
236
237 if (in_tray_id == VIRTUAL_TRAY_MAIN_ID || in_tray_id == VIRTUAL_TRAY_DEPUTY_ID) {
238 ams_id = in_tray_id;
239 slot_id = 0;
240 tray_id = ams_id;
241 if (!obj->is_enable_np)
242 tray_id = VIRTUAL_TRAY_DEPUTY_ID;
243 } else {
244 ams_id = in_tray_id / 4;
245 slot_id = in_tray_id % 4;
246 tray_id = in_tray_id;
247 }
248}
bool is_enable_np
Definition DeviceManager.hpp:932

References Slic3r::MachineObject::is_enable_np, VIRTUAL_TRAY_DEPUTY_ID, and VIRTUAL_TRAY_MAIN_ID.

Referenced by Slic3r::GUI::CalibrationWizard::cache_preset_info(), Slic3r::GUI::CalibrationPresetPage::get_extruder_id_by_tray_id(), Slic3r::GUI::CalibrationPresetPage::is_filament_in_blacklist(), Slic3r::GUI::FlowRateWizard::on_cali_start(), Slic3r::GUI::MaxVolumetricSpeedWizard::on_cali_start(), and Slic3r::GUI::PressureAdvanceWizard::on_cali_start().

Here is the caller graph for this function:

◆ get_tray_name_by_tray_id()

wxString Slic3r::GUI::get_tray_name_by_tray_id ( int tray_id)
static
96{
97 wxString tray_name;
98 if (tray_id == VIRTUAL_TRAY_MAIN_ID || tray_id == VIRTUAL_TRAY_DEPUTY_ID) {
99 tray_name = _L("Ext");
100 }
101 else {
102 int ams_id = tray_id / 4;
103 int slot_id = tray_id % 4;
104 if (ams_id >= 0 && ams_id < 26) {
105 char prefix = 'A' + ams_id;
106 char suffix = '0' + 1 + slot_id;
107 tray_name = std::string(1, prefix) + std::string(1, suffix);
108 } else if (ams_id >= 128 && ams_id < 153) {
109 char prefix = 'A' + ams_id - 128;
110 tray_name = std::string(1, prefix);
111 }
112 }
113 return tray_name;
114}

References _L, VIRTUAL_TRAY_DEPUTY_ID, and VIRTUAL_TRAY_MAIN_ID.

Referenced by Slic3r::GUI::CalibrationFlowX1SavePage::sync_cali_result(), Slic3r::GUI::CaliPASaveAutoPanel::sync_cali_result(), and Slic3r::GUI::CaliPASaveAutoPanel::sync_cali_result_for_multi_extruder().

Here is the caller graph for this function:

◆ get_type()

ParamType Slic3r::GUI::get_type ( const std::string & opt_key,
const ConfigOptionDef & opt_def )
static
174{
175 return opt_def.is_scalar() ? ParamType::Scalar : ParamType::Vector;
176}
bool is_scalar() const
Definition Config.hpp:2357
@ Vector
Definition EditGCodeDialog.hpp:89
@ Scalar
Definition EditGCodeDialog.hpp:88

References Slic3r::ConfigOptionDef::is_scalar(), Scalar, and Vector.

Referenced by Slic3r::GUI::EditGCodeDialog::init_params_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_unique_id()

std::string Slic3r::GUI::get_unique_id ( )
static
329{
330 std::vector<unsigned char> unique;
331
332#ifdef _WIN32
333 // On Windows, get the MAC address of a network adaptor (preferably Ethernet
334 // or IEEE 802.11 wireless
335
336 DWORD dwBufLen = sizeof(IP_ADAPTER_INFO);
337 PIP_ADAPTER_INFO AdapterInfo = (PIP_ADAPTER_INFO)malloc(dwBufLen);
338
339 if (GetAdaptersInfo(AdapterInfo, &dwBufLen) == ERROR_BUFFER_OVERFLOW) {
340 free(AdapterInfo);
341 AdapterInfo = (IP_ADAPTER_INFO*)malloc(dwBufLen);
342 }
343 if (GetAdaptersInfo(AdapterInfo, &dwBufLen) == NO_ERROR) {
344 const IP_ADAPTER_INFO* pAdapterInfo = AdapterInfo;
345 std::vector<std::vector<unsigned char>> macs;
346 bool ethernet_seen = false;
347 while (pAdapterInfo) {
348 macs.emplace_back();
349 for (unsigned char i = 0; i < pAdapterInfo->AddressLength; ++i)
350 macs.back().emplace_back(pAdapterInfo->Address[i]);
351 // Prefer Ethernet and IEEE 802.11 wireless
352 if (! ethernet_seen) {
353 if ((pAdapterInfo->Type == MIB_IF_TYPE_ETHERNET && (ethernet_seen = true))
354 || pAdapterInfo->Type == IF_TYPE_IEEE80211)
355 std::swap(macs.front(), macs.back());
356 }
357 pAdapterInfo = pAdapterInfo->Next;
358 }
359 if (! macs.empty())
360 unique = macs.front();
361 }
362 free(AdapterInfo);
363#elif __APPLE__
364 constexpr int buf_size = 100;
365 char buf[buf_size] = "";
366 memset(&buf, 0, sizeof(buf));
367 io_registry_entry_t ioRegistryRoot = IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/");
368 if (ioRegistryRoot != MACH_PORT_NULL) {
369 CFStringRef uuidCf = (CFStringRef)IORegistryEntryCreateCFProperty(ioRegistryRoot, CFSTR(kIOPlatformUUIDKey), kCFAllocatorDefault, 0);
370 IOObjectRelease(ioRegistryRoot);
371 CFStringGetCString(uuidCf, buf, buf_size, kCFStringEncodingMacRoman);
372 CFRelease(uuidCf);
373 }
374 // Now convert the string to std::vector<unsigned char>.
375 for (char* c = buf; *c != 0; ++c)
376 unique.emplace_back((unsigned char)(*c));
377#else // Linux/BSD
378 constexpr size_t max_len = 100;
379 char cline[max_len] = "";
380 FILE* fp = popen("cat /etc/machine-id", "r");
381 if (fp != NULL) {
382 // Maybe the only way to silence -Wunused-result on gcc...
383 // cline is simply not modified on failure, who cares.
384 [[maybe_unused]]auto dummy = fgets(cline, max_len, fp);
385 pclose(fp);
386 }
387 // Now convert the string to std::vector<unsigned char>.
388 for (char* c = cline; *c != 0; ++c)
389 unique.emplace_back((unsigned char)(*c));
390#endif
391
392 // In case that we did not manage to get the unique info, just return an empty
393 // string, so it is easily detectable and not masked by the hashing.
394 if (unique.empty())
395 return "";
396
397 // We should have a unique vector<unsigned char>. Append a long prime to be
398 // absolutely safe against unhashing.
399 uint64_t prime = 1171432692373;
400 size_t beg = unique.size();
401 unique.resize(beg + 8);
402 memcpy(&unique[beg], &prime, 8);
403
404 // Compute an MD5 hash and convert to std::string.
405 using boost::uuids::detail::md5;
406 md5 hash;
407 md5::digest_type digest;
408 hash.process_bytes(unique.data(), unique.size());
409 hash.get_digest(digest);
410 const unsigned char* charDigest = reinterpret_cast<const unsigned char*>(&digest);
411 std::string result;
412 boost::algorithm::hex(charDigest, charDigest + sizeof(md5::digest_type), std::back_inserter(result));
413 return result;
414}

Referenced by generate_system_info_json().

Here is the caller graph for this function:

◆ get_utf8_seq_length() [1/2]

int Slic3r::GUI::get_utf8_seq_length ( const char * seq,
size_t size )
static
643{
644 int length = 0;
645 unsigned char c = seq[0];
646 if (c < 0x80) { // 0x00-0x7F
647 // is ASCII letter
648 length++;
649 }
650 // Bytes 0x80 to 0xBD are trailer bytes in a multibyte sequence.
651 // pos is in the middle of a utf-8 sequence. Add the utf-8 trailer bytes.
652 else if (c < 0xC0) { // 0x80-0xBF
653 length++;
654 while (length < size) {
655 c = seq[length];
656 if (c < 0x80 || c >= 0xC0) {
657 break; // prevent overrun
658 }
659 length++; // add a utf-8 trailer byte
660 }
661 }
662 // Bytes 0xC0 to 0xFD are header bytes in a multibyte sequence.
663 // The number of one bits above the topmost zero bit indicates the number of bytes (including this one) in the whole sequence.
664 else if (c < 0xE0) { // 0xC0-0xDF
665 // add a utf-8 sequence (2 bytes)
666 if (2 > size) {
667 return size; // prevent overrun
668 }
669 length += 2;
670 }
671 else if (c < 0xF0) { // 0xE0-0xEF
672 // add a utf-8 sequence (3 bytes)
673 if (3 > size) {
674 return size; // prevent overrun
675 }
676 length += 3;
677 }
678 else if (c < 0xF8) { // 0xF0-0xF7
679 // add a utf-8 sequence (4 bytes)
680 if (4 > size) {
681 return size; // prevent overrun
682 }
683 length += 4;
684 }
685 else if (c < 0xFC) { // 0xF8-0xFB
686 // add a utf-8 sequence (5 bytes)
687 if (5 > size) {
688 return size; // prevent overrun
689 }
690 length += 5;
691 }
692 else if (c < 0xFE) { // 0xFC-0xFD
693 // add a utf-8 sequence (6 bytes)
694 if (6 > size) {
695 return size; // prevent overrun
696 }
697 length += 6;
698 }
699 else { // 0xFE-0xFF
700 // not a utf-8 sequence
701 length++;
702 }
703 return length;
704}

References Slic3r::length().

Referenced by Slic3r::GUI::NotificationManager::HintNotification::count_lines(), and get_utf8_seq_length().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_utf8_seq_length() [2/2]

int Slic3r::GUI::get_utf8_seq_length ( const std::string & text,
size_t pos )
static
707{
708 assert(pos < text.size());
709 return get_utf8_seq_length(text.c_str() + pos, text.size() - pos);
710}
static int get_utf8_seq_length(const char *seq, size_t size)
Definition HintNotification.cpp:642

References get_utf8_seq_length().

Here is the call graph for this function:

◆ get_vendor_name() [1/2]

std::string Slic3r::GUI::get_vendor_name ( std::string & preset_name)
static
462{
463 if (preset_name.empty()) return "";
464 std::string vendor_name = preset_name.substr(preset_name.find_first_not_of(' ')); //remove the name prefix space
465 size_t index_at = vendor_name.find(" ");
466 if (std::string::npos == index_at) {
467 return vendor_name;
468 } else {
469 vendor_name = vendor_name.substr(0, index_at);
470 return vendor_name;
471 }
472}

Referenced by Slic3r::GUI::ExportConfigsDialog::data_init(), and Slic3r::GUI::ExportPresetBundleDialog::InitExportData().

Here is the caller graph for this function:

◆ get_vendor_name() [2/2]

std::string Slic3r::GUI::get_vendor_name ( std::string & preset_name)
static
129{
130 if (preset_name.empty())
131 return "";
132 std::string vendor_name = preset_name.substr(preset_name.find_first_not_of(' ')); // remove the name prefix space
133 size_t index_at = vendor_name.find(" ");
134 if (std::string::npos == index_at) {
135 return vendor_name;
136 } else {
137 vendor_name = vendor_name.substr(0, index_at);
138 return vendor_name;
139 }
140}

◆ get_version()

Semver Slic3r::GUI::get_version ( const std::string & str,
const std::regex & regexp )
6282 {
6283 std::smatch match;
6284 if (std::regex_match(str, match, regexp)) {
6285 std::string version_cleaned = match[0];
6286 const boost::optional<Semver> version = Semver::parse(version_cleaned);
6287 if (version.has_value()) {
6288 return *version;
6289 }
6290 }
6291 return Semver::invalid();
6292}
static const Semver invalid()
Definition Semver.hpp:81
Definition 3DPrinterOS.hpp:13

References get_version(), Slic3r::Semver::invalid(), and Slic3r::Semver::parse().

Referenced by Slic3r::GUI::GUI_App::check_new_version_sf(), generate_system_info_json(), and get_version().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_view_type_string() [1/2]

wxString Slic3r::GUI::get_view_type_string ( Camera::ViewAngleType type)
24145 {
24146 switch (type) {
24147 case Slic3r::GUI::Camera::ViewAngleType::Iso: return _L("isometric");
24148 case Slic3r::GUI::Camera::ViewAngleType::Top_Front: return _L("top_front");
24149 case Slic3r::GUI::Camera::ViewAngleType::Left: return _L("left");
24150 case Slic3r::GUI::Camera::ViewAngleType::Right: return _L("right");
24151 case Slic3r::GUI::Camera::ViewAngleType::Top: return _L("top");
24152 case Slic3r::GUI::Camera::ViewAngleType::Bottom: return _L("bottom");
24153 case Slic3r::GUI::Camera::ViewAngleType::Front: return _L("front");
24154 case Slic3r::GUI::Camera::ViewAngleType::Rear: return _L("rear");
24155 default: return "";
24156 }
24157}
@ Bottom
Definition Camera.hpp:49
@ Iso
Definition Camera.hpp:44
@ Front
Definition Camera.hpp:50
@ Right
Definition Camera.hpp:47
@ Left
Definition Camera.hpp:46
@ Top
Definition Camera.hpp:48
@ Rear
Definition Camera.hpp:51
@ Top_Front
Definition Camera.hpp:45

References _L, Slic3r::GUI::Camera::Bottom, Slic3r::GUI::Camera::Front, Slic3r::GUI::Camera::Iso, Slic3r::GUI::Camera::Left, Slic3r::GUI::Camera::Rear, Slic3r::GUI::Camera::Right, Slic3r::GUI::Camera::Top, and Slic3r::GUI::Camera::Top_Front.

◆ get_view_type_string() [2/2]

std::string Slic3r::GUI::get_view_type_string ( libvgcode::EViewType view_type)
static
142{
143 if (view_type == libvgcode::EViewType::Summary)
144 return _u8L("Summary");
145 else if (view_type == libvgcode::EViewType::FeatureType)
146 return _u8L("Line Type");
147 else if (view_type == libvgcode::EViewType::Height)
148 return _u8L("Layer Height");
149 else if (view_type == libvgcode::EViewType::Width)
150 return _u8L("Line Width");
151 else if (view_type == libvgcode::EViewType::Speed)
152 return _u8L("Speed");
153 else if (view_type == libvgcode::EViewType::ActualSpeed)
154 return _u8L("Actual Speed");
155 else if (view_type == libvgcode::EViewType::Acceleration)
156 return _u8L("Acceleration");
157 else if (view_type == libvgcode::EViewType::Jerk)
158 return _u8L("Jerk");
159 else if (view_type == libvgcode::EViewType::FanSpeed)
160 return _u8L("Fan Speed");
161 else if (view_type == libvgcode::EViewType::Temperature)
162 return _u8L("Temperature");
163 else if (view_type == libvgcode::EViewType::VolumetricFlowRate)
164 return _u8L("Flow");
166 return _u8L("Actual Flow");
167 else if (view_type == libvgcode::EViewType::Tool)
168 return _u8L("Tool");
169 else if (view_type == libvgcode::EViewType::ColorPrint)
170 return _u8L("Filament");
171 else if (view_type == libvgcode::EViewType::LayerTimeLinear)
172 return _u8L("Layer Time");
173 else if (view_type == libvgcode::EViewType::LayerTimeLogarithmic)
174 return _u8L("Layer Time (log)");
175// ORCA: Add Pressure Advance visualization support
176 else if (view_type == libvgcode::EViewType::PressureAdvance)
177 return _u8L("Pressure Advance");
178 return "";
179}
@ ColorPrint
Definition Types.hpp:94
@ Summary
Definition Types.hpp:92
@ Width
Definition Types.hpp:98
@ Acceleration
Definition Types.hpp:108
@ Speed
Definition Types.hpp:95
@ ActualVolumetricFlowRate
Definition Types.hpp:100
@ LayerTimeLogarithmic
Definition Types.hpp:102
@ ActualSpeed
Definition Types.hpp:96
@ Jerk
Definition Types.hpp:110
@ LayerTimeLinear
Definition Types.hpp:101
@ FeatureType
Definition Types.hpp:93
@ FanSpeed
Definition Types.hpp:103
@ VolumetricFlowRate
Definition Types.hpp:99
@ Height
Definition Types.hpp:97

References _u8L, libvgcode::Acceleration, libvgcode::ActualSpeed, libvgcode::ActualVolumetricFlowRate, libvgcode::ColorPrint, libvgcode::FanSpeed, libvgcode::FeatureType, libvgcode::Height, libvgcode::Jerk, libvgcode::LayerTimeLinear, libvgcode::LayerTimeLogarithmic, libvgcode::PressureAdvance, libvgcode::Speed, libvgcode::Summary, libvgcode::Temperature, libvgcode::Tool, libvgcode::VolumetricFlowRate, and libvgcode::Width.

Referenced by Slic3r::GUI::GCodeViewer::default_view_type_choices(), get_all_camera_view_type(), and Slic3r::GUI::GCodeViewer::update_by_mode().

Here is the caller graph for this function:

◆ get_volume()

ModelVolume * Slic3r::GUI::get_volume ( const ObjectID & volume_id,
const Selection & selection )
3445 {
3446 const ModelObjectPtrs &objects = selection.get_model()->objects;
3447 for (const ModelObject *object : objects) {
3448 for (ModelVolume *volume : object->volumes) {
3449 if (volume->id() == volume_id)
3450 return volume;
3451 }
3452 }
3453 return nullptr;
3454}

References Slic3r::GUI::Selection::get_model(), Slic3r::ObjectBase::id(), and Slic3r::Model::objects.

Here is the call graph for this function:

◆ get_warning_icon_name()

std::string Slic3r::GUI::get_warning_icon_name ( const TriangleMeshStats & stats)
static
601{
602 return stats.manifold() ? (stats.repaired() ? "obj_warning" : "") : "obj_warning";
603}
bool manifold() const
Definition TriangleMesh.hpp:89
bool repaired() const
Definition TriangleMesh.hpp:90

References Slic3r::TriangleMeshStats::manifold(), and Slic3r::TriangleMeshStats::repaired().

Referenced by Slic3r::GUI::ObjectList::add_object_to_list(), Slic3r::GUI::ObjectList::add_volumes_to_object_in_list(), Slic3r::GUI::ObjectList::del_subobject_item(), Slic3r::GUI::ObjectList::delete_from_model_and_list(), Slic3r::GUI::ObjectList::get_mesh_errors_info(), Slic3r::GUI::ObjectList::split(), and Slic3r::GUI::ObjectList::update_item_error_icon().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_wipe_tower()

WipeTower Slic3r::GUI::get_wipe_tower ( const Plater & plater,
int plate_idx )
static
157{
158 return WipeTower{plater.canvas3D()->get_wipe_tower_info(plate_idx)};
159}
Definition ArrangeJob.cpp:106

References plater().

Referenced by get_wipe_tower_arrangepoly(), Slic3r::GUI::ArrangeJob::prepare_partplate(), and Slic3r::GUI::ArrangeJob::prepare_wipe_tower().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_wipe_tower_arrangepoly()

std::optional< arrangement::ArrangePolygon > Slic3r::GUI::get_wipe_tower_arrangepoly ( const Plater & plater)
969{
970 int id = plater.canvas3D()->fff_print()->get_plate_index();
971 if (auto wti = get_wipe_tower(plater, id))
972 return get_wipetower_arrange_poly(&wti);
973
974 return {};
975}
static WipeTower get_wipe_tower(const Plater &plater, int plate_idx)
Definition ArrangeJob.cpp:156
arrangement::ArrangePolygon get_wipetower_arrange_poly(WipeTower *tower)
Definition ArrangeJob.cpp:161

References get_wipe_tower(), get_wipetower_arrange_poly(), and plater().

Referenced by Slic3r::GUI::Plater::find_new_position(), and Slic3r::GUI::FillBedJob::prepare().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_wipetower_arrange_poly()

arrangement::ArrangePolygon Slic3r::GUI::get_wipetower_arrange_poly ( WipeTower * tower)
162{
164 ap.bed_idx = 0;
165 ap.setter = NULL; // do not move wipe tower
166 return ap;
167}
ArrangePolygon get_arrange_polygon() const
Definition ArrangeJob.cpp:122
arrangement::ArrangePolygon ArrangePolygon
Definition ArrangeJob.cpp:51
std::function< void(const ArrangePolygon &)> setter
Optional setter function which can store arbitrary data in its closure.
Definition Arrange.hpp:103

References Slic3r::arrangement::ArrangePolygon::bed_idx, Slic3r::GUI::WipeTower::get_arrange_polygon(), and Slic3r::arrangement::ArrangePolygon::setter.

Referenced by get_wipe_tower_arrangepoly(), Slic3r::GUI::ArrangeJob::prepare_partplate(), and Slic3r::GUI::ArrangeJob::prepare_wipe_tower().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_wraped_wxString()

wxString Slic3r::GUI::get_wraped_wxString ( const wxString & in,
size_t line_len )
569{
570 wxString out;
571
572 for (size_t i = 0; i < in.size();) {
573 // Overwrite the character (space or newline) starting at ibreak?
574 bool overwrite = false;
575 // UTF8 representation of wxString.
576 // Where to break the line, index of character at the start of a UTF-8 sequence.
577 size_t ibreak = size_t(-1);
578 // Overwrite the character at ibreak (it is a whitespace) or not?
579 size_t j = i;
580 for (size_t cnt = 0; j < in.size();) {
581 if (bool newline = in[j] == '\n'; in[j] == ' ' || in[j] == '\t' || newline) {
582 // Overwrite the whitespace.
583 ibreak = j ++;
584 overwrite = true;
585 if (newline)
586 break;
587 } else if (in[j] == '/'
588#ifdef _WIN32
589 || in[j] == '\\'
590#endif // _WIN32
591 ) {
592 // Insert after the slash.
593 ibreak = ++ j;
594 overwrite = false;
595 } else
596 j += get_utf8_sequence_length(in.c_str() + j, in.size() - j);
597 if (++ cnt == line_len) {
598 if (ibreak == size_t(-1)) {
599 ibreak = j;
600 overwrite = false;
601 }
602 break;
603 }
604 }
605 if (j == in.size()) {
606 out.append(in.begin() + i, in.end());
607 break;
608 }
609 assert(ibreak != size_t(-1));
610 out.append(in.begin() + i, in.begin() + ibreak);
611 out.append('\n');
612 i = ibreak;
613 if (overwrite)
614 ++ i;
615 }
616
617 return out;
618}
size_t get_utf8_sequence_length(const std::string &text, size_t pos)
Definition utils.cpp:1311

References Slic3r::get_utf8_sequence_length().

Referenced by Slic3r::GUI::EditGCodeDialog::selection_changed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getExtruderNozzleCount()

int Slic3r::GUI::getExtruderNozzleCount ( PresetBundle * preset_bundle,
int extruder_id,
NozzleVolumeType volume_type )
73{
74 if (!preset_bundle)
75 return 0;
76 auto *opt = preset_bundle->printers.get_edited_preset().config.option<ConfigOptionStrings>("extruder_nozzle_stats");
77 if (!opt)
78 return 0;
79 const auto stats = get_extruder_nozzle_stats(opt->values);
80 if (extruder_id < 0 || extruder_id >= (int) stats.size())
81 return 0;
82 const auto it = stats[extruder_id].find(volume_type);
83 return it == stats[extruder_id].end() ? 0 : it->second;
84}
std::vector< std::map< NozzleVolumeType, int > > get_extruder_nozzle_stats(const std::vector< std::string > &strs)
Definition PrintConfig.cpp:940

References Slic3r::Preset::config, Slic3r::PresetCollection::get_edited_preset(), Slic3r::get_extruder_nozzle_stats(), Slic3r::ConfigBase::option(), and Slic3r::PresetBundle::printers.

Referenced by Slic3r::GUI::Plater::priv::check_ams_status_impl(), manuallySetNozzleCount(), Slic3r::GUI::FilamentMapManualPanel::OnTimer(), Slic3r::GUI::FilamentMapManualPanel::UpdateNozzleCountDisplay(), and updateNozzleCountDisplay().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getExtruderNozzleCountTotal()

int Slic3r::GUI::getExtruderNozzleCountTotal ( PresetBundle * preset_bundle,
int extruder_id )
87{
88 if (!preset_bundle)
89 return 0;
90 auto *opt = preset_bundle->printers.get_edited_preset().config.option<ConfigOptionStrings>("extruder_nozzle_stats");
91 if (!opt)
92 return 0;
93 const auto stats = get_extruder_nozzle_stats(opt->values);
94 if (extruder_id < 0 || extruder_id >= (int) stats.size())
95 return 0;
96 int sum = 0;
97 for (const auto &kv : stats[extruder_id])
98 sum += kv.second;
99 return sum;
100}

References Slic3r::Preset::config, Slic3r::PresetCollection::get_edited_preset(), Slic3r::get_extruder_nozzle_stats(), Slic3r::ConfigBase::option(), and Slic3r::PresetBundle::printers.

Referenced by manuallySetNozzleCount(), onNozzleVolumeTypeSwitch(), Slic3r::GUI::FilamentMapManualPanel::UpdateNozzleCountDisplay(), and updateNozzleCountDisplay().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetIntersectionOfRayAndPlane()

Vec3d Slic3r::GUI::GetIntersectionOfRayAndPlane ( Vec3d ray_position,
Vec3d ray_dir,
Vec3d plane_position,
Vec3d plane_normal )
46{
47 double t = (plane_normal.dot(plane_position) - plane_normal.dot(ray_position)) / (plane_normal.dot(ray_dir));
48 Vec3d intersection = ray_position + t * ray_dir;
49 return intersection;
50}
Slic3r::Polygons intersection(const Slic3r::Polygon &subject, const Slic3r::Polygon &clip, ApplySafetyOffset do_safety_offset)
Definition ClipperUtils.cpp:769

References Slic3r::intersection().

Referenced by Slic3r::GUI::GLGizmoScale3D::calc_ratio().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNumberFromUser()

long Slic3r::GUI::GetNumberFromUser ( const wxString & msg,
const wxString & prompt,
const wxString & title,
long value,
long min,
long max,
wxWindow * parent )
static
19370{
19371#ifdef _WIN32
19372 wxNumberEntryDialog dialog(parent, msg, prompt, title, value, min, max, wxDefaultPosition);
19373 wxGetApp().UpdateDlgDarkUI(&dialog);
19374 if (dialog.ShowModal() == wxID_OK)
19375 return dialog.GetValue();
19376
19377 return -1;
19378#else
19379 return wxGetNumberFromUser(msg, prompt, title, value, min, max, parent);
19380#endif
19381}

Referenced by Slic3r::GUI::Plater::set_number_of_copies().

Here is the caller graph for this function:

◆ gl_get_string_safe()

std::string Slic3r::GUI::gl_get_string_safe ( GLenum param,
const std::string & default_value )
53{
54 const char* value = (const char*)::glGetString(param);
55 return std::string((value != nullptr) ? value : default_value);
56}
#define glGetString
Definition gl.h:3987

References glGetString.

Referenced by Slic3r::GUI::OpenGLManager::GLInfo::detect(), generate_system_info_json(), and Slic3r::GUI::OpenGLManager::GLInfo::to_string().

Here is the caller graph for this function:

◆ GUI_Run()

int Slic3r::GUI::GUI_Run ( GUI_InitParams & params)
35{
36#if __APPLE__
37 // On OSX, we use boost::process::spawn() to launch new instances of PrusaSlicer from another PrusaSlicer.
38 // boost::process::spawn() sets SIGCHLD to SIGIGN for the child process, thus if a child PrusaSlicer spawns another
39 // subprocess and the subrocess dies, the child PrusaSlicer will not receive information on end of subprocess
40 // (posix waitpid() call will always fail).
41 // https://jmmv.dev/2008/10/boostprocess-and-sigchld.html
42 // The child instance of PrusaSlicer has to reset SIGCHLD to its default, so that posix waitpid() and similar continue to work.
43 // See GH issue #5507
44 signal(SIGCHLD, SIG_DFL);
45#endif // __APPLE__
46
47 //BBS: remove the try-catch and let exception goto above
48 try {
49 //GUI::GUI_App* gui = new GUI::GUI_App(params.start_as_gcodeviewer ? GUI::GUI_App::EAppMode::GCodeViewer : GUI::GUI_App::EAppMode::Editor);
50 GUI::GUI_App* gui = new GUI::GUI_App();
51 //if (gui->get_app_mode() != GUI::GUI_App::EAppMode::GCodeViewer) {
52 // G-code viewer is currently not performing instance check, a new G-code viewer is started every time.
53 bool gui_single_instance_setting = gui->app_config->get("app", "single_instance") == "true";
54 if (Slic3r::instance_check(params.argc, params.argv, gui_single_instance_setting)) {
55 //TODO: do we have delete gui and other stuff?
56 return -1;
57 }
58 //}
59
60// gui->autosave = m_config.opt_string("autosave");
61 GUI::GUI_App::SetInstance(gui);
62 gui->init_params = &params;
63
64 if (params.argc > 1) {
65 // STUDIO-273 wxWidgets report error when opening some files with specific names
66 // wxWidgets does not handle parameters, so intercept parameters here, only keep the app name
67 int argc = 1;
68 std::vector<char *> argv;
69 argv.push_back(params.argv[0]);
70 return wxEntry(argc, argv.data());
71 } else {
72 return wxEntry(params.argc, params.argv);
73 }
74 } catch (const Slic3r::Exception &ex) {
75 BOOST_LOG_TRIVIAL(error) << ex.what() << std::endl;
76 wxMessageBox(boost::nowide::widen(ex.what()), _L("Orca Slicer GUI initialization failed"), wxICON_STOP);
77 } catch (const std::exception &ex) {
78 BOOST_LOG_TRIVIAL(error) << ex.what() << std::endl;
79 wxMessageBox(format_wxstr(_L("Fatal error, exception: %1%"), ex.what()), _L("Orca Slicer GUI initialization failed"), wxICON_STOP);
80 }
81 // error
82 return 1;
83}
bool get(const std::string &section, const std::string &key, std::string &value) const
Definition AppConfig.hpp:147
Definition GUI_App.hpp:255
GUI_InitParams * init_params
Definition GUI_App.hpp:785
AppConfig * app_config
Definition GUI_App.hpp:787
int argc
Definition GUI_Init.hpp:21
char ** argv
Definition GUI_Init.hpp:22
bool instance_check(int argc, char **argv, bool app_config_single_instance)
Definition InstanceCheck.cpp:317

References _L, Slic3r::GUI::GUI_App::app_config, Slic3r::GUI::GUI_InitParams::argc, Slic3r::GUI::GUI_InitParams::argv, format_wxstr(), Slic3r::AppConfig::get(), Slic3r::GUI::GUI_App::init_params, and Slic3r::instance_check().

Referenced by Slic3r::CLI::run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ guide_strings()

json Slic3r::GUI::guide_strings ( )
static
93{
94 return {
95 {"loading", _u8L("Loading…")},
96 // TRN Sidebar entry of the printer selection page for the group of custom (user-defined) printers.
97 {"custom_vendor", _u8L_CONTEXT("Custom", "Printer vendor")},
98 {"welcome", _u8L("Welcome to Orca Slicer")},
99 {"setup_intro", _u8L("Orca Slicer will be set up in several steps. Let's start!")},
100 {"get_started", _u8L("Get Started")},
101 {"login_region", _u8L("Please select your login region")},
102 {"asia_pacific", _u8L("Asia-Pacific")},
103 {"china", _u8L("China")},
104 {"europe", _u8L("Europe")},
105 {"north_america", _u8L("North America")},
106 {"others", _u8L_CONTEXT("Others", "Region")},
107 {"back", _u8L_CONTEXT("Back", "Navigation")},
108 {"next", _u8L("Next")},
109 {"finish", _u8L("Finish")},
110 {"confirm", _u8L("Confirm")},
111 {"cancel", _u8L("Cancel")},
112 {"ok", _u8L("OK")},
113 {"yes", _u8L("Yes")},
114 {"no", _u8L("No")},
115 {"error", _u8L("Error")},
116 {"information", _u8L("Information")},
117 {"printer_selection", _u8L("Printer Selection")},
118 {"vendors", _u8L("Vendors")},
119 {"search", _u8L("Search")},
120 {"custom_printer", _u8L("Custom Printer")},
121 {"nozzle", _u8L("Nozzle")},
122 {"create", _u8L("Create")},
123 {"check_new_printers", _u8L("Check for new printers")},
124 {"printer_required", _u8L("At least one printer must be selected.")},
125 {"new_printers_found", _u8L("New printers found")},
126 {"new_vendors_installed", _u8L("New printer vendors installed: %s")},
127 {"vendors_declined", _u8L("New printer vendors were found, but installation was cancelled.")},
128 {"no_new_printers", _u8L("No new printers found.")},
129 {"filament_selection", _u8L("Filament Selection")},
130 {"system_filaments", _u8L("System Filaments")},
131 {"custom_filaments", _u8L("Custom Filaments")},
132 {"create_new", _u8L("Create New")},
133 {"printer", _u8L("Printer")},
134 {"filament_type", _u8L("Filament type")},
135 {"vendor", _u8L("Vendor")},
136 {"all", _u8L("All")},
137 {"no_items", _u8L("No items")},
138 {"filter_items", _u8L("Filter items")},
139 {"checked", _u8L("Checked")},
140 {"unchecked", _u8L("Unchecked")},
141 {"select_filtered", _u8L("Select filtered")},
142 {"select_visible", _u8L("Select visible")},
143 {"clear_all", _u8L("Clear all")},
144 {"filament_required", _u8L("At least one filament must be selected.")},
145 {"use_default_filament", _u8L("Do you want to use the default filament?")},
146 {"stealth_mode", _u8L("Stealth Mode")},
147 {"stealth_mode_desc", _u8L("This disables all cloud features, including Orca Cloud profile syncing. Users who prefer to work entirely offline can enable this option.")},
148 {"stealth_mode_note", _u8L("Note: When Stealth Mode is enabled, your user profiles will not be backed up to Orca Cloud.")},
149 {"enable_stealth_mode", _u8L("Enable Stealth Mode.")},
150 {"proprietary_plugins", _u8L("Proprietary Plugins")},
151 {"proprietary_plugins_desc", _u8L("Some printer vendors require proprietary plugins for communication with their printers. Please select the corresponding plugin if you use such printers.")},
152 {"proprietary_plugins_risk", _u8L("Please be aware that these plugins are not developed or maintained by OrcaSlicer. They should be used at your own discretion and risk.")},
153 {"install_bambu_plugin", _u8L("Install Bambu Network plug-in")},
154 };
155}
#define _u8L_CONTEXT(s, ctx)
Definition I18N.hpp:16

References _u8L, and _u8L_CONTEXT.

Referenced by Slic3r::GUI::GuideFrame::GuideFrame().

Here is the caller graph for this function:

◆ has_cjk()

bool Slic3r::GUI::has_cjk ( const std::string & text)
163{
164 for (size_t i = 0; i + 2 < text.size(); ++i) {
165 unsigned char c1 = text[i];
166 unsigned char c2 = text[i + 1];
167 unsigned char c3 = text[i + 2];
168
169 if ((c1 & 0xF0) == 0xE0 && (c2 & 0xC0) == 0x80 && (c3 & 0xC0) == 0x80) {
170 int codepoint = ((c1 & 0x0F) << 12 | ((c2 & 0x3F) << 6) | (c3 & 0x3F));
171 if (codepoint >= 0x3000 && codepoint <= 0x9FFF) { return true; }
172 }
173 }
174 return false;
175}

Referenced by Slic3r::GUI::DailyTipsDataRenderer::render_text().

Here is the caller graph for this function:

◆ has_filaments()

bool Slic3r::GUI::has_filaments ( const std::vector< std::string > & model_filaments)
10472 {
10473 auto &filament_presets = Slic3r::GUI::wxGetApp().preset_bundle->filament_presets;
10474 if (!Slic3r::GUI::wxGetApp().plater()) return false;
10475 auto model_objects = Slic3r::GUI::wxGetApp().plater()->model().objects;
10476 const Slic3r::DynamicPrintConfig &config = wxGetApp().preset_bundle->full_config();
10477 Model::setExtruderParams(config, filament_presets.size());
10478
10479 auto get_filament_name = [](int id) { return Model::extruderParamsMap.find(id) != Model::extruderParamsMap.end() ? Model::extruderParamsMap.at(id).materialName : "PLA"; };
10480 for (const ModelObject *mo : model_objects) {
10481 for (auto vol : mo->volumes) {
10482 auto ve = vol->get_extruders();
10483 for (auto id : ve) {
10484 auto name = get_filament_name(id);
10485 if (find(model_filaments.begin(), model_filaments.end(), name) != model_filaments.end()) return true;
10486 }
10487 }
10488 }
10489 return false;
10490}
static std::map< size_t, ExtruderParams > extruderParamsMap
Definition Model.hpp:1706
static void setExtruderParams(const DynamicPrintConfig &config, int extruders_count)
Definition Model.cpp:3267
static std::string get_filament_name(std::string &preset_name)
Definition CreatePresetsDialog.cpp:427

References Slic3r::Model::extruderParamsMap, get_filament_name(), has_filaments(), plater(), Slic3r::Model::setExtruderParams(), and Slic3r::DynamicConfig::size().

Referenced by has_filaments(), is_support_filament(), Slic3r::GUI::Tab::on_value_change(), and wxDECLARE_EVENT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_importable_texture()

bool Slic3r::GUI::has_importable_texture ( const Slic3r::TexturedMesh & textured_mesh)
static
316{
317 if (textured_mesh.vertices.empty() || textured_mesh.indices.empty())
318 return false;
319
320 if (!textured_mesh.precomputed_face_colors.empty())
321 return true;
322
323 return std::any_of(textured_mesh.textures.begin(), textured_mesh.textures.end(),
324 [](const Slic3r::TextureImage& texture) { return !texture.data.empty(); });
325}
Definition TexturePainting.hpp:17
std::vector< std::array< int, 3 > > indices
Definition TexturePainting.hpp:26
std::vector< TextureImage > textures
Definition TexturePainting.hpp:28
std::vector< std::array< float, 3 > > vertices
Definition TexturePainting.hpp:25
std::vector< std::array< std::size_t, 3 > > precomputed_face_colors
Definition TexturePainting.hpp:46

References Slic3r::TexturedMesh::indices, Slic3r::TexturedMesh::precomputed_face_colors, Slic3r::TexturedMesh::textures, and Slic3r::TexturedMesh::vertices.

Referenced by Slic3r::GUI::Plater::priv::load_files(), and Slic3r::GUI::Plater::priv::run_textured_mesh_import_dialog().

Here is the caller graph for this function:

◆ has_junction_deviation()

bool Slic3r::GUI::has_junction_deviation ( const DynamicPrintConfig * printer_config)
static
1399{
1400 if (!printer_config) {
1401 return false;
1402 }
1403 const auto gcode_flavor = printer_config->option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor");
1404 const auto junction_dev = printer_config->option<ConfigOptionFloats>("machine_max_junction_deviation");
1405 return gcode_flavor &&
1407 junction_dev &&
1408 !junction_dev->values.empty() &&
1409 junction_dev->values.front() > 0.0;
1410}
@ gcfMarlinFirmware
Definition PrintConfig.hpp:56
zaa_minimize_perimeter_height gcode_flavor((ConfigOptionBool, gcode_skip_config_block))((ConfigOptionFloat

References Slic3r::gcfMarlinFirmware, Slic3r::gcode_flavor(), and printer_config().

Referenced by Slic3r::GUI::Plater::_calib_pa_pattern(), Slic3r::GUI::Plater::Calib_Cornering(), Slic3r::GUI::Plater::calib_input_shaping_damp(), and Slic3r::GUI::Plater::calib_input_shaping_freq().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Hex2Color()

wxColor Slic3r::GUI::Hex2Color ( const std::string & str)
43{
44 if (str.empty() || (str.length() != 9 && str.length() != 7) || str[0] != '#')
45 throw std::invalid_argument("Invalid hex color format");
46
47 auto hexToByte = [](const std::string& hex)->unsigned char
48 {
49 unsigned int byte;
50 std::istringstream(hex) >> std::hex >> byte;
51 return static_cast<unsigned char>(byte);
52 };
53 auto r = hexToByte(str.substr(1, 2));
54 auto g = hexToByte(str.substr(3, 2));
55 auto b = hexToByte(str.substr(5, 2));
56 unsigned char a = 255;
57 if (str.size() == 9)
58 a = hexToByte(str.substr(7, 2));
59 return wxColor(r, g, b, a);
60}

Referenced by Slic3r::GUI::FilamentMapManualPanel::FilamentMapManualPanel().

Here is the caller graph for this function:

◆ hex_digit_to_int()

int Slic3r::GUI::hex_digit_to_int ( const char c)
inline
453{
454 return
455 (c >= '0' && c <= '9') ? int(c - '0') :
456 (c >= 'A' && c <= 'F') ? int(c - 'A') + 10 :
457 (c >= 'a' && c <= 'f') ? int(c - 'a') + 10 : -1;
458}

Referenced by decode_color(), Slic3r::GUI::BitmapCache::parse_color(), and Slic3r::GUI::BitmapCache::parse_color4().

Here is the caller graph for this function:

◆ hex_to_int()

int Slic3r::GUI::hex_to_int ( const char c)
inline
56{
57 return (c >= '0' && c <= '9') ? int(c - '0') : (c >= 'A' && c <= 'F') ? int(c - 'A') + 10 : (c >= 'a' && c <= 'f') ? int(c - 'a') + 10 : -1;
58}

◆ hex_to_wx_colour()

wxColour Slic3r::GUI::hex_to_wx_colour ( const std::string & hex,
const wxColour & fallback )
static
77{
78 wxColour color(hex);
79 return color.IsOk() ? color : fallback;
80}

Referenced by to_dialog_result(), and Slic3r::GUI::ColorDecomposeDialog::try_build_single_base_result().

Here is the caller graph for this function:

◆ hide_id_middle_string()

wxString Slic3r::GUI::hide_id_middle_string ( wxString const & str,
size_t offset = 0,
size_t length = -1 )
341{
342#if BBL_RELEASE_TO_PUBLIC
343 if (length == size_t(-1)) length = str.Length() - offset;
344 if (length <= 8) return str;
345 return str.Left(offset + 4) + wxString(length - 8, '*') + str.Mid(offset + length - 4);
346#else
347 return str;
348#endif
349}
Slic3r::Polygons offset(const Slic3r::Polygon &polygon, const float delta, JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:582

References Slic3r::length(), and Slic3r::offset().

Referenced by hide_passwd(), Slic3r::GUI::MediaPlayCtrl::Play(), and Slic3r::GUI::MediaPlayCtrl::ToggleStream().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hide_passwd()

wxString Slic3r::GUI::hide_passwd ( wxString url,
std::vector< wxString > const & passwords )
extern
352{
353#if BBL_RELEASE_TO_PUBLIC
354 for (auto &p : passwords) {
355 auto i = url.find(p);
356 if (i == wxString::npos)
357 continue;
358 auto j = i + p.length();
359 if (p[p.length() - 1] == '=') {
360 i = j;
361 j = url.find('&', i);
362 if (j == wxString::npos) j = url.length();
363 }
364 auto l = size_t(j - i);
365 if (p[0] == '?' || p[0] == '&')
366 url = hide_id_middle_string(url, i, l);
367 else if (j == url.length() || url[j] == '@' || url[j] == '&')
368 url.replace(i, l, l, wxUniChar('*'));
369 }
370#endif
371 return url;
372}
wxString hide_id_middle_string(wxString const &str, size_t offset=0, size_t length=-1)
Definition MediaPlayCtrl.cpp:340

References hide_id_middle_string().

Referenced by Slic3r::GUI::MediaFilePanel::fetchUrl(), Slic3r::GUI::SendToPrinterDialog::GetConnection(), Slic3r::GUI::MediaPlayCtrl::Play(), and Slic3r::GUI::MediaPlayCtrl::ToggleStream().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ highlight()

void Slic3r::GUI::highlight ( wxString & str)
static
471{
472#if defined(SUPPORTS_MARKUP) && !defined(__APPLE__)
473 str = format_wxstr("<span bgcolor=\"#009688\">%1%</span>", str);
474#endif
475}

References format_wxstr().

Referenced by Slic3r::GUI::ParamsNode::GetFormattedText(), Slic3r::GUI::DragShape::paint(), and Slic3r::GUI::GCodeViewer::SequentialView::Marker::render_position_window().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ home_page_strings()

json Slic3r::GUI::home_page_strings ( )
static
72{
73 return {
74 {"login", _u8L("Login")},
75 // TRN Short badge on a recent project that was published (a published 3MF). Keep it about three letters long.
76 {"published_badge", _u8L("PUB")},
77 {"not_signed_in", _u8L("Not signed in")},
78 {"plugin_not_detected", _u8L("Bambu Network plug-in not detected. Click <a>here</a> to install it.")},
79 {"log_out", _u8L("Log Out")},
80 {"recent", _u8L("Recent")},
81 {"new_project", _u8L("New Project")},
82 {"create_new_project", _u8L("Create new project")},
83 {"open_project", _u8L("Open Project")},
84 {"recently_opened", _u8L("Recently opened")},
85 {"clear_all", _u8L("Clear all")},
86 {"remove", _u8L("Remove")},
87 {"show_in_folder", _u8L("Show in folder")},
88 };
89}

References _u8L.

Referenced by Slic3r::GUI::WebViewPanel::create_browser().

Here is the caller graph for this function:

◆ http_origin_of()

wxString Slic3r::GUI::http_origin_of ( const wxString & url)
static
349{
350 const wxURI uri(url);
351 if (!uri.HasScheme() || !uri.HasServer())
352 return {};
353 const wxString scheme = uri.GetScheme().Lower();
354 if (scheme != "http" && scheme != "https")
355 return {};
356 wxString origin = scheme + "://" + uri.GetServer().Lower();
357 const wxString port = uri.GetPort();
358 if (!port.IsEmpty() && port != (scheme == "https" ? "443" : "80"))
359 origin += ":" + port;
360 return origin;
361}

Referenced by Slic3r::GUI::WebViewPanel::is_cloud_origin(), Slic3r::GUI::WebViewPanel::load_cloud_url(), and Slic3r::GUI::WebViewPanel::should_divert_cloud_url().

Here is the caller graph for this function:

◆ image_button_ex()

bool Slic3r::GUI::image_button_ex ( ImGuiID id,
ImTextureID texture_id,
const ImVec2 & size,
const ImVec2 & uv0,
const ImVec2 & uv1,
const ImVec2 & padding,
const ImVec4 & bg_col,
const ImVec4 & tint_col,
ImGuiButtonFlags flags )
static
1319{
1320 ImGuiContext& g = *GImGui;
1321 ImGuiWindow* window = ImGui::GetCurrentWindow();
1322 if (window->SkipItems)
1323 return false;
1324
1325 const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size + padding * 2);
1326 ImGui::ItemSize(bb);
1327 if (!ImGui::ItemAdd(bb, id))
1328 return false;
1329
1330 bool hovered, held;
1331 bool pressed = ImGui::ButtonBehavior(bb, id, &hovered, &held, flags);
1332
1333 // Render
1334 const ImU32 col = ImGui::GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
1335 ImGui::RenderNavHighlight(bb, id);
1336 ImGui::RenderFrame(bb.Min, bb.Max, col, true, ImClamp((float)ImMin(padding.x, padding.y), 0.0f, g.Style.FrameRounding));
1337 if (bg_col.w > 0.0f)
1338 window->DrawList->AddRectFilled(bb.Min + padding, bb.Max - padding, ImGui::GetColorU32(bg_col));
1339 window->DrawList->AddImage(texture_id, bb.Min + padding, bb.Max - padding, uv0, uv1, ImGui::GetColorU32(tint_col));
1340
1341 return pressed;
1342}

References ImRect.

Referenced by Slic3r::GUI::ImGuiWrapper::image_button().

Here is the caller graph for this function:

◆ imex_grid_shape()

void Slic3r::GUI::imex_grid_shape ( const DynamicPrintConfig * cfg,
int & n_cols,
int & n_rows,
int & layout )
static
5921{
5922 n_cols = std::max(1, imex_cfg_int(*cfg, "imex_tools_per_gantry"));
5923 n_rows = std::max(1, imex_cfg_int(*cfg, "imex_gantry_count"));
5924 layout = IMEXModesCtrl::parse_layout(imex_cfg_enum<ImexToolLayout>(*cfg, "imex_tool_layout"));
5925}
static int parse_layout(ImexToolLayout layout)
Definition IMEXModesCtrl.hpp:80
T imex_cfg_enum(const ConfigBase &cfg, const std::string &key)
Definition IMEXHelpers.hpp:386
int imex_cfg_int(const ConfigBase &cfg, const std::string &key)
Definition IMEXHelpers.cpp:269

References Slic3r::imex_cfg_enum(), Slic3r::imex_cfg_int(), imex_grid_shape(), and Slic3r::GUI::IMEXModesCtrl::parse_layout().

Referenced by Slic3r::GUI::TabPrinter::build_unregular_pages(), imex_grid_shape(), Slic3r::GUI::TabPrinter::reload_config(), and Slic3r::GUI::TabPrinter::update_fff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ import_texture_to_library()

std::optional< TextureLibraryEntry > Slic3r::GUI::import_texture_to_library ( const std::string & source_path,
std::string & error )
428{
429 wxImage image;
430 if (!image.LoadFile(from_u8(source_path)) || !image.IsOk()) {
431 error = _u8L("Could not load the selected image.");
432 return std::nullopt;
433 }
434
435 std::vector<unsigned char> bytes;
436 if (!encode_png_bytes(image, bytes, error))
437 return std::nullopt;
438
439 return write_user_texture(bytes, boost::filesystem::path(source_path).stem().string(), error);
440}

References _u8L, and from_u8().

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::import_custom_texture().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ index_from_plane()

int Slic3r::GUI::index_from_plane ( const SketchPlane & p)
static
357{
358 if (std::abs(p.normal.y()) > 0.5) return 1; // XZ
359 if (std::abs(p.normal.x()) > 0.5) return 2; // YZ
360 return 0; // XY
361}

References Slic3r::SketchPlane::normal.

Referenced by Slic3r::GUI::DesignPanel::DesignPanel(), is_base_plane(), and Slic3r::GUI::DesignPanel::load_feature_into_dialog().

Here is the caller graph for this function:

◆ init_arrange_params()

arrangement::ArrangeParams Slic3r::GUI::init_arrange_params ( Plater * p)
990{
993 auto &print = wxGetApp().plater()->get_partplate_list().get_current_fff_print();
994 const PrintConfig &print_config = print.config();
995
996 auto [object_skirt_offset, object_skirt_witdh] = print.object_skirt_offset();
997
998 params.clearance_height_to_rod = print_config.extruder_clearance_height_to_rod.value;
999 params.clearance_height_to_lid = print_config.extruder_clearance_height_to_lid.value;
1000 params.clearance_radius = print_config.extruder_clearance_radius.value + object_skirt_offset * 2;
1001 params.object_skirt_offset = object_skirt_offset;
1002 params.printable_height = print_config.printable_height.value;
1003 params.allow_rotations = settings.enable_rotation;
1004 params.nozzle_height = print_config.nozzle_height.value;
1005 params.align_center = print_config.best_object_pos.value;
1008 params.is_seq_print = settings.is_seq_print;
1009 params.min_obj_distance = scaled(settings.distance);
1010 params.align_to_y_axis = settings.align_to_y_axis;
1011 if (print_config.belt_printer.value) {
1012 // Parts print in belt order: the belt runs across the gantry's tilt axis, a
1013 // rotation about X prints toward +Y and one about Y toward -X (see
1014 // BeltTransform), a negative angle flips that, and a tilted layer reaches
1015 // cot(angle) * height past a part's far edge.
1016 const BeltRotationAxis axis = print_config.belt_slice_rotation.value;
1017 const double angle = print_config.belt_slice_rotation_angle.value;
1018 const bool tilted = (axis == BeltRotationAxis::X || axis == BeltRotationAxis::Y) && std::abs(angle) > EPSILON;
1019 params.is_belt = true;
1020 params.belt_axis = axis == BeltRotationAxis::Y ? 0 : 1;
1021 params.belt_reversed = tilted && ((axis == BeltRotationAxis::Y) != (angle < 0.));
1022 params.belt_tilt_slope = tilted ? float(1. / std::tan(Geometry::deg2rad(std::clamp(std::abs(angle), 5., 90.)))) : 0.f;
1023 }
1024
1025 int state = p->get_prepare_state();
1027 PartPlateList &plate_list = p->get_partplate_list();
1028 PartPlate * plate = plate_list.get_curr_plate();
1029 bool plate_same_as_global = true;
1030 params.is_seq_print = plate->get_real_print_seq(&plate_same_as_global) == PrintSequence::ByObject;
1031 // if plate's print sequence is not the same as global, the settings.distance is no longer valid, we set it to auto
1032 if (!plate_same_as_global)
1033 params.min_obj_distance = 0;
1034 }
1035
1036 if (params.is_seq_print) {
1039 }
1040 return params;
1041}
#define BED_SHRINK_SEQ_PRINT
Definition Arrange.hpp:17
bool enable_rotation
Definition GLCanvas3D.hpp:608
ArrangeSettings & get_arrange_settings()
Definition GLCanvas3D.cpp:1563
bool align_to_y_axis
Definition GLCanvas3D.hpp:613
bool allow_multi_materials_on_same_plate
Definition GLCanvas3D.hpp:609
bool avoid_extrusion_cali_region
Definition GLCanvas3D.hpp:610
bool is_seq_print
Definition GLCanvas3D.hpp:612
float distance
Definition GLCanvas3D.hpp:605
Definition GLCanvas3D.hpp:604
@ PREPARE_STATE_MENU
Definition Job.hpp:24
PartPlate * get_curr_plate()
Definition PartPlate.hpp:962
PartPlateList & get_partplate_list()
Definition Plater.cpp:22578
int get_prepare_state()
Definition Plater.cpp:14553
BoundingBox scaled(const BoundingBoxf &bb)
Definition BoundingBox.hpp:284
Definition Arrange.hpp:128
bool align_to_y_axis
Definition Arrange.hpp:149
float printable_height
Definition Arrange.hpp:158
float object_skirt_offset
Definition Arrange.hpp:156
bool belt_reversed
Definition Arrange.hpp:165
float bed_shrink_y
Definition Arrange.hpp:151
Vec2d align_center
Definition Arrange.hpp:159
int belt_axis
Definition Arrange.hpp:164
coord_t min_obj_distance
The minimum distance which is allowed for any pair of items on the print bed in any direction.
Definition Arrange.hpp:132
float clearance_radius
Definition Arrange.hpp:155
float bed_shrink_x
Definition Arrange.hpp:150
float clearance_height_to_lid
Definition Arrange.hpp:154
bool avoid_extrusion_cali_region
Definition Arrange.hpp:147
float nozzle_height
Definition Arrange.hpp:157
float belt_tilt_slope
Definition Arrange.hpp:166
bool is_seq_print
Definition Arrange.hpp:148
bool is_belt
Definition Arrange.hpp:163
bool allow_rotations
Definition Arrange.hpp:141
bool allow_multi_materials_on_same_plate
Definition Arrange.hpp:146
float clearance_height_to_rod
Definition Arrange.hpp:153

References Slic3r::arrangement::ArrangeParams::align_center, Slic3r::arrangement::ArrangeParams::align_to_y_axis, Slic3r::GUI::GLCanvas3D::ArrangeSettings::align_to_y_axis, Slic3r::arrangement::ArrangeParams::allow_multi_materials_on_same_plate, Slic3r::GUI::GLCanvas3D::ArrangeSettings::allow_multi_materials_on_same_plate, Slic3r::arrangement::ArrangeParams::allow_rotations, Slic3r::angle(), Slic3r::arrangement::ArrangeParams::avoid_extrusion_cali_region, Slic3r::GUI::GLCanvas3D::ArrangeSettings::avoid_extrusion_cali_region, BED_SHRINK_SEQ_PRINT, Slic3r::arrangement::ArrangeParams::bed_shrink_x, Slic3r::arrangement::ArrangeParams::bed_shrink_y, Slic3r::arrangement::ArrangeParams::belt_axis, Slic3r::arrangement::ArrangeParams::belt_reversed, Slic3r::arrangement::ArrangeParams::belt_tilt_slope, Slic3r::ByObject, Slic3r::GUI::Plater::canvas3D(), Slic3r::arrangement::ArrangeParams::clearance_height_to_lid, Slic3r::arrangement::ArrangeParams::clearance_height_to_rod, Slic3r::arrangement::ArrangeParams::clearance_radius, Slic3r::Geometry::deg2rad(), Slic3r::GUI::GLCanvas3D::ArrangeSettings::distance, Slic3r::GUI::GLCanvas3D::ArrangeSettings::enable_rotation, EPSILON, Slic3r::GUI::GLCanvas3D::get_arrange_settings(), Slic3r::GUI::PartPlateList::get_curr_plate(), Slic3r::GUI::Plater::get_partplate_list(), Slic3r::GUI::Plater::get_prepare_state(), Slic3r::GUI::PartPlate::get_real_print_seq(), Slic3r::arrangement::ArrangeParams::is_belt, Slic3r::arrangement::ArrangeParams::is_seq_print, Slic3r::GUI::GLCanvas3D::ArrangeSettings::is_seq_print, Slic3r::arrangement::ArrangeParams::min_obj_distance, Slic3r::arrangement::ArrangeParams::nozzle_height, Slic3r::arrangement::ArrangeParams::object_skirt_offset, Slic3r::GUI::Job::PREPARE_STATE_MENU, Slic3r::arrangement::ArrangeParams::printable_height, Slic3r::scaled(), Slic3r::X, and Slic3r::Y.

Referenced by Slic3r::GUI::Plater::find_new_position(), Slic3r::GUI::ArrangeJob::prepare(), and Slic3r::GUI::FillBedJob::prepare().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_bitmap_dc()

BitmapDC Slic3r::GUI::init_bitmap_dc ( const wxSize & size)
static
218 {
219 return BitmapDC(size);
220}

Referenced by create_dual_filament_bitmap(), create_gradient_filament_bitmap(), create_gradient_ramp_bitmap(), create_quadruple_filament_bitmap(), create_single_filament_bitmap(), create_transparent_bitmap(), and create_triple_filament_bitmap().

Here is the caller graph for this function:

◆ init_exclusion_volume_prism_model()

bool Slic3r::GUI::init_exclusion_volume_prism_model ( GLModel & model,
const std::vector< ExclusionVolumePrismPreview > & prisms )
static
1563{
1564 model.reset();
1565 if (prisms.empty())
1566 return true;
1567
1568 GLModel::Geometry init_data;
1570
1571 for (const ExclusionVolumePrismPreview &prism : prisms) {
1572 const Polygon &polygon = prism.footprint;
1573 const float z_min = static_cast<float>(prism.z_min);
1574 const float z_max = static_cast<float>(prism.z_max);
1575 if (polygon.points.size() < 3 || z_max <= z_min)
1576 continue;
1577
1578 init_data.reserve_vertices(init_data.vertices_count() + 4 * polygon.points.size());
1579 init_data.reserve_indices(init_data.indices_count() + 6 * polygon.points.size());
1580 for (size_t i = 0; i < polygon.points.size(); ++i) {
1581 const Point &p0 = polygon.points[i];
1582 const Point &p1 = polygon.points[(i + 1) % polygon.points.size()];
1583
1584 init_data.add_vertex(Vec3f(unscale<float>(p0.x()), unscale<float>(p0.y()), z_min));
1585 init_data.add_vertex(Vec3f(unscale<float>(p1.x()), unscale<float>(p1.y()), z_min));
1586 init_data.add_vertex(Vec3f(unscale<float>(p1.x()), unscale<float>(p1.y()), z_max));
1587 init_data.add_vertex(Vec3f(unscale<float>(p0.x()), unscale<float>(p0.y()), z_max));
1588
1589 const unsigned int base = (unsigned int)init_data.vertices_count() - 4;
1590 init_data.add_triangle(base, base + 1, base + 2);
1591 init_data.add_triangle(base, base + 2, base + 3);
1592 }
1593
1594 const ExPolygon expolygon = expolygon_from_polygon(polygon);
1595 const std::vector<Vec2f> triangles = triangulate_expolygon_2f(expolygon, NORMALS_UP);
1596 init_data.reserve_vertices(init_data.vertices_count() + triangles.size());
1597 init_data.reserve_indices(init_data.indices_count() + triangles.size());
1598 const unsigned int cap_base = (unsigned int)init_data.vertices_count();
1599 for (const Vec2f &v : triangles)
1600 init_data.add_vertex(Vec3f(v.x(), v.y(), z_max));
1601 for (size_t i = 0; i + 2 < triangles.size(); i += 3)
1602 init_data.add_triangle(cap_base + (unsigned int)i, cap_base + (unsigned int)i + 1, cap_base + (unsigned int)i + 2);
1603 }
1604
1605 if (!init_data.is_empty())
1606 model.init_from(std::move(init_data));
1607
1608 return true;
1609}
void reset()
Definition GLModel.cpp:547
void init_from(Geometry &&data)
Definition GLModel.cpp:396
Points points
Definition MultiPoint.hpp:22
Definition Point.hpp:199
Definition Polygon.hpp:31
static ExPolygon expolygon_from_polygon(const Polygon &polygon)
Definition PartPlate.cpp:1473
T unscale(Q v)
Definition libslic3r.h:138
bool is_empty() const
Definition GLModel.hpp:98

References Slic3r::GUI::GLModel::Geometry::add_triangle(), Slic3r::GUI::GLModel::Geometry::add_vertex(), expolygon_from_polygon(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::Geometry::indices_count(), Slic3r::GUI::GLModel::init_from(), Slic3r::GUI::GLModel::Geometry::is_empty(), Slic3r::NORMALS_UP, Slic3r::GUI::GLModel::Geometry::P3, Slic3r::MultiPoint::points, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), Slic3r::GUI::GLModel::reset(), Slic3r::GUI::GLModel::Geometry::Triangles, Slic3r::triangulate_expolygon_2f(), Slic3r::unscale(), and Slic3r::GUI::GLModel::Geometry::vertices_count().

Referenced by Slic3r::GUI::PartPlate::update_exclusion_volume_preview_models().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_from_angle_arc()

void Slic3r::GUI::init_from_angle_arc ( GLModel & model,
double angle,
double radius )
static
217{
218 model.reset();
219
220 const float step_angle = float(angle) / float(AngleResolution);
221 const float ex_radius = float(radius);
222
223 GLModel::Geometry init_data;
225 init_data.reserve_vertices(1 + AngleResolution);
226 init_data.reserve_indices(1 + AngleResolution);
227
228 // vertices + indices
229 for (unsigned int i = 0; i <= AngleResolution; ++i) {
230 const float angle = float(i) * step_angle;
231 init_data.add_vertex(Vec3f(::cos(angle) * ex_radius, ::sin(angle) * ex_radius, 0.0f));
232 init_data.add_index(i);
233 }
234
235 model.init_from(std::move(init_data));
236}
const unsigned int AngleResolution
Definition GLGizmoCut.cpp:99
void add_index(unsigned int id)
Definition GLModel.cpp:110

References Slic3r::GUI::GLModel::Geometry::add_index(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::angle(), AngleResolution, Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::init_from(), Slic3r::GUI::GLModel::Geometry::LineStrip, Slic3r::GUI::GLModel::Geometry::P3, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), and Slic3r::GUI::GLModel::reset().

Referenced by Slic3r::GUI::GLGizmoCut3D::init_rendering_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_from_circle()

void Slic3r::GUI::init_from_circle ( GLModel & model,
double radius )
static

– #ysFIXME those functions bodies are ported from GizmoRotation

131{
132 GLModel::Geometry init_data;
136
137 // vertices + indices
138 for (unsigned int i = 0; i < ScaleStepsCount; ++i) {
139 const float angle = float(i * ScaleStepRad);
140 init_data.add_vertex(Vec3f(::cos(angle) * float(radius), ::sin(angle) * float(radius), 0.0f));
141 init_data.add_index(i);
142 }
143
144 model.init_from(std::move(init_data));
146}
static const ColorRGBA WHITE()
Definition Color.hpp:142
void set_color(const ColorRGBA &color)
Definition GLModel.hpp:179
const unsigned int ScaleStepsCount
Definition GLGizmoCut.cpp:100
const float ScaleStepRad
Definition GLGizmoCut.cpp:101

References Slic3r::GUI::GLModel::Geometry::add_index(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::angle(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::init_from(), Slic3r::GUI::GLModel::Geometry::LineLoop, Slic3r::GUI::GLModel::Geometry::P3, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), ScaleStepRad, ScaleStepsCount, Slic3r::GUI::GLModel::set_color(), and Slic3r::ColorRGBA::WHITE().

Referenced by Slic3r::GUI::GLGizmoCut3D::init_rendering_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_from_scale()

void Slic3r::GUI::init_from_scale ( GLModel & model,
double radius )
static
150{
151 const float out_radius_long = float(radius) * (1.0f + ScaleLongTooth);
152 const float out_radius_short = float(radius) * (1.0f + 0.5f * ScaleLongTooth);
153
154 GLModel::Geometry init_data;
156 init_data.reserve_vertices(2 * ScaleStepsCount);
157 init_data.reserve_indices(2 * ScaleStepsCount);
158
159 // vertices + indices
160 for (unsigned int i = 0; i < ScaleStepsCount; ++i) {
161 const float angle = float(i * ScaleStepRad);
162 const float cosa = ::cos(angle);
163 const float sina = ::sin(angle);
164 const float in_x = cosa * float(radius);
165 const float in_y = sina * float(radius);
166 const float out_x = (i % ScaleLongEvery == 0) ? cosa * out_radius_long : cosa * out_radius_short;
167 const float out_y = (i % ScaleLongEvery == 0) ? sina * out_radius_long : sina * out_radius_short;
168
169 // vertices
170 init_data.add_vertex(Vec3f(in_x, in_y, 0.0f));
171 init_data.add_vertex(Vec3f(out_x, out_y, 0.0f));
172
173 // indices
174 init_data.add_line(i * 2, i * 2 + 1);
175 }
176
177 model.init_from(std::move(init_data));
179}
const unsigned int ScaleLongEvery
Definition GLGizmoCut.cpp:102
const float ScaleLongTooth
Definition GLGizmoCut.cpp:103
void add_line(unsigned int id1, unsigned int id2)
Definition GLModel.cpp:115

References Slic3r::GUI::GLModel::Geometry::add_line(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::angle(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::init_from(), Slic3r::GUI::GLModel::Geometry::Lines, Slic3r::GUI::GLModel::Geometry::P3, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), ScaleLongEvery, ScaleLongTooth, ScaleStepRad, ScaleStepsCount, Slic3r::GUI::GLModel::set_color(), and Slic3r::ColorRGBA::WHITE().

Referenced by Slic3r::GUI::GLGizmoCut3D::init_rendering_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_from_snap_radii()

void Slic3r::GUI::init_from_snap_radii ( GLModel & model,
double radius )
static
183{
184 const float step = 2.0f * float(PI) / float(SnapRegionsCount);
185 const float in_radius = float(radius) / 3.0f;
186 const float out_radius = 2.0f * in_radius;
187
188 GLModel::Geometry init_data;
190 init_data.reserve_vertices(2 * ScaleStepsCount);
191 init_data.reserve_indices(2 * ScaleStepsCount);
192
193 // vertices + indices
194 for (unsigned int i = 0; i < ScaleStepsCount; ++i) {
195 const float angle = float(i) * step;
196 const float cosa = ::cos(angle);
197 const float sina = ::sin(angle);
198 const float in_x = cosa * in_radius;
199 const float in_y = sina * in_radius;
200 const float out_x = cosa * out_radius;
201 const float out_y = sina * out_radius;
202
203 // vertices
204 init_data.add_vertex(Vec3f(in_x, in_y, 0.0f));
205 init_data.add_vertex(Vec3f(out_x, out_y, 0.0f));
206
207 // indices
208 init_data.add_line(i * 2, i * 2 + 1);
209 }
210
211 model.init_from(std::move(init_data));
213}
const unsigned int SnapRegionsCount
Definition GLGizmoCut.cpp:104

References Slic3r::GUI::GLModel::Geometry::add_line(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::angle(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::init_from(), Slic3r::GUI::GLModel::Geometry::Lines, Slic3r::GUI::GLModel::Geometry::P3, PI, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), ScaleStepsCount, Slic3r::GUI::GLModel::set_color(), SnapRegionsCount, and Slic3r::ColorRGBA::WHITE().

Referenced by Slic3r::GUI::GLGizmoCut3D::init_rendering_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_model_from_expolygons()

bool Slic3r::GUI::init_model_from_expolygons ( GLModel & model,
const ExPolygons & expolygons,
float z )
static
1534{
1535 model.reset();
1536 if (expolygons.empty())
1537 return true;
1538
1539 GLModel::Geometry init_data;
1541
1542 for (const ExPolygon &expolygon : expolygons) {
1543 if (expolygon.contour.points.size() < 3)
1544 continue;
1545
1546 append_expolygon_triangles(init_data, expolygon, z);
1547 }
1548
1549 if (!init_data.is_empty())
1550 model.init_from(std::move(init_data));
1551
1552 return true;
1553}
static void append_expolygon_triangles(GLModel::Geometry &init_data, const ExPolygon &expolygon, float z)
Definition PartPlate.cpp:1481

References append_expolygon_triangles(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::init_from(), Slic3r::GUI::GLModel::Geometry::is_empty(), Slic3r::GUI::GLModel::Geometry::P3T2, Slic3r::GUI::GLModel::reset(), and Slic3r::GUI::GLModel::Geometry::Triangles.

Referenced by Slic3r::GUI::PartPlate::update_exclusion_volume_preview_models().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_model_from_lines() [1/2]

bool Slic3r::GUI::init_model_from_lines ( GLModel & model,
const Lines & lines,
float z )
static
1434{
1435
1436 GLModel::Geometry init_data;
1438 init_data.reserve_vertices(2 * lines.size());
1439 init_data.reserve_indices(2 * lines.size());
1440
1441 for (const auto &l : lines) {
1442 init_data.add_vertex(Vec3f(unscale<float>(l.a.x()), unscale<float>(l.a.y()), z));
1443 init_data.add_vertex(Vec3f(unscale<float>(l.b.x()), unscale<float>(l.b.y()), z));
1444 const unsigned int vertices_counter = (unsigned int)init_data.vertices_count();
1445 init_data.add_line(vertices_counter - 2, vertices_counter - 1);
1446 }
1447
1448 model.init_from(std::move(init_data));
1449
1450 return true;
1451}

References Slic3r::GUI::GLModel::Geometry::add_line(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::init_from(), Slic3r::GUI::GLModel::Geometry::Lines, Slic3r::GUI::GLModel::Geometry::P3, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), Slic3r::unscale(), and Slic3r::GUI::GLModel::Geometry::vertices_count().

Referenced by Slic3r::GUI::PartPlate::calc_gridlines(), and Slic3r::GUI::PartPlate::calc_height_limit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_model_from_lines() [2/2]

bool Slic3r::GUI::init_model_from_lines ( GLModel & model,
const Lines3 & lines )
static
1454{
1455
1456 GLModel::Geometry init_data;
1458 init_data.reserve_vertices(2 * lines.size());
1459 init_data.reserve_indices(2 * lines.size());
1460
1461 for (const auto &l : lines) {
1462 init_data.add_vertex(Vec3f(unscale<float>(l.a.x()), unscale<float>(l.a.y()), unscale<float>(l.a.z())));
1463 init_data.add_vertex(Vec3f(unscale<float>(l.b.x()), unscale<float>(l.b.y()), unscale<float>(l.b.z())));
1464 const unsigned int vertices_counter = (unsigned int) init_data.vertices_count();
1465 init_data.add_line(vertices_counter - 2, vertices_counter - 1);
1466 }
1467
1468 model.init_from(std::move(init_data));
1469
1470 return true;
1471}

References Slic3r::GUI::GLModel::Geometry::add_line(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::init_from(), Slic3r::GUI::GLModel::Geometry::Lines, Slic3r::GUI::GLModel::Geometry::P3, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), Slic3r::unscale(), and Slic3r::GUI::GLModel::Geometry::vertices_count().

Here is the call graph for this function:

◆ init_model_from_poly()

bool Slic3r::GUI::init_model_from_poly ( GLModel & model,
const ExPolygon & poly,
float z )
55{
56 if (poly.empty())
57 return false;
58
59 const std::vector<Vec2f> triangles = triangulate_expolygon_2f(poly, NORMALS_UP);
60 if (triangles.empty() || triangles.size() % 3 != 0)
61 return false;
62
63 GLModel::Geometry init_data;
65 init_data.reserve_vertices(triangles.size());
66 init_data.reserve_indices(triangles.size() / 3);
67
68 Vec2f min = triangles.front();
69 Vec2f max = min;
70 for (const Vec2f &v : triangles) {
71 min = min.cwiseMin(v).eval();
72 max = max.cwiseMax(v).eval();
73 }
74
75 const Vec2f size = max - min;
76 if (size.x() <= 0.0f || size.y() <= 0.0f)
77 return false;
78
79 Vec2f inv_size = size.cwiseInverse();
80 inv_size.y() *= -1.0f;
81
82 // vertices + indices
83 unsigned int vertices_counter = 0;
84 for (const Vec2f &v : triangles) {
85 const Vec3f p = {v.x(), v.y(), z};
86 init_data.add_vertex(p, (Vec2f)(v - min).cwiseProduct(inv_size).eval());
87 ++vertices_counter;
88 if (vertices_counter % 3 == 0)
89 init_data.add_triangle(vertices_counter - 3, vertices_counter - 2, vertices_counter - 1);
90 }
91
92 model.init_from(std::move(init_data));
93
94 return true;
95}

References Slic3r::GUI::GLModel::Geometry::add_triangle(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::init_from(), Slic3r::NORMALS_UP, Slic3r::GUI::GLModel::Geometry::P3T2, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), Slic3r::GUI::GLModel::Geometry::Triangles, and Slic3r::triangulate_expolygon_2f().

Referenced by Slic3r::GUI::PartPlate::calc_exclude_triangles(), Slic3r::GUI::PartPlate::calc_imex_zones(), Slic3r::GUI::PartPlate::calc_triangles(), Slic3r::GUI::PartPlate::calc_triangles_from_polygon(), Slic3r::GUI::PartPlate::calc_vertex_for_icons(), Slic3r::GUI::PartPlate::calc_vertex_for_imex_warn_badge(), Slic3r::GUI::PartPlate::calc_vertex_for_number(), Slic3r::GUI::PartPlate::calc_vertex_for_plate_name_edit_icon(), Slic3r::GUI::PartPlate::generate_plate_name_texture(), Slic3r::GUI::PartPlate::set_shape(), Slic3r::GUI::Bed3D::update_bed_triangles(), and Slic3r::GUI::PartPlateList::BedTextureInfo::TexturePart::update_buffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_model_from_polygons()

bool Slic3r::GUI::init_model_from_polygons ( GLModel & model,
const Polygons & polygons,
float z )
static
1512{
1513 model.reset();
1514 if (polygons.empty())
1515 return true;
1516
1517 GLModel::Geometry init_data;
1519
1520 for (const Polygon &polygon : polygons) {
1521 if (polygon.points.size() < 3)
1522 continue;
1523
1524 append_expolygon_triangles(init_data, expolygon_from_polygon(polygon), z);
1525 }
1526
1527 if (!init_data.is_empty())
1528 model.init_from(std::move(init_data));
1529
1530 return true;
1531}

References append_expolygon_triangles(), expolygon_from_polygon(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::init_from(), Slic3r::GUI::GLModel::Geometry::is_empty(), Slic3r::GUI::GLModel::Geometry::P3T2, Slic3r::GUI::GLModel::reset(), and Slic3r::GUI::GLModel::Geometry::Triangles.

Referenced by Slic3r::GUI::PartPlate::update_exclusion_volume_preview_models().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_multi_extruder_params_for_cali()

void Slic3r::GUI::init_multi_extruder_params_for_cali ( DynamicPrintConfig & config,
const CalibInfo & calib_info )
static
360{
361 int extruder_count = 1;
362 auto nozzle_diameters_opt = dynamic_cast<const ConfigOptionFloats*>(config.option("nozzle_diameter"));
363 if (nozzle_diameters_opt != nullptr) {
364 extruder_count = (int)(nozzle_diameters_opt->size());
365 }
366 std::vector<int>& nozzle_volume_types = dynamic_cast<ConfigOptionEnumsGeneric*>(config.option("nozzle_volume_type", true))->values;
367 nozzle_volume_types.clear();
368 nozzle_volume_types.resize(extruder_count, (int)calib_info.nozzle_volume_type);
369
370 std::vector<int> physical_extruder_maps = dynamic_cast<ConfigOptionInts*>(config.option("physical_extruder_map", true))->values;
371 int extruder_id = calib_info.extruder_id;
372 for (size_t index = 0; index < extruder_count; ++index) {
373 if (physical_extruder_maps[index] == extruder_id)
374 {
375 nozzle_volume_types[index] = (int) calib_info.nozzle_volume_type;
376 extruder_id = index + 1;
377 break;
378 }
379 }
380
381 int num_filaments = 1;
382 auto filament_colour_opt = dynamic_cast<const ConfigOptionStrings*>(config.option("filament_colour"));
383 if (filament_colour_opt != nullptr) {
384 num_filaments = (int)(filament_colour_opt->size());
385 }
386 std::vector<int>& filament_maps = config.option<ConfigOptionInts>("filament_map", true)->values;
387 filament_maps.clear();
388 filament_maps.resize(num_filaments, extruder_id);
389
390 config.option<ConfigOptionEnum<FilamentMapMode>>("filament_map_mode", true)->value = FilamentMapMode::fmmManual;
391
392}
int extruder_id
Definition CalibUtils.hpp:25
NozzleVolumeType nozzle_volume_type
Definition CalibUtils.hpp:30

References Slic3r::GUI::CalibInfo::extruder_id, Slic3r::fmmManual, Slic3r::GUI::CalibInfo::nozzle_volume_type, and Slic3r::ConfigBase::option().

Referenced by Slic3r::GUI::CalibUtils::calib_flowrate(), Slic3r::GUI::CalibUtils::calib_generic_PA(), Slic3r::GUI::CalibUtils::calib_max_vol_speed(), Slic3r::GUI::CalibUtils::calib_retraction(), Slic3r::GUI::CalibUtils::calib_temptue(), and Slic3r::GUI::CalibUtils::calib_VFA().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_plane_data()

GLModel::Geometry Slic3r::GUI::init_plane_data ( const indexed_triangle_set & its,
const std::vector< int > & triangle_indices,
float normal_offset )
1479{
1480 GLModel::Geometry init_data;
1482 init_data.reserve_indices(3 * triangle_indices.size());
1483 init_data.reserve_vertices(3 * triangle_indices.size());
1484 unsigned int i = 0;
1485 for (int idx : triangle_indices) {
1486 Vec3f v0 = its.vertices[its.indices[idx][0]];
1487 Vec3f v1 = its.vertices[its.indices[idx][1]];
1488 Vec3f v2 = its.vertices[its.indices[idx][2]];
1489 const Vec3f n = (v1 - v0).cross(v2 - v0).normalized();
1490 if (std::abs(normal_offset) > 0.0) {
1491 v0 = v0 + n * normal_offset;
1492 v1 = v1 + n * normal_offset;
1493 v2 = v2 + n * normal_offset;
1494 }
1495 init_data.add_vertex(v0, n);
1496 init_data.add_vertex(v1, n);
1497 init_data.add_vertex(v2, n);
1498 init_data.add_triangle(i, i + 1, i + 2);
1499 i += 3;
1500 }
1501
1502 return init_data;
1503}
T cross(const boost::geometry::model::d2::point_xy< T > &v1, const boost::geometry::model::d2::point_xy< T > &v2)
Definition ExtrusionSimulator.cpp:168

References Slic3r::GUI::GLModel::Geometry::add_triangle(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::cross(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::Geometry::P3N3, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), and Slic3r::GUI::GLModel::Geometry::Triangles.

Referenced by Slic3r::GUI::GLGizmoMeasure::init_plane_glmodel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_raycaster_from_model()

void Slic3r::GUI::init_raycaster_from_model ( PickingModel & model)
static
1612{
1613 assert(model.mesh_raycaster == nullptr);
1614
1615 const GLModel::Geometry &geometry = model.model.get_geometry();
1616
1617 indexed_triangle_set its;
1618 its.vertices.reserve(geometry.vertices_count());
1619 for (size_t i = 0; i < geometry.vertices_count(); ++i) {
1620 its.vertices.emplace_back(geometry.extract_position_3(i));
1621 }
1622 its.indices.reserve(geometry.indices_count() / 3);
1623 for (size_t i = 0; i < geometry.indices_count() / 3; ++i) {
1624 const size_t tri_id = i * 3;
1625 its.indices.emplace_back(geometry.extract_index(tri_id), geometry.extract_index(tri_id + 1), geometry.extract_index(tri_id + 2));
1626 }
1627
1628 model.mesh_raycaster = std::make_unique<MeshRaycaster>(std::make_shared<const TriangleMesh>(std::move(its)));
1629}
Vec3f extract_position_3(size_t id) const
Definition GLModel.cpp:145
unsigned int extract_index(size_t id) const
Definition GLModel.cpp:218
GLModel model
Definition MeshUtils.hpp:247
std::unique_ptr< MeshRaycaster > mesh_raycaster
Definition MeshUtils.hpp:248

References Slic3r::GUI::GLModel::Geometry::extract_index(), Slic3r::GUI::GLModel::Geometry::extract_position_3(), Slic3r::GUI::GLModel::get_geometry(), Slic3r::GUI::GLModel::Geometry::indices_count(), Slic3r::GUI::PickingModel::mesh_raycaster, Slic3r::GUI::PickingModel::model, and Slic3r::GUI::GLModel::Geometry::vertices_count().

Referenced by Slic3r::GUI::PartPlate::calc_vertex_for_icons(), Slic3r::GUI::PartPlate::calc_vertex_for_plate_name_edit_icon(), and Slic3r::GUI::PartPlate::set_shape().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_torus_data()

GLModel::Geometry Slic3r::GUI::init_torus_data ( unsigned int primary_resolution,
unsigned int secondary_resolution,
const Vec3f & center,
float radius,
float thickness,
const Vec3f & model_axis,
const Transform3f & world_trafo )
1512{
1513 const unsigned int torus_sector_count = std::max<unsigned int>(4, primary_resolution);
1514 const unsigned int section_sector_count = std::max<unsigned int>(4, secondary_resolution);
1515 const float torus_sector_step = 2.0f * float(M_PI) / float(torus_sector_count);
1516 const float section_sector_step = 2.0f * float(M_PI) / float(section_sector_count);
1517
1518 GLModel::Geometry data;
1520 data.reserve_vertices(torus_sector_count * section_sector_count);
1521 data.reserve_indices(torus_sector_count * section_sector_count * 2 * 3);
1522
1523 // vertices
1524 const Transform3f local_to_world_matrix = world_trafo * Geometry::translation_transform(center.cast<double>()).cast<float>() *
1525 Eigen::Quaternion<float>::FromTwoVectors(Vec3f::UnitZ(), model_axis);
1526 for (unsigned int i = 0; i < torus_sector_count; ++i) {
1527 const float section_angle = torus_sector_step * i;
1528 const Vec3f radius_dir(std::cos(section_angle), std::sin(section_angle), 0.0f);
1529 const Vec3f local_section_center = radius * radius_dir;
1530 const Vec3f world_section_center = local_to_world_matrix * local_section_center;
1531 const Vec3f local_section_normal = local_section_center.normalized().cross(Vec3f::UnitZ()).normalized();
1532 const Vec3f world_section_normal = (Vec3f) (local_to_world_matrix.matrix().block(0, 0, 3, 3) * local_section_normal).normalized();
1533 const Vec3f base_v = thickness * radius_dir;
1534 for (unsigned int j = 0; j < section_sector_count; ++j) {
1535 const Vec3f v = Eigen::AngleAxisf(section_sector_step * j, world_section_normal) * base_v;
1536 data.add_vertex(world_section_center + v, (Vec3f) v.normalized());
1537 }
1538 }
1539
1540 // triangles
1541 for (unsigned int i = 0; i < torus_sector_count; ++i) {
1542 const unsigned int ii = i * section_sector_count;
1543 const unsigned int ii_next = ((i + 1) % torus_sector_count) * section_sector_count;
1544 for (unsigned int j = 0; j < section_sector_count; ++j) {
1545 const unsigned int j_next = (j + 1) % section_sector_count;
1546 const unsigned int i0 = ii + j;
1547 const unsigned int i1 = ii_next + j;
1548 const unsigned int i2 = ii_next + j_next;
1549 const unsigned int i3 = ii + j_next;
1550 data.add_triangle(i0, i1, i2);
1551 data.add_triangle(i0, i2, i3);
1552 }
1553 }
1554
1555 return data;
1556}
Eigen::Transform< float, 3, Eigen::Affine, Eigen::DontAlign > Transform3f
Definition Point.hpp:95

References Slic3r::GUI::GLModel::Geometry::add_triangle(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::center(), Slic3r::GUI::GLModel::Geometry::format, M_PI, Slic3r::GUI::GLModel::Geometry::P3N3, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), Slic3r::Geometry::translation_transform(), and Slic3r::GUI::GLModel::Geometry::Triangles.

Referenced by Slic3r::GUI::GLGizmoMeasure::init_circle_glmodel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initGestures()

void Slic3r::GUI::initGestures ( void * view,
wxEvtHandler * handler )
469{
470 wxNSCustomOpenGLView * glView = (wxNSCustomOpenGLView *) view;
472}
Definition MacDarkMode.mm:349
void initGesturesWithHandler:(wxEvtHandler *handler)
Definition MacDarkMode.mm:448
Definition Snapshot.cpp:54

References initGestures(), and wxNSCustomOpenGLView::initGesturesWithHandler:.

Referenced by Slic3r::GUI::GLCanvas3D::bind_event_handlers(), initGestures(), and Slic3r::GUI::GLCanvas3D::unbind_event_handlers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initial_zip_archive()

mz_bool Slic3r::GUI::initial_zip_archive ( mz_zip_archive & zip_archive,
const std::string & file_path )
static
157{
158 mz_zip_zero_struct(&zip_archive);
159 mz_bool status;
160
161 // Initialize the ZIP file to write to the structure, using memory storage
162
163 std::string export_dir = encode_path(file_path.c_str());
164 status = mz_zip_writer_init_file(&zip_archive, export_dir.c_str(), 0);
165 return status;
166}
std::string encode_path(const char *src)
Definition utils.cpp:1382

References Slic3r::encode_path().

Referenced by Slic3r::GUI::ExportPresetBundleDialog::OnExportData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ input_optional()

template<typename T, typename Func>
bool Slic3r::GUI::input_optional ( std::optional< T > & v,
Func & f,
std::function< bool(const T &)> is_default,
const T & def_val )
static
2261{
2262 if (v.has_value()) {
2263 if (f(*v)) {
2264 if (is_default(*v)) v.reset();
2265 return true;
2266 }
2267 } else {
2268 T val = def_val;
2269 if (f(val)) {
2270 if (!is_default(val)) v = val;
2271 return true;
2272 }
2273 }
2274 return false;
2275}

References Slic3r::f().

Referenced by Slic3r::GUI::ImGuiWrapper::drag_optional_float(), Slic3r::GUI::ImGuiWrapper::input_optional_float(), Slic3r::GUI::ImGuiWrapper::input_optional_int(), Slic3r::GUI::ImGuiWrapper::slider_optional_float(), and Slic3r::GUI::ImGuiWrapper::slider_optional_int().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ input_shaper_types_for_flavor()

std::vector< InputShaperType > Slic3r::GUI::input_shaper_types_for_flavor ( GCodeFlavor flavor)
6541{
6542 switch (flavor) {
6544 return {
6553 };
6555 return {
6565 };
6567 return {
6570 };
6571 default:
6572 return {
6575 };
6576 }
6577}
@ gcfKlipper
Definition PrintConfig.hpp:53
@ gcfRepRapFirmware
Definition PrintConfig.hpp:54
@ ZVDDD
Definition PrintConfig.hpp:571
@ EI2
Definition PrintConfig.hpp:573
@ ZV
Definition PrintConfig.hpp:568
@ EI3
Definition PrintConfig.hpp:575
@ EI
Definition PrintConfig.hpp:572
@ ZVDD
Definition PrintConfig.hpp:570
@ Default
Definition PrintConfig.hpp:566
@ TwoHumpEI
Definition PrintConfig.hpp:574
@ ZVD
Definition PrintConfig.hpp:569
@ Disable
Definition PrintConfig.hpp:578
@ ThreeHumpEI
Definition PrintConfig.hpp:576
@ DAA
Definition PrintConfig.hpp:577
@ MZV
Definition PrintConfig.hpp:567

References Slic3r::DAA, Slic3r::Default, Slic3r::Disable, Slic3r::EI, Slic3r::EI2, Slic3r::EI3, Slic3r::gcfKlipper, Slic3r::gcfMarlinFirmware, Slic3r::gcfRepRapFirmware, input_shaper_types_for_flavor(), Slic3r::MZV, Slic3r::ThreeHumpEI, Slic3r::TwoHumpEI, Slic3r::ZV, Slic3r::ZVD, Slic3r::ZVDD, and Slic3r::ZVDDD.

Referenced by Slic3r::GUI::anonymous_namespace{calib_dlg.cpp}::get_shaper_type_values(), input_shaper_types_for_flavor(), and Slic3r::GUI::TabPrinter::update_input_shaper_menu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ install_local_plugin_package()

bool Slic3r::GUI::install_local_plugin_package ( const boost::filesystem::path & package_file,
wxWindow * parent,
wxString & message )
487{
488 message.clear();
489 if (package_file.empty())
490 return false;
491
492 // ---- pre-flight (main thread): validate + inspect + overwrite prompt ----
493 const wxString package_name = from_u8(package_file.filename().string());
494
495 std::string extension = package_file.extension().string();
496 std::transform(extension.begin(), extension.end(), extension.begin(),
497 [](unsigned char ch) { return static_cast<char>(std::tolower(ch)); });
498 if (extension != ".py" && extension != ".whl") {
499 message = _L("Select a .py or .whl plugin package.");
500 return false;
501 }
502
503 PluginDescriptor plugin_descriptor;
504 bool existing_installation = false;
505 std::string error;
506 try {
507 if (!PluginManager::instance().inspect_local_plugin_package(package_file, plugin_descriptor, existing_installation, error)) {
508 BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ": Plugin package inspection failed for " << package_file << " error=" << error;
509 message = _L("Failed to install plugin package. See the log for details.");
510 return false;
511 }
512 } catch (const std::exception& ex) {
513 BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ": Plugin package inspection failed for " << package_file << " error=" << ex.what();
514 message = _L("Failed to install plugin package. See the log for details.");
515 return false;
516 } catch (...) {
517 BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ": Plugin package inspection failed for " << package_file;
518 message = _L("Failed to install plugin package. See the log for details.");
519 return false;
520 }
521
522 if (existing_installation) {
523 const wxString plugin_name = from_u8(plugin_descriptor.name.empty() ? package_file.filename().string() : plugin_descriptor.name);
524 wxMessageDialog dialog(parent,
525 wxString::Format(_L("Plugin \"%s\" is already installed.\n\nInstalling this package will overwrite the existing plugin."),
526 plugin_name),
527 kOverwritePluginTitle, wxOK | wxCANCEL | wxCANCEL_DEFAULT | wxICON_WARNING);
528 dialog.SetOKCancelLabels(_L("Overwrite"), _L("Cancel"));
529 if (dialog.ShowModal() != wxID_OK) {
530 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": Plugin package installation cancelled before overwrite. package=" << package_file
531 << " plugin=" << plugin_descriptor.name;
532 return false; // cancelled: message stays empty so callers stay silent
533 }
534 }
535
536 // ---- install + refresh on a worker behind a modal progress dialog (keeps the UI live) ----
537 bool installed = false;
538 {
539 struct Result
540 {
541 std::mutex mutex;
542 bool ok = false;
543 std::string error;
544 };
545 auto state = std::make_shared<Result>();
546
548 [state, package_file]() {
549 std::string error;
550 bool ok = false;
551 try {
552 ok = PluginManager::instance().install_plugin(package_file, error);
553 } catch (const std::exception& ex) {
554 error = ex.what();
555 } catch (...) {
556 error = "Unknown error";
557 }
558 if (ok) {
559 // Reflect the new package in discovery/cloud metadata without blocking the caller.
560 try { refresh_plugin_metadata_blocking(kUseCurrentCloudMeta); } catch (...) {}
561 }
562 std::lock_guard<std::mutex> lock(state->mutex);
563 state->ok = ok;
564 state->error = std::move(error);
565 },
566 parent, _L("Installing plugin"), _L("Installing plugin") + ": " + package_name, 100,
567 wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_ELAPSED_TIME, /*alive=*/nullptr, /*restore=*/{});
568
569 std::lock_guard<std::mutex> lock(state->mutex);
570 installed = state->ok;
571 error = std::move(state->error);
572 }
573
574 if (!installed) {
575 BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ": Plugin package installation failed for " << package_file << " error=" << error;
576 message = _L("Failed to install plugin package. See the log for details.");
577 return false;
578 }
579
580 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": Plugin package installed successfully from " << package_file;
581 const wxString installed_name = from_u8(plugin_descriptor.name.empty() ? package_file.filename().string() : plugin_descriptor.name);
582 message = wxString::Format(_L("Installed \"%s\"."), installed_name);
583 return true;
584}
static PluginManager & instance()
Definition PluginManager.cpp:74
bool install_plugin(const boost::filesystem::path &filepath, std::string &error)
Definition PluginManager.cpp:1434
std::invoke_result_t< std::decay_t< Run > & > run_wait_with_progress(Run &&run, wxWindow *parent, const wxString &title, const wxString &message, int maximum, int style, std::shared_ptr< std::atomic< bool > > alive, std::function< void()> restore)
Definition PluginsDialog.hpp:132
void refresh_plugin_metadata_blocking(bool fetch_cloud)
Definition PluginsDialog.cpp:433
@ lock
Definition GLGizmoEmboss.cpp:209
Definition PluginDescriptor.hpp:53
std::string name
Definition PluginDescriptor.hpp:55

References _L, from_u8(), Slic3r::PluginManager::install_plugin(), Slic3r::PluginManager::instance(), Slic3r::PluginDescriptor::name, refresh_plugin_metadata_blocking(), and Slic3r::GUI::detail::run_wait_with_progress().

Referenced by Slic3r::GUI::GUI_App::install_local_plugin(), and Slic3r::GUI::PluginsDialog::install_plugin_package().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ intersect()

std::vector< std::string > Slic3r::GUI::intersect ( std::vector< std::string > const & l,
std::vector< std::string > const & r )
static
3688{
3689 std::vector<std::string> t;
3690 std::copy_if(r.begin(), r.end(), std::back_inserter(t), [&l](auto & e) { return std::find(l.begin(), l.end(), e) != l.end(); });
3691 return t;
3692}

References intersect().

Referenced by Slic3r::GUI::TabPrintModel::TabPrintModel(), intersect(), Slic3r::GUI::TabPrintModel::reset_model_config(), Slic3r::GUI::TabPrintPlate::reset_model_config(), and Slic3r::GUI::TabPrintModel::update_model_config().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ into_path()

◆ into_u8()

std::string Slic3r::GUI::into_u8 ( const wxString & str)
550{
551 auto buffer_utf8 = str.utf8_str();
552 return std::string(buffer_utf8.data());
553}

Referenced by Slic3r::GUI::SavePresetDialog::Item::Item(), Slic3r::GUI::PhysicalPrinterDialog::PhysicalPrinterDialog(), Slic3r::GUI::PrivacyUpdateDialog::PrivacyUpdateDialog(), Slic3r::GUI::MainFrame::add_to_recent_projects(), Slic3r::GUI::MainFrame::FileHistory::AddFileToHistory(), Slic3r::anonymous_namespace{PluginHostApp.cpp}::app_info(), Slic3r::GUI::GUI_App::associate_url(), Slic3r::GUI::ImGuiWrapper::bbl_button(), Slic3r::GUI::GizmoObjectManipulation::bbl_checkbox(), Slic3r::GUI::ImGuiWrapper::bbl_checkbox(), Slic3r::GUI::ImGuiWrapper::bbl_combo_with_filter(), Slic3r::GUI::NotificationManager::PopNotification::bbl_render_block_notif_buttons(), Slic3r::GUI::ImGuiWrapper::bbl_slider_float(), Slic3r::GUI::ImGuiWrapper::begin(), Slic3r::GUI::ImGuiWrapper::begin(), Slic3r::GUI::Sidebar::build_filament_ams_list(), Slic3r::GUI::GuideFrame::BuildProfileJson(), Slic3r::GUI::ImGuiWrapper::button(), Slic3r::GUI::ImGuiWrapper::button(), Slic3r::GUI::ImGuiWrapper::button(), Slic3r::GUI::ImGuiWrapper::calc_text_size(), Slic3r::GUI::ImGuiWrapper::checkbox(), anonymous_namespace{GLGizmoSVG.cpp}::choose_svg_file(), Slic3r::GUI::ImGuiWrapper::clipboard_get(), Slic3r::GUI::Sidebar::collect_physical_filament_info(), color_string(), Slic3r::GUI::ImGuiWrapper::combo(), Slic3r::GUI::Mouse3DController::connect_device(), Slic3r::GUI::NotificationManager::PopNotification::count_lines(), create_checkbox(), Slic3r::GUI::CreateFilamentPresetDialog::create_dialog_buttons(), Slic3r::GUI::CreatePresetForPrinterDialog::create_dialog_buttons(), Slic3r::GUI::ExportConfigsDialog::create_dialog_buttons(), Slic3r::PluginPages::create_page(), Slic3r::GUI::CreatePrinterPresetDialog::create_printer_item(), Slic3r::GUI::CreatePresetForPrinterDialog::create_selected_filament_preset_sizer(), Slic3r::GUI::CreatePrinterPresetDialog::data_init(), Slic3r::GUI::IMSlider::draw_custom_label_block(), Slic3r::GUI::anonymous_namespace{Plater.cpp}::emboss_svg(), Slic3r::GUI::PrintHostSendDialog::EndModal(), Slic3r::GUI::Plater::export_3mf(), Slic3r::GUI::MainFrame::export_config(), Slic3r::GUI::Plater::export_core_3mf(), Slic3r::GUI::Plater::export_stl(), Slic3r::GUI::Plater::export_toolpaths_to_obj(), Slic3r::GUI::IMEXModesCtrl::fix_row_name(), Slic3r::GUI::ObjectList::fix_through_cgal(), generate_system_info_json(), Slic3r::GUI::ModelNode::get_bitmap(), Slic3r::GUI::ScoreDialog::get_button_sizer(), Slic3r::PluginConfig::get_config_response(), Slic3r::GUI::ConfigOptionsGroup::get_config_value2(), Slic3r::GUI::CreatePrinterPresetDialog::get_custom_printer_model(), Slic3r::GUI::MainFrame::get_dir_name(), Slic3r::GUI::Plater::priv::get_export_file(), Slic3r::GUI::CreateFilamentPresetDialog::get_filament_preset_choices(), Slic3r::GUI::CreateFilamentPresetDialog::get_filament_presets_by_machine(), Slic3r::GUI::IMEXModesCtrl::get_mode_data(), Slic3r::GUI::CreatePrinterPresetDialog::get_nozzle_diameter(), Slic3r::ElegooLink::get_print_host_webui(), Slic3r::GUI::CreatePrinterPresetDialog::get_printer_model(), Slic3r::GUI::CreatePrinterPresetDialog::get_printer_vendor(), Slic3r::GUI::CaliPASaveManualPanel::get_result(), Slic3r::GUI::CaliSavePresetValuePanel::get_save_name(), get_selection(), Slic3r::PrusaLink::get_storage(), Slic3r::GUI::PrinterAgentChoice::get_value(), Slic3r::GUI::Field::get_value_by_opt_type(), Slic3r::GUI::ImGuiWrapper::glyph_button(), Slic3r::GUI::PrintHostSendDialog::group(), Slic3r::GUI::PluginsConfigDialog::handle_web_command(), Slic3r::GUI::Plater::has_illegal_filename_characters(), Slic3r::GUI::GLGizmoTextureDisplacement::import_custom_texture(), Slic3r::GUI::Plater::import_model_id(), Slic3r::GUI::MainFrame::init_menubar_as_editor(), Slic3r::GUI::ExportConfigsDialog::initial_file_name(), Slic3r::GUI::ExportConfigsDialog::initial_file_path(), Slic3r::GUI::ImGuiWrapper::input_double(), Slic3r::GUI::PluginsDialog::install_cloud_plugin(), Slic3r::GUI::GUI_App::install_local_plugin(), Slic3r::GUI::MainFrame::load_config_file(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::Plater::load_gcode(), Slic3r::GUI::ObjectList::load_generic_subobject(), Slic3r::GUI::GUI_App::load_language(), Slic3r::GUI::ObjectList::load_mesh_object(), Slic3r::GUI::Plater::load_project(), Slic3r::GUI::CreatePrinterPresetDialog::load_system_and_user_presets_with_curr_model(), Slic3r::GUI::WebViewHostDialog::load_url(), Slic3r::GUI::GuideFrame::LoadProfileFamily(), Slic3r::GUI::MarkdownTip::LoadStyle(), Slic3r::GUI::MainFrame::FileHistory::LoadThumbnails(), make_string_bold(), Slic3r::GUI::ActionRegistry::materialize_setting_actions(), Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::notify_script_outcome(), Slic3r::GUI::FlowRateWizard::on_cali_save(), Slic3r::GUI::PrintHostQueueDialog::on_cancel(), Slic3r::GUI::Downloader::on_error(), Slic3r::GUI::PrintHostQueueDialog::on_error(), Slic3r::GUI::Downloader::on_progress(), Slic3r::GUI::PrintHostQueueDialog::on_progress(), Slic3r::GUI::GLGizmoMeshBoolean::on_render_input_window(), Slic3r::GUI::WebViewHostDialog::on_script_message_parse_error(), Slic3r::GUI::CreatePrinterPresetDialog::on_select_printer_model(), Slic3r::GUI::ExportPresetBundleDialog::OnExportData(), Slic3r::GUI::OG_CustomCtrl::OnMotion(), Slic3r::GUI::PrinterCloudAuthDialog::OnScriptMessage(), Slic3r::GUI::ZUserLogin::OnScriptMessage(), Slic3r::GUI::MainFrame::open_recent_project(), Slic3r::GUI::GLGizmoTextureDisplacement::panel_tooltip(), Slic3r::GUI::GUI_App::persist_window_geometry(), Slic3r::GUI::MediaPlayCtrl::Play(), Slic3r::GUI::GUI_App::post_init(), Slic3r::GUI::ArrangeJob::prepare_all(), Slic3r::GUI::ArrangeJob::prepare_partplate(), Slic3r::GUI::OrientJob::prepare_partplate(), Slic3r::GUI::ArrangeJob::prepare_selected(), Slic3r::GUI::OrientJob::prepare_selection(), Slic3r::GUI::CreatePrinterPresetDialog::printer_preset_sort_with_nozzle_diameter(), Slic3r::GUI::PageCustom::profile_name(), Slic3r::GUI::ImGuiWrapper::radio_button(), Slic3r::GUI::GUI_App::refresh_plugins(), Slic3r::GUI::MainFrame::remove_recent_project(), Slic3r::GUI::IMSlider::render_add_menu(), Slic3r::GUI::NotificationManager::PrintHostUploadNotification::render_bar(), Slic3r::GUI::NotificationManager::HintNotification::render_close_button(), Slic3r::GUI::NotificationManager::PopNotification::render_close_button(), Slic3r::GUI::IMSlider::render_edit_menu(), Slic3r::GUI::GLGizmoTextureDisplacement::render_image_adjust_window(), Slic3r::GUI::GCodeViewer::render_legend(), Slic3r::GUI::NotificationManager::PopNotification::render_minimize_button(), Slic3r::GUI::NotificationManager::URLDownloadNotification::render_open_button_inner(), Slic3r::GUI::NotificationManager::URLDownloadNotification::render_pause_button_inner(), Slic3r::GUI::NotificationManager::HintNotification::render_preferences_button(), Slic3r::GUI::NotificationManager::HintNotification::render_right_arrow_button(), Slic3r::GUI::GLGizmoTextureDisplacement::render_tip_media(), Slic3r::GUI::Plater::priv::reset(), Slic3r::GUI::DesignSketchTool::resolve_live_drag(), Slic3r::PluginConfig::restore_config_response(), Slic3r::GUI::SpeedDialWebDialog::run_action(), Slic3r::GUI::Plater::priv::run_textured_mesh_import_dialog(), Slic3r::PluginConfig::save_config_response(), Slic3r::GUI::CreatePrinterPresetDialog::save_printable_area_config(), Slic3r::GUI::Plater::save_project(), Slic3r::GUI::CaliPASaveAutoPanel::save_to_result_from_widgets(), Slic3r::GUI::PluginsConfigDialog::send_capability_config(), Slic3r::GUI::MainFrame::set_max_recent_count(), Slic3r::GUI::PluginConfigField::set_value(), Slic3r::GUI::PluginField::set_value(), Slic3r::GUI::PrinterAgentChoice::set_value(), Slic3r::GUI::PrinterAgentChoice::set_value(), Slic3r::GUI::GuideFrame::SetStartPage(), Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::setting_text(), Slic3r::GUI::ObjectGridTable::SetValue(), Slic3r::GUI::Plater::priv::show_install_plugin_hint(), Slic3r::GUI::Plater::show_object_info(), Slic3r::GUI::Plater::priv::show_preview_only_hint(), Slic3r::GUI::PluginsConfigDialog::show_status(), Slic3r::GUI::PluginsDialog::show_status(), Slic3r::GUI::ImGuiWrapper::slider_float(), Slic3r::GUI::IMEXModesCtrl::snapshot_row(), start_new_slicer_or_gcodeviewer(), Slic3r::GUI::MediaPlayCtrl::Stop(), Slic3r::GUI::PrintHostSendDialog::storage(), Slic3r::GUI::IMEXModesCtrl::suggested_mode_names(), Slic3r::GUI::ImGuiWrapper::text(), Slic3r::GUI::ImGuiWrapper::text_colored(), Slic3r::GUI::ImGuiWrapper::text_wrapped(), Slic3r::GUI::MediaPlayCtrl::ToggleStream(), Slic3r::GUI::IMEXModesCtrl::unique_mode_name(), Slic3r::GUI::PlaterPresetComboBox::update(), Slic3r::GUI::PresetComboBox::update(), Slic3r::GUI::SavePresetDialog::Item::update(), Slic3r::GUI::TabPresetComboBox::update(), Slic3r::GUI::ObjectTableSettings::update_config_values(), update_custom_filaments(), Slic3r::GUI::PhysicalPrinterDialog::update_preset_input(), Slic3r::GUI::UnsavedChangesDialog::update_tree(), Slic3r::GUI::ModelNode::UpdateEnabling(), Slic3r::ElegooLink::upload_inner_with_host(), Slic3r::OctoPrint::upload_inner_with_host(), Slic3r::PrusaLink::upload_inner_with_host(), Slic3r::GUI::CreatePrinterPresetDialog::validate_input_valid(), validate_thumbnails_string(), Slic3r::GUI::IMSlider::vertical_slider(), Slic3r::GUI::ImGuiWrapper::warning_text(), and Slic3r::wxDEFINE_EVENT().

◆ is_bad_field()

bool Slic3r::GUI::is_bad_field ( const t_field & obj)
inline

Convenience function, accepts a const reference to t_field and checks to see whether or not both wx pointers are null.

316{ return obj->getSizer() == nullptr && obj->getWindow() == nullptr; }
virtual wxSizer * getSizer()
If you don't know what you are getting back, check both methods for nullptr.
Definition Field.hpp:270
virtual wxWindow * getWindow()
Definition Field.hpp:271

References Slic3r::GUI::Field::getSizer(), and Slic3r::GUI::Field::getWindow().

Referenced by is_sizer_field(), and is_window_field().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_base_plane()

bool Slic3r::GUI::is_base_plane ( const SketchPlane & p,
const Vec3d & modeling_origin )
static
373{
375 b.origin += modeling_origin;
376 const double e = 1e-6;
377 return (p.origin - b.origin).norm() < e && (p.normal - b.normal).norm() < e
378 && (p.x_axis - b.x_axis).norm() < e && (p.y_axis - b.y_axis).norm() < e;
379}
static SketchPlane plane_from_index(int i)
Definition DesignPanel.cpp:345
static int index_from_plane(const SketchPlane &p)
Definition DesignPanel.cpp:356

References index_from_plane(), Slic3r::SketchPlane::normal, Slic3r::SketchPlane::origin, plane_from_index(), Slic3r::SketchPlane::x_axis, and Slic3r::SketchPlane::y_axis.

Referenced by Slic3r::GUI::DesignSketchTool::hit_test_base_pick(), Slic3r::GUI::DesignPanel::load_feature_into_dialog(), reference_square(), and Slic3r::GUI::DesignSketchTool::render_base_pick().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_belt_purge_prism()

bool Slic3r::GUI::is_belt_purge_prism ( const ModelObject * mo)
static
150{
151 const ConfigOption *opt = mo->config.option("belt_purge_tower_object");
152 return opt != nullptr && opt->getBool();
153}
const ConfigOption * option(const t_config_option_key &opt_key) const
Definition PrintConfig.hpp:2652
ModelConfigObject config
Definition Model.hpp:395

References Slic3r::ModelObject::config, and Slic3r::ModelConfig::option().

Referenced by Slic3r::GUI::ArrangeJob::prepare_all(), Slic3r::GUI::ArrangeJob::prepare_partplate(), and Slic3r::GUI::ArrangeJob::prepare_selected().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_caret_line()

bool Slic3r::GUI::is_caret_line ( const std::string & line)
static
269{
270 return std::count(line.begin(), line.end(), '^') == 1 &&
271 std::all_of(line.begin(), line.end(), [](char c) { return c == ' ' || c == '^'; });
272}

Referenced by classify_code_lines().

Here is the caller graph for this function:

◆ is_debugger_present()

bool Slic3r::GUI::is_debugger_present ( )
45{
46 int junk;
47 int mib[4];
48 struct kinfo_proc info;
49 size_t size;
50
51 // Initialize the flags so that, if sysctl fails for some bizarre
52 // reason, we get a predictable result.
53
54 info.kp_proc.p_flag = 0;
55
56 // Initialize mib, which tells sysctl the info we want, in this case
57 // we're looking for information about a specific process ID.
58
59 mib[0] = CTL_KERN;
60 mib[1] = KERN_PROC;
61 mib[2] = KERN_PROC_PID;
62 mib[3] = getpid();
63
64 // Call sysctl.
65
66 size = sizeof(info);
67 junk = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0);
68 assert(junk == 0);
69
70 // We're being debugged if the P_TRACED flag is set.
71
72 return ( (info.kp_proc.p_flag & P_TRACED) != 0 );
73}

◆ is_defined_input_value()

template<class T>
bool Slic3r::GUI::is_defined_input_value ( wxWindow * win,
const ConfigOptionType & type )
957{
958 if (!win || (static_cast<T*>(win)->GetValue().empty() && type != coString && type != coStrings && type != coPoints && type != coPoint))
959 return false;
960 return true;
961}

References Slic3r::coPoint, Slic3r::coPoints, Slic3r::coString, Slic3r::coStrings, and Slic3r::empty().

Referenced by Slic3r::GUI::Choice::propagate_value(), and Slic3r::GUI::TextCtrl::propagate_value().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_improper_category()

bool Slic3r::GUI::is_improper_category ( const std::string & category,
const int filaments_cnt,
const bool is_object_settings = true )
static
71{
72 return category.empty() ||
73 (filaments_cnt == 1 && (category == "Extruders" || category == "Wipe options")) ||
74 (!is_object_settings && category == "Support material");
75}

Referenced by create_freq_settings_popupmenu(), Slic3r::GUI::SettingsFactory::get_bundle(), and get_full_settings_hierarchy().

Here is the caller graph for this function:

◆ is_left_handed() [1/2]

bool Slic3r::GUI::is_left_handed ( const Transform3d & m)
static
3004{
3005 return is_left_handed(m.linear());
3006}
static bool is_left_handed(const Transform3d::ConstLinearPart &m)
Definition Selection.cpp:2998

References is_left_handed().

Here is the call graph for this function:

◆ is_left_handed() [2/2]

bool Slic3r::GUI::is_left_handed ( const Transform3d::ConstLinearPart & m)
static
2999{
3000 return m.determinant() < 0;
3001}

Referenced by Slic3r::GUI::GLCanvas3D::_load_sla_shells(), Slic3r::GUI::Plater::export_stl(), is_left_handed(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_sphere(), Slic3r::GUI::GLGizmoPainterBase::render_triangles(), Slic3r::GUI::Selection::synchronize_unselected_instances(), and Slic3r::GUI::GLGizmoFlatten::update_planes().

Here is the caller graph for this function:

◆ is_pa_params_valid()

bool Slic3r::GUI::is_pa_params_valid ( const Calib_Params & params)
93{
94 if (params.start < MIN_PA_K_VALUE || params.end > MAX_PA_K_VALUE || params.step < EPSILON || params.end < params.start + params.step) {
95 MessageDialog msg_dlg(nullptr,
96 wxString::Format(_L("Please input valid values:\nStart value: >= %.1f\nEnd value: <= %.1f\nEnd value: > Start value\nValue step: >= %.3f"), MIN_PA_K_VALUE, MAX_PA_K_VALUE, MIN_PA_K_VALUE_STEP),
97 wxEmptyString, wxICON_WARNING | wxOK);
98 msg_dlg.ShowModal();
99 return false;
100 }
101 return true;
102}
const double MAX_PA_K_VALUE
Definition CalibUtils.cpp:68
static const float MIN_PA_K_VALUE_STEP
Definition CalibrationWizard.cpp:48
const double MIN_PA_K_VALUE
Definition CalibUtils.cpp:67
double step
Definition calib.hpp:45

References _L, Slic3r::Calib_Params::end, EPSILON, MAX_PA_K_VALUE, MIN_PA_K_VALUE, MIN_PA_K_VALUE_STEP, Slic3r::GUI::DPIAware< P >::ShowModal(), Slic3r::Calib_Params::start, and Slic3r::Calib_Params::step.

Referenced by Slic3r::GUI::PressureAdvanceWizard::on_cali_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_point_in_rect()

bool Slic3r::GUI::is_point_in_rect ( const wxPoint & pt,
const wxRect & rect )
static
43{
44 return rect.GetLeft() <= pt.x && pt.x <= rect.GetRight() &&
45 rect.GetTop() <= pt.y && pt.y <= rect.GetBottom();
46}

Referenced by Slic3r::GUI::OG_CustomCtrl::OnLeftDown(), and Slic3r::GUI::OG_CustomCtrl::OnMotion().

Here is the caller graph for this function:

◆ is_rotation_xy_synchronized()

bool Slic3r::GUI::is_rotation_xy_synchronized ( const Transform3d & rot_xyz_from,
const Transform3d & rot_xyz_to )
static
3010{
3011 const Eigen::AngleAxisd angle_axis((rot_xyz_from * rot_xyz_to.inverse()).rotation());
3012 const Vec3d axis = angle_axis.axis();
3013 const double angle = angle_axis.angle();
3014 if (std::abs(angle) < 1e-8)
3015 return true;
3016 assert(std::abs(axis.x()) < 1e-8);
3017 assert(std::abs(axis.y()) < 1e-8);
3018 assert(std::abs(std::abs(axis.z()) - 1.) < 1e-8);
3019 return std::abs(axis.x()) < 1e-8 && std::abs(axis.y()) < 1e-8 && std::abs(std::abs(axis.z()) - 1.) < 1e-8;
3020}

References Slic3r::angle().

Referenced by Slic3r::GUI::Selection::synchronize_unselected_instances(), and verify_instances_rotation_synchronized().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_running_in_msix()

bool Slic3r::GUI::is_running_in_msix ( )
198{
199#ifdef _WIN32
200 // The package identity APIs are Win8+ - resolved dynamically so the exe still loads on Win7
201 // (same treatment as the DPI APIs below). Null-buffer probe: returns ERROR_INSUFFICIENT_BUFFER
202 // when packaged, APPMODEL_ERROR_NO_PACKAGE when running unpackaged.
203 struct GetCurrentPackageFullName_t { typedef LONG (WINAPI *FN)(UINT32 *length, PWSTR full_name); };
204 static const bool packaged = []() {
205 auto fn = winapi_get_function<GetCurrentPackageFullName_t>(L"Kernel32.dll", "GetCurrentPackageFullName");
206 UINT32 length = 0;
207 return fn != nullptr && fn(&length, nullptr) != APPMODEL_ERROR_NO_PACKAGE;
208 }();
209 return packaged;
210#else
211 return false;
212#endif
213}

References L, and Slic3r::length().

Referenced by Slic3r::GUI::UpdateVersionDialog::UpdateVersionDialog(), Slic3r::GUI::GUI_App::associate_files(), Slic3r::GUI::GUI_App::associate_url(), Slic3r::GUI::PreferencesDialog::create_items(), Slic3r::GUI::GUI_App::disassociate_files(), Slic3r::GUI::GUI_App::disassociate_url(), Slic3r::GUI::GUI_App::on_init_inner(), and Slic3r::GUI::UpdateVersionDialog::update_version_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_same_nozzle_config()

bool Slic3r::GUI::is_same_nozzle_config ( const std::map< int, std::vector< DevNozzle > > & config1,
const std::map< int, std::vector< DevNozzle > > & config2 )
static
2029{
2030 if (config1.size() != config2.size()) return false;
2031
2032 for (const auto& [eid, nozzles1] : config1) {
2033 auto it = config2.find(eid);
2034 if (it == config2.end()) return false;
2035
2036 const auto &nozzles2 = it->second;
2037 if (nozzles1.size() != nozzles2.size()) return false;
2038
2039 auto sorted_nozzles1 = nozzles1;
2040 auto sorted_nozzles2 = nozzles2;
2041
2042 auto compare_nozzle = [](const DevNozzle &a, const DevNozzle &b) {
2043 float dia_a = a.GetNozzleDiameter();
2044 float dia_b = b.GetNozzleDiameter();
2045 if (std::abs(dia_a - dia_b) > EPSILON) {
2046 return dia_a < dia_b;
2047 }
2048 return static_cast<int>(a.GetNozzleFlowType()) < static_cast<int>(b.GetNozzleFlowType());
2049 };
2050
2051 std::sort(sorted_nozzles1.begin(), sorted_nozzles1.end(), compare_nozzle);
2052 std::sort(sorted_nozzles2.begin(), sorted_nozzles2.end(), compare_nozzle);
2053
2054 for (size_t i = 0; i < sorted_nozzles1.size(); ++i) {
2055 if (std::abs(sorted_nozzles1[i].GetNozzleDiameter() - sorted_nozzles2[i].GetNozzleDiameter()) > EPSILON ||
2056 sorted_nozzles1[i].GetNozzleFlowType() != sorted_nozzles2[i].GetNozzleFlowType()) {
2057 return false;
2058 }
2059 }
2060 }
2061
2062 return true;
2063}
NozzleFlowType GetNozzleFlowType() const
Definition DevNozzleSystem.h:61
float GetNozzleDiameter() const
Definition DevNozzleSystem.h:63

References EPSILON, Slic3r::DevNozzle::GetNozzleDiameter(), and Slic3r::DevNozzle::GetNozzleFlowType().

Referenced by Slic3r::GUI::Sidebar::priv::get_nozzle_options().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_same_nozzle_type()

bool Slic3r::GUI::is_same_nozzle_type ( const DynamicPrintConfig & full_config,
const MachineObject * obj,
wxString & error_msg )
static
302{
303 if (obj == nullptr)
304 return true;
305
307 int printer_nozzle_hrc = Print::get_hrc_by_nozzle_type(nozzle_type);
308
309 if (full_config.has("required_nozzle_HRC")) {
310 int filament_nozzle_hrc = full_config.opt_int("required_nozzle_HRC", 0);
311 if (abs(filament_nozzle_hrc) > abs(printer_nozzle_hrc)) {
312 BOOST_LOG_TRIVIAL(info) << "filaments hardness mismatch: printer_nozzle_hrc = " << printer_nozzle_hrc << ", filament_nozzle_hrc = " << filament_nozzle_hrc;
313 std::string filament_type = full_config.opt_string("filament_type", 0);
314 error_msg = format_wxstr(_L("Printing %1% material with %2% nozzle may cause nozzle damage."), filament_type, to_wstring_name(NozzleTypeEumnToStr[obj->GetExtderSystem()->GetNozzleType(0)]));
315 error_msg += "\n";
316
317 MessageDialog msg_dlg(nullptr, error_msg, wxEmptyString, wxICON_WARNING | wxOK | wxCANCEL);
318 auto result = msg_dlg.ShowModal();
319 if (result == wxID_OK) {
320 error_msg.clear();
321 return true;
322 } else {
323 error_msg.clear();
324 return false;
325 }
326 }
327 }
328
329 return true;
330}
static int get_hrc_by_nozzle_type(const NozzleType &type)
Definition Print.cpp:4570
static wxString to_wstring_name(std::string name)
Definition CalibUtils.cpp:286
static std::unordered_map< NozzleType, std::string > NozzleTypeEumnToStr
Definition PrintConfig.hpp:538
zaa_minimize_perimeter_height filament_type((ConfigOptionBools, filament_soluble))((ConfigOptionStrings
NozzleType
Definition CommonDefs.hpp:13
zaa_minimize_perimeter_height nozzle_type((ConfigOptionInt, nozzle_hrc))((ConfigOptionBool

References _L, Slic3r::filament_type(), format_wxstr(), Slic3r::Print::get_hrc_by_nozzle_type(), Slic3r::MachineObject::GetExtderSystem(), Slic3r::DevExtderSystem::GetNozzleType(), Slic3r::ConfigOptionResolver::has(), Slic3r::nozzle_type(), Slic3r::NozzleTypeEumnToStr, Slic3r::DynamicConfig::opt_int(), Slic3r::DynamicConfig::opt_string(), Slic3r::GUI::DPIAware< P >::ShowModal(), and to_wstring_name().

Referenced by check_nozzle_diameter_and_type(), and Slic3r::GUI::Sidebar::priv::update_sync_status().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_sizer_field()

bool Slic3r::GUI::is_sizer_field ( const t_field & obj)
inline

Covenience function to determine whether this field is a valid sizer field.

322{ return !is_bad_field(obj) && obj->getSizer() != nullptr; }
bool is_bad_field(const t_field &obj)
Convenience function, accepts a const reference to t_field and checks to see whether or not both wx p...
Definition Field.hpp:316

References Slic3r::GUI::Field::getSizer(), and is_bad_field().

Referenced by Slic3r::GUI::OptionsGroup::activate_line().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_skip_high_flow_printer()

bool Slic3r::GUI::is_skip_high_flow_printer ( const std::string & printer)
static
1940{
1941 static const std::set<std::string> invalidate_list = {
1942 "Bambu Lab X1E"
1943 };
1944 return invalidate_list.count(printer);
1945};

Referenced by Slic3r::GUI::Sidebar::update_presets().

Here is the caller graph for this function:

◆ is_soluble_filament()

bool Slic3r::GUI::is_soluble_filament ( int extruder_id)
10457{
10458 auto &filament_presets = Slic3r::GUI::wxGetApp().preset_bundle->filament_presets;
10459 auto &filaments = Slic3r::GUI::wxGetApp().preset_bundle->filaments;
10460
10461 if (extruder_id >= filament_presets.size()) return false;
10462
10463 Slic3r::Preset *filament = filaments.find_preset(filament_presets[extruder_id]);
10464 if (filament == nullptr) return false;
10465
10466 Slic3r::ConfigOptionBools *support_option = dynamic_cast<Slic3r::ConfigOptionBools *>(filament->config.option("filament_soluble"));
10467 if (support_option == nullptr) return false;
10468
10469 return support_option->get_at(0);
10470};

References Slic3r::Preset::config, Slic3r::ConfigOptionBoolsTempl< NULLABLE >::get_at(), is_soluble_filament(), and Slic3r::ConfigBase::option().

Referenced by is_soluble_filament(), Slic3r::GUI::Tab::on_value_change(), and wxDECLARE_EVENT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_support_filament()

bool Slic3r::GUI::is_support_filament ( int extruder_id,
bool strict_check )
10493{
10494 auto &filament_presets = Slic3r::GUI::wxGetApp().preset_bundle->filament_presets;
10495 auto &filaments = Slic3r::GUI::wxGetApp().preset_bundle->filaments;
10496
10497 if (extruder_id >= filament_presets.size()) return false;
10498
10499 Slic3r::Preset *filament = filaments.find_preset(filament_presets[extruder_id]);
10500 if (filament == nullptr) return false;
10501
10502 std::string filament_type = filament->config.option<ConfigOptionStrings>("filament_type")->values[0];
10503
10504 Slic3r::ConfigOptionBools *support_option = dynamic_cast<Slic3r::ConfigOptionBools *>(filament->config.option("filament_is_support"));
10505
10506 if(!strict_check &&(filament_type == "PETG" || filament_type == "PLA")) {
10507 std::vector<std::string> model_filaments;
10508 if (filament_type == "PETG")
10509 model_filaments.emplace_back("PLA");
10510 else {
10511 model_filaments = {"PETG", "TPU", "TPU-AMS"};
10512 }
10513 if (has_filaments(model_filaments)) return true;
10514 }
10515 if (support_option == nullptr) return false;
10516 return support_option->get_at(0);
10517};
bool has_filaments(const std::vector< std::string > &model_filaments)
Definition GUI_App.cpp:10472

References Slic3r::Preset::config, Slic3r::filament_type(), has_filaments(), is_support_filament(), and Slic3r::ConfigBase::option().

Referenced by Slic3r::GUI::Sidebar::auto_calc_flushing_volumes_internal(), Slic3r::anonymous_namespace{PluginHostPresets.cpp}::bind_filament_target(), WipingDialog::CalcFlushingVolumes(), is_support_filament(), Slic3r::GUI::Plater::priv::on_select_preset(), Slic3r::GUI::Tab::on_value_change(), Slic3r::GUI::Sidebar::sync_ams_list(), and wxDECLARE_EVENT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_transparent_color()

bool Slic3r::GUI::is_transparent_color ( const wxColour & color)
static
236 {
237 return color.Alpha() == 0;
238}

Referenced by create_single_filament_bitmap().

Here is the caller graph for this function:

◆ is_window_field()

bool Slic3r::GUI::is_window_field ( const t_field & obj)
inline

Covenience function to determine whether this field is a valid window field.

319{ return !is_bad_field(obj) && obj->getWindow() != nullptr && obj->getSizer() == nullptr; }

References Slic3r::GUI::Field::getSizer(), Slic3r::GUI::Field::getWindow(), and is_bad_field().

Referenced by Slic3r::GUI::OptionsGroup::activate_line().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ its_make_line()

GLModel::Geometry Slic3r::GUI::its_make_line ( Vec3f beg_pos,
Vec3f end_pos )
static
113{
114 GLModel::Geometry init_data;
116 init_data.reserve_vertices(2);
117 init_data.reserve_indices(2);
118
119 // vertices
120 init_data.add_vertex(beg_pos);
121 init_data.add_vertex(end_pos);
122
123 // indices
124 init_data.add_line(0, 1);
125 return init_data;
126}

References Slic3r::GUI::GLModel::Geometry::add_line(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::Geometry::Lines, Slic3r::GUI::GLModel::Geometry::P3, Slic3r::GUI::GLModel::Geometry::reserve_indices(), and Slic3r::GUI::GLModel::Geometry::reserve_vertices().

Referenced by Slic3r::GUI::GLGizmoCut3D::init_rendering_items(), and Slic3r::GUI::GLGizmoCut3D::render_cut_line().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ key_released()

void Slic3r::GUI::key_released ( int key)
static
4356{ s_keys_down.erase(key); }
static std::set< int > s_keys_down
Definition GLCanvas3D.cpp:4347

References s_keys_down.

Referenced by Slic3r::GUI::GLCanvas3D::on_key().

Here is the caller graph for this function:

◆ key_repeats()

bool Slic3r::GUI::key_repeats ( int key)
static
4350{
4351 for (auto it = s_keys_down.begin(); it != s_keys_down.end();) // drops keys released while no canvas had the focus
4352 it = wxGetKeyState(wxKeyCode(*it)) ? std::next(it) : s_keys_down.erase(it);
4353 return !s_keys_down.insert(key).second;
4354}

References s_keys_down.

Referenced by Slic3r::GUI::GLCanvas3D::on_key().

Here is the caller graph for this function:

◆ L_str()

wxString Slic3r::GUI::L_str ( const std::string & str)

Explicitly specify that the source string is already in UTF-8 encoding

10{
12 return wxGetTranslation(wxString(str.c_str(), wxConvUTF8));
13}

◆ libslic3r_translate_callback()

std::string Slic3r::GUI::libslic3r_translate_callback ( const char * s)
static
747{ return wxGetTranslation(wxString(s, wxConvUTF8)).utf8_str().data(); }

Referenced by Slic3r::GUI::GUI_App::on_init_inner().

Here is the caller graph for this function:

◆ list_model()

ObjectDataViewModel * Slic3r::GUI::list_model ( )
static
411{
412 return wxGetApp().obj_list()->GetModel();
413}

Referenced by Slic3r::GUI::MenuFactory::append_menu_item_settings(), Slic3r::GUI::MenuFactory::assemble_multi_selection_menu(), and Slic3r::GUI::MenuFactory::multi_selection_menu().

Here is the caller graph for this function:

◆ load_filament_id_sources()

void Slic3r::GUI::load_filament_id_sources ( PresetBundle & temp_preset_bundle)
static
546{
548 std::string dir_user_presets = wxGetApp().app_config->get("preset_folder");
549 if (dir_user_presets.empty()) {
551 } else {
552 temp_preset_bundle.load_user_presets(dir_user_presets, ForwardCompatibilitySubstitutionRule::EnableSilent);
553 }
554}
#define DEFAULT_USER_FOLDER_NAME
Definition PresetBundle.hpp:31
std::pair< PresetsConfigSubstitutions, std::string > load_system_filaments_json(ForwardCompatibilitySubstitutionRule compatibility_rule)
Definition PresetBundle.cpp:3553
PresetsConfigSubstitutions load_user_presets(std::string user, ForwardCompatibilitySubstitutionRule rule, bool read_only=false)
Definition PresetBundle.cpp:1411
@ EnableSilent
Definition Config.hpp:247

References DEFAULT_USER_FOLDER_NAME, Slic3r::EnableSilent, Slic3r::PresetBundle::load_system_filaments_json(), and Slic3r::PresetBundle::load_user_presets().

Referenced by Slic3r::GUI::CreateFilamentPresetDialog::create_dialog_buttons(), and Slic3r::GUI::CreatePrinterPresetDialog::create_page2_dialog_buttons().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_image()

bool Slic3r::GUI::load_image ( const std::string & filename,
wxImage & image )
491{
492 bool result = true;
493 if (boost::algorithm::iends_with(filename, ".png")) {
494 result = image.LoadFile(wxString::FromUTF8(filename.c_str()), wxBITMAP_TYPE_PNG);
495 } else if (boost::algorithm::iends_with(filename, ".bmp")) {
496 result = image.LoadFile(wxString::FromUTF8(filename.c_str()), wxBITMAP_TYPE_BMP);
497 } else if (boost::algorithm::iends_with(filename, ".jpg")) {
498 result = image.LoadFile(wxString::FromUTF8(filename.c_str()), wxBITMAP_TYPE_JPEG);
499 } else if (boost::algorithm::iends_with(filename, ".jpeg")) {
500 result = image.LoadFile(wxString::FromUTF8(filename.c_str()), wxBITMAP_TYPE_JPEG);
501 }
502 else {
503 return false;
504 }
505 return result;
506}

Referenced by generate_image().

Here is the caller graph for this function:

◆ load_next_part_texture()

bool Slic3r::GUI::load_next_part_texture ( PartPlateList::BedTextureInfo * infos,
size_t count,
size_t & next,
bool compress_and_filter )
static
9023{
9024 size_t k = next;
9025 for (size_t i = 0; i < count; ++i) {
9026 if (k >= infos[i].parts.size()) {
9027 k -= infos[i].parts.size();
9028 continue;
9029 }
9030 ++next;
9031 PartPlateList::BedTextureInfo::TexturePart& part = infos[i].parts[k];
9032 const std::string filename = resources_dir() + "/images/" + part.filename;
9033 if (boost::filesystem::exists(filename)) {
9034 part.texture = new GLTexture();
9035 if (!part.texture->load_from_svg_file(filename, true, compress_and_filter, compress_and_filter, logo_texture_size()))
9036 BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(": load texture from %1% failed!") % filename;
9037 } else {
9038 BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(": load texture from %1% failed!") % filename;
9039 }
9040 return true;
9041 }
9042 return false;
9043}
std::vector< TexturePart > parts
Definition PartPlate.hpp:889
static GLint logo_texture_size()
Definition PartPlate.cpp:9015

References count, Slic3r::GUI::PartPlateList::BedTextureInfo::TexturePart::filename, Slic3r::GUI::GLTexture::load_from_svg_file(), logo_texture_size(), Slic3r::GUI::PartPlateList::BedTextureInfo::parts, Slic3r::resources_dir(), and Slic3r::GUI::PartPlateList::BedTextureInfo::TexturePart::texture.

Referenced by Slic3r::GUI::PartPlateList::load_next_bedtype_texture(), Slic3r::GUI::PartPlateList::load_next_cali_texture(), and Slic3r::GUI::PartPlateList::load_next_extruder_only_area_texture().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_texture_image_data()

std::shared_ptr< std::vector< unsigned char > > Slic3r::GUI::load_texture_image_data ( const std::string & path,
std::string & error )
443{
444 std::vector<unsigned char> bytes = read_file_bytes(path);
445 if (bytes.empty()) {
446 error = _u8L("Could not read the texture file.");
447 return nullptr;
448 }
449 if (is_supported_height_map(bytes))
450 return std::make_shared<std::vector<unsigned char>>(std::move(bytes));
451
452 // Not a PNG at all (a jpg somebody copied into the folder by hand, say): convert it the same way
453 // an import would - keeping its colour if it has any - but leave the file on disk alone.
454 wxImage image;
455 if (!image.LoadFile(from_u8(path)) || !image.IsOk()) {
456 error = _u8L("Could not load the selected image.");
457 return nullptr;
458 }
459 std::vector<unsigned char> converted;
460 if (!encode_png_bytes(image, converted, error))
461 return nullptr;
462 return std::make_shared<std::vector<unsigned char>>(std::move(converted));
463}
wxString from_u8(const std::string &str)
Definition GUI.cpp:544

References _u8L, and from_u8().

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::get_library_texture().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log_substitutions() [1/2]

void Slic3r::GUI::log_substitutions ( const ConfigSubstitutions & substitutions,
const std::string & source )
static
8873{
8874 for (const ConfigSubstitution& substitution : substitutions)
8875 BOOST_LOG_TRIVIAL(warning) << "Loading " << source << ": " << substitution.opt_def->opt_key << " = \"" << substitution.old_value
8876 << "\" replaced with \"" << substitution.new_value->serialize() << "\"";
8877}

Referenced by Slic3r::GUI::Plater::priv::load_files(), and log_substitutions().

Here is the caller graph for this function:

◆ log_substitutions() [2/2]

void Slic3r::GUI::log_substitutions ( const PresetsConfigSubstitutions & substitutions,
const std::string & source )
static
8880{
8881 for (const PresetConfigSubstitutions& preset : substitutions)
8882 log_substitutions(preset.substitutions, source + " (preset " + preset.preset_name + ")");
8883}
static void log_substitutions(const ConfigSubstitutions &substitutions, const std::string &source)
Definition Plater.cpp:8872
Definition Preset.hpp:531

References log_substitutions().

Here is the call graph for this function:

◆ logo_texture_size()

GLint Slic3r::GUI::logo_texture_size ( )
static
9016{
9017 return std::min<GLint>(OpenGLManager::get_gl_info().get_max_tex_size(), 2048);
9018}

References Slic3r::GUI::OpenGLManager::get_gl_info().

Referenced by Slic3r::GUI::PartPlateList::load_logo_texture(), and load_next_part_texture().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookup_decompose_official_component()

DecomposeOfficialComponent Slic3r::GUI::lookup_decompose_official_component ( const std::string & basic_type,
DecomposeBaseColor base_color,
const wxColour & fallback )
144{
146 result.base_color = base_color;
147 result.color_hex = decompose_normalize_color_hex(fallback.GetAsString(wxC2S_HTML_SYNTAX).ToStdString());
148 result.filament_id = decompose_basic_filament_id(basic_type);
149
150 const char* color_name = decompose_base_color_en(base_color);
151 if (color_name[0] == '\0')
152 return result;
153
154 // Some materials name a standard base color differently in the color-code
155 // table. PETG Basic's RYBW blue base is "Reflex Blue" (deep blue, B00,
156 // #001489), not "Blue". Match by an ordered list of exact English names so
157 // "Navy Blue" (B01, #0086D6) is never picked up by mistake.
158 std::vector<std::string> candidate_names;
159 candidate_names.emplace_back(color_name);
160 if (base_color == DecomposeBaseColor::Blue && basic_type == kDecomposePetgBasicType)
161 candidate_names.emplace_back("Reflex Blue");
162
163 std::ifstream ifs(resources_dir() + "/profiles/BBL/filament/filaments_color_codes.json");
164 if (!ifs)
165 return result;
166
167 json root = json::parse(ifs, nullptr, false);
168 if (root.is_discarded() || !root.contains("data") || !root["data"].is_array())
169 return result;
170
171 for (const std::string& candidate : candidate_names) {
172 for (const auto& item : root["data"]) {
173 if (!item.is_object() || item.value("fila_type", "") != basic_type)
174 continue;
175 if (!item.contains("fila_color_name"))
176 continue;
177 const auto& names = item["fila_color_name"];
178 if (!names.is_object() || names.value("en", "") != candidate)
179 continue;
180 if (item.contains("fila_color") && item["fila_color"].is_array() && !item["fila_color"].empty())
181 result.color_hex = decompose_normalize_color_hex(item["fila_color"][0].get<std::string>());
182 // fila_id from this shipped, Bambu-keyed color table is a printer-side id; translate it so
183 // result.filament_id stays an OF id like the rest of this struct (the fallback default,
184 // result.filament_id, is already OF and passes through unchanged).
185 const std::string fila_id = item.value("fila_id", result.filament_id);
186 auto* agent = wxGetApp().getAgent();
187 result.filament_id = agent ? agent->to_orca_filament_id(fila_id) : fila_id;
188 return result;
189 }
190 }
191 return result;
192}
DecomposeBaseColor base_color
Definition ColorDecomposeSupport.hpp:30
std::string decompose_basic_filament_id(const std::string &basic_type)
Definition ColorDecomposeSupport.cpp:103
const char * decompose_base_color_en(DecomposeBaseColor color)
Definition ColorDecomposeSupport.cpp:44
Definition ColorDecomposeSupport.hpp:29

References Slic3r::GUI::DecomposeOfficialComponent::base_color, Blue, Slic3r::GUI::DecomposeOfficialComponent::color_hex, decompose_base_color_en(), decompose_basic_filament_id(), decompose_normalize_color_hex(), Slic3r::GUI::DecomposeOfficialComponent::filament_id, kDecomposePetgBasicType, and Slic3r::resources_dir().

Referenced by count_decompose_new_physical_filaments(), prepare_decompose_mixed_result(), and Slic3r::GUI::ColorDecomposeDialog::try_build_single_base_result().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mac_dark_mode()

bool Slic3r::GUI::mac_dark_mode ( )
29{
30 NSString *style = [[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"];
31 return style && [style isEqualToString:@"Dark"];
32
33}

References style.

Referenced by Slic3r::GUI::GUI_App::dark_mode().

Here is the caller graph for this function:

◆ mac_ime_owns_key()

bool Slic3r::GUI::mac_ime_owns_key ( void * ns_view)
187{
188 NSView* view = (NSView*) ns_view;
189 NSEvent* event = [NSApp currentEvent];
190 return view != nil && is_active(view) && event.type == NSEventTypeKeyDown &&
191 (marked_text(view) != nil || get(view, &key_ime_event) == event);
192}

Referenced by Slic3r::GUI::GLCanvas3D::on_key().

Here is the caller graph for this function:

◆ mac_ime_set_active()

void Slic3r::GUI::mac_ime_set_active ( void * ns_view,
bool active )
155{
156 NSView* view = (NSView*) ns_view;
157 if (view == nil || active == is_active(view))
158 return;
159 NSTextInputContext* context = get(view, &key_context);
160 if (context == nil) {
161 install([view class]);
162 context = [[[NSTextInputContext alloc] initWithClient:(id<NSTextInputClient>) view] autorelease];
163 set(view, &key_context, context);
164 }
165 // An open composition belongs to the field that lost input or to an earlier session; dropping it
166 // first keeps the input method's callbacks from committing it.
167 set_marked_text(view, nil, {});
168 set(view, &key_active, @(active));
169 if (active)
170 [context activate];
171 else {
172 [context discardMarkedText];
173 [context deactivate];
174 }
175}

Referenced by Slic3r::GUI::GLCanvas3D::bind_event_handlers(), and Slic3r::GUI::ImGuiWrapper::end_frame().

Here is the caller graph for this function:

◆ mac_ime_set_caret()

void Slic3r::GUI::mac_ime_set_caret ( void * ns_view,
int x,
int y,
int height )
178{
179 NSView* view = (NSView*) ns_view;
180 if (view == nil)
181 return;
182 const CGFloat scale = view.window != nil ? view.window.backingScaleFactor : 1.0;
183 set(view, &key_caret, [NSValue valueWithRect:NSMakeRect(x / scale, y / scale, 1.0, height / scale)]);
184}

References scale().

Referenced by Slic3r::GUI::ImGuiWrapper::init_input().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mac_max_scaling_factor()

double Slic3r::GUI::mac_max_scaling_factor ( )
36{
37 double scaling = 1.;
38 if ([NSScreen screens] == nil) {
39 scaling = [[NSScreen mainScreen] backingScaleFactor];
40 } else {
41 for (int i = 0; i < [[NSScreen screens] count]; ++ i)
42 scaling = std::max<double>(scaling, [[[NSScreen screens] objectAtIndex:0] backingScaleFactor]);
43 }
44 return scaling;
45}

Referenced by Slic3r::GUI::BitmapCache::BitmapCache(), ModeSwitchButton::doRender(), Slic3r::GUI::OpenGLManager::GLInfo::get_max_tex_size(), and SwitchButton::Rescale().

Here is the caller graph for this function:

◆ main_frame_icon()

wxIcon Slic3r::GUI::main_frame_icon ( GUI_App::EAppMode app_mode)
static
368{
369#if _WIN32
370 std::wstring path(size_t(MAX_PATH), wchar_t(0));
371 int len = int(::GetModuleFileName(nullptr, path.data(), MAX_PATH));
372 if (len > 0 && len < MAX_PATH) {
373 path.erase(path.begin() + len, path.end());
374 //BBS: remove GCodeViewer as seperate APP logic
375 /*if (app_mode == GUI_App::EAppMode::GCodeViewer) {
376 // Only in case the slicer was started with --gcodeviewer parameter try to load the icon from prusa-gcodeviewer.exe
377 // Otherwise load it from the exe.
378 for (const std::wstring_view exe_name : { std::wstring_view(L"prusa-slicer.exe"), std::wstring_view(L"prusa-slicer-console.exe") })
379 if (boost::iends_with(path, exe_name)) {
380 path.erase(path.end() - exe_name.size(), path.end());
381 path += L"prusa-gcodeviewer.exe";
382 break;
383 }
384 }*/
385 }
386 return wxIcon(path, wxBITMAP_TYPE_ICO);
387#else // _WIN32
388 return wxIcon(Slic3r::var("OrcaSlicer_128px.png"), wxBITMAP_TYPE_PNG);
389#endif // _WIN32
390}
std::string var(const std::string &file_name)
Definition utils.cpp:278

References Slic3r::var().

Here is the call graph for this function:

◆ make_alpha_bitmap()

wxBitmap Slic3r::GUI::make_alpha_bitmap ( int w,
int h,
const std::function< void(wxDC &dc)> & draw_fn )
static
217{
218 wxBitmap bmp(w, h);
219 wxMemoryDC memdc;
220#ifdef __WXOSX__
221 bmp.UseAlpha();
222 memdc.SelectObject(bmp);
223#else
224 {
225 wxImage img(w, h);
226 img.InitAlpha();
227 memset(img.GetAlpha(), 0, w * h);
228 bmp = wxBitmap(std::move(img));
229 }
230 memdc.SelectObject(bmp);
231#endif
232 {
233#ifdef __WXMSW__
234 wxGCDC dc(memdc);
235#else
236 wxDC& dc = memdc;
237#endif
238 draw_fn(dc);
239 }
240 memdc.SelectObject(wxNullBitmap);
241 return bmp;
242}

References make_alpha_bitmap().

Referenced by make_alpha_bitmap(), Slic3r::GUI::MixedFilamentDialog::make_swatch_bitmap(), and Slic3r::GUI::MixedFilamentDialog::update_gradient_direction_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_arc_through()

SketchEntity Slic3r::GUI::make_arc_through ( const Vec2d & center,
double radius,
const Vec2d & start,
const Vec2d & end,
const Vec2d & through,
bool construction )
static
2991{
2992 const double a_start = std::atan2(start.y() - center.y(), start.x() - center.x());
2993 const double a_end = std::atan2(end.y() - center.y(), end.x() - center.x());
2994 const double a_thru = std::atan2(through.y() - center.y(), through.x() - center.x());
2995 const double de = wrap_2pi(a_end - a_start); // CCW sweep to end (0,2Ï€)
2996 const double d3 = wrap_2pi(a_thru - a_start); // CCW position of through
2997 SketchEntity e;
2999 e.center = center;
3000 e.radius = radius;
3001 e.p0 = start;
3002 e.p1 = end;
3003 e.start_angle = a_start;
3004 e.end_angle = (d3 <= de) ? (a_start + de) : (a_start + de - 2.0 * M_PI);
3005 e.construction = construction;
3006 return e;
3007}
static double wrap_2pi(double a)
Definition DesignSketchTool.cpp:2961
Definition SketchEngine.hpp:30
bool construction
Definition SketchEngine.hpp:39

References Slic3r::SketchEntity::Arc, Slic3r::center(), Slic3r::SketchEntity::center, Slic3r::SketchEntity::construction, Slic3r::SketchEntity::end_angle, M_PI, make_arc_through(), Slic3r::SketchEntity::p0, Slic3r::SketchEntity::p1, Slic3r::SketchEntity::radius, Slic3r::SketchEntity::start_angle, Slic3r::SketchEntity::type, and Slic3r::wrap_2pi().

Referenced by Slic3r::GUI::DesignSketchTool::make_arc_slot(), make_arc_through(), Slic3r::GUI::DesignSketchTool::make_center_arc(), Slic3r::GUI::DesignSketchTool::make_slot(), Slic3r::GUI::DesignSketchTool::make_tangent_arc(), Slic3r::GUI::DesignSketchTool::make_three_point_arc(), and Slic3r::GUI::DesignSketchTool::rounded_rect_entities().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_bold()

void Slic3r::GUI::make_bold ( wxString & str)
static
464{
465#if defined(SUPPORTS_MARKUP) && !defined(__APPLE__)
466 str = format_wxstr("<b>%1%</b>", str);
467#endif
468}

References format_wxstr().

Referenced by Slic3r::GUI::ParamsNode::GetFormattedText().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_card()

StaticBox * Slic3r::GUI::make_card ( wxWindow * parent)
static
232{
233 auto* c = new StaticBox(parent);
234 c->SetCornerRadius(8);
235 // The light literal in a StateColor is mapped to the dark one at paint time, so the frame
236 // follows a theme switch by itself. No hover accent: the frame is not clickable.
237 c->SetBorderColor(StateColor(kDpTokens[TokBorder].light));
238 return c;
239}
Definition StateColor.hpp:13
Definition StaticBox.hpp:17

References kDpTokens, and TokBorder.

Referenced by Slic3r::GUI::DesignPanel::DesignPanel().

Here is the caller graph for this function:

◆ make_combo()

ComboBox * Slic3r::GUI::make_combo ( wxWindow * parent)
static
143{
144 // Explicit width: ComboBox's natural best size is its widest item, which inflated the
145 // sidebar's virtual width past the viewport and left the panel horizontally scrolled —
146 // that is what clipped the first letter of every label. The form column grows anyway.
147 auto* c = new ComboBox(parent, wxID_ANY, wxEmptyString, wxDefaultPosition,
148 wxSize(parent->FromDIP(90), parent->FromDIP(24)), 0, nullptr, wxCB_READONLY);
149 c->SetMinSize(wxSize(parent->FromDIP(90), parent->FromDIP(24)));
150 return c;
151}

Referenced by Slic3r::GUI::DesignPanel::DesignPanel().

Here is the caller graph for this function:

◆ make_spin()

wxSpinCtrlDouble * Slic3r::GUI::make_spin ( wxWindow * parent,
double val,
double mn = 0.1,
double mx = 1000.0 )
static
315{
316 auto* box = new StaticBox(parent);
317 box->SetCornerRadius(4);
318 box->SetBorderColor(StateColor(kDpTokens[TokBorder].light));
319 auto* s = new wxSpinCtrlDouble(box, wxID_ANY, "", wxDefaultPosition, parent->FromDIP(wxSize(90, -1)),
320 wxSP_ARROW_KEYS | wxBORDER_NONE);
321 s->SetRange(mn, mx);
322 s->SetDigits(2);
323 s->SetValue(val);
324 // THE WHEEL SCROLLS THE PANEL, IT DOES NOT EDIT THE VALUE. wxSpinCtrlDouble takes the wheel
325 // whenever the pointer is over it, so a card taller than the panel could not be scrolled past
326 // without silently incrementing whatever field happened to be under the cursor — measured:
327 // eight notches turned an X hint from 1,00 into 6,00, and the same gesture over an Extrude
328 // distance or a mate Offset is a silent model change made by someone who thought they were
329 // navigating. Skipping the event lets it reach the scrolled cards panel. A spin the user has
330 // deliberately focused still takes the wheel, which is the one case where editing is meant.
331 s->Bind(wxEVT_MOUSEWHEEL, [s](wxMouseEvent& e) {
332 if (wxWindow::FindFocus() == s) e.Skip(); // focused: wheel edits, as expected
333 else if (wxWindow* p = s->GetParent()) // otherwise hand it to the panel
334 wxPostEvent(p, e);
335 });
336 auto* sz = new wxBoxSizer(wxHORIZONTAL);
337 sz->Add(s, 1, wxEXPAND | wxALL, parent->FromDIP(2));
338 box->SetSizer(sz);
339 return s;
340}
wxMouseEvent
Definition CameraPopup.cpp:47

References kDpTokens, TokBorder, and wxMouseEvent.

Referenced by Slic3r::GUI::DesignPanel::DesignPanel().

Here is the caller graph for this function:

◆ make_string_bold()

void Slic3r::GUI::make_string_bold ( wxString & str)
static
113{
114#if defined(SUPPORTS_MARKUP) && !defined(__APPLE__)
115 str = from_u8((boost::format("<b>%1%</b>") % into_u8(str)).str());
116#endif
117}

References from_u8(), and into_u8().

Referenced by Slic3r::GUI::DiffModel::AddOption(), and Slic3r::GUI::DiffModel::AddPreset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ manuallySetNozzleCount()

void Slic3r::GUI::manuallySetNozzleCount ( int extruder_id)
321{
322 PresetBundle *preset_bundle = wxGetApp().preset_bundle;
323 if (!preset_bundle)
324 return;
325
326 DynamicPrintConfig full_config = preset_bundle->full_config();
327 auto *max_nozzle_count = full_config.option<ConfigOptionIntsNullable>("extruder_max_nozzle_count");
328 // Multi-nozzle gate: no-op for every single-nozzle / dual-extruder ({1,1}) printer.
329 // Skip nil entries: a nullable-int nil is INT_MAX (> 1) and would otherwise falsely pass the gate.
330 if (!max_nozzle_count ||
331 !std::any_of(max_nozzle_count->values.begin(), max_nozzle_count->values.end(),
332 [](int v) { return v > 1 && v != ConfigOptionIntsNullable::nil_value(); }))
333 return;
334
335 auto *nozzle_volume_type_opt = full_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type");
336 if (!nozzle_volume_type_opt || extruder_id < 0 || extruder_id >= (int) nozzle_volume_type_opt->values.size() ||
337 extruder_id >= (int) max_nozzle_count->values.size())
338 return;
339
340 const NozzleVolumeType volume_type = NozzleVolumeType(nozzle_volume_type_opt->values[extruder_id]);
341 const int standard_count = getExtruderNozzleCount(preset_bundle, extruder_id, nvtStandard);
342 const int highflow_count = getExtruderNozzleCount(preset_bundle, extruder_id, nvtHighFlow);
343 const int e3d_count = getExtruderNozzleCount(preset_bundle, extruder_id, nvtE3DHighFlow);
344
345 // Require at least one nozzle for a Hybrid extruder (an empty mix is meaningless) and when the other
346 // extruder currently has none.
347 bool force_no_zero = volume_type == nvtHybrid;
348 if (nozzle_volume_type_opt->values.size() > 1)
349 force_no_zero |= getExtruderNozzleCountTotal(preset_bundle, 1 - extruder_id) == 0;
350
351 // The printer profile's variant list is the authority on which volume types an extruder provides. An
352 // empty set means the profile could not be read, and the dialog then skips filtering instead of hiding
353 // everything.
354 const std::set<NozzleVolumeType> supported_types =
356
357 ManualNozzleCountDialog dialog(wxGetApp().plater(), volume_type, standard_count, highflow_count, e3d_count,
358 max_nozzle_count->values[extruder_id], force_no_zero, supported_types);
359 if (dialog.ShowModal() == wxID_OK) {
360 if (volume_type == nvtHybrid) {
361 setExtruderNozzleCount(preset_bundle, extruder_id, nvtStandard, dialog.GetNozzleCount(nvtStandard), true);
362 setExtruderNozzleCount(preset_bundle, extruder_id, nvtHighFlow, dialog.GetNozzleCount(nvtHighFlow), false);
363 setExtruderNozzleCount(preset_bundle, extruder_id, nvtE3DHighFlow, dialog.GetNozzleCount(nvtE3DHighFlow), false);
364 } else {
365 setExtruderNozzleCount(preset_bundle, extruder_id, volume_type, dialog.GetNozzleCount(volume_type), true);
366 }
367 updateNozzleCountDisplay(preset_bundle, extruder_id, volume_type);
368 wxGetApp().plater()->update();
369 }
370}
Definition MultiNozzleSync.hpp:70
void updateNozzleCountDisplay(PresetBundle *preset_bundle, int extruder_id, NozzleVolumeType volume_type)
Definition MultiNozzleSync.cpp:263
void setExtruderNozzleCount(PresetBundle *preset_bundle, int extruder_id, NozzleVolumeType volume_type, int nozzle_count, bool clear_all)
Definition MultiNozzleSync.cpp:222
int getExtruderNozzleCount(PresetBundle *preset_bundle, int extruder_id, NozzleVolumeType volume_type)
Definition MultiNozzleSync.cpp:72
int getExtruderNozzleCountTotal(PresetBundle *preset_bundle, int extruder_id)
Definition MultiNozzleSync.cpp:86
std::set< NozzleVolumeType > get_extruder_supported_nozzle_volume_types(const DynamicPrintConfig &printer_config, int extruder_id)
Definition PrintConfig.cpp:840

References Slic3r::Preset::config, Slic3r::PresetBundle::full_config(), Slic3r::PresetCollection::get_edited_preset(), Slic3r::get_extruder_supported_nozzle_volume_types(), getExtruderNozzleCount(), getExtruderNozzleCountTotal(), Slic3r::GUI::ManualNozzleCountDialog::GetNozzleCount(), Slic3r::nvtE3DHighFlow, Slic3r::nvtHighFlow, Slic3r::nvtHybrid, Slic3r::nvtStandard, Slic3r::ConfigBase::option(), plater(), Slic3r::PresetBundle::printers, setExtruderNozzleCount(), Slic3r::GUI::DPIAware< P >::ShowModal(), and updateNozzleCountDisplay().

Referenced by Slic3r::GUI::FilamentMapManualPanel::FilamentMapManualPanel(), Slic3r::GUI::Sidebar::Sidebar(), and Slic3r::GUI::FilamentMapManualPanel::OnSuggestionClicked().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ marker_scale()

double Slic3r::GUI::marker_scale ( const GLCanvas3D & canvas)
static
1026{
1027 double scale = canvas.get_scale();
1028#ifdef WIN32
1029 scale *= double(get_dpi_for_window(wxGetApp().GetTopWindow())) / double(DPI_DEFAULT);
1030#endif // WIN32
1031 return scale;
1032}
const float get_scale() const
Definition GLCanvas3D.cpp:1811

References DPI_DEFAULT, get_dpi_for_window(), Slic3r::GUI::GLCanvas3D::get_scale(), marker_scale(), and scale().

Referenced by marker_scale(), Slic3r::GUI::GLCanvas3D::CenterOfMass::on_left_down(), and Slic3r::GUI::GLCanvas3D::CenterOfMass::render_details().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ market_model_scoring_page()

void Slic3r::GUI::market_model_scoring_page ( int design_id)
static
195{
196 std::string url;
197 std::string country_code = GUI::wxGetApp().app_config->get_country_code();
198 std::string model_http_url = GUI::wxGetApp().get_model_http_url(country_code);
199 if (GUI::wxGetApp().getAgent()->get_model_mall_detail_url(&url, std::to_string(design_id), GUI::wxGetApp().get_printer_cloud_provider()) == 0) {
200 std::string user_id = GUI::wxGetApp().getAgent()->get_user_id(GUI::wxGetApp().get_printer_cloud_provider());
201 boost::algorithm::replace_first(url, "models", "u/" + user_id + "/rating");
202 // Prevent user_id from containing design_id
203 size_t sign_in = url.find("/rating");
204 std::string sub_url = url.substr(0, sign_in + 7);
205 url.erase(0, sign_in + 7);
206 boost::algorithm::replace_first(url, std::to_string(design_id), "");
207 url = sub_url + url;
208 try {
209 if (!url.empty()) { wxLaunchDefaultBrowser(url); }
210 } catch (...) {
211 return;
212 }
213 }
214}

Referenced by Slic3r::GUI::ScoreDialog::get_button_sizer().

Here is the caller graph for this function:

◆ mass_sum()

GCodeProcessorResult::ObjectMass::Sum Slic3r::GUI::mass_sum ( const MassProperties & solid)
static
1015{
1016 return { solid.mass, solid.volume, solid.mass * solid.center,
1017 solid.mass * (solid.spread.diagonal() + solid.center.cwiseProduct(solid.center)) };
1018}
Vec3d center
Definition TriangleMesh.hpp:334
Matrix3d spread
Definition TriangleMesh.hpp:335
double mass
Definition TriangleMesh.hpp:332
double volume
Definition TriangleMesh.hpp:333

References Slic3r::MassProperties::center, Slic3r::MassProperties::mass, mass_sum(), Slic3r::MassProperties::spread, and Slic3r::MassProperties::volume.

Referenced by mass_sum(), and Slic3r::GUI::GLCanvas3D::CenterOfMass::model_markers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ match_parent_bg()

void Slic3r::GUI::match_parent_bg ( wxWindow * w,
const wxColour & bg )
static
168{
169 w->SetBackgroundColour(bg);
170}

Referenced by Slic3r::GUI::ColorDecomposeDialog::create_mode_card(), and Slic3r::GUI::ColorDecomposeDialog::update_mode_card_content().

Here is the caller graph for this function:

◆ material_type_matches()

bool Slic3r::GUI::material_type_matches ( const std::string & a,
const std::string & b )
static
173{
174 if (a.empty() || b.empty())
175 return false;
176 return a == b || a == b + " Basic" || b == a + " Basic";
177}

Referenced by Slic3r::GUI::ColorDecomposeDialog::update_card_visibility().

Here is the caller graph for this function:

◆ measure_mixed_text()

wxSize Slic3r::GUI::measure_mixed_text ( wxWindow * parent,
const std::string & msg,
const wxFont & prose_font,
const wxFont & code_font )
static
326{
327 wxClientDC dc(parent);
328 int width = 0, height = 0;
329 for (const auto &[text, is_code] : classify_code_lines(msg)) {
330 dc.SetFont(is_code ? code_font : prose_font);
331 width = std::max(width, dc.GetTextExtent(wxString::FromUTF8(text.c_str())).GetWidth());
332 height += dc.GetCharHeight();
333 }
334 return wxSize(width, height);
335}

References classify_code_lines().

Referenced by add_msg_content().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ menu_item_with_icon()

bool Slic3r::GUI::menu_item_with_icon ( const char * label,
const char * shortcut,
ImVec2 icon_size,
ImU32 icon_color,
bool selected,
bool enabled,
bool * hovered )
1804{
1805 ImGuiWindow *window = ImGui::GetCurrentWindow();
1806 if (window->SkipItems) return false;
1807
1808 ImGuiContext &g = *GImGui;
1809 ImGuiStyle & style = g.Style;
1810 ImVec2 pos = window->DC.CursorPos;
1811 ImVec2 label_size = ImGui::CalcTextSize(label, NULL, true);
1812
1813 // We've been using the equivalent of ImGuiSelectableFlags_SetNavIdOnHover on all Selectable() since early Nav system days (commit 43ee5d73),
1814 // but I am unsure whether this should be kept at all. For now moved it to be an opt-in feature used by menus only.
1815 ImGuiSelectableFlags flags = ImGuiSelectableFlags_SelectOnRelease | ImGuiSelectableFlags_SetNavIdOnHover | (enabled ? 0 : ImGuiSelectableFlags_Disabled);
1816 bool pressed;
1817 if (window->DC.LayoutType == ImGuiLayoutType_Horizontal) {
1818 // Mimic the exact layout spacing of BeginMenu() to allow MenuItem() inside a menu bar, which is a little misleading but may be useful
1819 // Note that in this situation: we don't render the shortcut, we render a highlight instead of the selected tick mark.
1820 float w = label_size.x;
1821 window->DC.CursorPos.x += IM_FLOOR(style.ItemSpacing.x * 0.5f);
1822 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(style.ItemSpacing.x * 2.0f, style.ItemSpacing.y));
1823 pressed = ImGui::Selectable(label, selected, flags, ImVec2(w, 0.0f));
1824 ImGui::PopStyleVar();
1825 window->DC.CursorPos.x += IM_FLOOR(
1826 style.ItemSpacing.x *
1827 (-1.0f +
1828 0.5f)); // -1 spacing to compensate the spacing added when Selectable() did a SameLine(). It would also work to call SameLine() ourselves after the PopStyleVar().
1829 } else {
1830 // Menu item inside a vertical menu
1831 // (In a typical menu window where all items are BeginMenu() or MenuItem() calls, extra_w will always be 0.0f.
1832 // Only when they are other items sticking out we're going to add spacing, yet only register minimum width into the layout system.
1833 float shortcut_w = shortcut ? ImGui::CalcTextSize(shortcut, NULL).x : 0.0f;
1834 float min_w = window->DC.MenuColumns.DeclColumns(label_size.x, shortcut_w, IM_FLOOR(g.FontSize * 1.20f)); // Feedback for next frame
1835 float extra_w = std::max(0.0f, ImGui::GetContentRegionAvail().x - min_w);
1836 pressed = selectable(label, false, flags | ImGuiSelectableFlags_SpanAvailWidth, ImVec2(min_w, 0.0f), hovered);
1837
1838 if (icon_size.x != 0 && icon_size.y != 0) {
1839 float selectable_pos_y = pos.y + -0.5f * style.ItemSpacing.y;
1840 float icon_pos_y = selectable_pos_y + (label_size.y + style.ItemSpacing.y - icon_size.y) / 2;
1841 float icon_pos_x = pos.x + window->DC.MenuColumns.Pos[2] + extra_w + g.FontSize * 0.40f;
1842 ImVec2 icon_pos = ImVec2(icon_pos_x, icon_pos_y);
1843 if (icon_color != 0)
1844 ImGui::RenderFrame(icon_pos, icon_pos + icon_size, icon_color);
1845 else {
1846 static ImTextureID transparent;
1847 IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/transparent.svg", icon_size.x, icon_size.y, transparent);
1848 window->DrawList->AddImage(transparent, icon_pos, icon_pos + icon_size, { 0,0 }, { 1,1 }, ImGui::GetColorU32(ImVec4(1.f, 1.f, 1.f, 1.f)));
1849 }
1850 }
1851
1852 if (shortcut_w > 0.0f) {
1853 ImGui::PushStyleColor(ImGuiCol_Text, g.Style.Colors[ImGuiCol_TextDisabled]);
1854 ImGui::RenderText(pos + ImVec2(window->DC.MenuColumns.Pos[1] + extra_w, 0.0f), shortcut, NULL, false);
1855 ImGui::PopStyleColor();
1856 }
1857 if (selected) {
1858 //ImGui::RenderCheckMark(window->DrawList, pos + ImVec2(window->DC.MenuColumns.Pos[2] + extra_w + g.FontSize * 0.40f, g.FontSize * 0.134f * 0.5f),
1859 // ImGui::GetColorU32(enabled ? ImGuiCol_Text : ImGuiCol_TextDisabled), g.FontSize * 0.866f);
1860 }
1861 }
1862
1863 IMGUI_TEST_ENGINE_ITEM_INFO(window->DC.LastItemId, label, window->DC.LastItemStatusFlags | ImGuiItemStatusFlags_Checkable | (selected ? ImGuiItemStatusFlags_Checked : 0));
1864 return pressed;
1865}
static bool load_from_svg_file(const std::string &filename, unsigned width, unsigned height, ImTextureID &texture_id)
Definition ImGuiWrapper.cpp:3655

References Slic3r::GUI::IMTexture::load_from_svg_file(), Slic3r::resources_dir(), selectable(), and style.

Referenced by Slic3r::GUI::IMSlider::render_add_menu(), and Slic3r::GUI::IMSlider::render_edit_menu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ min_delta_area()

double Slic3r::GUI::min_delta_area ( )
inline
54{ return scale_(scale_(25)); }
#define scale_(val)
Definition libslic3r.h:106

References scale_.

Referenced by check_color_change().

Here is the caller graph for this function:

◆ miscalculation()

double Slic3r::GUI::miscalculation ( )
inline
56{ return scale_(scale_(1)); }

References scale_.

Referenced by equivalent_areas().

Here is the caller graph for this function:

◆ mix_colour()

wxColour Slic3r::GUI::mix_colour ( const wxColour & left,
const wxColour & right,
double ratio )
static
96{
97 ratio = std::max(0.0, std::min(1.0, ratio));
98 auto mix_channel = [ratio](unsigned char l, unsigned char r) {
99 return static_cast<unsigned char>(std::round(l + (r - l) * ratio));
100 };
101 return wxColour(mix_channel(left.Red(), right.Red()),
102 mix_channel(left.Green(), right.Green()),
103 mix_channel(left.Blue(), right.Blue()),
104 mix_channel(left.Alpha(), right.Alpha()));
105}

Referenced by Slic3r::GUI::ColorPicker::doRender().

Here is the caller graph for this function:

◆ mixed_gradient_curve()

Slic3r::GradientCurve Slic3r::GUI::mixed_gradient_curve ( const Slic3r::DynamicPrintConfig & cfg,
size_t slot )
139{
140 const auto* curve_opt = cfg.option<ConfigOptionStrings>("filament_mixed_gradient_curve");
141 if (curve_opt && slot < curve_opt->values.size() && !curve_opt->values[slot].empty()) {
142 Slic3r::GradientCurve custom = Slic3r::parse_gradient_curve(curve_opt->values[slot]);
143 if (custom.points.size() >= 2) return custom;
144 }
145
146 double start = kGradientMinRatio, end = kGradientMaxRatio;
147 const auto* range_opt = cfg.option<ConfigOptionStrings>("filament_mixed_gradient_range");
148 if (range_opt && slot < range_opt->values.size() && !range_opt->values[slot].empty()) {
149 CNumericLocalesSetter c_locale_setter;
150 float v0 = 0, v1 = 0;
151 if (std::sscanf(range_opt->values[slot].c_str(), "%f,%f", &v0, &v1) == 2 &&
152 v0 > 0 && v0 < 1.0 && v1 > 0 && v1 < 1.0) {
153 start = v0;
154 end = v1;
155 }
156 }
157
158 Slic3r::GradientCurve curve;
159 curve.points = {{0.0, start, NAN, NAN}, {1.0, end, NAN, NAN}};
160 return curve;
161}
Definition LocalesUtils.hpp:19
T * end(Slic3r::Mat< N, M, T > &mat)
Definition Point.hpp:841
constexpr double kGradientMinRatio
Definition FilamentMixer.hpp:40
GradientCurve parse_gradient_curve(const std::string &s)
Definition FilamentMixer.cpp:269
constexpr double kGradientMaxRatio
Definition FilamentMixer.hpp:41
Definition FilamentMixer.hpp:31
std::vector< GradientAnchor > points
Definition FilamentMixer.hpp:32

References Slic3r::kGradientMaxRatio, Slic3r::kGradientMinRatio, Slic3r::ConfigBase::option(), Slic3r::parse_gradient_curve(), and Slic3r::GradientCurve::points.

Referenced by Slic3r::GUI::PublishSettingsDialog::make_mixed_visual_spec(), and mixed_gradient_ramp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mixed_gradient_plot_rect()

wxRect Slic3r::GUI::mixed_gradient_plot_rect ( const wxSize & sz)
528{
529 const int x = static_cast<int>(std::lround(sz.x * kPlotLeftRatio));
530 const int y = static_cast<int>(std::lround(sz.y * kPlotTopRatio));
531 const int x2 = static_cast<int>(std::lround(sz.x * kPlotRightRatio));
532 const int y2 = static_cast<int>(std::lround(sz.y * kPlotBottomRatio));
533 const int side = std::max(1, std::min(x2 - x, y2 - y));
534 return wxRect(x, y, side, side);
535}

Referenced by Slic3r::GUI::PublishSettingsDialog::add_mixed_visual(), draw_mixed_gradient_plot(), and Slic3r::GUI::GradientCurveEditor::plot_rect().

Here is the caller graph for this function:

◆ mixed_gradient_ramp()

std::vector< wxColour > Slic3r::GUI::mixed_gradient_ramp ( const Slic3r::DynamicPrintConfig & cfg,
size_t slot,
int steps )
164{
165 const auto* is_mixed_opt = cfg.option<ConfigOptionBools>("filament_is_mixed");
166 const auto* grad_opt = cfg.option<ConfigOptionBools>("filament_mixed_gradient");
167 const auto* comp_opt = cfg.option<ConfigOptionStrings>("filament_mixed_components");
168 const auto* colour_opt = cfg.option<ConfigOptionStrings>("filament_colour");
169 if (!is_mixed_opt || !grad_opt || !comp_opt || !colour_opt) return {};
170 if (slot >= is_mixed_opt->values.size() || !is_mixed_opt->values[slot]) return {};
171 if (slot >= grad_opt->values.size() || !grad_opt->values[slot]) return {};
172 if (slot >= comp_opt->values.size()) return {};
173
174 // Only two-component slots fade; anything else stays on the plain blended swatch.
175 const auto comp_ids = Slic3r::parse_mixed_components(comp_opt->values[slot]);
176 if (comp_ids.size() != 2) return {};
177
178 auto component_colour = [&](unsigned int id) {
179 wxColour c = (id >= 1 && id <= colour_opt->values.size()) ? wxColour(colour_opt->values[id - 1]) : wxColour();
180 return c.IsOk() ? c : wxColour("#D9D9D9");
181 };
182
183 // Both gradient_range and the curve express the *first* component's ratio over Z, so
184 // the components stay in config order and the curve alone decides which end is which.
185 return sample_gradient_ramp(component_colour(comp_ids[0]), component_colour(comp_ids[1]),
186 mixed_gradient_curve(cfg, slot), steps);
187}
std::vector< wxColour > sample_gradient_ramp(const wxColour &first, const wxColour &second, const Slic3r::GradientCurve &curve, int steps)
Definition FilamentBitmapUtils.cpp:118
Slic3r::GradientCurve mixed_gradient_curve(const Slic3r::DynamicPrintConfig &cfg, size_t slot)
Definition FilamentBitmapUtils.cpp:138
std::vector< unsigned int > parse_mixed_components(const std::string &str)
Definition FilamentMixer.cpp:172

References mixed_gradient_curve(), Slic3r::ConfigBase::option(), Slic3r::parse_mixed_components(), sample_gradient_ramp(), Slic3r::ConfigOptionVector< T >::values, and Slic3r::ConfigOptionVector< unsigned char >::values.

Referenced by Slic3r::GUI::Plater::get_filament_gradient_ramps(), Slic3r::GUI::anonymous_namespace{PublishSettingsDialog.cpp}::mixed_filament_chip_bitmap(), and Slic3r::GUI::Sidebar::update_mixed_filament_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mixed_triangle_vertices()

std::array< TriPoint, 3 > Slic3r::GUI::mixed_triangle_vertices ( const wxSize & size,
double margin_dip )
758{
759 const double pw = size.GetWidth(), ph = size.GetHeight();
760 const double margin = dip_px(int(margin_dip));
761 const double avail = std::min(pw, ph) - 2.0 * margin;
762 const double side = avail;
763 const double tri_h = side * std::sqrt(3.0) / 2.0;
764 const double cx = pw / 2.0;
765 const double top_y = (ph - tri_h) / 2.0;
766 return {{{cx, top_y}, {cx - side / 2.0, top_y + tri_h}, {cx + side / 2.0, top_y + tri_h}}};
767}

Referenced by draw_mixed_triangle_labels(), and draw_mixed_triangle_picker().

Here is the caller graph for this function:

◆ mode_index()

size_t Slic3r::GUI::mode_index ( DecomposeMode mode)
static
63{
64 return static_cast<size_t>(mode);
65}

Referenced by Slic3r::GUI::ColorDecomposeDialog::compute_decomposition(), Slic3r::GUI::ColorDecomposeDialog::create_mode_card(), Slic3r::GUI::ColorDecomposeDialog::select_mode(), and Slic3r::GUI::ColorDecomposeDialog::update_mode_card_content().

Here is the caller graph for this function:

◆ move_volume_to_end()

void Slic3r::GUI::move_volume_to_end ( ModelObject * obj,
ModelVolume * volume )
static
5858{
5859 if (obj == nullptr || volume == nullptr)
5860 return;
5861 auto it = std::find(obj->volumes.begin(), obj->volumes.end(), volume);
5862 if (it != obj->volumes.end()) {
5863 obj->volumes.erase(it);
5864 obj->volumes.push_back(volume);
5865 }
5866}

References Slic3r::ModelObject::volumes.

Referenced by Slic3r::GUI::ObjectList::set_volume_type().

Here is the caller graph for this function:

◆ my_stof()

float Slic3r::GUI::my_stof ( std::string str)
static
260 {
261
262 const char dec_sep = is_decimal_separator_point() ? '.' : ',';
263 const char dec_sep_alt = dec_sep == '.' ? ',' : '.';
264
265 size_t alt_pos = str.find(dec_sep_alt);
266 if (alt_pos != std::string::npos) { str.replace(alt_pos, 1, 1, dec_sep); }
267
268 if (str == std::string(1, dec_sep)) { return 0.0f; }
269
270 try {
271 return static_cast<float>(std::stod(str));
272 } catch (...) {
273 return 0.f;
274 }
275}

References Slic3r::is_decimal_separator_point().

Referenced by Slic3r::GUI::CreatePrinterPresetDialog::create_page2_dialog_buttons(), Slic3r::GUI::CreatePrinterPresetDialog::generate_process_presets_data(), Slic3r::GUI::CreatePrinterPresetDialog::get_nozzle_diameter(), Slic3r::GUI::CreatePrinterPresetDialog::printer_preset_sort_with_nozzle_diameter(), and Slic3r::GUI::CreatePrinterPresetDialog::validate_input_valid().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ network_version_label()

wxString Slic3r::GUI::network_version_label ( const NetworkLibraryVersionInfo & ver)
205{
206 wxString label = wxString::FromUTF8(ver.display_name);
207 if (!ver.suffix.empty())
208 label = wxString::FromUTF8("\xE2\x94\x94 ") + label;
209 // Both can apply: the loaded build may also be the highest listed one.
210 if (ver.is_latest)
211 label += wxString(" ") + _L("(Latest)");
212 if (ver.is_loaded)
213 label += wxString(" ") + _L("(installed)");
214 return label;
215}
std::string display_name
Definition bambu_networking.hpp:494
std::string suffix
Definition bambu_networking.hpp:493
bool is_latest
Definition bambu_networking.hpp:496
bool is_loaded
Definition bambu_networking.hpp:502

References _L, Slic3r::NetworkLibraryVersionInfo::display_name, Slic3r::NetworkLibraryVersionInfo::is_latest, Slic3r::NetworkLibraryVersionInfo::is_loaded, and Slic3r::NetworkLibraryVersionInfo::suffix.

Referenced by Slic3r::GUI::PreferencesDialog::create_item_network_plugin_version(), and Slic3r::GUI::NetworkPluginDownloadDialog::setup_version_selector().

Here is the caller graph for this function:

◆ nop_deleter()

void Slic3r::GUI::nop_deleter ( InputIpAddressDialog * )
static
1429{}

Referenced by Slic3r::GUI::InputIpAddressDialog::on_ok().

Here is the caller graph for this function:

◆ nop_deleter_fan_control()

void Slic3r::GUI::nop_deleter_fan_control ( FanControlNew * )
static
352{}

◆ nop_deleter_fan_control_popup()

void Slic3r::GUI::nop_deleter_fan_control_popup ( FanControlPopupNew * )
static
647{}

◆ nozzle_diameter_supports_tpu_high_flow()

bool Slic3r::GUI::nozzle_diameter_supports_tpu_high_flow ( double nozzle_diameter)
248{
249 // "Direct Drive TPU High Flow" is offered only on the H2D/H2D Pro 0.4 and 0.6 nozzles.
250 constexpr double kEps = 0.01;
251 return std::fabs(nozzle_diameter - 0.4) < kEps || std::fabs(nozzle_diameter - 0.6) < kEps;
252}

References Slic3r::nozzle_diameter().

Referenced by extruder_supports_tpu_high_flow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nozzle_id_code_to_string()

wxString Slic3r::GUI::nozzle_id_code_to_string ( int code)
static
92{
93 if (code == 0) {
94 return "R";
95 } else if (code >= 0x10) {
96 return wxString::Format("%d", code - 0x10 + 1);
97 } else {
98 BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << "Nozzle position id is -1 or invalid.";
99 return "N/A";
100 }
101}

Referenced by Slic3r::GUI::EditCalibrationHistoryDialog::EditCalibrationHistoryDialog(), and Slic3r::GUI::HistoryWindow::sync_history_data().

Here is the caller graph for this function:

◆ obj_list()

ObjectList * Slic3r::GUI::obj_list ( )
static
406{
407 return wxGetApp().obj_list();
408}

Referenced by _collect_sorted_machines(), Slic3r::GUI::MenuFactory::append_menu_item_auto_drop(), Slic3r::GUI::MenuFactory::append_menu_item_change_extruder(), Slic3r::GUI::MenuFactory::append_menu_item_change_filament(), Slic3r::GUI::MenuFactory::append_menu_item_fix_through_cgal(), Slic3r::GUI::MenuFactory::append_menu_item_instance_to_object(), Slic3r::GUI::MenuFactory::append_menu_item_invalidate_cut_info(), Slic3r::GUI::MenuFactory::append_menu_item_layers_editing(), Slic3r::GUI::MenuFactory::append_menu_item_merge_to_multipart_object(), Slic3r::GUI::MenuFactory::append_menu_item_merge_to_single_object(), Slic3r::GUI::MenuFactory::append_menu_item_modify(), Slic3r::GUI::MenuFactory::append_menu_item_precise_seam_submenu(), Slic3r::GUI::MenuFactory::append_menu_item_printable(), Slic3r::GUI::MenuFactory::append_menu_item_rename(), Slic3r::GUI::MenuFactory::append_menu_item_set_printable(), Slic3r::GUI::MenuFactory::append_menu_item_settings(), Slic3r::GUI::MenuFactory::append_menu_item_simplify(), Slic3r::GUI::MenuFactory::append_menu_item_smooth_mesh(), Slic3r::GUI::MenuFactory::append_menu_items_convert_unit(), Slic3r::GUI::MenuFactory::append_menu_items_flush_options(), Slic3r::GUI::MenuFactory::append_submenu_add_generic(), Slic3r::GUI::Plater::priv::apply_textured_mesh_import_result(), Slic3r::GUI::MenuFactory::assemble_multi_selection_menu(), Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::build_command_catalog(), create_freq_settings_popupmenu(), Slic3r::GUI::MenuFactory::create_plate_menu(), create_settings_popupmenu(), anonymous_namespace{EmbossJob.cpp}::create_volume(), Slic3r::GUI::GLGizmoEmboss::draw_model_type(), Slic3r::GUI::GLGizmoSVG::draw_model_type(), ensure_belt_purge_tower(), Slic3r::GUI::FillBedJob::finalize(), Slic3r::GUI::TextureDisplacementPrepareJob::finalize(), Slic3r::GUI::GLGizmoEmboss::init_create(), Slic3r::GUI::MenuFactory::multi_selection_menu(), Slic3r::GUI::GLCanvas3D::on_char(), Slic3r::GUI::DesignPanel::on_commit(), Slic3r::GUI::GLCanvas3D::on_set_color_timer(), Slic3r::GUI::NotificationManager::push_slicing_serious_warning_notification(), Slic3r::GUI::ObjectGridTable::SetValue(), Slic3r::GUI::GLGizmoTextureDisplacement::smooth_model(), Slic3r::GUI::GLGizmoTextureDisplacement::subdivide_model(), Slic3r::GUI::GizmoObjectManipulation::update_settings_value(), and Slic3r::GUI::Emboss::UpdateJob::update_volume().

Here is the caller graph for this function:

◆ offer_bit()

uint32_t Slic3r::GUI::offer_bit ( OfferSel s)
inline
48{ return 1u << int(s); }

Referenced by Slic3r::GUI::anonymous_namespace{McpControl.cpp}::action_list_verbs(), Slic3r::GUI::anonymous_namespace{McpControl.cpp}::action_run_verb(), and Slic3r::GUI::DesignPanel::show_offer_menu().

Here is the caller graph for this function:

◆ offer_trace()

void Slic3r::GUI::offer_trace ( const char * fmt,
... )
static
6628{
6629 static const bool on = std::getenv("ORCA_CAD_KEYTRACE") != nullptr;
6630 if (!on) return;
6631 va_list ap;
6632 va_start(ap, fmt);
6633 fprintf(stderr, "[OFFER] ");
6634 vfprintf(stderr, fmt, ap);
6635 fprintf(stderr, "\n");
6636 va_end(ap);
6637 fflush(stderr);
6638}

Referenced by Slic3r::GUI::DesignPanel::show_offer_menu().

Here is the caller graph for this function:

◆ official_basic_type_from_preset_name()

std::string Slic3r::GUI::official_basic_type_from_preset_name ( const std::string & preset_name)
213{
214 if (preset_name.find(std::string(kDecomposeBambuPresetPrefix) + kDecomposePlaBasicType) != std::string::npos)
216 if (preset_name.find(std::string(kDecomposeBambuPresetPrefix) + kDecomposePetgBasicType) != std::string::npos)
218 return {};
219}

References kDecomposeBambuPresetPrefix, kDecomposePetgBasicType, and kDecomposePlaBasicType.

Referenced by filament_type_for_color_decompose(), and texture_entry_official_basic().

Here is the caller graph for this function:

◆ on_mouse_surface_drag()

bool Slic3r::GUI::on_mouse_surface_drag ( const wxMouseEvent & mouse_event,
const Camera & camera,
std::optional< SurfaceDrag > & surface_drag,
GLCanvas3D & canvas,
RaycastManager & raycast_manager,
const std::optional< double > & up_limit = {} )

Mouse event handler, when move(drag&drop) volume over model surface NOTE: Dragged volume has to be selected. And also has to be hovered on start of dragging.

Parameters
mouse_eventContain type of event and mouse position
cameraActual viewport of camera
surface_dragStructure which keep information about dragging
canvasContain gl_volumes and selection
raycast_managerAABB trees for raycast in object Refresh state inside of function
up_limitWhen set than use correction of up vector
Returns
True when event is processed otherwise false
106{
107 // Fix when leave window during dragging
108 // Fix when click right button
109 if (surface_drag.has_value() && !mouse_event.Dragging()) {
110 // write transformation from UI into model
111 canvas.do_move(L("Move over surface"));
112 wxGetApp().obj_manipul()->set_dirty();
113
114 // allow moving with object again
115 canvas.enable_moving(true);
116 canvas.enable_picking(true);
117 surface_drag.reset();
118
119 // only left up is correct
120 // otherwise it is fix state and return false
121 return mouse_event.LeftUp();
122 }
123
124 if (mouse_event.Moving())
125 return false;
126
127 if (mouse_event.LeftDown())
128 return start_dragging(mouse_position(mouse_event), camera, surface_drag, canvas, raycast_manager, up_limit);
129
130 // Dragging starts out of window
131 if (!surface_drag.has_value())
132 return false;
133
134 if (mouse_event.Dragging())
135 return dragging(mouse_position(mouse_event), camera, *surface_drag, canvas, raycast_manager, up_limit);
136
137 return false;
138}
void enable_picking(bool enable)
Definition GLCanvas3D.hpp:1086
void do_move(const std::string &snapshot_type, bool force_volume_move=false)
Definition GLCanvas3D.cpp:5635
void enable_moving(bool enable)
Definition GLCanvas3D.hpp:1094

References Slic3r::GUI::GLCanvas3D::do_move(), Slic3r::GUI::GLCanvas3D::enable_moving(), Slic3r::GUI::GLCanvas3D::enable_picking(), L, and wxMouseEvent.

Referenced by Slic3r::GUI::GLGizmoEmboss::on_mouse_for_translate(), and Slic3r::GUI::GLGizmoSVG::on_mouse_for_translate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_window_geometry()

void Slic3r::GUI::on_window_geometry ( wxTopLevelWindow * tlw,
std::function< void()> callback )
167{
168#ifdef _WIN32
169 // On windows, the wxEVT_SHOW is not received if the window is created maximized
170 // cf. https://groups.google.com/forum/#!topic/wx-users/c7ntMt6piRI
171 // OTOH the geometry is available very soon, so we can call the callback right away
172 callback();
173#elif defined __linux__
174 tlw->Bind(wxEVT_SHOW, [=](wxShowEvent &evt) {
175 // On Linux, the geometry is only available after wxEVT_SHOW + CallAfter
176 // cf. https://groups.google.com/forum/?pli=1#!topic/wx-users/fERSXdpVwAI
177 tlw->CallAfter([=]() { callback(); });
178 evt.Skip();
179 });
180#elif defined __APPLE__
181 tlw->Bind(wxEVT_SHOW, [=](wxShowEvent &evt) {
182 callback();
183 evt.Skip();
184 });
185#endif
186}

Referenced by Slic3r::GUI::ConfigWizard::ConfigWizard(), and Slic3r::GUI::GUI_App::persist_window_geometry().

Here is the caller graph for this function:

◆ onNozzleVolumeTypeSwitch()

void Slic3r::GUI::onNozzleVolumeTypeSwitch ( PresetBundle * preset_bundle,
int extruder_id,
NozzleVolumeType type )
307{
308 if (!preset_bundle)
309 return;
310 // Machine-synced stats carry the device's per-type breakdown; a flow switch must not collapse it.
312 return;
313 // Hybrid is a mix, not a type every nozzle shares, so there is nothing to carry over.
314 if (type == nvtHybrid)
315 return;
316 const int total = getExtruderNozzleCountTotal(preset_bundle, extruder_id);
317 setExtruderNozzleCount(preset_bundle, extruder_id, type, total, true);
318}
static bool s_nozzle_stats_from_machine
Definition MultiNozzleSync.cpp:218

References getExtruderNozzleCountTotal(), Slic3r::nvtHybrid, s_nozzle_stats_from_machine, and setExtruderNozzleCount().

Referenced by Slic3r::GUI::TabPrinter::set_extruder_volume_type().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ open_cloud_url_externally()

void Slic3r::GUI::open_cloud_url_externally ( const wxString & url)
static
379{
380 if (url.empty())
381 return;
382 BOOST_LOG_TRIVIAL(info) << "cloud pane: opening externally " << WebView::RedactUrl(url).ToUTF8().data();
383 wxGetApp().CallAfter([url] { wxLaunchDefaultBrowser(url); });
384}
static wxString RedactUrl(const wxString &url)
Definition WebView.cpp:474

References WebView::RedactUrl().

Referenced by Slic3r::GUI::WebViewPanel::OnCloudWebViewEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ open_filament_group_wiki()

bool Slic3r::GUI::open_filament_group_wiki ( )
94{
95 if (wxLaunchDefaultBrowser("https://e.bambulab.com/t?c=mOkvsXkJ9pldGYp9")) {
96 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format("Wiki is being displayed using the system's default browser.");
97 return true;
98 }
99 BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format("launch system's default browser failed");
100 return false;
101}

Referenced by Slic3r::GUI::FilamentGroupPopup::FilamentGroupPopup().

Here is the caller graph for this function:

◆ open_ms_store_product_page()

void Slic3r::GUI::open_ms_store_product_page ( )
216{
217#ifdef _WIN32
218 struct GetCurrentPackageFamilyName_t { typedef LONG (WINAPI *FN)(UINT32 *length, PWSTR family_name); };
219 static auto fn = winapi_get_function<GetCurrentPackageFamilyName_t>(L"Kernel32.dll", "GetCurrentPackageFamilyName");
220 if (fn == nullptr)
221 return;
222 UINT32 length = 0;
223 if (fn(&length, nullptr) != ERROR_INSUFFICIENT_BUFFER)
224 return;
225 std::wstring family_name(length, L'\0');
226 if (fn(&length, family_name.data()) != ERROR_SUCCESS)
227 return;
228 family_name.resize(length > 0 ? length - 1 : 0); // drop the terminating null
229 wxLaunchDefaultBrowser(wxString(L"ms-windows-store://pdp/?PFN=") + family_name.c_str());
230#endif
231}

References L, and Slic3r::length().

Referenced by Slic3r::GUI::GUI_App::on_init_inner().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ open_plugin_hub()

void Slic3r::GUI::open_plugin_hub ( )
469{
470 std::string cloud_base_url = "https://cloud.orcaslicer.com";
471
472 if (wxGetApp().getAgent()) {
473 auto orca_agent = std::dynamic_pointer_cast<OrcaCloudServiceAgent>(wxGetApp().getAgent()->get_cloud_agent());
474 if (orca_agent && !orca_agent->get_cloud_base_url().empty())
475 cloud_base_url = orca_agent->get_cloud_base_url();
476 }
477
478 while (!cloud_base_url.empty() && cloud_base_url.back() == '/')
479 cloud_base_url.pop_back();
480 if (cloud_base_url.empty())
481 cloud_base_url = "https://cloud.orcaslicer.com";
482
483 wxLaunchDefaultBrowser(wxString::FromUTF8(cloud_base_url + "/app/plugins/plugin-hub"));
484}

Referenced by Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::build_command_catalog(), and Slic3r::GUI::PluginsDialog::open_plugin_hub().

Here is the caller graph for this function:

◆ openFolderForFile()

void Slic3r::GUI::openFolderForFile ( wxString const & file)
120{
121 NSArray *fileURLs = [NSArray arrayWithObjects:wxCFStringRef(file).AsNSString(), /* ... */ nil];
122 [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:fileURLs];
123}

Referenced by desktop_open_any_folder().

Here is the caller graph for this function:

◆ operator<()

bool Slic3r::GUI::operator< ( const DriveData & lhs,
const DriveData & rhs )
inline
34{ return lhs.path < rhs.path; }
std::string path
Definition RemovableDriveManager.hpp:23

References Slic3r::GUI::DriveData::path.

◆ operator<<()

std::ostream & Slic3r::GUI::operator<< ( std::ostream & os,
const WindowMetrics & metrics )
464{
465 return os << '(' << metrics.serialize() << ')';
466}
std::string serialize() const
Definition GUI_Utils.cpp:452

References Slic3r::GUI::WindowMetrics::serialize().

Here is the call graph for this function:

◆ operator==()

bool Slic3r::GUI::operator== ( const DriveData & lhs,
const DriveData & rhs )
inline
36{ return lhs.path == rhs.path; }

References Slic3r::GUI::DriveData::path.

Referenced by Slic3r::GUI::Sidebar::priv::update_sync_status().

Here is the caller graph for this function:

◆ operator>()

bool Slic3r::GUI::operator> ( const DriveData & lhs,
const DriveData & rhs )
inline
35{ return lhs.path > rhs.path; }

References Slic3r::GUI::DriveData::path.

◆ option_id_in_map()

std::string Slic3r::GUI::option_id_in_map ( const t_opt_map & options,
const t_config_option_key & opt_key,
int & opt_index )
inline
130{
131 if (opt_index >= 0) {
132 for (const auto& opt : options) {
133 if (opt.second.first == opt_key && opt.second.second == opt_index) {
134 opt_index = opt.second.second;
135 return opt.first;
136 }
137 }
138 return {};
139 }
140
141 std::string opt_id;
142 for (const auto& opt : options) {
143 if (opt.second.first != opt_key)
144 continue;
145 if (!opt_id.empty())
146 return {}; // several entries: a vector option, not one value
147 opt_id = opt.first;
148 opt_index = opt.second.second;
149 }
150 return opt_id;
151}

Referenced by Slic3r::GUI::ConfigOptionsGroup::commit_config_value().

Here is the caller graph for this function:

◆ organize_cannot_reasons_text()

wxString Slic3r::GUI::organize_cannot_reasons_text ( std::vector< DevAms::CannotDryReason > & reasons)
1405{
1406 wxString cannot_reasons_text;
1407 if (std::find(reasons.begin(), reasons.end(), DevAms::CannotDryReason::DryingInProgress) != reasons.end()) {
1409 } else if (std::find(reasons.begin(), reasons.end(), DevAms::CannotDryReason::AmsBusy) != reasons.end()) {
1411 } else if (std::find(reasons.begin(), reasons.end(), DevAms::CannotDryReason::ConsumableAtAmsOutlet) != reasons.end()) {
1413 } else if (std::find(reasons.begin(), reasons.end(), DevAms::CannotDryReason::FilamentAtAmsOutletManualUnload) != reasons.end()) {
1415 }
1416
1417 if (std::find(reasons.begin(), reasons.end(), DevAms::CannotDryReason::InsufficientPower) != reasons.end()) {
1419 }
1420
1421 for (auto reason : reasons) {
1424 } else if (reason == DevAms::CannotDryReason::NotSupportedIn2dMode) {
1426 } else if (reason == DevAms::CannotDryReason::InitiatingAmsDrying) {
1428 } else if (reason == DevAms::CannotDryReason::Upgrading) {
1430 }
1431 }
1432
1433 if (cannot_reasons_text.empty()) {
1434 cannot_reasons_text += "*" + _L("System is busy") + "\n";
1435 cannot_reasons_text += _L(" Initiating other drying processes, please wait a few seconds...") + "\n";
1436 }
1437
1438 return cannot_reasons_text;
1439}
wxString get_cannot_reason_text(DevAms::CannotDryReason reason)
Definition AMSDryControl.cpp:1356

References _L, Slic3r::DevAms::AmsBusy, Slic3r::DevAms::ConsumableAtAmsOutlet, Slic3r::DevAms::DryingInProgress, Slic3r::DevAms::FilamentAtAmsOutletManualUnload, get_cannot_reason_text(), Slic3r::DevAms::InitiatingAmsDrying, Slic3r::DevAms::InsufficientPower, Slic3r::DevAms::InsufficientPowerNeedPluginPower, Slic3r::DevAms::NotSupportedIn2dMode, and Slic3r::DevAms::Upgrading.

Referenced by Slic3r::GUI::AMSDryCtrWin::update_state().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ origin_toggle_text()

wxString Slic3r::GUI::origin_toggle_text ( bool shown)
static
291{
292 return shown ? _L("Hide reference planes and axes") : _L("Show reference planes and axes");
293}

References _L.

Referenced by Slic3r::GUI::DesignPanel::DesignPanel(), and Slic3r::GUI::DesignPanel::refresh_pinned().

Here is the caller graph for this function:

◆ pad_combo_value_for_config()

wxString Slic3r::GUI::pad_combo_value_for_config ( const DynamicPrintConfig & config)
static
2056{
2057 return config.opt_bool("pad_enable") ? (config.opt_bool("pad_around_object") ? _("Around object") : _("Below object")) : _("None");
2058}

References _, Slic3r::DynamicConfig::opt_bool(), and pad_combo_value_for_config().

Referenced by Slic3r::GUI::Tab::on_value_change(), pad_combo_value_for_config(), and Slic3r::GUI::Tab::update_frequently_changed_parameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ page_label()

wxStaticText * Slic3r::GUI::page_label ( wxStaticText * lbl)
static
109{
110 lbl->SetForegroundColour(wxColour("#363636"));
111 wxGetApp().UpdateDarkUI(lbl);
112 return lbl;
113}

References wxStaticText.

Referenced by Slic3r::GUI::IMEXModesCtrl::add_row(), and Slic3r::GUI::IMEXModesCtrl::rebuild_info_and_header().

Here is the caller graph for this function:

◆ pan_camera()

void Slic3r::GUI::pan_camera ( Camera & camera,
const Vec2d & screen_delta,
const Vec3d & anchor )
static
215{
216 // Orca: Derive world-units-per-pixel from the projection which produced the visible frame.
217 // Perspective additionally scales with the eye-space depth of the point being dragged.
218 const auto& viewport = camera.get_viewport();
219 const auto& projection = camera.get_projection_matrix().matrix();
220 const double depth_scale = camera.get_type() == Camera::EType::Perspective ?
221 (anchor - camera.get_position()).dot(camera.get_dir_forward()) : 1.0;
222 const double projection_x = projection(0, 0) * viewport[2];
223 const double projection_y = projection(1, 1) * viewport[3];
224
225 // Orca: X/Y projection coefficients already include zoom. Using them directly avoids a
226 // project/unproject round-trip through window depth, whose precision depends on the scene frustum.
227 if (viewport[2] > 0 && viewport[3] > 0 && anchor.allFinite() && depth_scale > EPSILON &&
228 std::abs(projection_x) > EPSILON && std::abs(projection_y) > EPSILON) {
229 const Vec3d displacement = 2.0 * depth_scale *
230 (screen_delta.y() / projection_y * camera.get_dir_up() -
231 screen_delta.x() / projection_x * camera.get_dir_right());
232 if (displacement.allFinite()) {
233 camera.translate(displacement);
234 return;
235 }
236 }
237
238 // Orca: Preserve the former target-plane behavior if the projection or anchor is invalid.
239 // Screen Y grows downward, and the camera moves opposite to the drag.
240 camera.translate(camera.get_inv_zoom() *
241 (screen_delta.y() * camera.get_dir_up() - screen_delta.x() * camera.get_dir_right()));
242}
Vec3d get_dir_forward() const
Definition Camera.hpp:123
const Transform3d & get_projection_matrix() const
Definition Camera.hpp:116
void translate(const Vec3d &displacement)
Definition Camera.cpp:88
Vec3d get_dir_right() const
Definition Camera.hpp:121
double get_inv_zoom() const
Definition Camera.hpp:104
Vec3d get_dir_up() const
Definition Camera.hpp:122
const std::array< int, 4 > & get_viewport() const
Definition Camera.hpp:114

References EPSILON, Slic3r::GUI::Camera::get_dir_forward(), Slic3r::GUI::Camera::get_dir_right(), Slic3r::GUI::Camera::get_dir_up(), Slic3r::GUI::Camera::get_inv_zoom(), Slic3r::GUI::Camera::get_position(), Slic3r::GUI::Camera::get_projection_matrix(), Slic3r::GUI::Camera::get_type(), Slic3r::GUI::Camera::get_viewport(), Slic3r::GUI::Camera::Perspective, and Slic3r::GUI::Camera::translate().

Referenced by Slic3r::GUI::GLCanvas3D::on_gesture(), and Slic3r::GUI::GLCanvas3D::on_mouse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_color_string()

std::array< float, 4 > Slic3r::GUI::parse_color_string ( const std::string & hex)
static
360{
361 std::array<float, 4> c = {1.f, 1.f, 1.f, 1.f};
362 if (hex.size() >= 7 && hex[0] == '#') {
363 unsigned long val = std::strtoul(hex.c_str() + 1, nullptr, 16);
364 c[0] = ((val >> 16) & 0xFF) / 255.f;
365 c[1] = ((val >> 8) & 0xFF) / 255.f;
366 c[2] = ((val ) & 0xFF) / 255.f;
367 }
368 return c;
369}

Referenced by Slic3r::GUI::TextureImportDialog::add_decomposed_mixed_filament(), Slic3r::GUI::TextureImportDialog::add_virtual_mixed_filament(), Slic3r::GUI::TextureImportDialog::apply_auto_standard_mix(), and wxBEGIN_EVENT_TABLE().

Here is the caller graph for this function:

◆ parse_lscpu_etc()

std::map< std::string, std::string > Slic3r::GUI::parse_lscpu_etc ( const std::string & name,
char delimiter )
static
300{
301 std::map<std::string, std::string> out;
302 constexpr size_t max_len = 1000;
303 char cline[max_len] = "";
304 FILE* fp = popen(name.data(), "r");
305 if (fp != NULL) {
306 while (fgets(cline, max_len, fp) != NULL) {
307 std::string line(cline);
308 line.erase(std::remove_if(line.begin(), line.end(),
309 [](char c) { return c == '\"' || c == '\r' || c == '\n'; }),
310 line.end());
311 size_t pos = line.find(delimiter);
312 if (pos < line.size() - 1) {
313 std::string key = line.substr(0, pos);
314 std::string value = line.substr(pos + 1);
315 boost::trim_all(key); // remove leading and trailing spaces
316 boost::trim_all(value);
317 out[key] = value;
318 }
319 }
320 pclose(fp);
321 }
322 return out;
323}

Referenced by generate_system_info_json().

Here is the caller graph for this function:

◆ parse_mm()

bool Slic3r::GUI::parse_mm ( wxString t,
double & out )
static
59{
60 t.Replace(",", ".");
61 return t.Trim(true).Trim(false).ToCDouble(&out) && out >= 0.5 && out <= 500.0;
62}

Referenced by Slic3r::GUI::DesignTextDialog::height_mm().

Here is the caller graph for this function:

◆ parse_semver_from_ini()

boost::optional< Semver > Slic3r::GUI::parse_semver_from_ini ( std::string path)
static
2641{
2642 std::ifstream stream(path);
2643 std::stringstream buffer;
2644 buffer << stream.rdbuf();
2645 std::string body = buffer.str();
2646 size_t start = body.find("OrcaSlicer ");
2647 if (start == std::string::npos) {
2648 start = body.find("OrcaSlicer ");
2649 if (start == std::string::npos)
2650 return boost::none;
2651 }
2652 body = body.substr(start + 12);
2653 size_t end = body.find_first_of(" \n");
2654 if (end < body.size())
2655 body.resize(end);
2656 return Semver::parse(body);
2657}

References Slic3r::Semver::parse(), and parse_semver_from_ini().

Referenced by parse_semver_from_ini().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseErrorCode()

wxString Slic3r::GUI::ParseErrorCode ( int errorcde)
static
120{
121 auto it = error_messages.find(errorcde);
122 if (it != error_messages.end()) { return _L(it->second); }
123 return "";
124}
static const std::map< int, std::string > error_messages
Definition SendToPrinter.cpp:101

References _L, and error_messages.

Referenced by Slic3r::GUI::SendToPrinterDialog::CreateMediaAbilityJob(), and Slic3r::GUI::SendToPrinterDialog::UploadFileRessultCallback().

Here is the caller graph for this function:

◆ pick_reference_square()

int Slic3r::GUI::pick_reference_square ( const std::vector< SketchPlane > & squares,
double half,
const Vec3d & from,
const Vec3d & dir )
5530{
5531 int best = -1;
5532 double best_t = std::numeric_limits<double>::max();
5533 for (int i = 0; i < int(squares.size()); ++i) {
5534 const SketchPlane& s = squares[i];
5535 const Vec3d n = s.x_axis.cross(s.y_axis);
5536 const double dn = n.dot(dir);
5537 if (std::abs(dn) < 1e-12)
5538 continue; // the ray runs along the square
5539 const double t = n.dot(s.origin - from) / dn;
5540 if (t <= 0. || t >= best_t)
5541 continue; // behind the eye, or no nearer than one already hit
5542 const Vec3d d = from + dir * t - s.origin;
5543 if (std::abs(d.dot(s.x_axis)) <= half && std::abs(d.dot(s.y_axis)) <= half) {
5544 best = i;
5545 best_t = t;
5546 }
5547 }
5548 return best;
5549}

References Slic3r::SketchPlane::origin, pick_reference_square(), Slic3r::SketchPlane::x_axis, and Slic3r::SketchPlane::y_axis.

Referenced by Slic3r::GUI::DesignSketchTool::hit_test_base_pick(), and pick_reference_square().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ plane_from_index()

SketchPlane Slic3r::GUI::plane_from_index ( int i)
static
346{
347 switch (i) {
348 case 1: return SketchPlane::XZ();
349 case 2: return SketchPlane::YZ();
350 default: return SketchPlane::XY();
351 }
352}
static SketchPlane XY()
Definition SketchEngine.hpp:57
static SketchPlane YZ()
Definition SketchEngine.hpp:62
static SketchPlane XZ()
Definition SketchEngine.hpp:61

References Slic3r::SketchPlane::XY(), Slic3r::SketchPlane::XZ(), and Slic3r::SketchPlane::YZ().

Referenced by Slic3r::GUI::DesignPanel::hole_plane(), is_base_plane(), Slic3r::GUI::DesignPanel::plane_from_choice(), and Slic3r::GUI::DesignPanel::thread_plane().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ planes_back_to_front()

std::vector< PlanePiece > Slic3r::GUI::planes_back_to_front ( const std::vector< SketchPlane > & planes,
double half,
const Vec3d & eye,
const Vec3d & forward,
bool perspective )
5496{
5497 std::vector<PlanePiece> squares;
5498 for (int i = 0; i < int(planes.size()); ++i) {
5499 const SketchPlane& p = planes[i];
5500 squares.push_back({ i, { p.to_world(Vec2d(-half, -half)), p.to_world(Vec2d(half, -half)),
5501 p.to_world(Vec2d(half, half)), p.to_world(Vec2d(-half, half)) } });
5502 }
5503 std::vector<PlanePiece> out;
5504 paint_back_to_front(std::move(squares), 0, planes, 1e-6 * std::max(half, 1.), eye, forward, perspective, out);
5505 return out;
5506}
void paint_back_to_front(std::vector< PlanePiece > &&in, size_t k, const std::vector< SketchPlane > &planes, double eps, const Vec3d &eye, const Vec3d &forward, bool perspective, std::vector< PlanePiece > &out)
Definition DesignSketchTool.cpp:5420
Vec3d to_world(const Vec2d &pt) const
Definition SketchEngine.cpp:132

References planes_back_to_front(), and Slic3r::SketchPlane::to_world().

Referenced by planes_back_to_front(), and Slic3r::GUI::DesignSketchTool::render_base_pick().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ plate_toolbar_hover_color()

ImVec4 Slic3r::GUI::plate_toolbar_hover_color ( bool is_dark)
static
10382{
10383 return ImVec4(0.67f, 0.67f, 0.67f, is_dark ? .6f : 1.f);
10384}
static bool is_dark()
Definition TextureImportDialog.cpp:85

References is_dark(), and plate_toolbar_hover_color().

Referenced by Slic3r::GUI::GLCanvas3D::_render_imgui_select_plate_toolbar(), Slic3r::GUI::GLCanvas3D::_render_plate_switcher(), and plate_toolbar_hover_color().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ plate_toolbar_keeps_scrollbar()

bool Slic3r::GUI::plate_toolbar_keeps_scrollbar ( bool shown,
float scrollbar_size )
static
10388{
10389 const ImVec2 pos = ImGui::GetWindowPos();
10390 return ImGui::IsMouseHoveringRect(pos, pos + ImGui::GetWindowSize() + ImVec2(shown ? scrollbar_size : 0.f, 0.f), !shown) ||
10391 (ImGui::GetIO().MouseDown[0] && GImGui->ActiveId != 0 && GImGui->ActiveIdWindow == ImGui::GetCurrentWindow());
10392}

References plate_toolbar_keeps_scrollbar().

Referenced by Slic3r::GUI::GLCanvas3D::_render_imgui_select_plate_toolbar(), Slic3r::GUI::GLCanvas3D::_render_plate_switcher(), and plate_toolbar_keeps_scrollbar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ plater()

Plater * Slic3r::GUI::plater ( )
static
401{
402 return wxGetApp().plater();
403}

Referenced by Slic3r::GUI::ArrangeJob::ArrangeJob(), Slic3r::GUI::BindMachineDialog::BindMachineDialog(), Slic3r::GUI::CalibrationDialog::CalibrationDialog(), Slic3r::GUI::Cornering_Test_Dlg::Cornering_Test_Dlg(), Slic3r::GUI::DesignCanvas::DesignCanvas(), Slic3r::GUI::EditDevNameDialog::EditDevNameDialog(), Slic3r::GUI::FillBedJob::FillBedJob(), Slic3r::GUI::FlowRateCalibrationDialog::FlowRateCalibrationDialog(), Slic3r::GUI::Input_Shaping_Damp_Test_Dlg::Input_Shaping_Damp_Test_Dlg(), Slic3r::GUI::Input_Shaping_Freq_Test_Dlg::Input_Shaping_Freq_Test_Dlg(), Slic3r::GUI::MaxVolumetricSpeed_Test_Dlg::MaxVolumetricSpeed_Test_Dlg(), Slic3r::GUI::ModelMallDialog::ModelMallDialog(), Slic3r::GUI::MultiMachinePickPage::MultiMachinePickPage(), Slic3r::GUI::ObjectList::ObjectList(), Slic3r::GUI::OrientJob::OrientJob(), Slic3r::GUI::PA_Calibration_Dlg::PA_Calibration_Dlg(), Slic3r::GUI::ParamsDialog::ParamsDialog(), Slic3r::GUI::PingCodeBindDialog::PingCodeBindDialog(), Slic3r::GUI::PlaterDropTarget::PlaterDropTarget(), Slic3r::GUI::PlaterPresetComboBox::PlaterPresetComboBox(), Slic3r::GUI::PlaterWorker< WorkerSubclass >::PlaterWorker(), Slic3r::GUI::PrintJob::PrintJob(), Slic3r::GUI::ReleaseNoteDialog::ReleaseNoteDialog(), Slic3r::GUI::Retraction_Test_Dlg::Retraction_Test_Dlg(), Slic3r::GUI::RotoptimizeJob::RotoptimizeJob(), Slic3r::GUI::GLGizmoRotate3D::RotoptimzeWindow::RotoptimzeWindow(), Slic3r::GUI::SelectMachineDialog::SelectMachineDialog(), Slic3r::GUI::SendJob::SendJob(), Slic3r::GUI::SendMultiMachinePage::SendMultiMachinePage(), Slic3r::GUI::SendToPrinterDialog::SendToPrinterDialog(), Slic3r::GUI::Plater::SingleSnapshot::SingleSnapshot(), Slic3r::GUI::SLAImportDialog::SLAImportDialog(), Slic3r::GUI::SLAImportJob::SLAImportJob(), Slic3r::GUI::SuppressBackgroundProcessingUpdate::SuppressBackgroundProcessingUpdate(), Slic3r::GUI::Plater::SuppressSnapshots::SuppressSnapshots(), Slic3r::GUI::Plater::TakeSnapshot::TakeSnapshot(), Slic3r::GUI::Plater::TakeSnapshot::TakeSnapshot(), Slic3r::GUI::Temp_Calibration_Dlg::Temp_Calibration_Dlg(), Slic3r::GUI::UnBindMachineDialog::UnBindMachineDialog(), Slic3r::GUI::VFA_Test_Dlg::VFA_Test_Dlg(), Slic3r::GUI::GLCanvas3D::_is_xray_view_active(), Slic3r::GUI::GLCanvas3D::_max_bounding_box(), Slic3r::GUI::GLCanvas3D::_mouse_to_3d(), Slic3r::GUI::GLCanvas3D::_picking_pass(), Slic3r::GUI::GLCanvas3D::_render_arrange_menu(), Slic3r::GUI::GLCanvas3D::_render_frame(), Slic3r::GUI::GLCanvas3D::_render_imgui_select_plate_toolbar(), Slic3r::GUI::GLCanvas3D::_render_orient_menu(), Slic3r::GUI::GLCanvas3D::_render_plate_switcher(), Slic3r::GUI::GLCanvas3D::_render_return_toolbar(), Slic3r::GUI::GLCanvas3D::_render_wireframe_overlay(), Slic3r::GUI::GLCanvas3D::_set_warning_notification(), Slic3r::GUI::GLCanvas3D::_update_selection_from_hover(), Slic3r::GUI::GLGizmosManager::activate_gizmo(), Slic3r::GUI::Selection::add(), Slic3r::GUI::GLGizmoCut3D::add_connector(), Slic3r::GUI::Selection::add_curr_plate(), Slic3r::GUI::Sidebar::add_custom_filament(), Slic3r::GUI::ObjectList::add_layer_range_after_current(), Slic3r::GUI::ObjectTableSettings::add_missed_options(), Slic3r::GUI::Sidebar::add_mixed_filament(), Slic3r::GUI::GLGizmoSimplify::add_simplify_suggestion_notification(), Slic3r::GUI::GLGizmoTextureDisplacement::add_texture_layer(), add_volume_with_gizmo(), Slic3r::GUI::MenuFactory::append_menu_item_align_distribute(), Slic3r::GUI::MenuFactory::append_menu_item_center(), Slic3r::GUI::MenuFactory::append_menu_item_clone(), Slic3r::GUI::MenuFactory::append_menu_item_delete(), Slic3r::GUI::MenuFactory::append_menu_item_drop(), Slic3r::GUI::MenuFactory::append_menu_item_edit_svg(), Slic3r::GUI::MenuFactory::append_menu_item_edit_text(), Slic3r::GUI::MenuFactory::append_menu_item_export_drc(), Slic3r::GUI::MenuFactory::append_menu_item_export_stl(), Slic3r::GUI::MenuFactory::append_menu_item_fill_bed(), Slic3r::GUI::MenuFactory::append_menu_item_fix_through_cgal(), Slic3r::GUI::MenuFactory::append_menu_item_instance_to_object(), Slic3r::GUI::MenuFactory::append_menu_item_locked(), Slic3r::GUI::MenuFactory::append_menu_item_modify(), Slic3r::GUI::MenuFactory::append_menu_item_per_object_process(), Slic3r::GUI::MenuFactory::append_menu_item_per_object_settings(), Slic3r::GUI::MenuFactory::append_menu_item_plate_delete(), Slic3r::GUI::MenuFactory::append_menu_item_plate_name(), Slic3r::GUI::MenuFactory::append_menu_item_printable(), Slic3r::GUI::MenuFactory::append_menu_item_reload_from_disk(), Slic3r::GUI::MenuFactory::append_menu_item_replace_all_with_stl(), Slic3r::GUI::MenuFactory::append_menu_item_replace_with_stl(), Slic3r::GUI::MenuFactory::append_menu_item_scale_selection_to_fit_print_volume(), Slic3r::GUI::MenuFactory::append_menu_item_set_auto_drop(), Slic3r::GUI::MenuFactory::append_menu_item_set_printable(), Slic3r::GUI::MenuFactory::append_menu_item_set_visible(), Slic3r::GUI::MenuFactory::append_menu_item_simplify(), Slic3r::GUI::MenuFactory::append_menu_item_smooth_mesh(), Slic3r::GUI::MenuFactory::append_menu_item_transform(), Slic3r::GUI::MenuFactory::append_menu_items_flush_options(), Slic3r::GUI::MenuFactory::append_menu_items_instance_manipulation(), Slic3r::GUI::Tab::apply_preset_config_values(), Slic3r::GUI::GLGizmoTextureDisplacement::apply_projection_frame(), Slic3r::GUI::GLGizmoBrimEars::apply_radius_change(), Slic3r::GUI::GLGizmoSimplify::apply_simplify(), Slic3r::GUI::GLGizmoBrimEars::auto_generate(), Slic3r::GUI::NotificationManager::bbl_show_filament_map_invalid_notification_after_slice(), Slic3r::GUI::NotificationManager::bbl_show_filament_map_invalid_notification_before_slice(), Slic3r::GUI::NotificationManager::bbl_show_objectsinfo_notification(), Slic3r::GUI::NotificationManager::bbl_show_plugin_install_notification(), bed_stride_x(), bed_stride_y(), Slic3r::GUI::ObjectList::boolean(), Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::build_command_catalog(), Slic3r::GUI::GLGizmoTextureDisplacement::build_island_move_set(), Slic3r::GUI::PublishSettingsDialog::build_option_model(), Slic3r::GUI::TabPrinter::build_unregular_pages(), Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::calib_command(), call_after_if_active(), Slic3r::GUI::ConfigManipulation::check_layer_height(), check_nozzle_diameter_and_type(), check_objects_after_cut(), Slic3r::GUI::PartPlate::check_objects_empty_and_gcode3mf(), Slic3r::GUI::Plater::check_printer_initialized(), Slic3r::GUI::ObjectList::clone(), Slic3r::GUI::GLCanvas3D::collapse_side(), Slic3r::GUI::ObjectList::copy(), Slic3r::GUI::MenuFactory::create_default_menu(), Slic3r::GUI::MenuFactory::create_filament_action_menu(), create_freq_settings_popupmenu(), anonymous_namespace{GLGizmoEmboss.cpp}::create_input(), anonymous_namespace{GLGizmoSVG.cpp}::create_input(), Slic3r::GUI::PreferencesDialog::create_item_checkbox(), Slic3r::GUI::PreferencesDialog::create_item_darkmode(), Slic3r::GUI::PreferencesDialog::create_item_language_combobox(), Slic3r::GUI::PreferencesDialog::create_items(), Slic3r::GUI::ExtruderGroup::create_nozzle_row(), Slic3r::GUI::ObjectList::create_objects_ctrl(), Slic3r::GUI::MenuFactory::create_plate_menu(), create_settings_popupmenu(), Slic3r::GUI::MenuFactory::create_sla_object_menu(), anonymous_namespace{EmbossJob.cpp}::create_volume(), Slic3r::GUI::ObjectList::cut(), Slic3r::GUI::GLGizmoMmuSegmentation::data_changed(), Slic3r::GUI::DesignSketchTool::dbp_half_extent(), Slic3r::GUI::ObjectList::del_from_cut_object(), Slic3r::GUI::ObjectList::del_info_item(), Slic3r::GUI::Sidebar::delete_mixed_filament_at(), Slic3r::GUI::GLGizmoCut3D::delete_selected_connectors(), Slic3r::GUI::GLGizmoBrimEars::delete_selected_points(), desktop_open_project_attachment(), Slic3r::GUI::Mouse3DController::disconnect_device(), Slic3r::GUI::MediaFilePanel::doAction(), Slic3r::GUI::GLGizmoEmboss::draw_delete_style_button(), Slic3r::GUI::GLGizmoEmboss::draw_font_list(), Slic3r::GUI::GLGizmoEmboss::draw_model_type(), Slic3r::GUI::GLGizmoSVG::draw_model_type(), Slic3r::GUI::GLGizmoEmboss::draw_style_rename_popup(), Slic3r::GUI::GLGizmoEmboss::draw_text_input(), Slic3r::GUI::Sidebar::edit_mixed_filament(), Slic3r::GUI::anonymous_namespace{Plater.cpp}::emboss_svg(), Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::ensure_3d_view(), anonymous_namespace{EmbossJob.cpp}::CreateObjectJob::finalize(), Slic3r::GUI::TextureDisplacementBakeJob::finalize(), Slic3r::GUI::TextureDisplacementPrepareJob::finalize(), Slic3r::GUI::ObjectList::fix_all_through_cgal(), Slic3r::GUI::ObjectList::fix_cut_selection(), Slic3r::GUI::ObjectList::fix_through_cgal(), Slic3r::GUI::GLGizmoCut3D::flip_cut_plane(), Slic3r::GUI::SyncAmsInfoDialog::generate_override_fix_ams_list(), Slic3r::GUI::SelectMachineDialog::get_ams_mapping_result(), Slic3r::GUI::SendMultiMachinePage::get_ams_mapping_result(), Slic3r::GUI::SyncAmsInfoDialog::get_ams_mapping_result(), Slic3r::GUI::SyncAmsInfoDialog::get_is_double_extruder(), get_selection(), get_wipe_tower(), get_wipe_tower_arrangepoly(), Slic3r::GUI::GLGizmoBrimEars::gizmo_event(), Slic3r::GUI::GLGizmoPainterBase::gizmo_event(), Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::go_to_layer(), Slic3r::GUI::GLCanvas3D::handle_shortcut(), Slic3r::GUI::Sidebar::has_broken_mixed_filament(), Slic3r::GUI::Sidebar::has_broken_mixed_filament(), has_filaments(), Slic3r::GUI::DesignPanel::hydrate_from_model(), Slic3r::GUI::GCodeViewer::init(), Slic3r::GUI::Plater::priv::init_collapse_toolbar(), Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::is_fff_plater(), Slic3r::GUI::Sidebar::priv::is_fila_switch_ready(), Slic3r::GUI::Selection::is_from_fully_selected_instance(), Slic3r::GUI::Sidebar::is_new_project_in_gcode3mf(), Slic3r::GUI::ConfigManipulation::layer_height_out_of_range_dialog(), Slic3r::GUI::ObjectList::layers_editing(), Slic3r::GUI::DesignCanvas::leave_viewport(), Slic3r::GUI::ObjectList::list_manipulation(), Slic3r::GUI::GCodeViewer::load_as_gcode(), Slic3r::GUI::DesignPanel::load_default_layout(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::GLCanvas3D::load_gcode_preview(), Slic3r::GUI::ObjectList::load_generic_subobject(), Slic3r::GUI::MenuFactory::load_handy_model(), Slic3r::GUI::ObjectList::load_shape_object(), manuallySetNozzleCount(), Slic3r::GUI::GLGizmoTextureDisplacement::mark_seam_path(), Slic3r::GUI::ActionRegistry::materialize_plate_actions(), Slic3r::GUI::Tab::may_discard_current_dirty_preset(), Slic3r::GUI::ObjectList::merge(), Slic3r::GUI::GLCanvas3D::mouse_up_cleanup(), Slic3r::GUI::GLGizmoTextureDisplacement::move_texture_layer(), Slic3r::GUI::anonymous_namespace{ActionRegistry.cpp}::notify_script_outcome(), Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::object_op(), Slic3r::GUI::GLGizmoAssembly::on_get_name(), Slic3r::GUI::GLGizmoMeasure::on_get_name(), Slic3r::GUI::GLCanvas3D::on_idle(), Slic3r::GUI::GLGizmoAssembly::on_is_activable(), Slic3r::GUI::GLGizmoCut3D::on_is_activable(), Slic3r::GUI::GLGizmoMeasure::on_is_activable(), Slic3r::GUI::GLGizmoTextureDisplacement::on_island_edited(), Slic3r::GUI::GLCanvas3D::on_mouse(), Slic3r::GUI::GLCanvas3D::on_mouse_wheel(), Slic3r::GUI::SendToPrinterDialog::on_ok(), Slic3r::GUI::TabPrinter::on_preset_loaded(), Slic3r::GUI::Tab::on_presets_changed(), Slic3r::GUI::ProjectPanel::on_reload(), Slic3r::GUI::GLGizmoEmboss::on_render_input_window(), Slic3r::GUI::GLGizmoFdmSupports::on_render_input_window(), Slic3r::GUI::GLGizmoFuzzySkin::on_render_input_window(), Slic3r::GUI::GLGizmoMmuSegmentation::on_render_input_window(), Slic3r::GUI::GLGizmoSeam::on_render_input_window(), Slic3r::GUI::GLGizmoSimplify::on_render_input_window(), Slic3r::GUI::GLGizmoSVG::on_render_input_window(), Slic3r::GUI::GLGizmoTextureDisplacement::on_render_input_window(), Slic3r::GUI::AuFile::on_set_delete(), Slic3r::GUI::GLGizmoBrimEars::on_set_state(), Slic3r::GUI::GLGizmoCut3D::on_start_dragging(), Slic3r::GUI::GLGizmoBrimEars::on_stop_dragging(), Slic3r::GUI::GLGizmoCut3D::on_stop_dragging(), Slic3r::GUI::anonymous_namespace{SceneBenchmark.cpp}::SceneBenchmarkDialog::on_timer(), Slic3r::GUI::GLGizmoTextureDisplacement::on_uv_vertex_edited(), Slic3r::GUI::Tab::on_value_change(), Slic3r::GUI::TabFilament::on_value_change(), Slic3r::GUI::TabPrinter::on_value_change(), Slic3r::GUI::TabPrintPlate::on_value_change(), Slic3r::GUI::ObjectList::OnEditingDone(), Slic3r::GUI::ObjectList::OnEditingStarted(), BBLTopbar::OnOpenProject(), BBLTopbar::OnRedo(), BBLTopbar::OnSaveProject(), Slic3r::GUI::GuideFrame::OnScriptMessage(), BBLTopbar::OnUndo(), Slic3r::GUI::TroubleshootDialog::PackAll(), Slic3r::GUI::ObjectList::paste(), Slic3r::GUI::GLGizmoCut3D::perform_cut(), Slic3r::GUI::PrintJob::process(), Slic3r::GUI::SendJob::process(), Slic3r::GUI::GLGizmoCut3D::process_cut_line(), Slic3r::GUI::TroubleshootDialog::RebuildSystemProfiles(), refresh_plugin_metadata_blocking(), Slic3r::GUI::GLCanvas3D::reload_scene(), Slic3r::GUI::GLGizmoMmuSegmentation::remap_filament_assignments(), Slic3r::GUI::ObjectList::remove(), Slic3r::GUI::Sidebar::remove_all_mixed_filaments(), Slic3r::GUI::Selection::remove_curr_plate(), Slic3r::GUI::DockPanel::remove_pane(), Slic3r::GUI::GLGizmoTextureDisplacement::remove_texture_layer(), Slic3r::GUI::PartPlate::render(), Slic3r::GUI::Selection::render(), Slic3r::GUI::TriangleSelectorPatch::render(), Slic3r::GUI::GCodeViewer::render_all_plates_stats(), Slic3r::GUI::GLGizmoCut3D::render_angle_input(), Slic3r::GUI::GLGizmoCut3D::render_connectors_input_window(), Slic3r::GUI::GLGizmoPainterBase::render_cursor_circle(), Slic3r::GUI::GLGizmoCut3D::render_cut_line(), Slic3r::GUI::GLGizmoCut3D::render_cut_mode_combo(), Slic3r::GUI::GLGizmoCut3D::render_cut_plane_input_window(), Slic3r::GUI::GLCanvas3D::CenterOfMass::render_details(), Slic3r::GUI::GLGizmoMeasure::render_dimensioning(), Slic3r::GUI::GLGizmoPainterBase::render_follows_cursor(), Slic3r::GUI::GLGizmoCut3D::render_groove_float_input(), Slic3r::GUI::GLGizmoCut3D::render_groove_int_input(), Slic3r::GUI::GLGizmoCut3D::render_groove_two_float_input(), Slic3r::GUI::GCodeViewer::render_legend_color_arr_recommen(), Slic3r::GUI::GLGizmoCut3D::render_line(), Slic3r::GUI::GLGizmoCut3D::render_model(), Slic3r::GUI::GLGizmoCut3D::render_move_center_input(), Slic3r::GUI::Mouse3DController::render_settings_dialog(), Slic3r::GUI::GLCanvas3D::render_thumbnail(), Slic3r::GUI::GLCanvas3D::render_thumbnail(), Slic3r::GUI::GLCanvas3D::render_thumbnail_internal(), Slic3r::GUI::SyncAmsInfoDialog::reset_and_sync_ams_list(), Slic3r::GUI::GizmoObjectManipulation::reset_scale_value(), Slic3r::GUI::Selection::rotate(), Slic3r::GUI::ConfigWizard::run(), Slic3r::GUI::GuideFrame::run(), Slic3r::GUI::SpeedDialWebDialog::run_action(), run_scene_benchmark(), Slic3r::GUI::GLGizmoTextureDisplacement::run_uv_command(), s_get_slicing_extuder_nozzles(), Slic3r::GUI::Selection::scale_and_translate(), scene_selection(), Slic3r::GUI::GLGizmoFdmSupports::select_facets_by_angle(), Slic3r::GUI::ObjectList::select_item_all_children(), Slic3r::GUI::Tab::select_preset(), Slic3r::GUI::GLGizmoTextureDisplacement::select_visible_faces(), Slic3r::GUI::GLGizmoTextureDisplacement::select_whole_model(), Slic3r::GUI::CalibUtils::send_to_print(), Slic3r::GUI::CalibUtils::send_to_print(), Slic3r::GUI::Plater::priv::set_current_panel(), Slic3r::GUI::SyncAmsInfoDialog::set_default_normal(), Slic3r::GUI::GLGizmoTextureDisplacement::set_layer_texture(), Slic3r::GUI::DesignCanvas::set_view(), Slic3r::GUI::ObjectList::set_volume_type(), Slic3r::GUI::IMSlider::SetTicksValues(), setup_dialog_position(), Slic3r::GUI::GLGizmoCut3D::shift_cut(), Slic3r::GUI::MonitorPanel::Show(), Slic3r::GUI::ObjectList::show_context_menu(), Slic3r::GUI::ConfigManipulation::show_spiral_mode_settings_dialog(), Slic3r::GUI::ObjectList::simplify(), Slic3r::GUI::ObjectList::smooth_mesh(), Slic3r::GUI::GLGizmoTextureDisplacement::smooth_model(), Slic3r::GUI::ObjectList::split_instances(), Slic3r::GUI::Downloader::start_download(), Slic3r::GUI::anonymous_namespace{SceneBenchmark.cpp}::SceneBenchmarkDialog::start_slicing(), Slic3r::GUI::GLGizmoTextureDisplacement::subdivide_model(), Slic3r::GUI::DesignCanvas::swap_camera(), Slic3r::GUI::Sidebar::sync_ams_list(), Slic3r::GUI::Tab::sync_excluder(), Slic3r::GUI::DesignPanel::sync_recipe_to_model(), take_snapshot(), Slic3r::GUI::GLCanvas3D::toggle_model_objects_visibility(), Slic3r::GUI::GLGizmoTextureDisplacement::toggle_seam_at(), Slic3r::GUI::GLCanvas3D::toggle_selected_volume_visibility(), Slic3r::GUI::GLCanvas3D::toggle_sla_auxiliaries_visibility(), Slic3r::GUI::Selection::translate(), Slic3r::GUI::FilamentGroupPopup::tryPopup(), Slic3r::GUI::TabPrint::update(), Slic3r::GUI::TabSLAPrint::update(), Slic3r::GUI::ObjectList::update_after_undo_redo(), Slic3r::GUI::PresetComboBox::update_ams_color(), Slic3r::GUI::GLGizmoCut3D::update_bb(), Slic3r::GUI::AuFolderPanel::update_cover(), Slic3r::GUI::Sidebar::priv::update_extruder_separator_icon(), Slic3r::GUI::GLGizmoMmuSegmentation::update_from_model_object(), Slic3r::GUI::ProjectDirtyStateManager::update_from_undo_redo_stack(), Slic3r::GUI::DesignerPanel::update_info(), Slic3r::GUI::ObjectList::update_info_items(), Slic3r::GUI::Preview::update_layers_slider(), Slic3r::GUI::Sidebar::update_mixed_filament_list(), Slic3r::GUI::Sidebar::update_presets(), Slic3r::GUI::ObjectList::update_selections_on_canvas(), Slic3r::GUI::GLGizmoTextureDisplacement::update_uv_editor(), anonymous_namespace{EmbossJob.cpp}::update_volume(), Slic3r::GUI::Emboss::UpdateJob::update_volume(), updateNozzleCountDisplay(), Slic3r::GUI::PreferencesDialog::UpdateSidebarLayout(), Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::view_command(), and Slic3r::GUI::GLCanvas3D::zoom_to_plate().

◆ play_dual_extruder_print_tpu_video()

bool Slic3r::GUI::play_dual_extruder_print_tpu_video ( )
83{
84 const wxString video_url = "https://e.bambulab.com/t?c=fwWqpBg37Liel92N";
85 if (wxLaunchDefaultBrowser(video_url)){
86 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format("Print Tpu Video is being played using the system's default browser.");
87 return true;
88 }
89 BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format("launch system's default browser failed");
90 return false;
91}

◆ play_dual_extruder_slice_video()

bool Slic3r::GUI::play_dual_extruder_slice_video ( )
73{
74 if (wxLaunchDefaultBrowser("https://e.bambulab.com/t?c=HDB24RlwSmt77YFH")) {
75 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format("Video is being played using the system's default browser.");
76 return true;
77 }
78 BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format("launch system's default browser failed");
79 return false;
80}

Referenced by Slic3r::GUI::FilamentGroupPopup::FilamentGroupPopup().

Here is the caller graph for this function:

◆ plugin_pane_name()

std::string Slic3r::GUI::plugin_pane_name ( const std::string & plugin_key,
const std::string & title )
19{
20 std::string name = "plugin:" + plugin_key + ":" + title;
21 std::replace_if(name.begin(), name.end(), [](char c) { return c == '|' || c == ';' || c == '=' || c == '\\'; }, '_');
22 return name;
23}

Referenced by Slic3r::anonymous_namespace{PluginHostUi.cpp}::ui_create_dock_panel().

Here is the caller graph for this function:

◆ plugin_sort_key_from_string()

PluginSortKey Slic3r::GUI::plugin_sort_key_from_string ( const std::string & sort_key,
PluginSortKey fallback )
inline
54 {
55 if (sort_key == "status")
57 if (sort_key == "name")
59 if (sort_key == "source")
61 if (sort_key == "version")
63 if (sort_key == "none")
65 return fallback;
66 }

References Name, None, Source, Status, and Version.

Referenced by Slic3r::GUI::PluginsDialog::set_plugin_sort().

Here is the caller graph for this function:

◆ plugin_sort_order_from_string()

PluginSortOrder Slic3r::GUI::plugin_sort_order_from_string ( const std::string & sort_order,
PluginSortOrder fallback )
inline
69 {
70 if (sort_order == "asc")
72 if (sort_order == "desc")
74 return fallback;
75 }

References Asc, and Desc.

Referenced by Slic3r::GUI::PluginsDialog::set_plugin_sort().

Here is the caller graph for this function:

◆ point_in_poly()

bool Slic3r::GUI::point_in_poly ( const Vec2d & q,
const std::vector< Vec2d > & poly )
static
10289{
10290 if (poly.size() < 3) return false;
10291 bool in = false;
10292 for (size_t i = 0, j = poly.size() - 1; i < poly.size(); j = i++) {
10293 const Vec2d& a = poly[i];
10294 const Vec2d& b = poly[j];
10295 if (((a.y() > q.y()) != (b.y() > q.y())) &&
10296 (q.x() < (b.x() - a.x()) * (q.y() - a.y()) / (b.y() - a.y()) + a.x()))
10297 in = !in;
10298 }
10299 return in;
10300}

References point_in_poly().

Referenced by Slic3r::GUI::DesignSketchTool::hit_display_sketch(), and point_in_poly().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ point_segment_dist()

double Slic3r::GUI::point_segment_dist ( const Vec2d & p,
const Vec2d & a,
const Vec2d & b )
static
10277{
10278 const Vec2d ab = b - a;
10279 const double len2 = ab.squaredNorm();
10280 if (len2 < 1e-12)
10281 return (p - a).norm();
10282 double t = (p - a).dot(ab) / len2;
10283 t = std::max(0.0, std::min(1.0, t));
10284 return (p - (a + t * ab)).norm();
10285}

References Slic3r::dot(), and point_segment_dist().

Referenced by entity_pick_dist(), Slic3r::GUI::DesignSketchTool::hit_test_op_arrow(), Slic3r::GUI::DesignSketchTool::on_mouse_impl(), and point_segment_dist().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ precise_seam_group_changed()

bool Slic3r::GUI::precise_seam_group_changed ( ModelVolumeType old_type,
ModelVolumeType new_type )
static
5845{
5846 const bool old_is_ps = is_precise_seam(old_type);
5847 const bool new_is_ps = is_precise_seam(new_type);
5848 if (old_is_ps != new_is_ps)
5849 return true; // non-PS ↔ PS transition
5850 if (!old_is_ps)
5851 return false; // both non-PS — regular enum ordering is enough
5852 return is_precise_seam_strong(old_type) != is_precise_seam_strong(new_type);
5853}
bool is_precise_seam_strong(ModelVolumeType t)
Definition Model.hpp:374
bool is_precise_seam(ModelVolumeType t)
Definition Model.hpp:373

References Slic3r::is_precise_seam(), and Slic3r::is_precise_seam_strong().

Referenced by Slic3r::GUI::ObjectList::set_volume_type().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepare_decompose_mixed_result()

bool Slic3r::GUI::prepare_decompose_mixed_result ( const ColorDecomposeResult & result,
size_t source_config_idx,
size_t source_physical_idx,
const std::vector< std::string > & physical_colors,
const std::vector< std::string > & physical_types,
const std::vector< size_t > & physical_config_indices,
MixedFilamentResult & out_result,
std::vector< DecomposeMissingComponent > & missing )
298{
299 out_result = {};
300 missing.clear();
301 if (result.components.size() < 2) {
302 return false;
303 }
304
305 const bool standard_mode = result.mode == DecomposeMode::CMYW || result.mode == DecomposeMode::RYBW;
306 std::string basic_type;
307 std::string preset_name;
308 if (standard_mode) {
309 basic_type = decompose_basic_type_from_source(source_config_idx, source_physical_idx, physical_types);
310 preset_name = find_decompose_standard_preset_name(source_config_idx, basic_type);
311 }
312
313 for (size_t i = 0; i < result.components.size(); ++i) {
314 const DecomposeComponent& comp = result.components[i];
315 out_result.ratios.push_back(comp.ratio);
316 if (!standard_mode) {
317 if (comp.filament_index <= 0) {
318 return false;
319 }
320 const size_t physical_idx = static_cast<size_t>(comp.filament_index - 1);
321 if (physical_idx >= physical_config_indices.size()) {
322 return false;
323 }
324 out_result.components.push_back(static_cast<unsigned int>(physical_config_indices[physical_idx] + 1));
325 continue;
326 }
327
328 if (comp.base_color == DecomposeBaseColor::None) {
329 return false;
330 }
331 DecomposeOfficialComponent official_component =
332 lookup_decompose_official_component(basic_type, comp.base_color, comp.colour);
333 int existing_idx = find_existing_decompose_component(official_component, physical_colors,
334 physical_config_indices, source_config_idx);
335 if (existing_idx > 0) {
336 out_result.components.push_back(static_cast<unsigned int>(existing_idx));
337 continue;
338 }
339
340 DecomposeMissingComponent missing_comp;
341 missing_comp.component_idx = out_result.components.size();
342 missing_comp.official_component = official_component;
343 missing_comp.preset_name = preset_name;
344 // TRN %1% is a color name such as "Cyan", %2% is a filament type such as "PLA Basic"
345 missing_comp.display_name = format_wxstr(_L_CONTEXT("%1% %2%", "Color and filament type"),
346 decompose_base_color_display(comp.base_color), wxString::FromUTF8(basic_type));
347 missing.push_back(std::move(missing_comp));
348 out_result.components.push_back(0);
349 }
350
351 const bool ok = out_result.components.size() == out_result.ratios.size() && out_result.components.size() >= 2;
352 return ok;
353}
size_t component_idx
Definition ColorDecomposeSupport.hpp:36
wxString decompose_base_color_display(DecomposeBaseColor color)
Definition ColorDecomposeSupport.cpp:58
std::string find_decompose_standard_preset_name(size_t source_config_idx, const std::string &basic_type)
Definition ColorDecomposeSupport.cpp:194
Definition ColorDecomposeSupport.hpp:35
Definition ColorDecomposeDialog.hpp:40
#define _L_CONTEXT(s, ctx)
Definition I18N.hpp:15

References _L_CONTEXT, Slic3r::GUI::DecomposeComponent::base_color, Slic3r::GUI::DecomposeComponent::colour, Slic3r::GUI::DecomposeMissingComponent::component_idx, Slic3r::GUI::ColorDecomposeResult::components, Slic3r::GUI::MixedFilamentResult::components, decompose_base_color_display(), decompose_basic_type_from_source(), Slic3r::GUI::DecomposeMissingComponent::display_name, Slic3r::GUI::DecomposeComponent::filament_index, find_decompose_standard_preset_name(), find_existing_decompose_component(), format_wxstr(), lookup_decompose_official_component(), Slic3r::GUI::ColorDecomposeResult::mode, None, Slic3r::GUI::DecomposeMissingComponent::official_component, Slic3r::GUI::DecomposeMissingComponent::preset_name, Slic3r::GUI::DecomposeComponent::ratio, and Slic3r::GUI::MixedFilamentResult::ratios.

Referenced by Slic3r::GUI::Sidebar::decompose_filament_color().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ preset_type_name()

const char * Slic3r::GUI::preset_type_name ( Preset::Type type)
static
1666{
1667 switch (type) {
1668 case Preset::TYPE_PRINT: return "process";
1669 case Preset::TYPE_FILAMENT: return "filament";
1670 case Preset::TYPE_PRINTER: return "printer";
1671 default: return "preset";
1672 }
1673}

References preset_type_name(), Slic3r::Preset::TYPE_FILAMENT, Slic3r::Preset::TYPE_PRINT, and Slic3r::Preset::TYPE_PRINTER.

Referenced by Slic3r::GUI::Tab::apply_preset_config_values(), preset_type_name(), and show_substitutions_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ preset_type_options()

const std::vector< std::string > & Slic3r::GUI::preset_type_options ( Preset::Type type)
static
1655{
1656 static const std::vector<std::string> none;
1657 switch (type) {
1661 default: return none;
1662 }
1663}
static const std::vector< std::string > & print_options()
Definition Preset.cpp:1705
static const std::vector< std::string > & printer_options()
Definition Preset.cpp:1715
static const std::vector< std::string > & filament_options()
Definition Preset.cpp:1706
static std::string none
Definition UnsavedChangesDialog.cpp:803

References Slic3r::Preset::filament_options(), none, preset_type_options(), Slic3r::Preset::print_options(), Slic3r::Preset::printer_options(), Slic3r::Preset::TYPE_FILAMENT, Slic3r::Preset::TYPE_PRINT, and Slic3r::Preset::TYPE_PRINTER.

Referenced by Slic3r::GUI::Tab::apply_preset_config_values(), and preset_type_options().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_ams_mapping_result()

void Slic3r::GUI::print_ams_mapping_result ( std::vector< FilamentInfo > & result)
1192{
1193 if (result.empty()) {
1194 BOOST_LOG_TRIVIAL(info) << "print_ams_mapping_result: empty";
1195 }
1196
1197 char buffer[256];
1198 for (int i = 0; i < result.size(); i++) {
1199 ::sprintf(buffer, "print_ams_mapping: F(%02d) -> A(%02d)", result[i].id+1, result[i].tray_id+1);
1200 BOOST_LOG_TRIVIAL(info) << std::string(buffer);
1201 }
1202}

Referenced by Slic3r::GUI::SelectMachineDialog::do_ams_mapping(), and Slic3r::GUI::SyncAmsInfoDialog::do_ams_mapping().

Here is the caller graph for this function:

◆ printer_config()

DynamicPrintConfig & Slic3r::GUI::printer_config ( )
static
132{
133 return wxGetApp().preset_bundle->printers.get_edited_preset().config;
134}

Referenced by Slic3r::GUI::PlateSettingsDialog::PlateSettingsDialog(), Slic3r::GUI::Plater::_calib_pa_pattern(), Slic3r::GUI::Plater::_calib_pa_tower(), Slic3r::GUI::Plater::_calib_temp_belt_sectioned(), Slic3r::GUI::TabFilament::add_filament_overrides_page(), adjust_settings_for_flowrate_calib(), Slic3r::GUI::ExportConfigsDialog::archive_preset_bundle_to_file(), belt_calib_rotation_params(), Slic3r::GUI::Plater::Calib_Cornering(), Slic3r::GUI::CalibUtils::calib_flowrate(), Slic3r::GUI::Plater::calib_flowrate(), Slic3r::GUI::CalibUtils::calib_generic_auto_pa_cali(), Slic3r::GUI::CalibUtils::calib_generic_PA(), Slic3r::GUI::Plater::calib_input_shaping_damp(), Slic3r::GUI::Plater::calib_input_shaping_freq(), Slic3r::GUI::CalibUtils::calib_max_vol_speed(), Slic3r::GUI::Plater::calib_max_vol_speed(), Slic3r::GUI::Plater::calib_pa(), Slic3r::GUI::CalibUtils::calib_pa_pattern(), Slic3r::GUI::CalibUtils::calib_retraction(), Slic3r::GUI::Plater::calib_retraction(), Slic3r::GUI::Plater::calib_temp(), Slic3r::GUI::CalibUtils::calib_temptue(), Slic3r::GUI::CalibUtils::calib_VFA(), Slic3r::GUI::Plater::calib_VFA(), ensure_belt_purge_tower(), Slic3r::GUI::Plater::export_gcode(), generate_max_speed_parameter_value(), Slic3r::GUI::anonymous_namespace{calib_dlg.cpp}::get_shaper_type_values(), has_junction_deviation(), Slic3r::GUI::ConfigManipulation::layer_height_limits(), Slic3r::GUI::Plater::normalize_bed_types(), Slic3r::GUI::VFA_Test_Dlg::on_start(), Slic3r::GUI::TabFilament::on_value_change(), Slic3r::GUI::ExportPresetBundleDialog::OnExportData(), Slic3r::GUI::ObjectList::split(), Slic3r::GUI::TabPrint::toggle_options(), and update_speed_parameter().

Here is the caller graph for this function:

◆ printer_has_multi_nozzle_extruder()

bool Slic3r::GUI::printer_has_multi_nozzle_extruder ( )
static
50{
51 auto *max_nozzle_counts_opt = wxGetApp().preset_bundle->printers.get_edited_preset().config.option<ConfigOptionIntsNullable>("extruder_max_nozzle_count");
52 // Skip nil entries: a nullable-int nil is INT_MAX (> 1) and would otherwise falsely pass the gate.
53 return max_nozzle_counts_opt &&
54 std::any_of(max_nozzle_counts_opt->values.begin(), max_nozzle_counts_opt->values.end(),
55 [](int v) { return v > 1 && v != ConfigOptionIntsNullable::nil_value(); });
56}

Referenced by Slic3r::GUI::FilamentMapManualPanel::FilamentMapManualPanel(), Slic3r::GUI::FilamentMapManualPanel::OnTimer(), and Slic3r::GUI::FilamentMapManualPanel::UpdateNozzleCountDisplay().

Here is the caller graph for this function:

◆ printer_technology() [1/2]

PrinterTechnology Slic3r::GUI::printer_technology ( )
static
61{
62 return wxGetApp().preset_bundle->printers.get_selected_preset().printer_technology();
63}

Referenced by Slic3r::GUI::ObjectList::add_category_to_settings_from_selection(), Slic3r::GUI::ObjectList::add_layer_root_item(), Slic3r::GUI::ObjectTableSettings::add_missed_options(), Slic3r::GUI::GUI_App::apply_keeped_preset_modifications(), Slic3r::GUI::ObjectList::can_merge_to_multipart_object(), Slic3r::GUI::GUI_App::check_and_keep_current_preset_changes(), Slic3r::GUI::Tab::compatible_widget_create(), create_freq_settings_popupmenu(), Slic3r::GUI::ObjectList::delete_from_model_and_list(), Slic3r::GUI::GLGizmoEmboss::draw_model_type(), Slic3r::GUI::GLGizmoSVG::draw_model_type(), Slic3r::GUI::SettingsFactory::get_options(), Slic3r::GUI::GUI_App::get_selected_presets(), Slic3r::GUI::GUI_App::has_current_preset_changes(), Slic3r::GUI::GUI_App::has_unsaved_preset_changes(), Slic3r::GUI::MainFrame::load_config(), Slic3r::GUI::Tab::load_current_preset(), Slic3r::GUI::GUI_App::load_current_presets(), Slic3r::GUI::ObjectList::part_selection_changed(), Slic3r::GUI::ObjectList::paste_layers_into_list(), Slic3r::GUI::GLCanvas3D::reload_scene(), Slic3r::GUI::UnsavedChangesDialog::save(), Slic3r::GUI::Tab::select_preset(), Slic3r::GUI::ObjectList::show_context_menu(), Slic3r::GUI::UnsavedChangesDialog::update(), Slic3r::GUI::ObjectSettings::update_config_values(), Slic3r::GUI::ObjectTableSettings::update_config_values(), Slic3r::GUI::ObjectList::update_info_items(), Slic3r::GUI::ObjectList::update_object_list_by_printer_technology(), Slic3r::GUI::ObjectList::update_objects_list_filament_column(), Slic3r::GUI::GUI_App::update_saved_preset_from_current_preset(), Slic3r::GUI::ObjectTableSettings::update_settings_list(), and Slic3r::GUI::UnsavedChangesDialog::update_tree().

Here is the caller graph for this function:

◆ printer_technology() [2/2]

PrinterTechnology Slic3r::GUI::printer_technology ( )
static
117{
118 return wxGetApp().preset_bundle->printers.get_selected_preset().printer_technology();
119}

◆ process_key_down()

void Slic3r::GUI::process_key_down ( ImGuiKey imgui_key,
std::function< void()> f )
static
1894{
1895 if (ImGui::IsKeyDown(ImGui::GetKeyIndex(imgui_key)))
1896 {
1897 f();
1898 // set KeysDown to false to avoid redundant key down processing
1899 ImGuiContext& g = *GImGui;
1900 g.IO.KeysDown[ImGui::GetKeyIndex(imgui_key)] = false;
1901 }
1902}

References Slic3r::f().

Referenced by Slic3r::GUI::ImGuiWrapper::search_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_mouse_wheel()

void Slic3r::GUI::process_mouse_wheel ( int & mouse_wheel)
static
1442{
1443 if (mouse_wheel > 0)
1444 scroll_up();
1445 else if (mouse_wheel < 0)
1446 scroll_down();
1447 mouse_wheel = 0;
1448}
static void scroll_down()
Definition ImGuiWrapper.cpp:1430
static void scroll_up()
Definition ImGuiWrapper.cpp:1418

References scroll_down(), and scroll_up().

Referenced by Slic3r::GUI::GLCanvas3D::on_mouse_wheel(), Slic3r::GUI::ImGuiWrapper::search_list(), and Slic3r::GUI::ImGuiWrapper::undo_redo_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ project_page_strings()

json Slic3r::GUI::project_page_strings ( )
static
72{
73 return {
74 {"no_model_info", _u8L("No model information")},
75 {"edit_project_info", _u8L("Edit Project Info")},
76 {"model_information", _u8L("Model Information")},
77 {"accessories", _u8L("Accessories")},
78 {"profile_information", _u8L("Profile Information")},
79 {"model_name", _u8L("Model name")},
80 {"created_by", _u8L("Created by")},
81 {"remixed_by", _u8L("Remixed by")},
82 {"shared_by", _u8L("Shared by")},
83 {"model_description", _u8L("Model description")},
84 {"bom", _u8L("BOM")},
85 {"assembly_guide", _u8L("Assembly Guide")},
86 {"other", _u8L("Other")},
87 {"profile_name", _u8L("Profile name")},
88 {"profile_author", _u8L("Profile Author")},
89 {"profile_description", _u8L("Profile description")},
90 };
91}

References _u8L.

Referenced by Slic3r::GUI::ProjectPanel::create_browser().

Here is the caller graph for this function:

◆ pt_linear_len()

double Slic3r::GUI::pt_linear_len ( double spacing,
int count )
static
7119{
7120 return std::max(spacing * double(std::max(1, count) - 1), spacing);
7121}

References count, and pt_linear_len().

Referenced by Slic3r::GUI::DesignSketchTool::hit_test_pattern_handle(), pt_linear_len(), and Slic3r::GUI::DesignSketchTool::render_pattern_gizmo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pure_color_for_base()

wxColour Slic3r::GUI::pure_color_for_base ( DecomposeBaseColor base)
static
100{
101 switch (base) {
108 default: return *wxBLACK;
109 }
110}
static const wxColour CMYW_WHITE(255, 255, 255)
static const wxColour CMYW_YELLOW(255, 255, 0)
static const wxColour RYBW_BLUE(0, 0, 255)
static const wxColour CMYW_CYAN(0, 255, 255)
static const wxColour CMYW_MAGENTA(255, 0, 255)
static const wxColour RYBW_RED(255, 0, 0)

References Blue, CMYW_CYAN(), CMYW_MAGENTA(), CMYW_WHITE(), CMYW_YELLOW(), Cyan, Magenta, Red, RYBW_BLUE(), RYBW_RED(), White, and Yellow.

Referenced by Slic3r::GUI::ColorDecomposeDialog::try_build_single_base_result().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ push_plate_toolbar_scrollbar_style()

void Slic3r::GUI::push_plate_toolbar_scrollbar_style ( bool is_dark,
float scrollbar_size )
static
10370{
10371 const ImVec4 grab(0.77f, 0.77f, 0.77f, is_dark ? .6f : 1.f);
10372 // A background with opacity over the window's would make a second color.
10373 ImGui::PushStyleColor(ImGuiCol_ScrollbarBg, ImVec4(0.f, 0.f, 0.f, 0.f));
10374 ImGui::PushStyleColor(ImGuiCol_ScrollbarGrab, grab);
10375 ImGui::PushStyleColor(ImGuiCol_ScrollbarGrabHovered, grab);
10376 ImGui::PushStyleColor(ImGuiCol_ScrollbarGrabActive, grab);
10377 ImGui::PushStyleVar(ImGuiStyleVar_ScrollbarSize, scrollbar_size);
10378}

References is_dark(), and push_plate_toolbar_scrollbar_style().

Referenced by Slic3r::GUI::GLCanvas3D::_render_imgui_select_plate_toolbar(), Slic3r::GUI::GLCanvas3D::_render_plate_switcher(), and push_plate_toolbar_scrollbar_style().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ queue_job() [1/3]

template<class ProcessFn, class = std::enable_if_t<IsProcessFn<ProcessFn>>>
bool Slic3r::GUI::queue_job ( Worker & w,
ProcessFn fn )
85{
86 return queue_job(w, std::move(fn), [](bool, std::exception_ptr &) {});
87}
bool queue_job(Worker &w, ProcessFn fn, FinishFn finishfn)
Definition Worker.hpp:62

References queue_job().

Here is the call graph for this function:

◆ queue_job() [2/3]

template<class ProcessFn, class FinishFn, class = std::enable_if_t<IsProcessFn<ProcessFn>>, class = std::enable_if_t<IsFinishFn<FinishFn>>>
bool Slic3r::GUI::queue_job ( Worker & w,
ProcessFn fn,
FinishFn finishfn )
63{
64 struct LambdaJob: Job {
65 ProcessFn fn;
66 FinishFn finishfn;
67
68 LambdaJob(ProcessFn pfn, FinishFn ffn)
69 : fn{std::move(pfn)}, finishfn{std::move(ffn)}
70 {}
71
72 void process(Ctl &ctl) override { fn(ctl); }
73 void finalize(bool canceled, std::exception_ptr &eptr) override
74 {
75 finishfn(canceled, eptr);
76 }
77 };
78
79 auto j = std::make_shared<LambdaJob>(std::move(fn), std::move(finishfn));
80 return w.push(std::move(j));
81}
Definition Job.hpp:19
virtual void finalize(bool, std::exception_ptr &)
Definition Job.hpp:65
virtual void process(Ctl &ctl)=0
virtual bool push(std::shared_ptr< Job > job)=0
STL namespace.

References queue_job().

Referenced by anonymous_namespace{GLGizmoEmboss.cpp}::draw_font_preview(), Slic3r::GUI::Emboss::StyleManager::init_style_images(), queue_job(), queue_job(), Slic3r::GUI::GLGizmoTextureDisplacement::queue_preview_job(), queue_texture_displacement_bake(), queue_texture_displacement_debug(), queue_texture_displacement_prepare(), replace_job(), anonymous_namespace{EmbossJob.cpp}::start_create_object_job(), anonymous_namespace{EmbossJob.cpp}::start_create_volume_job(), and Slic3r::GUI::Emboss::start_update_volume().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ queue_job() [3/3]

bool Slic3r::GUI::queue_job ( Worker & w,
std::shared_ptr< Job > j )
inline
90{
91 return w.push(std::move(j));
92}

References Slic3r::GUI::Worker::push().

Here is the call graph for this function:

◆ queue_texture_displacement_bake()

void Slic3r::GUI::queue_texture_displacement_bake ( std::vector< TextureDisplacementBakeVolume > volumes,
const TextureColorSettings & color,
std::function< void()> on_finished,
bool take_snapshot )
362{
364 input.volumes = std::move(volumes);
365 input.color = color;
367
368 auto &worker = wxGetApp().plater()->get_ui_job_worker();
369 queue_job(worker, std::make_unique<TextureDisplacementBakeJob>(std::move(input), std::move(on_finished)));
370}
TextureColorSettings color
Definition TextureDisplacementBakeJob.hpp:55
static void take_snapshot(const std::string &snapshot_name)
Definition GUI_ObjectList.cpp:141
bool take_snapshot
Definition TextureDisplacementBakeJob.hpp:59
std::vector< TextureDisplacementBakeVolume > volumes
Definition TextureDisplacementBakeJob.hpp:50
Definition TextureDisplacementBakeJob.hpp:44

References Slic3r::GUI::TextureDisplacementBakeInput::color, queue_job(), queue_texture_displacement_bake(), take_snapshot(), Slic3r::GUI::TextureDisplacementBakeInput::take_snapshot, and Slic3r::GUI::TextureDisplacementBakeInput::volumes.

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::bake(), and queue_texture_displacement_bake().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ queue_texture_displacement_debug()

void Slic3r::GUI::queue_texture_displacement_debug ( const ModelVolume & volume,
const TextureColorSettings & color,
const TextureDisplacementPrepareParams & prepare_params,
const Transform3d & prepare_texture_frame,
float resting_drop,
bool run_prepare,
bool check_topology,
std::function< void(std::vector< BakeStageSnapshot >)> on_finished )
113{
115 input.volume_id = volume.id();
116 input.base_mesh = volume.mesh().its;
117 input.layers = volume.texture_displacement_layers;
119 input.prepare_params = prepare_params;
120 input.run_prepare = run_prepare;
121 input.check_topology = check_topology;
122 input.color = color;
124 input.prepare_texture_frame = prepare_texture_frame;
125 input.resting_drop = resting_drop;
126 if (volume.has_texture_uv())
127 input.model_uv = volume.texture_uv;
128 for (int i = 0; i < int(TEXTURE_DISPLACEMENT_MAX_LAYERS); ++i)
129 input.facets_data[size_t(i)] = volume.texture_displacement_facet(i).get_data();
130
131 auto &worker = wxGetApp().plater()->get_ui_job_worker();
132 queue_job(worker, std::make_unique<TextureDisplacementDebugJob>(std::move(input), std::move(on_finished)));
133}
const TriangleSelector::TriangleSplittingData & get_data() const noexcept
Definition Model.hpp:763
const TriangleMesh & mesh() const
Definition Model.hpp:892
FacetsAnnotation & texture_displacement_facet(int slot)
Definition Model.hpp:937
std::vector< TextureDisplacementLayer > texture_displacement_layers
Definition Model.hpp:974
TextureDisplacementOptions texture_displacement_options
Definition Model.hpp:979
bool has_texture_uv() const
Definition Model.hpp:996
std::vector< Vec2f > texture_uv
Definition Model.hpp:994
indexed_triangle_set its
Definition TriangleMesh.hpp:164
ObjectID volume_id
Definition TextureDisplacementDebugJob.hpp:35
float resting_drop
Definition TextureDisplacementDebugJob.hpp:51
bool check_topology
Definition TextureDisplacementDebugJob.hpp:62
std::vector< Vec2f > model_uv
Definition TextureDisplacementDebugJob.hpp:57
Transform3d volume_to_world
Definition TextureDisplacementDebugJob.hpp:46
TextureDisplacementFacetsData facets_data
Definition TextureDisplacementDebugJob.hpp:38
TextureDisplacementOptions options
Definition TextureDisplacementDebugJob.hpp:39
std::vector< TextureDisplacementLayer > layers
Definition TextureDisplacementDebugJob.hpp:37
indexed_triangle_set base_mesh
Definition TextureDisplacementDebugJob.hpp:36
TextureDisplacementPrepareParams prepare_params
Definition TextureDisplacementDebugJob.hpp:42
bool run_prepare
Definition TextureDisplacementDebugJob.hpp:43
TextureColorSettings color
Definition TextureDisplacementDebugJob.hpp:54
Transform3d prepare_texture_frame
Definition TextureDisplacementDebugJob.hpp:50
Definition TextureDisplacementDebugJob.hpp:34
static constexpr size_t TEXTURE_DISPLACEMENT_MAX_LAYERS
Definition TextureDisplacement.hpp:44
Transform3d texture_displacement_volume_to_world(const ModelVolume &volume)
Definition TextureDisplacement.cpp:3595

References Slic3r::GUI::TextureDisplacementDebugInput::base_mesh, Slic3r::GUI::TextureDisplacementDebugInput::check_topology, Slic3r::GUI::TextureDisplacementDebugInput::color, Slic3r::GUI::TextureDisplacementDebugInput::facets_data, Slic3r::FacetsAnnotation::get_data(), Slic3r::ModelVolume::has_texture_uv(), Slic3r::ObjectBase::id(), Slic3r::TriangleMesh::its, Slic3r::GUI::TextureDisplacementDebugInput::layers, Slic3r::ModelVolume::mesh(), Slic3r::GUI::TextureDisplacementDebugInput::model_uv, Slic3r::GUI::TextureDisplacementDebugInput::options, Slic3r::GUI::TextureDisplacementDebugInput::prepare_params, Slic3r::GUI::TextureDisplacementDebugInput::prepare_texture_frame, queue_job(), Slic3r::GUI::TextureDisplacementDebugInput::resting_drop, Slic3r::GUI::TextureDisplacementDebugInput::run_prepare, Slic3r::ModelVolume::texture_displacement_facet(), Slic3r::ModelVolume::texture_displacement_layers, Slic3r::TEXTURE_DISPLACEMENT_MAX_LAYERS, Slic3r::ModelVolume::texture_displacement_options, Slic3r::texture_displacement_volume_to_world(), Slic3r::ModelVolume::texture_uv, Slic3r::GUI::TextureDisplacementDebugInput::volume_id, and Slic3r::GUI::TextureDisplacementDebugInput::volume_to_world.

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::run_stage_debug().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ queue_texture_displacement_prepare()

void Slic3r::GUI::queue_texture_displacement_prepare ( TextureDisplacementPrepareInput && input,
std::function< void(TextureDisplacementPrepareOutcome)> on_finished )
151{
152 auto &worker = wxGetApp().plater()->get_ui_job_worker();
153 queue_job(worker, std::make_unique<TextureDisplacementPrepareJob>(std::move(input), std::move(on_finished)));
154}

References queue_job(), and queue_texture_displacement_prepare().

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::queue_prepare(), and queue_texture_displacement_prepare().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ray_axis_proj()

double Slic3r::GUI::ray_axis_proj ( const Linef3 & ray,
const Vec3d & anchor,
const Vec3d & dir )
static
10339{
10340 const Vec3d ro = ray.a, rd = ray.vector();
10341 const Vec3d e = dir;
10342 const Vec3d w0 = anchor - ro;
10343 const double a = e.dot(e), b = e.dot(rd), c = rd.dot(rd), dd = e.dot(w0), ee = rd.dot(w0);
10344 const double denom = a * c - b * b;
10345 // Relative near-parallel guard: when the camera ray is ~along the axis (e.g. the depth axis in
10346 // top view) denom collapses; a tiny absolute floor lets a huge, unstable projection through.
10347 if (std::abs(denom) < 1e-4 * std::max(a * c, 1e-12)) return std::nan("");
10348 return (b * ee - c * dd) / denom;
10349}
Vec3d vector() const
Definition Line.hpp:281
Vec3d a
Definition Line.hpp:311

References Slic3r::Linef3::a, ray_axis_proj(), and Slic3r::Linef3::vector().

Referenced by Slic3r::GUI::DesignSketchTool::drag_move_arrow(), Slic3r::GUI::DesignSketchTool::grab_move_arrow(), Slic3r::GUI::DesignSketchTool::hole_axis_proj(), and ray_axis_proj().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ray_from_camera()

std::optional< RaycastManager::Hit > Slic3r::GUI::ray_from_camera ( const RaycastManager & raycaster,
const Vec2d & mouse_pos,
const Camera & camera,
const RaycastManager::ISkip * skip )

Unproject on mesh by Mesh raycasters.

Parameters
mouse_posPosition of mouse on screen
cameraProjection params
skipDefine which caster will be skipped, null mean no skip
Returns
Position on surface, normal direction in world coorinate
  • key, to know hitted instance and volume
369{
370 Vec3d point;
371 Vec3d direction;
372 CameraUtils::ray_from_screen_pos(camera, mouse_pos, point, direction);
373 return raycaster.first_hit(point, direction, skip);
374}
static void ray_from_screen_pos(const Camera &camera, const Vec2d &position, Vec3d &point, Vec3d &direction)
Create ray(point and direction) for screen coordinate.
Definition CameraUtils.cpp:95
std::optional< Hit > first_hit(const Vec3d &point, const Vec3d &direction, const ISkip *skip=nullptr) const
Unproject on mesh and return closest hit to point in given direction.
Definition RaycastManager.cpp:115

References Slic3r::GUI::RaycastManager::first_hit(), and Slic3r::GUI::CameraUtils::ray_from_screen_pos().

Referenced by anonymous_namespace{SurfaceDrag.cpp}::dragging(), and anonymous_namespace{EmbossJob.cpp}::start_create_volume_on_surface_job().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ray_segment_dist3()

double Slic3r::GUI::ray_segment_dist3 ( const Vec3d & ro,
const Vec3d & rd,
const Vec3d & a,
const Vec3d & b )
static
10324{
10325 const Vec3d d1 = rd, d2 = b - a, r = ro - a;
10326 const double A = d1.dot(d1), B = d1.dot(d2), C = d2.dot(d2), D = d1.dot(r), E = d2.dot(r);
10327 const double denom = A * C - B * B;
10328 double s = (std::abs(denom) > 1e-12) ? (A * E - B * D) / denom : 0.0; // param on segment
10329 s = std::max(0.0, std::min(1.0, s));
10330 double tt = (B * s - D) / std::max(A, 1e-12); // param on ray
10331 tt = std::max(0.0, tt); // ray is forward-only
10332 const Vec3d pr = ro + tt * d1, ps = a + s * d2;
10333 return (pr - ps).norm();
10334}
@ E
Definition libslic3r.h:144

References Slic3r::E, and ray_segment_dist3().

Referenced by Slic3r::GUI::DesignSketchTool::hit_test_cut_arrow(), Slic3r::GUI::DesignSketchTool::hit_test_extrude_arrow(), Slic3r::GUI::DesignSketchTool::hit_test_fillet_arrow(), Slic3r::GUI::DesignSketchTool::hit_test_hole_handle(), Slic3r::GUI::DesignSketchTool::hit_test_move_arc(), Slic3r::GUI::DesignSketchTool::hit_test_move_arrow(), Slic3r::GUI::DesignSketchTool::hit_test_pattern_handle(), Slic3r::GUI::DesignSketchTool::hit_test_shell_arrow(), Slic3r::GUI::DesignSketchTool::hit_test_thread_handle(), and ray_segment_dist3().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ray_triangle()

bool Slic3r::GUI::ray_triangle ( const Vec3d & ro,
const Vec3d & rd,
const Vec3d & v0,
const Vec3d & v1,
const Vec3d & v2,
double & t )
static
10306{
10307 const Vec3d e1 = v1 - v0, e2 = v2 - v0;
10308 const Vec3d p = rd.cross(e2);
10309 const double det = e1.dot(p);
10310 if (std::abs(det) < 1e-12) return false; // parallel
10311 const double inv = 1.0 / det;
10312 const Vec3d s = ro - v0;
10313 const double u = s.dot(p) * inv;
10314 if (u < -1e-9 || u > 1.0 + 1e-9) return false;
10315 const Vec3d q = s.cross(e1);
10316 const double v = rd.dot(q) * inv;
10317 if (v < -1e-9 || u + v > 1.0 + 1e-9) return false;
10318 t = e2.dot(q) * inv;
10319 return t > 1e-9;
10320}

References ray_triangle().

Referenced by ray_triangle(), and Slic3r::GUI::DesignSketchTool::resolve_solid_pick().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_binary_stl()

void Slic3r::GUI::read_binary_stl ( const std::string & filename,
std::string & model_id,
std::string & code )
8808 {
8809 std::ifstream file( encode_path(filename.c_str()), std::ios::binary);
8810 if (!file) {
8811 return;
8812 }
8813
8814 try {
8815 // Read the first 80 bytes
8816 char data[80];
8817 file.read(data, 80);
8818 if (!file) {
8819 file.close();
8820 return;
8821 }
8822
8823 if (data[0] == '\0' || data[0] == ' ') {
8824 file.close();
8825 return;
8826 }
8827
8828 char magic[2] = { data[0], data[1] };
8829 if (magic[0] != 'M' || magic[1] != 'W') {
8830 file.close();
8831 return;
8832 }
8833
8834 if (data[2] != ' ') {
8835 file.close();
8836 return;
8837 }
8838
8839 char protocol_version[3] = { data[3], data[4], data[5] };
8840
8841 //version
8842 if (protocol_version[0] != '1' || protocol_version[1] != '.' || protocol_version[2] != '0') {
8843 file.close();
8844 return;
8845 }
8846
8847 std::vector<char*> tokens;
8848 std::istringstream iss(data);
8849 std::string token;
8850 while (std::getline(iss, token, ' ')) {
8851 char* tokenPtr = new char[token.length() + 1];
8852 std::strcpy(tokenPtr, token.c_str());
8853 tokens.push_back(tokenPtr);
8854 }
8855
8856 //model id
8857 if (tokens.size() < 4) {
8858 file.close();
8859 return;
8860 }
8861
8862 model_id = tokens[2];
8863 code = tokens[3];
8864 file.close();
8865 }
8866 catch (...) {
8867 }
8868 return;
8869}

References Slic3r::encode_path().

Referenced by Slic3r::GUI::Plater::priv::load_files().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_json_file()

char * Slic3r::GUI::read_json_file ( const std::string & preset_path)
static
646{
647 FILE *json_file = boost::nowide::fopen(boost::filesystem::path(preset_path).make_preferred().string().c_str(), "rb");
648 if (json_file == NULL) {
649 BOOST_LOG_TRIVIAL(info) << "Failed to open JSON file: " << preset_path;
650 return NULL;
651 }
652 fseek(json_file, 0, SEEK_END); // seek to end
653 long file_size = ftell(json_file); // get file size
654 fseek(json_file, 0, SEEK_SET); // seek to start
655
656 char * json_contents = (char *) malloc(file_size);
657 if (json_contents == NULL) {
658 BOOST_LOG_TRIVIAL(info) << "Failed to allocate memory for JSON file ";
659 fclose(json_file);
660 return NULL;
661 }
662
663 const size_t read_bytes = fread(json_contents, 1, file_size, json_file);
664 if (read_bytes != static_cast<size_t>(file_size))
665 BOOST_LOG_TRIVIAL(error) << "Read " << read_bytes << " of " << file_size << " bytes from the JSON file";
666 fclose(json_file);
667
668 return json_contents;
669}

◆ read_model_from_file()

void Slic3r::GUI::read_model_from_file ( const std::string & input_file,
Model & model )
static
526{
529 int plate_to_slice = 0;
530
531 bool is_bbl_3mf;
532 Semver file_version;
533 DynamicPrintConfig config;
534 PlateDataPtrs plate_data_src;
535 std::vector<Preset *> project_presets;
536
537 model = Model::read_from_file(input_file, &config, &config_substitutions, strategy, &plate_data_src, &project_presets,
538 &is_bbl_3mf, &file_version, nullptr, nullptr, nullptr, plate_to_slice);
539
540 model.add_default_instances();
541
542 const std::string extension = fs::path(input_file).extension().string();
543 const bool is_project_file = extension == ".3mf" || extension == ".3MF" || extension == ".amf" || extension == ".AMF";
544 for (auto object : model.objects) {
545 if (!is_project_file)
546 object->center_around_origin(false);
547 object->ensure_on_bed(is_project_file);
548 }
549}
static Model read_from_file(const std::string &input_file, DynamicPrintConfig *config=nullptr, ConfigSubstitutionContext *config_substitutions=nullptr, LoadStrategy options=LoadStrategy::AddDefaultInstances, PlateDataPtrs *plate_data=nullptr, std::vector< Preset * > *project_presets=nullptr, bool *is_xxx=nullptr, Semver *file_version=nullptr, Import3mfProgressFn proFn=nullptr, ImportstlProgressFn stlFn=nullptr, BBLProject *project=nullptr, int plate_id=0)
Definition Model.cpp:318
bool add_default_instances()
Definition Model.cpp:805
Definition Semver.hpp:24
std::vector< PlateData * > PlateDataPtrs
Definition bbs_3mf.hpp:278
@ Enable
Definition Config.hpp:245
LoadStrategy
Definition bbs_3mf.hpp:218
@ LoadModel
Definition bbs_3mf.hpp:222
Definition Config.hpp:274

References Slic3r::Model::add_default_instances(), Slic3r::Enable, Slic3r::LoadModel, Slic3r::Model::objects, and Slic3r::Model::read_from_file().

Referenced by Slic3r::GUI::CalibUtils::calib_flowrate(), Slic3r::GUI::CalibUtils::calib_generic_auto_pa_cali(), Slic3r::GUI::CalibUtils::calib_generic_PA(), Slic3r::GUI::CalibUtils::calib_max_vol_speed(), Slic3r::GUI::CalibUtils::calib_retraction(), Slic3r::GUI::CalibUtils::calib_temptue(), and Slic3r::GUI::CalibUtils::calib_VFA().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recompute_mixed_slot_colors()

void Slic3r::GUI::recompute_mixed_slot_colors ( std::vector< wxColour > & colors,
const Slic3r::DynamicPrintConfig & cfg )
434{
435 const auto* is_mixed_opt = cfg.option<ConfigOptionBools>("filament_is_mixed");
436 const auto* comp_opt = cfg.option<ConfigOptionStrings>("filament_mixed_components");
437 const auto* ratio_opt = cfg.option<ConfigOptionStrings>("filament_mixed_sublayer_ratios");
438 const auto* grad_opt = cfg.option<ConfigOptionBools>("filament_mixed_gradient");
439 if (!is_mixed_opt || !comp_opt) return;
440
441 const size_t n = is_mixed_opt->values.size();
442 if (colors.size() < n) colors.resize(n);
443
444 const auto* colour_opt = cfg.option<ConfigOptionStrings>("filament_colour");
445 const auto kFallback = wxColour(128, 128, 128, 255);
446
447 for (size_t i = 0; i < n; ++i) {
448 if (!is_mixed_opt->values[i]) continue;
449
450 if (i >= comp_opt->values.size()) { colors[i] = kFallback; continue; }
451 auto comp_ids = Slic3r::parse_mixed_components(comp_opt->values[i]);
452 if (comp_ids.empty()) { colors[i] = kFallback; continue; }
453
454 bool is_gradient = grad_opt && i < grad_opt->values.size() && grad_opt->values[i];
455 std::vector<unsigned int> use_ids = comp_ids;
456 std::vector<int> weights;
457
458 if (is_gradient && comp_ids.size() >= 2) {
459 use_ids = { comp_ids.front(), comp_ids.back() };
460 weights = { 5000, 5000 };
461 } else {
462 auto ratios_d = Slic3r::parse_mixed_ratios(
463 (ratio_opt && i < ratio_opt->values.size()) ? ratio_opt->values[i] : std::string{},
464 comp_ids.size());
465 weights.reserve(comp_ids.size());
466 for (double r : ratios_d)
467 weights.push_back(static_cast<int>(std::lround(r * 10000.0)));
468 }
469
470 std::vector<std::string> hex_colors;
471 hex_colors.reserve(use_ids.size());
472 bool any_invalid = false;
473 for (unsigned int id : use_ids) {
474 if (id == 0 || id > colors.size()) { any_invalid = true; break; }
475 wxColour c = colors[id - 1];
476 if (c.IsOk() && (c.Red() > 0 || c.Green() > 0 || c.Blue() > 0)) {
477 hex_colors.push_back(to_hex(c));
478 } else if (colour_opt && (id - 1) < colour_opt->values.size()) {
479 hex_colors.push_back(colour_opt->values[id - 1]);
480 } else {
481 any_invalid = true; break;
482 }
483 }
484 if (any_invalid) { colors[i] = kFallback; continue; }
485
486 std::string hex = Slic3r::blend_color_multi(hex_colors, weights);
487 wxColour blended(hex);
488 if (!blended.IsOk()) blended = kFallback;
489 colors[i] = wxColour(blended.Red(), blended.Green(), blended.Blue(), 255);
490 }
491}
std::vector< double > parse_mixed_ratios(const std::string &str, size_t n_components)
Definition FilamentMixer.cpp:404

References Slic3r::blend_color_multi(), Slic3r::ConfigBase::option(), Slic3r::parse_mixed_components(), Slic3r::parse_mixed_ratios(), Slic3r::ConfigOptionVector< T >::size(), to_hex(), Slic3r::ConfigOptionVector< T >::values, and Slic3r::ConfigOptionVector< unsigned char >::values.

Referenced by Slic3r::GUI::SelectMachineDialog::change_default_normal(), Slic3r::GUI::SyncAmsInfoDialog::change_default_normal(), Slic3r::GUI::SelectMachineDialog::clone_thumbnail_data(), Slic3r::GUI::SyncAmsInfoDialog::clone_thumbnail_data(), and Slic3r::GUI::anonymous_namespace{PublishSettingsDialog.cpp}::mixed_filament_blend_color().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reference_label_box()

std::array< Vec3d, 4 > Slic3r::GUI::reference_label_box ( const SketchPlane & square,
double half,
const std::string & text )
5519{
5520 const double th = label_height(half);
5521 Vec2d size;
5522 text_strokes(text, th, size);
5523 const Vec2d c = label_centre(half, size);
5524 const Vec2d r = 0.5 * size + Vec2d::Constant(0.15 * th); // a margin round the strokes, to aim at
5525 return { square.to_world(c + Vec2d(-r.x(), -r.y())), square.to_world(c + Vec2d(r.x(), -r.y())),
5526 square.to_world(c + Vec2d(r.x(), r.y())), square.to_world(c + Vec2d(-r.x(), r.y())) };
5527}

References reference_label_box(), and Slic3r::SketchPlane::to_world().

Referenced by Slic3r::GUI::DesignSketchTool::hit_test_base_pick(), and reference_label_box().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reference_square()

SketchPlane Slic3r::GUI::reference_square ( const SketchPlane & plane,
int base,
double half )
5509{
5510 SketchPlane square = plane;
5511 if (is_base_plane(base)) {
5512 const Vec3d o = reference_octant();
5513 square.origin += (reference_square_gap(half) + half) * (plane.x_axis.dot(o) * plane.x_axis + plane.y_axis.dot(o) * plane.y_axis);
5514 }
5515 return square;
5516}
static bool is_base_plane(const SketchPlane &p, const Vec3d &modeling_origin)
Definition DesignPanel.cpp:372
double reference_square_gap(double half)
Definition DesignSketchTool.hpp:80

References is_base_plane(), Slic3r::SketchPlane::origin, reference_square(), reference_square_gap(), Slic3r::SketchPlane::x_axis, and Slic3r::SketchPlane::y_axis.

Referenced by Slic3r::GUI::DesignSketchTool::dbp_squares(), and reference_square().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reference_square_gap()

double Slic3r::GUI::reference_square_gap ( double half)
inline
80{ return 0.25 * half; }

Referenced by reference_square(), and Slic3r::GUI::DesignSketchTool::render_reference_axes().

Here is the caller graph for this function:

◆ refresh_agora_url()

void Slic3r::GUI::refresh_agora_url ( char const * device,
char const * dev_ver,
char const * channel,
void * context,
void(* callback )(void *context, char const *url) )
extern
375{
376 std::string device2 =device;
377 device2 += "|";
378 device2 += dev_ver;
379 device2 += "|\"agora\"|";
380 device2 += channel;
381 wxGetApp().getAgent()->get_camera_url(device2, [context, callback](std::string url) {
382 callback(context, url.c_str());
383 }, wxGetApp().get_printer_cloud_provider());
384}

Referenced by Slic3r::GUI::MediaPlayCtrl::Play().

Here is the caller graph for this function:

◆ refresh_plugin_metadata_blocking()

void Slic3r::GUI::refresh_plugin_metadata_blocking ( bool fetch_cloud)
434{
436
437 std::vector<std::string> not_found, unauthorized;
438 const std::vector<PluginDescriptor> current_cloud_metadata = fetch_cloud ? std::vector<PluginDescriptor>{} :
439 current_cloud_metadata_snapshot();
440
441 manager.rescan_plugins();
442
443 if (!fetch_cloud) {
444 manager.update_cloud_metadata(current_cloud_metadata);
445 return;
446 }
447
448 manager.fetch_plugins_from_cloud(&not_found, &unauthorized);
449
450 wxGetApp().CallAfter([not_found = std::move(not_found), unauthorized = std::move(unauthorized)]() {
451 if (wxGetApp().is_closing())
452 return;
453 Plater* plater = wxGetApp().plater();
454 if (plater == nullptr)
455 return;
456
457 for (const auto& uuid : not_found)
460 format(_L("Plugin %s is no longer available."), uuid));
461 for (const auto& uuid : unauthorized)
464 format(_L("Plugin %s access is unauthorized."), uuid));
465 });
466}
@ RegularNotificationLevel
Definition NotificationManager.hpp:216
void push_notification(const NotificationType type, int timestamp=0)
Definition NotificationManager.cpp:1892
const NotificationManager * get_notification_manager() const
Definition Plater.cpp:23864
Definition PluginManager.hpp:116
void rescan_plugins()
Definition PluginManager.cpp:270
void update_cloud_metadata(const std::vector< PluginDescriptor > &cloud_list)
Definition PluginManager.cpp:1503
void fetch_plugins_from_cloud(std::vector< std::string > *out_not_found=nullptr, std::vector< std::string > *out_unauthorized=nullptr)
Definition PluginManager.cpp:1608

References _L, CustomNotification, Slic3r::PluginManager::fetch_plugins_from_cloud(), format(), Slic3r::PluginManager::instance(), plater(), Slic3r::GUI::NotificationManager::RegularNotificationLevel, Slic3r::PluginManager::rescan_plugins(), and Slic3r::PluginManager::update_cloud_metadata().

Referenced by install_local_plugin_package(), Slic3r::GUI::PluginsDialog::refresh_plugin_metadata_async(), and Slic3r::GUI::GUI_App::refresh_plugins().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_mac_deep_link_handler()

void Slic3r::GUI::register_mac_deep_link_handler ( )
28{
29 static OrcaDeepLinkHandler *handler = nil;
30 if (handler == nil)
31 handler = [[OrcaDeepLinkHandler alloc] init];
32
33 [[NSAppleEventManager sharedAppleEventManager]
34 setEventHandler:handler
35 andSelector:@selector(handleGetURLEvent:withReplyEvent:)
36 forEventClass:kInternetEventClass
37 andEventID:kAEGetURL];
38}
Definition DeepLinkHandlerMac.mm:10

Referenced by Slic3r::GUI::GUI_App::on_init_inner().

Here is the caller graph for this function:

◆ register_model_for_picking()

void Slic3r::GUI::register_model_for_picking ( GLCanvas3D & canvas,
PickingModel & model,
int id )
static
3020{
3021 if (model.mesh_raycaster == nullptr)
3022 return;
3023
3024 canvas.add_raycaster_for_picking(SceneRaycaster::EType::Bed, id, *model.mesh_raycaster, Transform3d::Identity());
3025}
std::shared_ptr< SceneRaycasterItem > add_raycaster_for_picking(SceneRaycaster::EType type, int id, const MeshRaycaster &raycaster, const Transform3d &trafo=Transform3d::Identity(), bool use_back_faces=false)
Definition GLCanvas3D.hpp:961
@ Bed
Definition SceneRaycaster.hpp:49

References Slic3r::GUI::GLCanvas3D::add_raycaster_for_picking(), Slic3r::GUI::SceneRaycaster::Bed, and Slic3r::GUI::PickingModel::mesh_raycaster.

Referenced by Slic3r::GUI::PartPlate::generate_plate_name_texture(), Slic3r::GUI::PartPlate::refresh_imex_icon(), and Slic3r::GUI::PartPlate::register_raycasters_for_picking().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ release_window_pools()

void Slic3r::GUI::release_window_pools ( )
868{
869 for (auto p : spools2) {
870 delete p;
871 }
872 spools2.clear();
873}
std::vector< std::deque< wxWindow * > * > spools2
Definition Field.cpp:857

References spools2.

Referenced by Slic3r::GUI::GUI_App::recreate_GUI().

Here is the caller graph for this function:

◆ remove_empty_plugin_values()

void Slic3r::GUI::remove_empty_plugin_values ( std::vector< std::string > & values)
static
2299{
2300 for (auto it = values.begin(); it != values.end();) {
2301 if (it->empty())
2302 it = values.erase(it);
2303 else
2304 ++it;
2305 }
2306}

Referenced by Slic3r::GUI::PluginField::rebuild_ui().

Here is the caller graph for this function:

◆ remove_special_key()

std::string Slic3r::GUI::remove_special_key ( const std::string & str)
static
234{
235 std::string res_str;
236 for (char c : str) {
237 if (special_key.find(c) == special_key.end()) {
238 res_str.push_back(c);
239 }
240 }
241 return res_str;
242}
static std::set< char > special_key
Definition CreatePresetsDialog.cpp:231

References special_key.

Referenced by Slic3r::GUI::CreateFilamentPresetDialog::create_dialog_buttons(), Slic3r::GUI::CreatePrinterPresetDialog::get_printer_model(), Slic3r::GUI::CreatePrinterPresetDialog::get_printer_vendor(), and Slic3r::GUI::CreatePrinterPresetDialog::validate_input_valid().

Here is the caller graph for this function:

◆ remove_user_texture()

bool Slic3r::GUI::remove_user_texture ( const std::string & path,
std::string & error )
406{
407 if (!in_user_texture_dir(path)) {
408 error = _u8L("Only your own imported textures can be removed.");
409 return false;
410 }
411 boost::system::error_code ec;
412 boost::filesystem::remove(boost::filesystem::path(path), ec);
413 if (ec) {
414 BOOST_LOG_TRIVIAL(error) << "Could not delete texture " << path << ": " << ec.message();
415 error = _u8L("Could not delete the texture file.");
416 return false;
417 }
418
419 const std::string name = boost::filesystem::path(path).filename().string();
420 std::vector<std::string> names = recent_texture_names();
421 names.erase(std::remove(names.begin(), names.end(), name), names.end());
422 store_recent_texture_names(std::move(names));
423 texture_library(true); // drop it from the list
424 return true;
425}
const std::vector< TextureLibraryEntry > & texture_library(bool force_rescan)
Definition TextureLibrary.cpp:373

References _u8L, and texture_library().

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::render_texture_library_popup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_extruders_combo()

void Slic3r::GUI::render_extruders_combo ( const std::string & label,
const std::vector< std::string > & extruders,
const std::vector< ColorRGBA > & extruders_colors,
size_t & selection_idx )
static
259{
260 assert(!extruders_colors.empty());
261 assert(extruders_colors.size() == extruders_colors.size());
262
263 size_t selection_out = selection_idx;
264 // It is necessary to use BeginGroup(). Otherwise, when using SameLine() is called, then other items will be drawn inside the combobox.
265 ImGui::BeginGroup();
266 ImVec2 combo_pos = ImGui::GetCursorScreenPos();
267 if (ImGui::BeginCombo(label.c_str(), "")) {
268 for (size_t extruder_idx = 0; extruder_idx < std::min(extruders.size(), GLGizmoMmuSegmentation::EXTRUDERS_LIMIT); ++extruder_idx) {
269 ImGui::PushID(int(extruder_idx));
270 ImVec2 start_position = ImGui::GetCursorScreenPos();
271
272 if (ImGui::Selectable("", extruder_idx == selection_idx))
273 selection_out = extruder_idx;
274
275 ImGui::SameLine();
276 ImGuiStyle &style = ImGui::GetStyle();
277 float height = ImGui::GetTextLineHeight();
278 ImGui::GetWindowDrawList()->AddRectFilled(start_position, ImVec2(start_position.x + height + height / 2, start_position.y + height), ImGuiWrapper::to_ImU32(extruders_colors[extruder_idx]));
279 ImGui::GetWindowDrawList()->AddRect(start_position, ImVec2(start_position.x + height + height / 2, start_position.y + height), IM_COL32_BLACK);
280
281 ImGui::SetCursorScreenPos(ImVec2(start_position.x + height + height / 2 + style.FramePadding.x, start_position.y));
282 ImGui::Text("%s", extruders[extruder_idx].c_str());
283 ImGui::PopID();
284 }
285
286 ImGui::EndCombo();
287 }
288
289 ImVec2 backup_pos = ImGui::GetCursorScreenPos();
290 ImGuiStyle &style = ImGui::GetStyle();
291
292 ImGui::SetCursorScreenPos(ImVec2(combo_pos.x + style.FramePadding.x, combo_pos.y + style.FramePadding.y));
293 ImVec2 p = ImGui::GetCursorScreenPos();
294 float height = ImGui::GetTextLineHeight();
295
296 ImGui::GetWindowDrawList()->AddRectFilled(p, ImVec2(p.x + height + height / 2, p.y + height), ImGuiWrapper::to_ImU32(extruders_colors[selection_idx]));
297 ImGui::GetWindowDrawList()->AddRect(p, ImVec2(p.x + height + height / 2, p.y + height), IM_COL32_BLACK);
298
299 ImGui::SetCursorScreenPos(ImVec2(p.x + height + height / 2 + style.FramePadding.x, p.y));
300 ImGui::Text("%s", extruders[selection_out].c_str());
301 ImGui::SetCursorScreenPos(backup_pos);
302 ImGui::EndGroup();
303
304 selection_idx = selection_out;
305}
static const constexpr size_t EXTRUDERS_LIMIT
Definition GLGizmoMmuSegmentation.hpp:91

References Slic3r::GUI::GLGizmoMmuSegmentation::EXTRUDERS_LIMIT, style, and Slic3r::GUI::ImGuiWrapper::to_ImU32().

Here is the call graph for this function:

◆ render_ribbons()

void Slic3r::GUI::render_ribbons ( GLModel & model,
GLModel::Geometry && g,
const ColorRGBA & colour )
static
3561{
3562 if (g.is_empty())
3563 return;
3569 model.reset();
3570 model.init_from(std::move(g));
3571 model.set_color(colour);
3572 model.render();
3577}
#define glsafe(cmd)
Definition OpenGLUtils.hpp:25
void render(GLShaderProgram *shader=nullptr)
Definition GLModel.cpp:603
#define GL_TRUE
Definition gl.h:1892
#define GL_LESS
Definition gl.h:914
#define glEnable
Definition gl.h:3667
#define GL_DEPTH_TEST
Definition gl.h:574
#define GL_SRC_ALPHA
Definition gl.h:1621
#define glDepthFunc
Definition gl.h:3593
#define GL_LEQUAL
Definition gl.h:913
#define glDepthMask
Definition gl.h:3595
#define GL_BLEND
Definition gl.h:275
#define GL_ONE_MINUS_SRC_ALPHA
Definition gl.h:1239
#define GL_FALSE
Definition gl.h:648
#define glDisable
Definition gl.h:3607
#define glBlendFunc
Definition gl.h:3325

References GL_BLEND, GL_DEPTH_TEST, GL_FALSE, GL_LEQUAL, GL_LESS, GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA, GL_TRUE, glBlendFunc, glDepthFunc, glDepthMask, glDisable, glEnable, glsafe, Slic3r::GUI::GLModel::init_from(), Slic3r::GUI::GLModel::render(), render_ribbons(), Slic3r::GUI::GLModel::reset(), and Slic3r::GUI::GLModel::set_color().

Referenced by Slic3r::GUI::DesignSketchTool::render_body_edges(), Slic3r::GUI::DesignSketchTool::render_face_outline(), and render_ribbons().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ replace_job()

template<class... Args>
bool Slic3r::GUI::replace_job ( Worker & w,
Args &&... args )

◆ requires_mode_switch()

bool Slic3r::GUI::requires_mode_switch ( ConfigOptionMode setting_mode,
ConfigOptionMode current_mode )
inline
141{
142 return setting_mode > current_mode;
143}

Referenced by Slic3r::GUI::SpeedDialWebDialog::run_action().

Here is the caller graph for this function:

◆ rescale_children()

void Slic3r::GUI::rescale_children ( ModelNode * parent)
static
545{
546 if (parent->IsContainer()) {
547 for (std::unique_ptr<ModelNode> &child : parent->GetChildren()) {
548 child->UpdateIcons();
549 rescale_children(child.get());
550 }
551 }
552}
bool IsContainer() const
Definition UnsavedChangesDialog.hpp:112
ModelNodePtrArray & GetChildren()
Definition UnsavedChangesDialog.hpp:120
static void rescale_children(ModelNode *parent)
Definition UnsavedChangesDialog.cpp:544

References Slic3r::GUI::ModelNode::GetChildren(), Slic3r::GUI::ModelNode::IsContainer(), and rescale_children().

Referenced by Slic3r::GUI::DiffModel::Rescale(), and rescale_children().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolve_default_virtual_filament_preset_name()

std::string Slic3r::GUI::resolve_default_virtual_filament_preset_name ( )
static
447{
448 auto* preset_bundle = wxGetApp().preset_bundle;
449 if (!preset_bundle)
450 return {};
451
452 auto valid_preset_name = [preset_bundle](const std::string& name) -> bool {
453 return !name.empty() && preset_bundle->filaments.find_preset(name, false) != nullptr;
454 };
455
456 const auto* default_profiles = preset_bundle->printers.get_selected_preset()
457 .config.option<ConfigOptionStrings>("default_filament_profile");
458 if (default_profiles) {
459 for (const std::string& name : default_profiles->values) {
460 if (starts_with_preset_name(name, DEFAULT_VIRTUAL_FILAMENT_NAME) && valid_preset_name(name))
461 return name;
462 }
463 }
464
465 for (const Preset& preset : preset_bundle->filaments.get_presets()) {
466 if (preset.is_system && preset.is_visible && preset.is_compatible &&
468 return preset.name;
469 }
470 }
471
472 for (const Preset& preset : preset_bundle->filaments.get_presets()) {
473 if (preset.is_visible && preset.is_compatible &&
475 return preset.name;
476 }
477 }
478
479 std::string selected = preset_bundle->filaments.get_selected_preset_name();
480 return valid_preset_name(selected) ? selected : std::string();
481}
static constexpr const char * DEFAULT_VIRTUAL_FILAMENT_NAME
Definition TextureImportDialog.cpp:83
static bool starts_with_preset_name(const std::string &name, const char *prefix)
Definition TextureImportDialog.cpp:440

References DEFAULT_VIRTUAL_FILAMENT_NAME, and starts_with_preset_name().

Referenced by wxBEGIN_EVENT_TABLE().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolve_plugin_status()

PluginStatus Slic3r::GUI::resolve_plugin_status ( bool loading,
bool has_error,
bool is_loaded )
inline
39 {
40 if (loading)
42 if (has_error)
44 if (is_loaded)
47 }
@ Error
Definition PluginStatus.hpp:13

References Activated, Error, Inactive, Loading, and RuntimeError.

Referenced by Slic3r::GUI::anonymous_namespace{PluginsDialog.cpp}::build_plugin_dialog_item().

Here is the caller graph for this function:

◆ rgb_to_hex()

wxString Slic3r::GUI::rgb_to_hex ( const std::array< std::size_t, 3 > & c)
static
372{
373 return wxString::Format("#%02X%02X%02X",
374 (unsigned)c[0], (unsigned)c[1], (unsigned)c[2]);
375}

Referenced by Slic3r::GUI::TextureImportDialog::do_auto_match(), and Slic3r::GUI::TextureImportDialog::rebuild_mapping_rows().

Here is the caller graph for this function:

◆ rib_frame()

bool Slic3r::GUI::rib_frame ( const Vec2d & p0,
const Vec2d & p1,
double thickness,
Vec2d & d,
Vec2d & perp,
Vec2d & mid,
double & half )
static
5298{
5299 const Vec2d seg = p1 - p0;
5300 const double len = seg.norm();
5301 if (len < 1e-9) return false;
5302 d = seg / len;
5303 perp = Vec2d(-d.y(), d.x());
5304 mid = 0.5 * (p0 + p1);
5305 half = thickness * 0.5;
5306 return true;
5307}
Eigen::Matrix< typename Derived::Scalar, 2, 1, Eigen::DontAlign > perp(const Eigen::MatrixBase< Derived > &v)
Definition Point.hpp:130

References Slic3r::perp(), and rib_frame().

Referenced by Slic3r::GUI::DesignSketchTool::drag_rib_handle(), Slic3r::GUI::DesignSketchTool::hit_test_rib_handle(), Slic3r::GUI::DesignSketchTool::render_rib_gizmo(), and rib_frame().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run_off_ui_thread()

void Slic3r::GUI::run_off_ui_thread ( wxWindow * parent,
const wxString & message,
const std::function< void()> & work )
static
4857{
4858 struct Busy { Busy() { ++s_doc_worker_busy; } ~Busy() { --s_doc_worker_busy; } } busy;
4859 std::atomic<bool> done{false};
4860 std::thread worker([&work, &done]() {
4861 work();
4862 done.store(true, std::memory_order_release);
4863 });
4864
4865 // Input stays blocked for the whole operation: the worker owns the document, so nothing
4866 // in the UI may mutate it meanwhile. The dialog only appears if the work is actually slow —
4867 // a fillet on a small body finishes in milliseconds and must not flash a dialog.
4868 wxWindowDisabler disabler;
4869 std::unique_ptr<wxProgressDialog> dlg;
4870 int elapsed_ms = 0;
4871 while (!done.load(std::memory_order_acquire)) {
4872 if (dlg == nullptr && elapsed_ms >= 300)
4873 dlg = std::make_unique<wxProgressDialog>(_L("Design"), message, 100, parent,
4874 wxPD_AUTO_HIDE | wxPD_SMOOTH);
4875 if (dlg != nullptr)
4876 dlg->Pulse();
4877 wxYield(); // keep the window painting instead of going unresponsive
4878 wxMilliSleep(30);
4879 elapsed_ms += 30;
4880 }
4881 worker.join();
4882}
class WXDLLIMPEXP_FWD_CORE wxWindowDisabler
Definition ProgressDialog.hpp:31
static std::atomic< int > s_doc_worker_busy
Definition DesignPanel.cpp:4854
@ Busy
Definition ICameraSignalingChannel.hpp:16

References _L, Slic3r::Busy, s_doc_worker_busy, and wxWindowDisabler.

Referenced by Slic3r::GUI::DesignPanel::feature_faces(), Slic3r::GUI::DesignPanel::on_import_step(), and Slic3r::GUI::DesignPanel::recompute_guarded().

Here is the caller graph for this function:

◆ run_scene_benchmark()

void Slic3r::GUI::run_scene_benchmark ( )
548{
549 Plater* plater = wxGetApp().plater();
550 if (plater == nullptr || !wxGetApp().is_editor())
551 return;
552 if (s_benchmark != nullptr) {
553 if (s_benchmark->is_running()) {
554 s_benchmark->Raise();
555 return;
556 }
557 s_benchmark->Close();
558 }
559
560 MessageDialog confirm(wxGetApp().mainframe,
561 _L("The benchmark replaces the current project with the OrcaSliced Combo and slices it. It turns the camera "
562 "around the model in Prepare and in Preview, then moves the layer slider through the sliced layers, timing "
563 "every frame, and shows the results.") + "\n\n" +
564 _L("It uses the current graphics settings and usually takes less than a minute. The main window stays "
565 "locked until it finishes."),
566 _L("Benchmark 3D Scene"), wxICON_INFORMATION | wxOK | wxCANCEL);
567 confirm.SetButtonLabel(wxID_OK, _L("Start"), true);
568 if (confirm.ShowModal() != wxID_OK || plater->new_project() == wxID_CANCEL)
569 return;
570
571 const std::vector<MenuFactory::HandyModel>& models = MenuFactory::handy_models();
572 const auto combo = std::find_if(models.begin(), models.end(),
573 [](const MenuFactory::HandyModel& model) { return std::strcmp(model.key, "orcasliced_combo") == 0; });
574 MenuFactory::load_handy_model(size_t(combo - models.begin()));
575 (new SceneBenchmarkDialog())->Show();
576}
static const std::vector< HandyModel > & handy_models()
Definition GUI_Factories.cpp:634
static void load_handy_model(std::size_t index)
Definition GUI_Factories.cpp:651
int new_project(bool skip_confirm=false, bool silent=false, const wxString &project_name=wxString(), bool reload_presets=true)
Definition Plater.cpp:16054

References _L, Slic3r::GUI::MenuFactory::handy_models(), Slic3r::GUI::anonymous_namespace{SceneBenchmark.cpp}::SceneBenchmarkDialog::is_running(), Slic3r::GUI::MenuFactory::load_handy_model(), plater(), Slic3r::GUI::anonymous_namespace{SceneBenchmark.cpp}::s_benchmark, Slic3r::GUI::MsgDialog::SetButtonLabel(), and Slic3r::GUI::DPIAware< P >::ShowModal().

Referenced by Slic3r::GUI::anonymous_namespace{NativeCommands.cpp}::build_command_catalog(), Slic3r::GUI::PreferencesDialog::create_items(), and Slic3r::GUI::MainFrame::generate_help_menu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run_wizard()

void Slic3r::GUI::run_wizard ( ConfigWizard::StartPage sp)
static
1009{
1010 wxGetApp().run_wizard(ConfigWizard::RR_USER, sp);
1011}
@ RR_USER
Definition ConfigWizard.hpp:27

References Slic3r::GUI::ConfigWizard::RR_USER.

Referenced by Slic3r::GUI::PlaterPresetComboBox::OnSelect(), Slic3r::GUI::TabPresetComboBox::OnSelect(), Slic3r::GUI::PlaterPresetComboBox::show_add_menu(), and Slic3r::GUI::PlaterPresetComboBox::show_edit_menu().

Here is the caller graph for this function:

◆ rv_yaxis()

Vec3d Slic3r::GUI::rv_yaxis ( const Vec3d & axis,
const Vec3d & ref,
bool flip )
static
6698{
6699 Vec3d y = axis.cross(ref);
6700 if (y.norm() < 1e-9) return ref; // degenerate; never used (ref ⟂ axis by construction)
6701 y.normalize();
6702 return flip ? -y : y;
6703}

References rv_yaxis().

Referenced by Slic3r::GUI::DesignSketchTool::drag_revolve_arc(), Slic3r::GUI::DesignSketchTool::hit_test_revolve_handle(), Slic3r::GUI::DesignSketchTool::render_revolve_gizmo(), and rv_yaxis().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RYBW_BLUE()

const wxColour Slic3r::GUI::RYBW_BLUE ( 0 ,
0 ,
255  )
static

Referenced by Slic3r::GUI::ColorDecomposeDialog::compute_decomposition(), pure_color_for_base(), and standard_base_color_for().

Here is the caller graph for this function:

◆ RYBW_RED()

const wxColour Slic3r::GUI::RYBW_RED ( 255 ,
0 ,
0  )
static

Referenced by pure_color_for_base(), and standard_base_color_for().

Here is the caller graph for this function:

◆ RYBW_WHITE()

const wxColour Slic3r::GUI::RYBW_WHITE ( 255 ,
255 ,
255  )
static

Referenced by standard_base_color_for().

Here is the caller graph for this function:

◆ RYBW_YELLOW()

const wxColour Slic3r::GUI::RYBW_YELLOW ( 255 ,
255 ,
0  )
static

Referenced by Slic3r::GUI::ColorDecomposeDialog::compute_decomposition(), and standard_base_color_for().

Here is the caller graph for this function:

◆ s_button_style_gray()

StateColor Slic3r::GUI::s_button_style_gray ( )
static
97{
98 return StateColor(std::pair<wxColour, int>(wxColour(206, 206, 206), StateColor::Pressed),
99 std::pair<wxColour, int>(*wxWHITE, StateColor::Focused),
100 std::pair<wxColour, int>(wxColour(238, 238, 238), StateColor::Hovered),
101 std::pair<wxColour, int>(*wxWHITE, StateColor::Normal));
102}
@ Hovered
Definition StateColor.hpp:20
@ Normal
Definition StateColor.hpp:16
@ Pressed
Definition StateColor.hpp:21
@ Focused
Definition StateColor.hpp:19

References StateColor::Focused, StateColor::Hovered, StateColor::Normal, and StateColor::Pressed.

Referenced by Slic3r::GUI::wgtDeviceNozzleRackArea::CreateGui().

Here is the caller graph for this function:

◆ s_create_title()

wxPanel * Slic3r::GUI::s_create_title ( wxWindow * parent,
const wxString & text )
static
40{
41 wxPanel *panel = new wxPanel(parent, wxID_ANY);
42 panel->SetBackgroundColour(*wxWHITE);
43
44 auto title = new Label(panel, text);
45 title->SetFont(::Label::Body_13);
46 title->SetBackgroundColour(*wxWHITE);
47 title->SetForegroundColour(0x909090);
48
49 auto split_line = new wxPanel(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
50 split_line->SetBackgroundColour(wxColour(0xEE, 0xEE, 0xEE));
51 split_line->SetMinSize(wxSize(-1, 1));
52 split_line->SetMaxSize(wxSize(-1, 1));
53
54 wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
55 sizer->Add(0, 0, 0, wxEXPAND, 0);
56 sizer->Add(title, 0, wxALIGN_CENTER, 0);
57 sizer->Add(split_line, 1, wxALIGN_CENTER_VERTICAL | wxEXPAND, 0);
58 panel->SetSizer(sizer);
59 panel->Layout();
60 return panel;
61}
Definition Label.hpp:16
static wxFont Body_13
Definition Label.hpp:54

References Label::Body_13.

Referenced by Slic3r::GUI::wgtDeviceNozzleRackSelect::CreateGui().

Here is the caller graph for this function:

◆ s_enable_item_if_match()

void Slic3r::GUI::s_enable_item_if_match ( wgtDeviceNozzleRackNozzleItem * item,
const DevNozzle & nozzle_info,
const DevNozzle & selected_nozzle )
static
152{
153 if (item) {
154 if (nozzle_info.GetLogicExtruderId() != selected_nozzle.GetLogicExtruderId()) {
155 item->SetDisable(true);
156 return;
157 }
158
159 if (!nozzle_info.IsEmpty() && !nozzle_info.IsAbnormal() && !nozzle_info.IsUnknown() &&
160 nozzle_info.GetNozzleType() == selected_nozzle.GetNozzleType() &&
161 nozzle_info.GetNozzleDiameter() == selected_nozzle.GetNozzleDiameter() &&
162 nozzle_info.GetNozzleFlowType() == selected_nozzle.GetNozzleFlowType()) {
163 item->SetDisable(false);
164 } else {
165 item->SetDisable(true);
166 }
167 }
168}
void SetDisable(bool disabled)
Definition wgtDeviceNozzleRack.cpp:1037
bool IsEmpty() const
Definition DevNozzleSystem.h:54
NozzleType GetNozzleType() const
Definition DevNozzleSystem.h:60
bool IsUnknown() const
Definition DevNozzleSystem.cpp:136
int GetLogicExtruderId() const
Definition DevNozzleSystem.cpp:176
bool IsAbnormal() const
Definition DevNozzleSystem.cpp:131

References Slic3r::DevNozzle::GetLogicExtruderId(), Slic3r::DevNozzle::GetNozzleDiameter(), Slic3r::DevNozzle::GetNozzleFlowType(), Slic3r::DevNozzle::GetNozzleType(), Slic3r::DevNozzle::IsAbnormal(), Slic3r::DevNozzle::IsEmpty(), Slic3r::DevNozzle::IsUnknown(), and Slic3r::GUI::wgtDeviceNozzleRackNozzleItem::SetDisable().

Referenced by Slic3r::GUI::wgtDeviceNozzleRackSelect::UpdatSelectedNozzle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_get_mapped_nozzle_str_line_count()

int Slic3r::GUI::s_get_mapped_nozzle_str_line_count ( const wxString & text)
static
311{
312 if (text.empty()) {
313 return 0;
314 }
315
316 return std::max(1, static_cast<int>(wxSplit(s_wrap_mapped_nozzle_str(text), '\n', '\0').size()));
317}
static wxString s_wrap_mapped_nozzle_str(const wxString &text)
Definition AmsMappingPopup.cpp:268

References s_wrap_mapped_nozzle_str().

Referenced by Slic3r::GUI::MaterialItem::messure_size().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_get_slicing_extuder_nozzles()

std::unordered_multimap< int, NozzleDef > Slic3r::GUI::s_get_slicing_extuder_nozzles ( )
static
4415{
4416 std::unordered_multimap<int, NozzleDef> used_extuder_nozzles;
4417
4418 PresetBundle* preset_bundle = wxGetApp().preset_bundle;
4419 if (!preset_bundle) {
4420 return used_extuder_nozzles;
4421 }
4422
4423 PartPlate* cur_plate = wxGetApp().plater()->get_partplate_list().get_curr_plate();
4424 if (!cur_plate) {
4425 return used_extuder_nozzles;
4426 }
4427
4428 auto opt_nozzle_diameters = preset_bundle->printers.get_edited_preset().config.option<ConfigOptionFloats>("nozzle_diameter");
4429 if (!opt_nozzle_diameters) {
4430 return used_extuder_nozzles;
4431 }
4432
4433 auto nozzle_volume_type_opt = dynamic_cast<const ConfigOptionEnumsGeneric*>(preset_bundle->project_config.option("nozzle_volume_type"));
4434 if (!nozzle_volume_type_opt) {
4435 return used_extuder_nozzles;
4436 }
4437
4438 try {
4439 auto nozzle_group_res = DevUtilBackend::GetNozzleGroupResult(wxGetApp().plater());
4440 if (nozzle_group_res && nozzle_group_res->is_support_dynamic_nozzle_map() && nozzle_volume_type_opt->values.size() == 2) {
4441 const auto& used_nozzles = nozzle_group_res->get_used_nozzles_in_extruder();
4442 for (const auto& used_nozzle : used_nozzles) {
4443 NozzleDef nozzle_data;
4444 nozzle_data.nozzle_diameter = std::stof(used_nozzle.diameter);
4445 nozzle_data.nozzle_flow_type = DevNozzle::ToNozzleFlowType(used_nozzle.volume_type);
4446 if (used_nozzle.extruder_id == 0) {
4447 used_extuder_nozzles.insert({ DEPUTY_EXTRUDER_ID, nozzle_data });
4448 } else if (used_nozzle.extruder_id == 1) {
4449 used_extuder_nozzles.insert({ MAIN_EXTRUDER_ID, nozzle_data });
4450 }
4451 };
4452
4453 return used_extuder_nozzles;
4454 }
4455
4456 const auto& used_filament_idxs = cur_plate->get_used_filaments(); /*the index is started from 1*/
4457 for (int used_filament_idx : used_filament_idxs) {
4458 int physical_idx = cur_plate->get_physical_extruder_by_filament_id(preset_bundle->full_config(), used_filament_idx);
4459 int logic_extruder_idx = cur_plate->get_logical_extruder_by_filament_id(preset_bundle->full_config(), used_filament_idx);
4460 if (physical_idx < 0 || logic_extruder_idx < 0) {
4461 assert(0);
4462 continue;
4463 }
4464
4465 NozzleDef nozzle_data;
4466 nozzle_data.nozzle_diameter = float(opt_nozzle_diameters->get_at(logic_extruder_idx));
4467 nozzle_data.nozzle_flow_type = NozzleFlowType::S_FLOW;// default value
4468
4469 auto volume_type = (NozzleVolumeType)nozzle_volume_type_opt->get_at(logic_extruder_idx);
4470 if (volume_type == NozzleVolumeType::nvtHybrid) {
4471 if (used_extuder_nozzles.find(physical_idx) != used_extuder_nozzles.end()) {
4472 continue;// already collected
4473 }
4474
4475 // A hybrid extruder prints with a mix of nozzle flows: collect the flow of each
4476 // physically used nozzle instead of forcing a single one.
4477 if (nozzle_group_res) {
4478 for (const auto& nozzle_info : nozzle_group_res->get_used_nozzles_in_extruder(logic_extruder_idx)) {
4479 nozzle_data.nozzle_flow_type = DevNozzle::ToNozzleFlowType(nozzle_info.volume_type);
4480 used_extuder_nozzles.insert({ physical_idx, nozzle_data });
4481 }
4482 } else {
4483 // Orca: a by-object plate with several objects produces no plate-level nozzle
4484 // grouping, so the used flows are unknown; skip the check for this extruder
4485 // rather than blocking the print.
4486 BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << ": no nozzle group result, nozzle check skipped for extruder " << logic_extruder_idx;
4487 }
4488
4489 continue;
4490 }
4491
4492 nozzle_data.nozzle_flow_type = DevNozzle::ToNozzleFlowType(volume_type);
4493 used_extuder_nozzles.insert({ physical_idx, nozzle_data });
4494 };
4495 } catch (const std::exception& e) {
4496 BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << "exception: " << e.what();
4497 }
4498
4499 return used_extuder_nozzles;
4500}
static std::shared_ptr< MultiNozzleUtils::NozzleGroupResultBase > GetNozzleGroupResult(Slic3r::GUI::Plater *plater)
Definition DevUtilBackend.cpp:41
@ S_FLOW
Definition DevDefs.h:118
float nozzle_diameter
Definition DevDefs.h:182
Slic3r::NozzleFlowType nozzle_flow_type
Definition DevDefs.h:183
static NozzleFlowType ToNozzleFlowType(const NozzleVolumeType &type)
Definition DevNozzleSystem.cpp:41

References Slic3r::Preset::config, DEPUTY_EXTRUDER_ID, Slic3r::PresetBundle::full_config(), Slic3r::PresetCollection::get_edited_preset(), Slic3r::GUI::PartPlate::get_logical_extruder_by_filament_id(), Slic3r::GUI::PartPlate::get_physical_extruder_by_filament_id(), Slic3r::GUI::PartPlate::get_used_filaments(), Slic3r::DevUtilBackend::GetNozzleGroupResult(), MAIN_EXTRUDER_ID, NozzleDef::nozzle_diameter, NozzleDef::nozzle_flow_type, Slic3r::nvtHybrid, Slic3r::ConfigBase::option(), plater(), Slic3r::PresetBundle::printers, Slic3r::PresetBundle::project_config, Slic3r::S_FLOW, and Slic3r::DevNozzle::ToNozzleFlowType().

Referenced by Slic3r::GUI::SelectMachineDialog::CheckErrorExtruderNozzleWithSlicing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_set_bg_style()

void Slic3r::GUI::s_set_bg_style ( StaticBox * box,
ScalableButton * btn,
Label * label_row,
Label * label_row_status,
const wxColour & clr )
static
527{
528 box->SetBorderColor(clr);
529 box->SetBackgroundColor(clr);
530 btn->SetBackgroundColour(clr);
531 label_row->SetBackgroundColour(clr);
532 label_row_status->SetBackgroundColour(clr);
533}
void SetBorderColor(StateColor const &color)
Definition StaticBox.cpp:87
void SetBackgroundColor(StateColor const &color)
Definition StaticBox.cpp:102

References StaticBox::SetBackgroundColor(), and StaticBox::SetBorderColor().

Referenced by Slic3r::GUI::wgtDeviceNozzleRackPos::CreateGui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_show_label() [1/2]

void Slic3r::GUI::s_show_label ( Label * label,
const wxString & text )
static
621{
622 label->SetLabel(text);
623 label->Show();
624}
void SetLabel(const wxString &label) override
Definition Label.cpp:322

References Label::SetLabel().

Referenced by Slic3r::GUI::wgtDeviceNozzleRackPos::UpdateRackPos().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_show_label() [2/2]

void Slic3r::GUI::s_show_label ( Label * label,
const wxString & text,
const wxColour & text_color )
static
627{
628 label->SetLabel(text);
629 label->SetForegroundColour(StateColor::darkModeColorFor(text_color));
630 label->Show();
631}
const wxColour text_color(107, 107, 107)

References StateColor::darkModeColorFor(), Label::SetLabel(), and text_color().

Here is the call graph for this function:

◆ s_update_nozzle_info()

void Slic3r::GUI::s_update_nozzle_info ( wgtDeviceNozzleRackNozzleItem * item,
std::shared_ptr< DevNozzleRack > rack,
const DevNozzle & nozzle_info )
static
126{
127 item->UpdateInfo(rack, nozzle_info.IsOnRack());
128 if (nozzle_info.IsUnknown()) {
129 if (item->GetToolTipText() != _L("Nozzle information needs to be read")) {
130 item->SetToolTip(_L("Nozzle information needs to be read"));
131 }
132 } else {
133 item->SetToolTip(wxEmptyString);
134 }
135}
void UpdateInfo(const std::shared_ptr< DevNozzleRack > rack, bool on_rack=true)
Definition wgtDeviceNozzleRack.cpp:860
bool IsOnRack() const
Definition DevNozzleSystem.h:86

References _L, Slic3r::DevNozzle::IsOnRack(), Slic3r::DevNozzle::IsUnknown(), and Slic3r::GUI::wgtDeviceNozzleRackNozzleItem::UpdateInfo().

Referenced by Slic3r::GUI::wgtDeviceNozzleRackSelect::UpdateNozzleInfos().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_update_title()

void Slic3r::GUI::s_update_title ( const std::shared_ptr< DevNozzleRack > rack,
wgtDeviceNozzleRackTitle * title_label )
static
388{
389 wxString title = _L("Induction Hotend Rack");
390 if (rack && (rack->GetReadingCount() > 0))
391 {
392 // TRN %d/%d is the hotend being read and the number of hotends to read.
393 title = wxString::Format(_L("Induction Hotend Rack: Reading %d/%d"), rack->GetReadingIdx(), rack->GetReadingCount());
394 }
395
396 title_label->SetLabel(title);
397}
void SetLabel(const wxString &new_label)
Definition wgtDeviceNozzleRack.cpp:179

References _L, and Slic3r::GUI::wgtDeviceNozzleRackTitle::SetLabel().

Here is the call graph for this function:

◆ s_wrap_mapped_nozzle_str()

wxString Slic3r::GUI::s_wrap_mapped_nozzle_str ( const wxString & text)
static
269{
270 if (text.length() <= MAPPED_NOZZLE_STR_MAX_CHARS_PER_LINE) {
271 return text;
272 }
273
274 wxArrayString parts = wxSplit(text, ',');
275 wxString wrapped;
276 std::vector<wxString> buffers;
277 for (auto& part : parts) {
278 if (!part.empty()) {
279 buffers.push_back(part.Trim(false).Trim(true));
280 }
281
282 if (buffers.size() > 2) {
283 if (!wrapped.empty()) {
284 wrapped += "\n";
285 }
286
287 wrapped += buffers[0];
288 wrapped += " ";
289 wrapped += buffers[1];
290 wrapped += " ";
291 wrapped += buffers[2];
292 buffers.clear();
293 }
294 }
295
296 if (!wrapped.empty()) {
297 wrapped += "\n";
298 }
299 if (buffers.size() > 0) {
300 wrapped += buffers[0];
301 }
302 if (buffers.size() > 1) {
303 wrapped += " ";
304 wrapped += buffers[1];
305 }
306
307 return wrapped;
308}
static constexpr size_t MAPPED_NOZZLE_STR_MAX_CHARS_PER_LINE
Definition AmsMappingPopup.cpp:266

References MAPPED_NOZZLE_STR_MAX_CHARS_PER_LINE.

Referenced by Slic3r::GUI::MaterialItem::doRender(), and s_get_mapped_nozzle_str_line_count().

Here is the caller graph for this function:

◆ same_rgb()

bool Slic3r::GUI::same_rgb ( const wxColour & lhs,
const wxColour & rhs )
static
83{
84 return lhs.Red() == rhs.Red() && lhs.Green() == rhs.Green() && lhs.Blue() == rhs.Blue();
85}

Referenced by standard_base_color_for().

Here is the caller graph for this function:

◆ sample_gradient_ramp()

std::vector< wxColour > Slic3r::GUI::sample_gradient_ramp ( const wxColour & first,
const wxColour & second,
const Slic3r::GradientCurve & curve,
int steps )
122{
123 std::vector<wxColour> ramp;
124 if (steps <= 0 || curve.points.size() < 2) return ramp;
125
126 ramp.reserve(steps);
127 for (int i = 0; i < steps; ++i) {
128 const double t = (steps > 1) ? (i + 0.5) / steps : 0.5;
129 const double r1 = Slic3r::sample_gradient_curve(curve, t);
130 ramp.push_back(blend_n_colors({first, second}, {r1, 1.0 - r1}));
131 }
132 return ramp;
133}
wxColour blend_n_colors(const std::vector< wxColour > &cols, const std::vector< double > &weights)
Definition FilamentBitmapUtils.cpp:101
double sample_gradient_curve(const GradientCurve &c, double t)
Definition FilamentMixer.cpp:357

References blend_n_colors(), Slic3r::GradientCurve::points, and Slic3r::sample_gradient_curve().

Referenced by Slic3r::GUI::MixedFilamentDialog::create_preview_panel(), and mixed_gradient_ramp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_texture_to_library()

std::optional< TextureLibraryEntry > Slic3r::GUI::save_texture_to_library ( const DecodedHeightTexture & image,
const std::string & stem,
std::string & error )
467{
468 std::vector<unsigned char> scratch;
469 const wxImage wx = image_from_decoded(image, scratch);
470 if (!wx.IsOk()) {
471 error = _u8L("The selected image is empty.");
472 return std::nullopt;
473 }
474
475 std::vector<unsigned char> bytes;
476 if (!encode_png_bytes(wx, bytes, error))
477 return std::nullopt;
478
479 return write_user_texture(bytes, stem.empty() ? std::string("texture") : stem, error);
480}

References _u8L.

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::commit_image_adjust().

Here is the caller graph for this function:

◆ save_version()

void Slic3r::GUI::save_version ( )
static
257{
258 //BBS sentwxGetApp().app_config->set("version_last", std::string(SLIC3R_VERSION));
259}

Referenced by Slic3r::GUI::SendSystemInfoDialog::SendSystemInfoDialog().

Here is the caller graph for this function:

◆ scene_selection()

const Selection & Slic3r::GUI::scene_selection ( )
static
122{
123 //BBS AssembleView canvas has its own selection
124 if (wxGetApp().plater()->get_current_canvas3D()->get_canvas_type() == GLCanvas3D::ECanvasType::CanvasAssembleView)
125 return wxGetApp().plater()->get_assmeble_canvas3D()->get_selection();
126
127 return wxGetApp().plater()->get_view3D_canvas3D()->get_selection();
128}
@ CanvasAssembleView
Definition GLCanvas3D.hpp:628

References Slic3r::GUI::GLCanvas3D::CanvasAssembleView, and plater().

Referenced by Slic3r::GUI::ObjectList::can_split_instances(), Slic3r::GUI::ObjectList::is_instance_or_object_selected(), Slic3r::GUI::ObjectList::layers_editing(), Slic3r::GUI::ObjectList::load_generic_subobject(), Slic3r::GUI::ObjectList::load_modifier(), Slic3r::GUI::ObjectList::part_selection_changed(), Slic3r::GUI::ObjectList::split_instances(), and Slic3r::GUI::ObjectList::update_selections().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sCheckFilamentInfo()

DevFilaBlacklist::CheckResult Slic3r::GUI::sCheckFilamentInfo ( PresetBundle * preset_bundle,
MachineObject * obj,
int ams_id,
int slot_id,
const std::string & filament_id,
std::string & ams_filament_id,
std::string & ams_setting_id )
static
718{
720 if (!preset_bundle || !obj)
721 return result;
722
723 // Orca: there is no lookup struct that also carries setting_id, so resolve the (root) preset by
724 // scanning the filaments collection for a matching filament_id.
725 Preset* fila_preset = nullptr;
726 for (auto it = preset_bundle->filaments.begin(); it != preset_bundle->filaments.end(); ++it) {
727 if (it->filament_id == filament_id) {
728 fila_preset = &(*it);
729 break;
730 }
731 }
732 if (!fila_preset)
733 return result;
734
735 if (wxGetApp().app_config->get("skip_ams_blacklist_check") != "true") {
736 std::string filamnt_type;
737 fila_preset->get_filament_type(filamnt_type);
738
739 DevFilaBlacklist::CheckFilamentInfo check_info;
740 check_info.dev_id = obj->get_dev_id();
741 check_info.model_id = obj->printer_type;
742 check_info.fila_id = fila_preset->filament_id;
743 check_info.fila_type = filamnt_type;
744 check_info.fila_name = fila_preset->name;
745 check_info.has_filament_switch = obj->GetFilaSwitch()->IsInstalled();
746 check_info.ams_id = ams_id;
747 check_info.slot_id = slot_id;
748
749 if (auto vendor = dynamic_cast<ConfigOptionStrings*>(fila_preset->config.option("filament_vendor"));
750 vendor && !vendor->values.empty()) {
751 check_info.fila_vendor = vendor->values[0];
752 }
753
754 check_info.extruder_id = obj->GetFilaSystem()->GetExtruderIdByAmsId(std::to_string(ams_id));
755
756 // Rack-gated per-nozzle context. For a multi-nozzle main extruder on a rack printer (H2C) the
757 // specific nozzle is resolved later by the print-dispatch rack mapping, so leave
758 // nozzle_flow/nozzle_diameter unset here to keep the high-flow nozzle rules dormant. Every
759 // non-rack printer takes the else branch, threading the reported nozzle flow + diameter and
760 // thereby activating the high-flow blacklist warnings in the AMS-edit dialog for H2D/H2S/X2D/P2S
761 // (and the E3D-kit X1C/P1x).
762 DevNozzleSystem* nozzle_system = obj->GetNozzleSystem();
763 const bool rack_supported = nozzle_system && nozzle_system->GetNozzleRack() &&
764 nozzle_system->GetNozzleRack()->IsSupported();
765 if (check_info.extruder_id == MAIN_EXTRUDER_ID && rack_supported) {
766 ; // multi-nozzle main extruder on a rack printer — nozzle resolved later by print dispatch
767 } else {
768 check_info.nozzle_flow = obj->GetFilaSystem()->GetNozzleFlowStringByAmsId(std::to_string(ams_id));
769 if (nozzle_system) {
770 DevNozzle nozzle = nozzle_system->GetNozzleByPosId(check_info.extruder_id.value_or(-1));
771 if (!nozzle.IsEmpty())
772 check_info.nozzle_diameter = nozzle.GetNozzleDiameter();
773 }
774 }
775
777 }
778
779 ams_filament_id = fila_preset->filament_id;
780 ams_setting_id = fila_preset->setting_id;
781 return result;
782}
static CheckResult check_filaments_in_blacklist(const CheckFilamentInfo &info)
Definition DevFilaBlackList.cpp:406
bool IsInstalled() const
Definition DevFilaSwitch.h:44
DevFilaSwitch * GetFilaSwitch() const
Definition DeviceManager.hpp:389
std::shared_ptr< DevFilaSystem > GetFilaSystem() const
Definition DeviceManager.hpp:388
std::string printer_type
Definition DeviceManager.hpp:239
std::string filament_id
Definition Preset.hpp:326
Definition DevFilaBlackList.h:53

References Slic3r::DevFilaBlacklist::CheckFilamentInfo::ams_id, Slic3r::PresetCollection::begin(), Slic3r::DevFilaBlacklist::check_filaments_in_blacklist(), Slic3r::Preset::config, Slic3r::DevFilaBlacklist::CheckFilamentInfo::dev_id, Slic3r::PresetCollection::end(), Slic3r::DevFilaBlacklist::CheckFilamentInfo::extruder_id, Slic3r::DevFilaBlacklist::CheckFilamentInfo::fila_id, Slic3r::DevFilaBlacklist::CheckFilamentInfo::fila_name, Slic3r::DevFilaBlacklist::CheckFilamentInfo::fila_type, Slic3r::DevFilaBlacklist::CheckFilamentInfo::fila_vendor, Slic3r::Preset::filament_id, Slic3r::PresetBundle::filaments, Slic3r::MachineObject::get_dev_id(), Slic3r::Preset::get_filament_type(), Slic3r::MachineObject::GetFilaSwitch(), Slic3r::MachineObject::GetFilaSystem(), Slic3r::DevNozzleSystem::GetNozzleByPosId(), Slic3r::DevNozzle::GetNozzleDiameter(), Slic3r::DevNozzleSystem::GetNozzleRack(), Slic3r::MachineObject::GetNozzleSystem(), Slic3r::DevFilaBlacklist::CheckFilamentInfo::has_filament_switch, Slic3r::DevNozzle::IsEmpty(), Slic3r::DevFilaSwitch::IsInstalled(), MAIN_EXTRUDER_ID, Slic3r::DevFilaBlacklist::CheckFilamentInfo::model_id, Slic3r::Preset::name, Slic3r::DevFilaBlacklist::CheckFilamentInfo::nozzle_diameter, Slic3r::DevFilaBlacklist::CheckFilamentInfo::nozzle_flow, Slic3r::ConfigBase::option(), Slic3r::MachineObject::printer_type, Slic3r::Preset::setting_id, Slic3r::DevFilaBlacklist::CheckFilamentInfo::slot_id, and Slic3r::ConfigOptionVector< T >::values.

Referenced by Slic3r::GUI::AMSMaterialsSetting::on_select_ok().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scroll_down()

void Slic3r::GUI::scroll_down ( )
static
1431{
1432 ImGuiContext& g = *GImGui;
1433 ImGuiWindow* window = g.CurrentWindow;
1434
1435 float item_size_y = window->DC.PrevLineSize.y + g.Style.ItemSpacing.y;
1436 float win_top = window->Scroll.y;
1437
1438 ImGui::SetScrollY(win_top + item_size_y);
1439}

Referenced by process_mouse_wheel(), and Slic3r::GUI::ImGuiWrapper::search_list().

Here is the caller graph for this function:

◆ scroll_up()

void Slic3r::GUI::scroll_up ( )
static
1419{
1420 ImGuiContext& g = *GImGui;
1421 ImGuiWindow* window = g.CurrentWindow;
1422
1423 float item_size_y = window->DC.PrevLineSize.y + g.Style.ItemSpacing.y;
1424 float win_top = window->Scroll.y;
1425
1426 ImGui::SetScrollY(win_top - item_size_y);
1427}

Referenced by process_mouse_wheel(), and Slic3r::GUI::ImGuiWrapper::search_list().

Here is the caller graph for this function:

◆ scroll_y()

void Slic3r::GUI::scroll_y ( int hover_id)
static
1869{
1870 if (hover_id < 0)
1871 return;
1872 ImGuiContext& g = *GImGui;
1873 ImGuiWindow* window = g.CurrentWindow;
1874
1875 float item_size_y = window->DC.PrevLineSize.y + g.Style.ItemSpacing.y;
1876 float item_delta = 0.5 * item_size_y;
1877
1878 float item_top = item_size_y * hover_id;
1879 float item_bottom = item_top + item_size_y;
1880
1881 float win_top = window->Scroll.y;
1882 float win_bottom = window->Scroll.y + window->Size.y;
1883
1884 if (item_bottom + item_delta >= win_bottom)
1885 ImGui::SetScrollY(win_top + item_size_y);
1886 else if (item_top - item_delta <= win_top)
1887 ImGui::SetScrollY(win_top - item_size_y);
1888}

Referenced by Slic3r::GUI::ImGuiWrapper::search_list().

Here is the caller graph for this function:

◆ search_string_getter()

bool Slic3r::GUI::search_string_getter ( int idx,
const char ** label,
const char ** tooltip )
static
6556{
6557 return wxGetApp().plater()->search_string_getter(idx, label, tooltip);
6558}

◆ section_name()

const char * Slic3r::GUI::section_name ( ShortcutSection section)
248{ return section_table[size_t(section)].name; }

Referenced by Slic3r::GUI::ConfigWizard::priv::apply_config(), Slic3r::GUI::GuideFrame::apply_config(), Slic3r::GUI::KBShortcutsDialog::create_page(), anonymous_namespace{EmbossStyleManager.cpp}::load_styles(), Slic3r::GUI::ConfigWizard::priv::load_vendors(), Slic3r::GUI::GuideFrame::SaveProfile(), and anonymous_namespace{EmbossStyleManager.cpp}::store_styles().

Here is the caller graph for this function:

◆ seedExtruderNozzleStats()

void Slic3r::GUI::seedExtruderNozzleStats ( PresetBundle * preset_bundle)
283{
284 if (!preset_bundle)
285 return;
286 auto *max_nozzle_count = preset_bundle->printers.get_edited_preset().config.option<ConfigOptionIntsNullable>("extruder_max_nozzle_count");
287 auto *nozzle_volume_type = preset_bundle->project_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type");
288
289 const int extruder_count = preset_bundle->get_printer_extruder_count();
290 for (int eid = 0; eid < extruder_count; ++eid) {
292 if (nozzle_volume_type && eid < (int) nozzle_volume_type->values.size())
293 type = NozzleVolumeType(nozzle_volume_type->values[eid]);
294 // A fresh seed has no per-type breakdown to draw on, so a Hybrid extruder starts as all-Standard.
295 if (type == nvtHybrid)
296 type = nvtStandard;
297 int count = 1;
298 if (max_nozzle_count && eid < (int) max_nozzle_count->values.size() &&
299 max_nozzle_count->values[eid] != ConfigOptionIntsNullable::nil_value())
300 count = max_nozzle_count->values[eid];
301 setExtruderNozzleCount(preset_bundle, eid, type, count, true);
302 }
304}
static int nil_value()
Definition Config.hpp:1083
int get_printer_extruder_count() const
Definition PresetBundle.cpp:5364

References Slic3r::Preset::config, count, Slic3r::PresetCollection::get_edited_preset(), Slic3r::PresetBundle::get_printer_extruder_count(), Slic3r::ConfigOptionIntsTempl< true >::nil_value(), Slic3r::nozzle_volume_type(), Slic3r::nvtHybrid, Slic3r::nvtStandard, Slic3r::ConfigBase::option(), Slic3r::PresetBundle::printers, Slic3r::PresetBundle::project_config, s_nozzle_stats_from_machine, and setExtruderNozzleCount().

Referenced by Slic3r::GUI::TabPrinter::on_preset_loaded().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ select_iso_view()

void Slic3r::GUI::select_iso_view ( Camera & camera)
static
66{
67 const Vec3d target = camera.get_target();
68 camera.look_at(target + camera.get_distance() * Vec3d(1., -1., 1.).normalized(), target, Vec3d::UnitZ());
70}
void auto_type(EType preferred_type)
Definition Camera.cpp:71
void look_at(const Vec3d &position, const Vec3d &target, const Vec3d &up)
Definition Camera.cpp:702
double get_distance()
Definition Camera.hpp:99
const Vec3d & get_target()
Definition Camera.hpp:94

References Slic3r::GUI::Camera::auto_type(), Slic3r::GUI::Camera::get_distance(), Slic3r::GUI::Camera::get_target(), Slic3r::GUI::Camera::look_at(), and Slic3r::GUI::Camera::Perspective.

Referenced by Slic3r::GUI::DesignCanvas::DesignCanvas(), and Slic3r::GUI::DesignCanvas::set_view().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ select_nozzle_volume()

void Slic3r::GUI::select_nozzle_volume ( ComboBox * combo,
NozzleVolumeType volume_type )
static
864{
865 for (unsigned int i = 0; i < combo->GetCount(); ++i)
866 if (NozzleVolumeType(intptr_t(combo->GetClientData(i))) == volume_type) {
867 combo->SetSelection(i);
868 return;
869 }
870}
void SetSelection(int n) override
Definition ComboBox.cpp:102
unsigned int GetCount() const override
Definition ComboBox.cpp:311

References ComboBox::GetCount(), and ComboBox::SetSelection().

Referenced by fill_nozzle_volume_combo(), and Slic3r::GUI::CalibrationPresetPage::init_with_machine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ selectable()

bool Slic3r::GUI::selectable ( const char * label,
bool selected,
ImGuiSelectableFlags flags = 0,
const ImVec2 & size_arg = ImVec2(0, 0),
bool * out_hovered = nullptr )
static
1485{
1486 ImGuiWindow* window = ImGui::GetCurrentWindow();
1487 if (window->SkipItems)
1488 return false;
1489
1490 ImGuiContext& g = *GImGui;
1491 const ImGuiStyle& style = g.Style;
1492
1493 // Submit label or explicit size to ItemSize(), whereas ItemAdd() will submit a larger/spanning rectangle.
1494 ImGuiID id = window->GetID(label);
1495 ImVec2 label_size = ImGui::CalcTextSize(label, NULL, true);
1496 ImVec2 size(size_arg.x != 0.0f ? size_arg.x : label_size.x, size_arg.y != 0.0f ? size_arg.y : label_size.y);
1497 ImVec2 pos = window->DC.CursorPos;
1498 pos.y += window->DC.CurrLineTextBaseOffset;
1499 ImGui::ItemSize(size, 0.0f);
1500
1501 // Fill horizontal space
1502 // We don't support (size < 0.0f) in Selectable() because the ItemSpacing extension would make explicitly right-aligned sizes not visibly match other widgets.
1503 const bool span_all_columns = (flags & ImGuiSelectableFlags_SpanAllColumns) != 0;
1504 const float min_x = span_all_columns ? window->ParentWorkRect.Min.x : pos.x;
1505 const float max_x = span_all_columns ? window->ParentWorkRect.Max.x : window->WorkRect.Max.x;
1506 if (size_arg.x == 0.0f || (flags & ImGuiSelectableFlags_SpanAvailWidth))
1507 size.x = ImMax(label_size.x, max_x - min_x);
1508
1509 // Text stays at the submission position, but bounding box may be extended on both sides
1510 const ImVec2 text_min = pos;
1511 const ImVec2 text_max(min_x + size.x, pos.y + size.y);
1512
1513 // Selectables are meant to be tightly packed together with no click-gap, so we extend their box to cover spacing between selectable.
1514 ImRect bb(min_x, pos.y, text_max.x, text_max.y);
1515 if ((flags & ImGuiSelectableFlags_NoPadWithHalfSpacing) == 0)
1516 {
1517 const float spacing_x = span_all_columns ? 0.0f : style.ItemSpacing.x;
1518 const float spacing_y = style.ItemSpacing.y;
1519 const float spacing_L = IM_FLOOR(spacing_x * 0.50f);
1520 const float spacing_U = IM_FLOOR(spacing_y * 0.50f);
1521 bb.Min.x -= spacing_L;
1522 bb.Min.y -= spacing_U;
1523 bb.Max.x += (spacing_x - spacing_L);
1524 bb.Max.y += (spacing_y - spacing_U);
1525 }
1526 //if (g.IO.KeyCtrl) { GetForegroundDrawList()->AddRect(bb.Min, bb.Max, IM_COL32(0, 255, 0, 255)); }
1527
1528 // Modify ClipRect for the ItemAdd(), faster than doing a PushColumnsBackground/PushTableBackground for every Selectable..
1529 const float backup_clip_rect_min_x = window->ClipRect.Min.x;
1530 const float backup_clip_rect_max_x = window->ClipRect.Max.x;
1531 if (span_all_columns)
1532 {
1533 window->ClipRect.Min.x = window->ParentWorkRect.Min.x;
1534 window->ClipRect.Max.x = window->ParentWorkRect.Max.x;
1535 }
1536
1537 bool item_add;
1538 if (flags & ImGuiSelectableFlags_Disabled)
1539 {
1540 ImGuiItemFlags backup_item_flags = g.CurrentItemFlags;
1541 g.CurrentItemFlags |= ImGuiItemFlags_Disabled | ImGuiItemFlags_NoNavDefaultFocus;
1542 item_add = ImGui::ItemAdd(bb, id);
1543 g.CurrentItemFlags = backup_item_flags;
1544 }
1545 else
1546 {
1547 item_add = ImGui::ItemAdd(bb, id);
1548 }
1549
1550 if (span_all_columns)
1551 {
1552 window->ClipRect.Min.x = backup_clip_rect_min_x;
1553 window->ClipRect.Max.x = backup_clip_rect_max_x;
1554 }
1555
1556 if (!item_add)
1557 return false;
1558
1559 // FIXME: We can standardize the behavior of those two, we could also keep the fast path of override ClipRect + full push on render only,
1560 // which would be advantageous since most selectable are not selected.
1561 if (span_all_columns && window->DC.CurrentColumns)
1562 ImGui::PushColumnsBackground();
1563 else if (span_all_columns && g.CurrentTable)
1564 ImGui::TablePushBackgroundChannel();
1565
1566 // We use NoHoldingActiveID on menus so user can click and _hold_ on a menu then drag to browse child entries
1567 ImGuiButtonFlags button_flags = 0;
1568 if (flags & ImGuiSelectableFlags_NoHoldingActiveID) { button_flags |= ImGuiButtonFlags_NoHoldingActiveId; }
1569 if (flags & ImGuiSelectableFlags_SelectOnClick) { button_flags |= ImGuiButtonFlags_PressedOnClick; }
1570 if (flags & ImGuiSelectableFlags_SelectOnRelease) { button_flags |= ImGuiButtonFlags_PressedOnRelease; }
1571 if (flags & ImGuiSelectableFlags_Disabled) { button_flags |= ImGuiButtonFlags_Disabled; }
1572 if (flags & ImGuiSelectableFlags_AllowDoubleClick) { button_flags |= ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnDoubleClick; }
1573 if (flags & ImGuiSelectableFlags_AllowItemOverlap) { button_flags |= ImGuiButtonFlags_AllowItemOverlap; }
1574
1575 if (flags & ImGuiSelectableFlags_Disabled)
1576 selected = false;
1577
1578 const bool was_selected = selected;
1579 bool hovered, held;
1580 bool pressed = ImGui::ButtonBehavior(bb, id, &hovered, &held, button_flags);
1581
1582 // Update NavId when clicking or when Hovering (this doesn't happen on most widgets), so navigation can be resumed with gamepad/keyboard
1583 if (pressed || (hovered && (flags & ImGuiSelectableFlags_SetNavIdOnHover)))
1584 {
1585 if (!g.NavDisableMouseHover && g.NavWindow == window && g.NavLayer == window->DC.NavLayerCurrent)
1586 {
1587 ImGui::SetNavID(id, window->DC.NavLayerCurrent, window->DC.NavFocusScopeIdCurrent, ImRect(bb.Min - window->Pos, bb.Max - window->Pos));
1588 g.NavDisableHighlight = true;
1589 }
1590 }
1591 if (pressed)
1592 ImGui::MarkItemEdited(id);
1593
1594 if (flags & ImGuiSelectableFlags_AllowItemOverlap)
1595 ImGui::SetItemAllowOverlap();
1596
1597 // In this branch, Selectable() cannot toggle the selection so this will never trigger.
1598 if (selected != was_selected) //-V547
1599 window->DC.LastItemStatusFlags |= ImGuiItemStatusFlags_ToggledSelection;
1600
1601 // Render
1602 if (held && (flags & ImGuiSelectableFlags_DrawHoveredWhenHeld))
1603 hovered = true;
1604 if (hovered || selected)
1605 {
1606 const ImU32 col = ImGui::GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
1607 ImGui::RenderFrame(bb.Min, bb.Max, col, false, 0.0f);
1608 ImGui::RenderNavHighlight(bb, id, ImGuiNavHighlightFlags_TypeThin | ImGuiNavHighlightFlags_NoRounding);
1609 }
1610
1611 if (span_all_columns && window->DC.CurrentColumns)
1612 ImGui::PopColumnsBackground();
1613 else if (span_all_columns && g.CurrentTable)
1614 ImGui::TablePopBackgroundChannel();
1615
1616 // mark a label with a ColorMarkerHovered, if item is hovered
1617 char marked_label[512]; //255 symbols is not enough for translated string (e.t. to Russian)
1618 if (hovered || selected) {
1619 sprintf(marked_label, "%c%s", ImGui::ColorMarkerHovered, label);
1620 ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 1.0f, 1.0f));
1621 }
1622 else
1623 strcpy(marked_label, label);
1624
1625 if (flags & ImGuiSelectableFlags_Disabled) ImGui::PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]);
1626 ImGui::RenderTextClipped(text_min, text_max, marked_label, NULL, &label_size, style.SelectableTextAlign, &bb);
1627 if (flags & ImGuiSelectableFlags_Disabled) ImGui::PopStyleColor();
1628 if (hovered || selected) ImGui::PopStyleColor();
1629
1630 if (out_hovered) *out_hovered = hovered;
1631
1632 // Automatically close popups
1633 if (pressed && (window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiSelectableFlags_DontClosePopups) && !(g.CurrentItemFlags & ImGuiItemFlags_SelectableDontClosePopup))
1634 ImGui::CloseCurrentPopup();
1635 IMGUI_TEST_ENGINE_ITEM_INFO(id, label, window->DC.LastItemStatusFlags);
1636 return pressed;
1637}

References ImRect, and style.

Referenced by Slic3r::GUI::DesignRowList::DesignRowList(), begin_menu(), Slic3r::GUI::GLGizmosManager::get_gizmo_from_mouse(), menu_item_with_icon(), Slic3r::GUI::GLGizmoMeshBoolean::on_render_input_window(), and Slic3r::GUI::ImGuiWrapper::search_list().

Here is the caller graph for this function:

◆ selected_machines()

std::vector< DeviceItem * > Slic3r::GUI::selected_machines ( const std::vector< DeviceItem * > & dev_item_list,
std::string search_text )
184{
185 std::vector<DeviceItem*> res;
186 for (const auto& item : dev_item_list) {
187 const MachineObject* dev = item->get_obj();
188 const std::string& dev_name = dev->get_dev_name();
189 const std::string& dev_ip = dev->get_dev_ip();
190
191 auto name_it = dev_name.find(search_text);
192 auto ip_it = dev_ip.find(search_text);
193
194 if (name_it != std::string::npos || ip_it != std::string::npos)
195 res.emplace_back(item);
196 }
197
198 return res;
199}
std::string get_dev_ip() const
Definition DeviceManager.hpp:203

References Slic3r::MachineObject::get_dev_ip(), and Slic3r::MachineObject::get_dev_name().

Here is the call graph for this function:

◆ selection_transform()

void Slic3r::GUI::selection_transform ( Selection & selection,
const std::function< void()> & selection_transformation_fnc )

Wrap function around selection transformation to apply fix transformation Fix transformation is needed because of (store/load) volume (to/from) 3mf.

Parameters
selectionSelected gl volume will be modified
selection_transformation_fncFunction modified Selection transformation
308{
309 if (const Transform3d *fix = get_fix_transformation(selection); fix != nullptr) {
310 // NOTE: need editable gl volume .. can't use selection.get_first_volume()
311 GLVolume *gl_volume = selection.get_volume(*selection.get_volume_idxs().begin());
312 Transform3d volume_tr = gl_volume->get_volume_transformation().get_matrix();
313 gl_volume->set_volume_transformation(volume_tr * fix->inverse());
314 selection.setup_cache();
315
316 selection_transformation_fnc();
317
318 volume_tr = gl_volume->get_volume_transformation().get_matrix();
319 gl_volume->set_volume_transformation(volume_tr * (*fix));
320 selection.setup_cache();
321 } else {
322 selection_transformation_fnc();
323 }
324
325 if (selection.is_single_full_instance())
327}

References Slic3r::GUI::Selection::GENERAL, Slic3r::Geometry::Transformation::get_matrix(), Slic3r::GUI::Selection::get_volume(), Slic3r::GUI::Selection::get_volume_idxs(), Slic3r::GLVolume::get_volume_transformation(), Slic3r::GUI::Selection::is_single_full_instance(), Slic3r::GLVolume::set_volume_transformation(), Slic3r::GUI::Selection::setup_cache(), and Slic3r::GUI::Selection::synchronize_unselected_instances().

Referenced by do_local_z_move(), do_local_z_rotate(), Slic3r::GUI::GLGizmoEmboss::do_mirror(), dragging_rotate_gizmo(), Slic3r::GUI::GLGizmoSVG::draw_mirroring(), and Slic3r::GUI::GLGizmoSVG::draw_size().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sequential_clearance_height_polygons()

std::vector< std::pair< Polygon, float > > Slic3r::GUI::sequential_clearance_height_polygons ( const std::vector< SequentialClearanceInstance > & instances,
double printable_height,
double height_to_lid,
double height_to_rod )
inline
43{
44 std::vector<std::pair<Polygon, float>> height_polygons;
45 height_polygons.reserve(instances.size());
46 for (size_t k = 0; k < instances.size(); ++k) {
47 const auto& instance = instances[k];
48 double height = k + 1 == instances.size() ? printable_height : height_to_lid;
49 for (size_t i = k + 1; i < instances.size(); ++i) {
50 const auto& next_bbox = instances[i].bounding_box;
51 if (std::min(instance.bounding_box.max.y(), next_bbox.max.y()) >
52 std::max(instance.bounding_box.min.y(), next_bbox.min.y())) {
53 height = height_to_rod;
54 break;
55 }
56 }
57 if (height < instance.instance_height)
58 height_polygons.emplace_back(instance.hull_polygon, float(height));
59 }
60 return height_polygons;
61}

References Slic3r::printable_height().

Referenced by Slic3r::GUI::GLCanvas3D::update_sequential_clearance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ serialize_mixed_gradient_curve_if_custom()

std::string Slic3r::GUI::serialize_mixed_gradient_curve_if_custom ( const MixedFilamentResult & result)
static
5006{
5007 if (!(result.components.size() == 2 && !result.gradient_curve.empty()))
5008 return {};
5009
5010 const double y0 = (result.gradient_direction == 0) ? kGradientMaxRatio : kGradientMinRatio;
5011 const double y1 = (result.gradient_direction == 0) ? kGradientMinRatio : kGradientMaxRatio;
5012 const double eps = 1e-4;
5013 if (result.gradient_curve.size() == 2) {
5014 const auto& a0 = result.gradient_curve[0];
5015 const auto& a1 = result.gradient_curve[1];
5016 // Default curve also requires no tangent overrides; any finite tangent
5017 // means the user bent the segment, so we must serialize it.
5018 const bool is_default =
5019 std::abs(a0.x - 0.0) < eps
5020 && std::abs(a1.x - 1.0) < eps
5021 && std::abs(a0.y - y0) < eps
5022 && std::abs(a1.y - y1) < eps
5023 && !std::isfinite(a0.m_in) && !std::isfinite(a0.m_out)
5024 && !std::isfinite(a1.m_in) && !std::isfinite(a1.m_out);
5025 if (is_default) return {};
5026 }
5027
5028 Slic3r::GradientCurve gc;
5029 gc.points = result.gradient_curve;
5031}
std::vector< GradientAnchor > gradient_curve
Definition MixedFilamentDialog.hpp:45
std::string serialize_gradient_curve(const GradientCurve &c)
Definition FilamentMixer.cpp:324

References Slic3r::GUI::MixedFilamentResult::components, Slic3r::GUI::MixedFilamentResult::gradient_curve, Slic3r::GUI::MixedFilamentResult::gradient_direction, Slic3r::kGradientMaxRatio, Slic3r::kGradientMinRatio, Slic3r::GradientCurve::points, and Slic3r::serialize_gradient_curve().

Referenced by create_mixed_filament_from_result(), and Slic3r::GUI::Sidebar::edit_mixed_filament().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ serialize_nozzle_config()

std::string Slic3r::GUI::serialize_nozzle_config ( const std::map< int, std::vector< DevNozzle > > & nozzle_cfg_map)
static
1952{
1953 std::ostringstream oss;
1954
1955 std::vector<DevNozzle> deputy_nozzles;
1956 auto deputy_it = nozzle_cfg_map.find(1);
1957 if (deputy_it != nozzle_cfg_map.end()) {
1958 deputy_nozzles = deputy_it->second;
1959 }
1960
1961 std::vector<DevNozzle> main_nozzles;
1962 auto main_it = nozzle_cfg_map.find(0);
1963 if (main_it != nozzle_cfg_map.end()) {
1964 main_nozzles = main_it->second;
1965 }
1966
1967 for (size_t i = 0; i < deputy_nozzles.size(); ++i) {
1968 if (i > 0) oss << ";";
1969 oss << std::fixed << std::setprecision(1) << deputy_nozzles[i].GetNozzleDiameter() << ","
1970 << static_cast<int>(deputy_nozzles[i].GetNozzleFlowType());
1971 }
1972
1973 oss << "|";
1974
1975 for (size_t i = 0; i < main_nozzles.size(); ++i) {
1976 if (i > 0) oss << ";";
1977 oss << std::fixed << std::setprecision(1) << main_nozzles[i].GetNozzleDiameter() << ","
1978 << static_cast<int>(main_nozzles[i].GetNozzleFlowType());
1979 }
1980
1981 return oss.str();
1982}

Referenced by Slic3r::GUI::Sidebar::priv::get_nozzle_options().

Here is the caller graph for this function:

◆ serialize_nozzle_option()

std::string Slic3r::GUI::serialize_nozzle_option ( const NozzleOption & option)
static
2065 {
2066 std::ostringstream oss;
2067 oss << option.diameter << "|";
2068
2069 bool first = true;
2070 for (const auto& pair : option.extruder_nozzle_stats) {
2071 if (!first) oss << ";";
2072 first = false;
2073 oss << pair.first << ":";
2074
2075 bool first_stat = true;
2076 for (const auto& stat_pair : pair.second) {
2077 if (!first_stat) oss << ",";
2078 first_stat = false;
2079 oss << static_cast<int>(stat_pair.first) << "#" << stat_pair.second;
2080 }
2081 }
2082 return oss.str();
2083}

References Slic3r::GUI::NozzleOption::diameter, and Slic3r::GUI::NozzleOption::extruder_nozzle_stats.

Referenced by Slic3r::GUI::Sidebar::priv::get_nozzle_options().

Here is the caller graph for this function:

◆ set_arrange_polygon_bed_exclusion_extruders()

void Slic3r::GUI::set_arrange_polygon_bed_exclusion_extruders ( ArrangePolygon & polygon,
const ModelObject & object,
const PartPlate & plate,
const DynamicPrintConfig & config )
55{
56 polygon.bed_exclusion_extruder_ids.clear();
58 return;
59
60 const ConfigOptionFloats *nozzle_diameters = config.opt<ConfigOptionFloats>("nozzle_diameter");
61 const size_t extruder_count = nozzle_diameters != nullptr ? nozzle_diameters->size() : 0;
62 if (extruder_count == 0)
63 return;
64
65 PresetBundle *preset_bundle = wxGetApp().preset_bundle;
66 if (preset_bundle == nullptr)
67 return;
68
69 const DynamicPrintConfig &project_config = preset_bundle->project_config;
70 // Automatic Bambu mapping may be recalculated after arrangement or differ
71 // between destination plates. Leave it unresolved so every nozzle volume
72 // is checked rather than embedding a temporary assignment in the item.
73 if (preset_bundle->is_bbl_vendor() &&
75 return;
76
77 std::set<int> extruder_ids;
78 for (const auto &mapping : plate.get_object_filament_extruders(object, project_config, extruder_count))
79 extruder_ids.emplace(int(mapping.second));
80 polygon.bed_exclusion_extruder_ids.assign(extruder_ids.begin(), extruder_ids.end());
81}
std::map< int, size_t > get_object_filament_extruders(const ModelObject &object, const DynamicConfig &g_config, size_t extruder_count) const
Definition PartPlate.cpp:3562
bool is_bbl_vendor()
Definition PresetBundle.hpp:374
BedExcludeVolumeMode active_bed_exclude_volume_mode(const DynamicPrintConfig &cfg)
Definition PrintConfig.cpp:14364
@ Shared
Definition PrintConfig.hpp:643
bool is_auto_filament_map_mode(FilamentMapMode mode)
Definition PrintConfig.hpp:649
std::vector< int > bed_exclusion_extruder_ids
Definition Arrange.hpp:92

References Slic3r::active_bed_exclude_volume_mode(), Slic3r::arrangement::ArrangePolygon::bed_exclusion_extruder_ids, Slic3r::GUI::PartPlate::get_object_filament_extruders(), Slic3r::GUI::PartPlate::get_real_filament_map_mode(), Slic3r::is_auto_filament_map_mode(), Slic3r::PresetBundle::is_bbl_vendor(), Slic3r::DynamicConfig::opt(), Slic3r::PresetBundle::project_config, Slic3r::Shared, and Slic3r::ConfigOptionVector< double >::size().

Referenced by Slic3r::GUI::FillBedJob::prepare(), Slic3r::GUI::ArrangeJob::prepare_arrange_polygon(), and set_arrange_polygon_bed_exclusion_extruders_for_all_plates().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_arrange_polygon_bed_exclusion_extruders_for_all_plates()

void Slic3r::GUI::set_arrange_polygon_bed_exclusion_extruders_for_all_plates ( ArrangePolygon & polygon,
const ModelObject & object,
PartPlateList & plate_list,
const DynamicPrintConfig & config )
static
87{
88 polygon.bed_exclusion_extruder_ids.clear();
90 return;
91
92 std::set<int> extruder_ids;
93 for (int plate_index = 0; plate_index < plate_list.get_plate_count(); ++plate_index) {
94 ArrangePolygon mapped = polygon;
95 set_arrange_polygon_bed_exclusion_extruders(mapped, object, *plate_list.get_plate(plate_index), config);
96 if (mapped.bed_exclusion_extruder_ids.empty()) {
97 polygon.bed_exclusion_extruder_ids.clear();
98 return;
99 }
100 extruder_ids.insert(mapped.bed_exclusion_extruder_ids.begin(), mapped.bed_exclusion_extruder_ids.end());
101 }
102 polygon.bed_exclusion_extruder_ids.assign(extruder_ids.begin(), extruder_ids.end());
103}
void set_arrange_polygon_bed_exclusion_extruders(ArrangePolygon &polygon, const ModelObject &object, const PartPlate &plate, const DynamicPrintConfig &config)
Definition ArrangeJob.cpp:53

References Slic3r::active_bed_exclude_volume_mode(), Slic3r::arrangement::ArrangePolygon::bed_exclusion_extruder_ids, Slic3r::GUI::PartPlateList::get_plate(), Slic3r::GUI::PartPlateList::get_plate_count(), set_arrange_polygon_bed_exclusion_extruders(), and Slic3r::Shared.

Referenced by Slic3r::GUI::ArrangeJob::prepare_all(), and Slic3r::GUI::ArrangeJob::prepare_selected().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_config_values()

template<typename T, typename OptionType>
void Slic3r::GUI::set_config_values ( DynamicPrintConfig * config,
const std::string & key,
T value )
static
380{
381 auto config_opt = config->option<OptionType>(key);
382 if (config_opt) {
383 for (size_t i = 0; i < config_opt->values.size(); ++i) {
384 config_opt->values[i] = value;
385 }
386 }
387 else {
388 BOOST_LOG_TRIVIAL(info) << "set_config_values: the key" << key << "is empty.";
389 }
390}

References Slic3r::ConfigBase::option().

Referenced by Slic3r::GUI::Plater::_calib_pa_pattern(), Slic3r::GUI::Plater::Calib_Cornering(), Slic3r::GUI::Plater::calib_input_shaping_damp(), Slic3r::GUI::Plater::calib_input_shaping_freq(), Slic3r::GUI::Plater::calib_max_vol_speed(), Slic3r::GUI::Plater::calib_temp(), and Slic3r::GUI::Plater::calib_VFA().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_created_standard_component_metadata()

void Slic3r::GUI::set_created_standard_component_metadata ( size_t config_idx,
const DecomposeOfficialComponent & component )
116{
117 auto& project_config = wxGetApp().preset_bundle->project_config;
118 if (!component.filament_id.empty()) {
119 if (auto* filament_id_opt = project_config.option<ConfigOptionStrings>("filament_id")) {
120 while (filament_id_opt->values.size() <= config_idx)
121 filament_id_opt->values.push_back("");
122 filament_id_opt->values[config_idx] = component.filament_id;
123 }
124 }
125
126 // component.filament_id is our OF id; the two constants are the printer's own ids.
127 auto* agent = wxGetApp().getAgent();
128 const std::string printer_filament_id = agent ? agent->from_orca_filament_id(component.filament_id) : component.filament_id;
129 const std::string type = printer_filament_id == kDecomposePetgFilamentId ? kDecomposePetgShortType :
130 printer_filament_id == kDecomposePlaFilamentId ? kDecomposePlaShortType : "";
131 if (!type.empty()) {
132 if (auto* type_opt = project_config.option<ConfigOptionStrings>("filament_type")) {
133 while (type_opt->values.size() <= config_idx)
134 type_opt->values.push_back("");
135 type_opt->values[config_idx] = type;
136 }
137 }
138}

References Slic3r::GUI::DecomposeOfficialComponent::filament_id, kDecomposePetgFilamentId, kDecomposePetgShortType, kDecomposePlaFilamentId, and kDecomposePlaShortType.

Referenced by Slic3r::GUI::Sidebar::decompose_filament_color().

Here is the caller graph for this function:

◆ set_miniaturizable()

void Slic3r::GUI::set_miniaturizable ( void * window)
48{
49 CGFloat rFloat = 34/255.0;
50 CGFloat gFloat = 34/255.0;
51 CGFloat bFloat = 36/255.0;
52 [(NSView*) window window].titlebarAppearsTransparent = true;
53 [(NSView*) window window].backgroundColor = [NSColor colorWithCalibratedRed:rFloat green:gFloat blue:bFloat alpha:1.0];
54 [(NSView*) window window].styleMask |= NSMiniaturizableWindowMask;
55
56 NSEnumerator *viewEnum = [[[[[[[(NSView*) window window] contentView] superview] titlebarViewController] view] subviews] objectEnumerator];
57 NSView *viewObject;
58
59 while(viewObject = (NSView *)[viewEnum nextObject]) {
60 if([viewObject class] == [NSTextField self]) {
61 //[(NSTextField*)viewObject setTextColor : NSColor.whiteColor];
62 mainframe_text_field = (NSTextField*)viewObject;
63 }
64 }
65}
NSTextField * mainframe_text_field
Definition MacDarkMode.mm:25

References mainframe_text_field.

◆ set_pop_up_remind_flag()

void Slic3r::GUI::set_pop_up_remind_flag ( bool remind)
static
35{
36 auto &app_config = wxGetApp().app_config;
37 app_config->set_bool("pop_up_filament_map_dialog", remind);
38}

Referenced by Slic3r::GUI::FilamentMapDialog::on_checkbox().

Here is the caller graph for this function:

◆ set_prefered_map_mode()

void Slic3r::GUI::set_prefered_map_mode ( FilamentMapMode mode)
static
62{
63 const static std::vector<std::string> enum_values = ConfigOptionEnum<FilamentMapMode>::get_enum_names();
64 auto &app_config = wxGetApp().app_config;
65 std::string mode_str;
66 if (mode < enum_values.size()) mode_str = enum_values[mode];
67
68 if (mode_str.empty()) BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format("Set empty prefered_filament_map_mode to app config");
69 app_config->set("prefered_filament_map_mode", mode_str);
70}
static const t_config_enum_names & get_enum_names()

References Slic3r::ConfigOptionEnum< T >::get_enum_names().

Here is the call graph for this function:

◆ set_tag_when_enter_full_screen()

void Slic3r::GUI::set_tag_when_enter_full_screen ( bool isfullscreen)
68{
69 is_in_full_screen_mode = isfullscreen;
70}
bool is_in_full_screen_mode
Definition MacDarkMode.mm:26

References is_in_full_screen_mode.

◆ set_title_colour_after_set_title()

void Slic3r::GUI::set_title_colour_after_set_title ( void * window)
73{
74 NSEnumerator *viewEnum = [[[[[[[(NSView*) window window] contentView] superview] titlebarViewController] view] subviews] objectEnumerator];
75 NSView *viewObject;
76 while(viewObject = (NSView *)[viewEnum nextObject]) {
77 if([viewObject class] == [NSTextField self]) {
78 [(NSTextField*)viewObject setTextColor : NSColor.whiteColor];
79 mainframe_text_field = (NSTextField*)viewObject;
80 }
81 }
82
84 [(NSTextField*)mainframe_text_field setTextColor : NSColor.whiteColor];
85 }
86}

References mainframe_text_field.

Referenced by Slic3r::GUI::MainFrame::update_title_colour_after_set_title().

Here is the caller graph for this function:

◆ set_window_corner_radius()

void Slic3r::GUI::set_window_corner_radius ( wxWindow * win,
int radius )
27 {
28 if (!win)
29 return;
30 NSView* view = (NSView*)win->GetHandle();
31 if (!view)
32 return;
33 NSWindow* window = [view window];
34 [window setOpaque:NO];
35 [window setBackgroundColor:[NSColor clearColor]];
36 [view setWantsLayer:YES];
37 [[view layer] setCornerRadius:radius];
38 [[view layer] setMasksToBounds:YES];
39}

Referenced by Slic3r::GUI::SpeedDialWebDialog::apply_rounded_shape().

Here is the caller graph for this function:

◆ setExtruderNozzleCount()

void Slic3r::GUI::setExtruderNozzleCount ( PresetBundle * preset_bundle,
int extruder_id,
NozzleVolumeType volume_type,
int nozzle_count,
bool clear_all )
223{
224 if (!preset_bundle)
225 return;
226 // Hybrid is a mix marker, not a physical nozzle type — never a stats key.
227 if (volume_type == nvtHybrid)
228 return;
229 auto &config = preset_bundle->printers.get_edited_preset().config;
230 auto *opt = config.option<ConfigOptionStrings>("extruder_nozzle_stats", true);
231 if (!opt)
232 return;
233
234 const int extruder_count = preset_bundle->get_printer_extruder_count();
235 auto stats = get_extruder_nozzle_stats(opt->values);
236 if ((int) stats.size() < extruder_count)
237 stats.resize(extruder_count);
238 if (extruder_id < 0 || extruder_id >= (int) stats.size())
239 return;
240
241 if (clear_all)
242 stats[extruder_id].clear();
243 stats[extruder_id][volume_type] = nozzle_count;
245}
std::vector< std::string > save_extruder_nozzle_stats_to_string(const std::vector< std::map< NozzleVolumeType, int > > &extruder_nozzle_stats)
Definition PrintConfig.cpp:975

References Slic3r::Preset::config, Slic3r::PresetCollection::get_edited_preset(), Slic3r::get_extruder_nozzle_stats(), Slic3r::PresetBundle::get_printer_extruder_count(), Slic3r::nvtHybrid, Slic3r::PresetBundle::printers, and Slic3r::save_extruder_nozzle_stats_to_string().

Referenced by Slic3r::GUI::Sidebar::priv::get_nozzle_options(), manuallySetNozzleCount(), onNozzleVolumeTypeSwitch(), seedExtruderNozzleStats(), and tryPopUpMultiNozzleDialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMinimalSupportAreaPrams()

void Slic3r::GUI::setMinimalSupportAreaPrams ( Slic3r::orientation::OrientParams & out)
static

parameters to minimize support area

176{
177 out.TAR_A = 0.015f;
178 out.TAR_B = 0.177f;
179 out.RELATIVE_F = 20;
180 out.CONTOUR_F = 0.5f;
181 out.BOTTOM_F = 2.5f;
182 out.BOTTOM_HULL_F = 0.1f;
183 out.TAR_C = 0.1f;
184 out.TAR_D = 1;
185 out.TAR_E = 0.0115f;
186 out.FIRST_LAY_H = 0.2f; // 0.0475;
187 out.VECTOR_TOL = -0.00083f;
188 out.NEGL_FACE_SIZE = 0.01f;
189 out.ASCENT = -0.5f;
190 out.PLAFOND_ADV = 0.0599f;
191 out.CONTOUR_AMOUNT = 0.0182427f;
192 out.OV_H = 2.574f;
193 out.height_offset = 2.3728f;
194 out.height_log = 0.041375f;
195 out.height_log_k = 1.9325457f;
196 out.LAF_MAX = 0.999f; // cos(1.4\degree) for low angle face 0.9997f
197 out.LAF_MIN = 0.97f; // cos(14\degree) 0.9703f
198 out.TAR_LAF = 0.001f; // 0.01f
199 out.TAR_PROJ_AREA = 0.1f;
200 out.BOTTOM_MIN = 0.1f; // min bottom area. If lower than it the object may be unstable
201 out.BOTTOM_MAX = 2000; // max bottom area. If get to it the object is stable enough (further increase bottom area won't do more help)
203 out.BOTTOM_HULL_MAX = 2000; // max bottom hull area
204 out.APPERANCE_FACE_SUPP = 3; // penalty of generating supports on appearance face
205 out.overhang_angle = 60.f;
206 out.use_low_angle_face = true;
207 out.min_volume = false;
208 out.fun_dir = {};
209 out.parallel = true;
210 out.progressind = {};
211 out.stopcondition = {};
212}
float CONTOUR_AMOUNT
Definition Orient.hpp:75
float TAR_LAF
Definition Orient.hpp:82
float ASCENT
Definition Orient.hpp:73
float OV_H
Definition Orient.hpp:76
std::function< bool(void)> stopcondition
A predicate returning true if abort is needed.
Definition Orient.hpp:103
float TAR_D
Definition Orient.hpp:68
Eigen::Vector3f fun_dir
Definition Orient.hpp:93
bool use_low_angle_face
Definition Orient.hpp:91
float height_offset
Definition Orient.hpp:77
bool min_volume
Definition Orient.hpp:92
float RELATIVE_F
Definition Orient.hpp:63
float TAR_PROJ_AREA
Definition Orient.hpp:83
float height_to_bottom_hull_ratio_MIN
Definition Orient.hpp:86
float BOTTOM_HULL_MAX
Definition Orient.hpp:87
float TAR_C
Definition Orient.hpp:67
std::function< void(unsigned, std::string)> progressind
Progress indicator callback called when an object gets packed. The unsigned argument is the number of...
Definition Orient.hpp:100
float FIRST_LAY_H
Definition Orient.hpp:70
float APPERANCE_FACE_SUPP
Definition Orient.hpp:88
float BOTTOM_MIN
Definition Orient.hpp:84
float height_log_k
Definition Orient.hpp:79
bool parallel
Allow parallel execution.
Definition Orient.hpp:96
float CONTOUR_F
Definition Orient.hpp:64
float TAR_B
Definition Orient.hpp:62
float TAR_E
Definition Orient.hpp:69
float PLAFOND_ADV
Definition Orient.hpp:74
float overhang_angle
Definition Orient.hpp:90
float BOTTOM_F
Definition Orient.hpp:65
float LAF_MAX
Definition Orient.hpp:80
float TAR_A
Definition Orient.hpp:61
float BOTTOM_HULL_F
Definition Orient.hpp:66
float NEGL_FACE_SIZE
Definition Orient.hpp:72
float VECTOR_TOL
Definition Orient.hpp:71
float height_log
Definition Orient.hpp:78
float LAF_MIN
Definition Orient.hpp:81
float BOTTOM_MAX
Definition Orient.hpp:85

References Slic3r::orientation::OrientParams::APPERANCE_FACE_SUPP, Slic3r::orientation::OrientParams::ASCENT, Slic3r::orientation::OrientParams::BOTTOM_F, Slic3r::orientation::OrientParams::BOTTOM_HULL_F, Slic3r::orientation::OrientParams::BOTTOM_HULL_MAX, Slic3r::orientation::OrientParams::BOTTOM_MAX, Slic3r::orientation::OrientParams::BOTTOM_MIN, Slic3r::orientation::OrientParams::CONTOUR_AMOUNT, Slic3r::orientation::OrientParams::CONTOUR_F, Slic3r::orientation::OrientParams::FIRST_LAY_H, Slic3r::orientation::OrientParams::fun_dir, Slic3r::orientation::OrientParams::height_log, Slic3r::orientation::OrientParams::height_log_k, Slic3r::orientation::OrientParams::height_offset, Slic3r::orientation::OrientParams::height_to_bottom_hull_ratio_MIN, Slic3r::orientation::OrientParams::LAF_MAX, Slic3r::orientation::OrientParams::LAF_MIN, Slic3r::orientation::OrientParams::min_volume, Slic3r::orientation::OrientParams::NEGL_FACE_SIZE, Slic3r::orientation::OrientParams::OV_H, Slic3r::orientation::OrientParams::overhang_angle, Slic3r::orientation::OrientParams::parallel, Slic3r::orientation::OrientParams::PLAFOND_ADV, Slic3r::orientation::OrientParams::progressind, Slic3r::orientation::OrientParams::RELATIVE_F, Slic3r::orientation::OrientParams::stopcondition, Slic3r::orientation::OrientParams::TAR_A, Slic3r::orientation::OrientParams::TAR_B, Slic3r::orientation::OrientParams::TAR_C, Slic3r::orientation::OrientParams::TAR_D, Slic3r::orientation::OrientParams::TAR_E, Slic3r::orientation::OrientParams::TAR_LAF, Slic3r::orientation::OrientParams::TAR_PROJ_AREA, Slic3r::orientation::OrientParams::use_low_angle_face, and Slic3r::orientation::OrientParams::VECTOR_TOL.

Referenced by Slic3r::GUI::OrientJob::process().

Here is the caller graph for this function:

◆ SetNozzleBmpColor()

wxBitmap Slic3r::GUI::SetNozzleBmpColor ( const wxBitmap & bmp,
const std::string & color_str )
static
72 {
73 if(color_str.empty()) return bmp;
74
75 wxImage img = bmp.ConvertToImage();
76 wxColour color("#" + color_str);
77
78 for (int y = 0; y < img.GetHeight(); ++y) {
79 for (int x = 0; x < img.GetWidth(); ++x) {
80 unsigned char r = img.GetRed(x, y);
81 unsigned char g = img.GetGreen(x, y);
82 unsigned char b = img.GetBlue(x, y);
83
84 /*replace yellow with color*/
85 if ( r >= 180 && g >= 180 && b <= 150) {
86 img.SetRGB(x, y, color.Red(), color.Green(), color.Blue());
87 }
88 }
89 }
90
91 return wxBitmap(img, -1, bmp.GetScaleFactor());
92}

Referenced by Slic3r::GUI::wgtDeviceNozzleRackNozzleItem::Rescale(), Slic3r::GUI::wgtDeviceNozzleRackToolHead::Rescale(), Slic3r::GUI::wgtDeviceNozzleRackNozzleItem::SetNozzleStatus(), and Slic3r::GUI::wgtDeviceNozzleRackToolHead::UpdateToolHeadInfo().

Here is the caller graph for this function:

◆ setNozzleStatsFromMachine()

void Slic3r::GUI::setNozzleStatsFromMachine ( bool from_machine)
220{ s_nozzle_stats_from_machine = from_machine; }

References s_nozzle_stats_from_machine.

Referenced by Slic3r::GUI::Sidebar::priv::get_nozzle_options(), and tryPopUpMultiNozzleDialog().

Here is the caller graph for this function:

◆ setup_collapse_toolbar()

bool Slic3r::GUI::setup_collapse_toolbar ( GLToolbar & toolbar,
std::function< void()> toggle )
1680{
1684 toolbar.set_border(4.0f);
1685 toolbar.set_separator_size(4);
1686 toolbar.set_gap_size(2);
1687
1688 toolbar.del_all_item();
1689
1691
1692 item.name = "collapse_sidebar";
1693 // set collapse svg name
1694 item.icon_filename = "collapse.svg";
1695 item.sprite_id = 0;
1696 item.left.action_callback = std::move(toggle);
1697
1698 return toolbar.add_item(item);
1699}
bool del_all_item()
Definition GLToolbar.cpp:379
void set_vertical_orientation(Layout::EVerticalOrientation orientation)
Definition GLToolbar.hpp:370
void set_border(float border)
Definition GLToolbar.cpp:321
void set_layout_type(Layout::EType type)
Definition GLToolbar.cpp:309
void set_horizontal_orientation(Layout::EHorizontalOrientation orientation)
Definition GLToolbar.hpp:368
bool add_item(const GLToolbarItem::Data &data, GLToolbarItem::EType type=GLToolbarItem::Action)
Definition GLToolbar.cpp:368
void set_separator_size(float size)
Definition GLToolbar.cpp:327
void set_gap_size(float size)
Definition GLToolbar.cpp:333
Definition GLToolbar.hpp:112
unsigned int sprite_id
Definition GLToolbar.hpp:137
Option left
Definition GLToolbar.hpp:139
std::string name
Definition GLToolbar.hpp:124
std::string icon_filename
Definition GLToolbar.hpp:125
@ Vertical
Definition GLToolbar.hpp:284
@ VO_Top
Definition GLToolbar.hpp:298
@ HO_Right
Definition GLToolbar.hpp:292

References Slic3r::GUI::GLToolbar::add_item(), Slic3r::GUI::GLToolbar::del_all_item(), Slic3r::GUI::GLToolbar::Layout::HO_Right, Slic3r::GUI::GLToolbarItem::Data::icon_filename, Slic3r::GUI::GLToolbarItem::Data::left, Slic3r::GUI::GLToolbarItem::Data::name, Slic3r::GUI::GLToolbar::set_border(), Slic3r::GUI::GLToolbar::set_gap_size(), Slic3r::GUI::GLToolbar::set_horizontal_orientation(), Slic3r::GUI::GLToolbar::set_layout_type(), Slic3r::GUI::GLToolbar::set_separator_size(), Slic3r::GUI::GLToolbar::set_vertical_orientation(), Slic3r::GUI::GLToolbarItem::Data::sprite_id, Slic3r::GUI::GLToolbar::Layout::Vertical, and Slic3r::GUI::GLToolbar::Layout::VO_Top.

Referenced by Slic3r::GUI::Plater::priv::init_collapse_toolbar(), and Slic3r::GUI::DesignCanvas::set_sidebar_collapse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setup_dialog_position()

template<typename T>
void Slic3r::GUI::setup_dialog_position ( T & info)
6733{
6734 auto plater = wxGetApp().plater();
6735 auto& sidebar = plater->sidebar();
6736 auto docking = plater->get_sidebar_docking_state();
6737 bool on_right = true;
6738
6739 if (docking == Sidebar::Left) {
6740 on_right = true;
6741 } else if (docking == Sidebar::Right) {
6742 on_right = false;
6743 } else {
6744 // If sidebar is too close to screen right edge, then move the dialog to the left side instead
6745
6746 auto screen_width = wxDisplay(&sidebar).GetClientArea().GetSize().x;
6747 auto right_space = screen_width - sidebar.get_sidebar_pos_right_x();
6748 if (right_space < sidebar.FromDIP(400)) {
6749 on_right = false;
6750 }
6751 }
6752
6753 if (on_right) {
6754 info.dialog_pos.x = sidebar.get_sidebar_pos_right_x() + sidebar.FromDIP(5);
6755 info.dialog_pos_align_right = true;
6756 } else {
6757 info.dialog_pos.x = sidebar.GetScreenPosition().x - sidebar.FromDIP(5);
6758 info.dialog_pos_align_right = false;
6759 }
6760}
@ Right
Definition Plater.hpp:175
@ Left
Definition Plater.hpp:175

References Slic3r::GUI::Sidebar::Left, plater(), and Slic3r::GUI::Sidebar::Right.

Referenced by Slic3r::GUI::Sidebar::pop_finsish_sync_ams_dialog(), and Slic3r::GUI::Sidebar::pop_sync_nozzle_and_ams_dialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sGetNozzlePosId()

volatile int Slic3r::GUI::sGetNozzlePosId ( wgtDeviceNozzleRackNozzleItem * item,
wgtDeviceNozzleRackNozzleItem * l_item,
wgtDeviceNozzleRackNozzleItem * r_item )
259{
260 int to_select_pos_id = -1;
261 if (item == l_item) {
262 to_select_pos_id = DEPUTY_EXTRUDER_ID;
263 } else if (item == r_item) {
264 to_select_pos_id = MAIN_EXTRUDER_ID;
265 } else {
266 to_select_pos_id = item->GetNozzleId() + 0x10;
267 }
268
269 return to_select_pos_id;
270}
int GetNozzleId() const
Definition wgtDeviceNozzleRack.h:212

References DEPUTY_EXTRUDER_ID, Slic3r::GUI::wgtDeviceNozzleRackNozzleItem::GetNozzleId(), and MAIN_EXTRUDER_ID.

Referenced by Slic3r::GUI::wgtDeviceNozzleRackSelect::OnNozzleItemSelected().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sGetTrayData()

std::optional< TrayData > Slic3r::GUI::sGetTrayData ( DevAmsTray * tray,
const std::string & ams_id_str,
DevAmsType ams_type )
static
204{
205 int ams_id = 0;
206 int tray_id = 0;
207 try {
208 ams_id = std::stoi(ams_id_str);
209 tray_id = atoi(tray->id.c_str());
210 } catch (const std::exception& e) {
211 BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ":[error] invalid ams_id or tray_id: " << e.what();
212 return std::nullopt;
213 }
214
215 TrayData td;
216 td.ams_id = ams_id;
217 if (ams_type != DevAmsType::EXT_SPOOL) {
218 td.slot_id = tray_id;
219 } else {
220 td.slot_id = 0;
221 }
222
223 if (ams_type == DevAmsType::AMS ||
224 ams_type == DevAmsType::AMS_LITE ||
225 ams_type == DevAmsType::N3F) {
226 td.id = ams_id * 4 + tray_id;
227 } else if (ams_type == DevAmsType::N3S) {
228 td.id = ams_id + tray_id;
229 } else if(ams_type == DevAmsType::EXT_SPOOL){
230 td.id = tray_id;
231 }
232
233 if (ams_type != EXT_SPOOL && !tray->is_exists) {
234 td.type = EMPTY;
235 } else {
236 if (!tray->is_tray_info_ready()) {
237 td.type = THIRD;
238 } else {
239 td.type = NORMAL;
240 td.remain = tray->remain;
241 td.colour = DevAmsTray::decode_color(tray->color);
242 td.name = tray->get_display_filament_type();
243 td.filament_type = tray->get_filament_type();
244 td.ctype = tray->ctype;
245 for (const auto& col : tray->cols) {
246 td.material_cols.push_back(DevAmsTray::decode_color(col));
247 }
248 }
249 }
250
251 return td;
252}
bool is_exists
Definition DevFilaSystem.h:84
std::string get_display_filament_type() const
Definition DevFilaSystem.cpp:104
std::string id
Definition DevFilaSystem.h:59
int remain
Definition DevFilaSystem.h:87
std::string get_filament_type()
Definition DevFilaSystem.cpp:112
@ AMS
Definition DevDefs.h:60
@ AMS_LITE
Definition DevDefs.h:61
@ EXT_SPOOL
Definition DevDefs.h:59

References Slic3r::AMS, Slic3r::GUI::TrayData::ams_id, Slic3r::AMS_LITE, Slic3r::DevAmsTray::color, Slic3r::GUI::TrayData::colour, Slic3r::DevAmsTray::cols, Slic3r::DevAmsTray::ctype, Slic3r::GUI::TrayData::ctype, Slic3r::DevAmsTray::decode_color(), EMPTY, Slic3r::EXT_SPOOL, Slic3r::GUI::TrayData::filament_type, Slic3r::DevAmsTray::get_display_filament_type(), Slic3r::DevAmsTray::get_filament_type(), Slic3r::DevAmsTray::id, Slic3r::GUI::TrayData::id, Slic3r::DevAmsTray::is_exists, Slic3r::DevAmsTray::is_tray_info_ready(), Slic3r::GUI::TrayData::material_cols, Slic3r::N3F, Slic3r::N3S, Slic3r::GUI::TrayData::name, NORMAL, Slic3r::DevAmsTray::remain, Slic3r::GUI::TrayData::remain, Slic3r::GUI::TrayData::slot_id, THIRD, and Slic3r::GUI::TrayData::type.

Referenced by Slic3r::GUI::AmsMapingPopup::update_mapping_items().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ short_and_splitted_time()

std::string Slic3r::GUI::short_and_splitted_time ( const std::string & time)
static
133{
134 // Parse the dhms time format.
135 int days = 0;
136 int hours = 0;
137 int minutes = 0;
138 int seconds = 0;
139 if (time.find('d') != std::string::npos)
140 ::sscanf(time.c_str(), "%dd %dh %dm %ds", &days, &hours, &minutes, &seconds);
141 else if (time.find('h') != std::string::npos)
142 ::sscanf(time.c_str(), "%dh %dm %ds", &hours, &minutes, &seconds);
143 else if (time.find('m') != std::string::npos)
144 ::sscanf(time.c_str(), "%dm %ds", &minutes, &seconds);
145 else if (time.find('s') != std::string::npos)
146 ::sscanf(time.c_str(), "%ds", &seconds);
147
148 // Format the dhm time.
149 char buffer[64];
150 if (days > 0)
151 ::sprintf(buffer, "%dd%dh%dm", days, hours, minutes);
152 else if (hours > 0) {
153 if (hours < 10 && minutes < 10 && seconds < 10)
154 ::sprintf(buffer, "%dh%dm%ds", hours, minutes, seconds);
155 else if (hours > 10 && minutes > 10 && seconds > 10)
156 ::sprintf(buffer, "%dh%dm%ds", hours, minutes, seconds);
157 else if ((minutes < 10 && seconds > 10) || (minutes > 10 && seconds < 10))
158 ::sprintf(buffer, "%dh%dm%ds", hours, minutes, seconds);
159 else
160 ::sprintf(buffer, "%dh%dm%ds", hours, minutes, seconds);
161 } else if (minutes > 0) {
162 if (minutes > 10 && seconds > 10)
163 ::sprintf(buffer, "%dm%ds", minutes, seconds);
164 else
165 ::sprintf(buffer, "%dm%ds", minutes, seconds);
166 } else
167 ::sprintf(buffer, "%ds", seconds);
168 return std::string(buffer);
169}

Referenced by Slic3r::GUI::IMSlider::get_label().

Here is the caller graph for this function:

◆ short_nozzle_volume_name()

wxString Slic3r::GUI::short_nozzle_volume_name ( const std::string & volume_name)
static
8909{
8910 // Hybrid has no entry on purpose: it is never a variant string, and the switch lists its two
8911 // sub-nozzle types as separate tags (see generate_extruder_options).
8912 if (volume_name == "Standard")
8913 // TRN Short tag for the Standard nozzle flow type.
8914 return _L_CONTEXT("SF", "Nozzle flow type");
8915 if (volume_name == "High Flow")
8916 // TRN Short tag for the High Flow nozzle flow type.
8917 return _L_CONTEXT("HF", "Nozzle flow type");
8918 if (volume_name == "TPU High Flow")
8919 // TRN Short tag for the TPU High Flow nozzle flow type.
8920 return _L_CONTEXT("TPU HF", "Nozzle flow type");
8921 if (volume_name == "E3D High Flow")
8922 // TRN Short tag for the E3D High Flow nozzle flow type.
8923 return _L_CONTEXT("E3D HF", "Nozzle flow type");
8924 if (volume_name == "Extra High Flow")
8925 // TRN Short tag for the Extra High Flow nozzle flow type.
8926 return _L_CONTEXT("XHF", "Nozzle flow type");
8927 return from_u8(volume_name);
8928}

References _L_CONTEXT, Slic3r::from_u8(), and short_nozzle_volume_name().

Referenced by Slic3r::GUI::Tab::generate_extruder_options(), and short_nozzle_volume_name().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shortcut_info()

◆ shortcut_section()

ShortcutSection Slic3r::GUI::shortcut_section ( Shortcut shortcut)
240{
241 size_t section = 0;
242 for (size_t i = 1; i < section_table.size(); ++i)
243 if (section_table[i].first <= shortcut)
244 section = i;
245 return ShortcutSection(section);
246}
ShortcutSection
Definition Shortcuts.hpp:71

Referenced by Slic3r::GUI::KBShortcutsDialog::fill_pages().

Here is the caller graph for this function:

◆ shortcuts_in()

std::vector< Shortcut > Slic3r::GUI::shortcuts_in ( ShortcutContext context)
251{
252 std::vector<Shortcut> out;
253 for (const ShortcutInfo& info : shortcut_table)
254 if (info.contexts & context_bit(context))
255 out.push_back(info.id);
256 return out;
257}
constexpr uint8_t context_bit(ShortcutContext context)
Definition Shortcuts.hpp:23
Definition Shortcuts.hpp:58

References context_bit().

Referenced by Slic3r::GUI::KBShortcutsDialog::fill_pages().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shortkey_alt_prefix()

const std::string & Slic3r::GUI::shortkey_alt_prefix ( )
128{
129 static const std::string str =
130#ifdef __APPLE__
131 u8"\u2325+" // "⌥+" (Mac Option+)
132#else
133 _u8L("Alt+")
134#endif
135 ;
136 return str;
137}

References _u8L.

Referenced by Slic3r::GUI::GizmoObjectManipulation::GizmoObjectManipulation(), Slic3r::GUI::GLCanvas3D::GLCanvas3D(), Slic3r::GUI::GLCanvas3D::_render_section_view_panel(), Slic3r::GUI::KeyChord::modifier_prefix(), Slic3r::GUI::GLGizmoCut3D::on_init(), Slic3r::GUI::GLGizmoMmuSegmentation::on_init(), Slic3r::GUI::GLGizmoTextureDisplacement::on_init(), and Slic3r::GUI::anonymous_namespace{SpeedDialDialog.cpp}::speed_dial_ui_strings().

Here is the caller graph for this function:

◆ shortkey_ctrl_prefix()

const std::string & Slic3r::GUI::shortkey_ctrl_prefix ( )

◆ shortkey_shift_prefix()

const std::string & Slic3r::GUI::shortkey_shift_prefix ( )

◆ should_dialog_be_shown()

bool Slic3r::GUI::should_dialog_be_shown ( )
static
212{
213 //BBS TODO remember to read last version
214 //std::string last_sent_version = wxGetApp().app_config->get("version_last");
215 std::string last_sent_version = SLIC3R_VERSION;
216
217 Semver semver_current(SLIC3R_VERSION);
218 Semver semver_last_sent;
219 if (! last_sent_version.empty())
220 semver_last_sent = Semver(last_sent_version);
221
222 // set whether to show in alpha builds, or only betas/rcs/finals:
223 const bool show_in_alphas = true;
224
225 if (! show_in_alphas && semver_current.prerelease()
226 && std::string(semver_current.prerelease()).find("alpha") != std::string::npos)
227 return false;
228
229 // New version means current > last, but they must differ in more than just patch.
230 bool new_version = ((semver_current.maj() > semver_last_sent.maj())
231 || (semver_current.maj() == semver_last_sent.maj() && semver_current.min() > semver_last_sent.min() ));
232
233 if (! new_version)
234 return false;
235
236 // We might want to check that the internet connection is ready so we don't open the dialog
237 // if it cannot really send any data. Using a dummy HTTP GET request led
238 // It might also trigger security softwares, which would look bad and would lead to questions
239 // about what PS is doing. We better use some less intrusive way of checking the connection.
240
241 // As of now, this is only implemented on Win. The other platforms do not check beforehand.
242
243#ifdef _WIN32
244 //BBS: remove atl related logic
245 //return check_internet_connection_win();
246 return true;
247#else
248 return true;
249#endif
250}
int min() const
Definition Semver.hpp:109
int maj() const
Definition Semver.hpp:108

References Slic3r::Semver::maj(), Slic3r::Semver::min(), and Slic3r::Semver::prerelease().

Referenced by show_send_system_info_dialog_if_needed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ should_pop_up()

bool Slic3r::GUI::should_pop_up ( )
static
40{
41 const auto &preset_bundle = wxGetApp().preset_bundle;
42 if (!preset_bundle->is_bbl_vendor()) return false;
43 const auto &full_config = preset_bundle->full_config();
44 const auto nozzle_diameters = full_config.option<ConfigOptionFloats>("nozzle_diameter");
45 return nozzle_diameters->size() > 1;
46}

Referenced by Slic3r::GUI::FilamentGroupPopup::tryPopup().

Here is the caller graph for this function:

◆ show_error() [1/3]

void Slic3r::GUI::show_error ( wxWindow * parent,
const char * message,
bool has_code_excerpts )
305{
306 assert(message);
307 show_error(parent, wxString::FromUTF8(message), has_code_excerpts);
308}

References show_error().

Here is the call graph for this function:

◆ show_error() [2/3]

void Slic3r::GUI::show_error ( wxWindow * parent,
const std::string & message,
bool has_code_excerpts = false )
inline
48{ show_error(parent, message.c_str(), has_code_excerpts); }

References show_error().

Here is the call graph for this function:

◆ show_error() [3/3]

void Slic3r::GUI::show_error ( wxWindow * parent,
const wxString & message,
bool has_code_excerpts )
297{
298 wxGetApp().CallAfter([=] {
299 ErrorDialog msg(parent, message, has_code_excerpts);
300 msg.ShowModal();
301 });
302}
Definition MsgDialog.hpp:116

References Slic3r::GUI::DPIAware< P >::ShowModal().

Referenced by Slic3r::GUI::PrintHostQueueDialog::PrintHostQueueDialog(), Slic3r::GUI::GLGizmoTextureDisplacement::add_texture_layer(), Slic3r::GUI::GLGizmoTextureDisplacement::bake(), Slic3r::GUI::GLGizmoTextureDisplacement::bake_standard(), Slic3r::GUI::PhysicalPrinterDialog::build_printhost_settings(), Slic3r::GUI::GUI_App::catch_error(), Slic3r::GUI::GUI_App::check_legacy_user_filament_presets(), Slic3r::GUI::GUI_App::check_updates(), Slic3r::GUI::GLGizmoTextureDisplacement::commit_image_adjust(), anonymous_namespace{EmbossJob.cpp}::create_message(), Slic3r::GUI::ObjectList::del_subobject_from_object(), Slic3r::GUI::Plater::export_3mf(), Slic3r::GUI::MainFrame::export_config(), Slic3r::GUI::Plater::export_gcode(), Slic3r::GUI::Plater::priv::export_gcode(), Slic3r::GUI::Plater::priv::export_gcode(), Slic3r::GUI::Plater::export_gcode_3mf(), fatal_error(), Slic3r::GUI::ArrangeJob::finalize(), Slic3r::GUI::PlaterWorker< WorkerSubclass >::PlaterJob::finalize(), Slic3r::GUI::SLAImportJob::finalize(), Slic3r::GUI::TextureDisplacementBakeJob::finalize(), focus_event(), Slic3r::GUI::LayerRangeEditor::get_value(), Slic3r::GUI::PointCtrl::get_value(), Slic3r::GUI::Field::get_value_by_opt_type(), Slic3r::GUI::GLGizmoTextureDisplacement::import_custom_texture(), Slic3r::GUI::MainFrame::load_config_file(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::Plater::load_gcode(), Slic3r::GUI::BedShapePanel::load_model(), Slic3r::GUI::CreatePrinterPresetDialog::load_model_stl(), Slic3r::GUI::ObjectList::load_modifier(), Slic3r::GUI::BedShapePanel::load_stl(), Slic3r::GUI::BedShapePanel::load_texture(), Slic3r::GUI::CreatePrinterPresetDialog::load_texture(), Slic3r::GUI::GUI_App::maybe_migrate_user_presets_on_login(), Slic3r::GUI::ConnectPrinterDialog::on_button_confirm(), Slic3r::GUI::Downloader::on_error(), Slic3r::GUI::PrintHostQueueDialog::on_error(), Slic3r::GUI::GUI_App::on_init_inner(), Slic3r::GUI::Plater::priv::on_process_completed(), Slic3r::GUI::Tab::on_value_change(), Slic3r::GUI::Plater::PopupMenu(), Slic3r::GUI::Plater::preview_zip_archive(), Slic3r::GUI::GLGizmoTextureDisplacement::queue_prepare(), Slic3r::GUI::GLGizmoTextureDisplacement::render_debug_stage_panel(), Slic3r::GUI::GLGizmoTextureDisplacement::render_texture_library_popup(), Slic3r::GUI::GLGizmoTextureDisplacement::run_stage_debug(), Slic3r::GUI::GLGizmoTextureDisplacement::run_uv_command(), anonymous_namespace{GLGizmoSVG.cpp}::select_shape(), Slic3r::GUI::Plater::send_gcode_legacy(), Slic3r::GUI::GLGizmoTextureDisplacement::set_layer_texture(), Slic3r::GUI::ObjectList::set_volume_type(), Slic3r::GUI::Plater::priv::show_delayed_error_message(), show_error(), show_error(), show_error_id(), Slic3r::GUI::Plater::show_illegal_characters_warning(), Slic3r::GUI::GLGizmoTextureDisplacement::smooth_model(), Slic3r::GUI::GUI_App::start_download(), Slic3r::GUI::GLGizmoTextureDisplacement::subdivide_model_adaptive(), Slic3r::GUI::Config::take_config_snapshot_report_error(), Slic3r::GUI::PhysicalPrinterDialog::update_printers(), and Slic3r::GUI::FlashforgePrintHostSendDialog::validate_before_close().

Here is the call graph for this function:

◆ show_error_id()

void Slic3r::GUI::show_error_id ( int id,
const std::string & message )
311{
312 auto *parent = id != 0 ? wxWindow::FindWindowById(id) : nullptr;
313 show_error(parent, message);
314}

References show_error().

Here is the call graph for this function:

◆ show_info() [1/3]

void Slic3r::GUI::show_info ( wxWindow * parent,
const char * message,
const char * title )
324{
325 assert(message);
326 show_info(parent, wxString::FromUTF8(message), title ? wxString::FromUTF8(title) : wxString());
327}
void show_info(wxWindow *parent, const wxString &message, const wxString &title)
Definition GUI.cpp:316

References show_info().

Here is the call graph for this function:

◆ show_info() [2/3]

void Slic3r::GUI::show_info ( wxWindow * parent,
const std::string & message,
const std::string & title = std::string() )
inline
52{ show_info(parent, message.c_str(), title.c_str()); }

References show_info().

Here is the call graph for this function:

◆ show_info() [3/3]

void Slic3r::GUI::show_info ( wxWindow * parent,
const wxString & message,
const wxString & title )
317{
318 //wxMessageDialog msg_wingow(parent, message, wxString(SLIC3R_APP_NAME " - ") + (title.empty() ? _L("Notice") : title), wxOK | wxICON_INFORMATION);
319 MessageDialog msg_wingow(parent, message, wxString(SLIC3R_APP_FULL_NAME " - ") + (title.empty() ? _L("Notice") : title), wxOK | wxICON_INFORMATION);
320 msg_wingow.ShowModal();
321}
#define SLIC3R_APP_FULL_NAME
Definition libslic3r.h:11

References _L, Slic3r::GUI::DPIAware< P >::ShowModal(), and SLIC3R_APP_FULL_NAME.

Referenced by Slic3r::GUI::PhysicalPrinterDialog::build_printhost_settings(), Slic3r::GUI::ObjectList::check_last_selection(), Slic3r::GUI::SLAImportJob::finalize(), Slic3r::GUI::ObjectList::fix_multiselection_conflicts(), Slic3r::GUI::Plater::load_files(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::Plater::normalize_bed_types(), Slic3r::GUI::GLGizmoTextureDisplacement::render_debug_stage_panel(), Slic3r::GUI::GUI_App::request_open_project(), show_info(), and show_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ show_notification_extruders_limit_exceeded()

void Slic3r::GUI::show_notification_extruders_limit_exceeded ( )
inlinestatic
54{
55 wxGetApp()
56 .plater()
57 ->get_notification_manager()
59 GUI::format(_L_PLURAL("Filament count exceeds the maximum number that painting tool supports. Only the "
60 "first %1% filament will be available in painting tool.",
61 "Filament count exceeds the maximum number that painting tool supports. Only the "
62 "first %1% filaments will be available in painting tool.",
65}
@ PrintInfoNotificationLevel
Definition NotificationManager.hpp:218

References _L_PLURAL, Slic3r::GUI::GLGizmoMmuSegmentation::EXTRUDERS_LIMIT, format(), MmSegmentationExceededExtrudersLimit, and Slic3r::GUI::NotificationManager::PrintInfoNotificationLevel.

Referenced by Slic3r::GUI::GLGizmoMmuSegmentation::data_changed(), and Slic3r::GUI::GLGizmoMmuSegmentation::on_opening().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ show_send_system_info_dialog_if_needed()

void Slic3r::GUI::show_send_system_info_dialog_if_needed ( )
819{
820 if (wxGetApp().is_gcode_viewer() || ! should_dialog_be_shown())
821 return;
822
823 SendSystemInfoDialog dlg(wxGetApp().mainframe);
824 dlg.ShowModal();
825}
Definition SendSystemInfoDialog.cpp:108
static bool should_dialog_be_shown()
Definition SendSystemInfoDialog.cpp:211

References should_dialog_be_shown(), and Slic3r::GUI::DPIAware< P >::ShowModal().

Here is the call graph for this function:

◆ show_substitutions_info() [1/2]

void Slic3r::GUI::show_substitutions_info ( const ConfigSubstitutions & config_substitutions,
const std::string & filename )
458{
459 wxString changes = "\n";
460 add_config_substitutions(config_substitutions, changes);
461
462 InfoDialog msg(nullptr,
463 format_wxstr(_L("The configuration file \u201c%1%\u201d was loaded, but some values were not recognized."), from_u8(filename)),
464 substitution_message(changes), true);
465 msg.ShowModal();
466}
Definition MsgDialog.hpp:366
static wxString substitution_message(const wxString &changes)
Definition GUI.cpp:422
static void add_config_substitutions(const ConfigSubstitutions &conf_substitutions, wxString &changes)
Definition GUI.cpp:345

References _L, add_config_substitutions(), format_wxstr(), from_u8(), Slic3r::GUI::DPIAware< P >::ShowModal(), and substitution_message().

Here is the call graph for this function:

◆ show_substitutions_info() [2/2]

void Slic3r::GUI::show_substitutions_info ( const PresetsConfigSubstitutions & presets_config_substitutions)
430{
431 wxString changes;
432
433 auto preset_type_name = [](Preset::Type type) {
434 switch (type) {
435 case Preset::TYPE_PRINT: return _L("Process");
436 // BBS: remove TYPE_SLA_PRINT
437 case Preset::TYPE_FILAMENT: return _L("Filament");
438 // BBS: remove TYPE_SLA_MATERIAL
439 case Preset::TYPE_PRINTER: return _L("Machine");
440 // BBS: remove TYPE_PHYSICAL_PRINTER
441 default: assert(false); return wxString();
442 }
443 };
444
445 for (const PresetConfigSubstitutions& substitution : presets_config_substitutions) {
446 changes += "\n\n" + format_wxstr("%1% : %2%", preset_type_name(substitution.preset_type), bold_string(substitution.preset_name));
447 if (!substitution.preset_file.empty())
448 changes += format_wxstr(" (%1%)", substitution.preset_file);
449
450 add_config_substitutions(substitution.substitutions, changes);
451 }
452
453 InfoDialog msg(nullptr, _L("The configuration package was loaded, but some values were not recognized."), substitution_message(changes), true);
454 msg.ShowModal();
455}
Type
Definition Preset.hpp:244
static const char * preset_type_name(Preset::Type type)
Definition Tab.cpp:1665

References _L, add_config_substitutions(), bold_string(), format_wxstr(), preset_type_name(), Slic3r::GUI::DPIAware< P >::ShowModal(), substitution_message(), Slic3r::Preset::TYPE_FILAMENT, Slic3r::Preset::TYPE_PRINT, and Slic3r::Preset::TYPE_PRINTER.

Referenced by Slic3r::GUI::SLAImportJob::finalize(), Slic3r::GUI::MainFrame::load_config_file(), Slic3r::GUI::Plater::priv::load_files(), and Slic3r::GUI::Plater::load_gcode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sidebar_icon_btn()

::Button * Slic3r::GUI::sidebar_icon_btn ( wxWindow * parent,
const char * icon,
const wxString & tip,
int px = 20 )
static
258{
259 auto* b = new ::Button(parent, "", icon, wxBORDER_NONE, px);
260 b->SetName("design_icon_btn");
261 b->SetCanFocus(false);
262 b->SetIconSpacing(0); // off macOS an empty label still reserves the icon-text gap
263 b->SetBorderColor(StateColor());
264 b->SetToolTip(tip);
266 return b;
267}
static void style_sidebar_icon_btn(::Button *b)
Definition DesignPanel.cpp:247

References style_sidebar_icon_btn().

Referenced by Slic3r::GUI::DesignPanel::DesignPanel(), and Slic3r::GUI::DesignPanel::rebuild_constraint_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sketch_endpoint_roles()

int Slic3r::GUI::sketch_endpoint_roles ( const SketchEntity & e,
SketchPointRole out[2] )
static
2705{
2706 switch (e.type) {
2711 out[0] = SketchPointRole::P0; out[1] = SketchPointRole::P1; return 2;
2713 out[0] = SketchPointRole::P0; return 1;
2714 default: return 0; // circle: centre coincidence is Concentric's job, not this one's
2715 }
2716}
@ P0
Definition SketchEngine.hpp:131
@ P1
Definition SketchEngine.hpp:131

References Slic3r::SketchEntity::Arc, Slic3r::SketchEntity::BSpline, Slic3r::SketchEntity::EllipseArc, Slic3r::SketchEntity::Line, Slic3r::P0, Slic3r::P1, Slic3r::SketchEntity::Point, sketch_endpoint_roles(), and Slic3r::SketchEntity::type.

Referenced by Slic3r::GUI::DesignSketchTool::heal_coincidences(), Slic3r::GUI::DesignSketchTool::infer_auto_constraints(), and sketch_endpoint_roles().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sketch_plane_prompt()

wxString Slic3r::GUI::sketch_plane_prompt ( )
static
304{
305 return _L("Click a reference plane or a flat face to sketch on it — Esc cancels");
306}

References _L.

Referenced by Slic3r::GUI::DesignPanel::DesignPanel(), and Slic3r::GUI::DesignPanel::start_sketch().

Here is the caller graph for this function:

◆ sketch_step_prompt()

wxString Slic3r::GUI::sketch_step_prompt ( DesignSketchTool::Mode m,
int step,
int picks )
static
6438{
6440 auto pick_more = [](const wxString& lead, int n) {
6441 return n <= 0 ? lead
6442 // TRN Appended to a sketch tool prompt; %d is the number of picked entities.
6443 : lead + wxString::Format(_L_PLURAL(" · %d picked", " · %d picked", n), n);
6444 };
6445 switch (m) {
6446 case Mode::Select:
6447 return picks > 0
6448 ? wxString::Format(_L_PLURAL("%d selected · Del removes it · Shift-click adds · "
6449 "double-click takes the whole loop",
6450 "%d selected · Del removes them · Shift-click adds · "
6451 "double-click takes the whole loop", picks), picks)
6452 : _L("Select — click an entity to pick it · drag an endpoint or center to move it · "
6453 "Shift-click adds · Del removes");
6454 case Mode::Constrain:
6455 return picks > 0
6456 ? wxString::Format(_L_PLURAL("%d picked · now choose a constraint (Horizontal, Parallel, "
6457 "Tangent, Equal…)",
6458 "%d picked · now choose a constraint (Horizontal, Parallel, "
6459 "Tangent, Equal…)", picks), picks)
6460 : _L("Constrain — click one or two entities, then choose a constraint");
6461 case Mode::Dimension:
6462 return step == 0 ? _L("Dimension — click an entity, or the first of two points")
6463 : _L("Dimension — click the second point");
6464 case Mode::Line:
6465 return step == 0 ? _L("Line — click the start point")
6466 : _L("Line — click the end point; its length and angle can then be typed");
6467 case Mode::Polyline:
6468 return step == 0 ? _L("Polyline — click the first point")
6469 : pick_more(_L("Polyline — click the next point · click the start point "
6470 "to close it · right-click, double-click or Enter ends the chain"), step);
6471 case Mode::CornerRect:
6472 return step == 0 ? _L("Rectangle — click one corner")
6473 : _L("Rectangle — click the opposite corner");
6474 case Mode::CenterRect:
6475 return step == 0 ? _L("Center rectangle — click the center")
6476 : _L("Center rectangle — click a corner");
6477 case Mode::ObliqueRect:
6478 return step == 0 ? _L("Oblique rectangle — click the start of the base edge")
6479 : step == 1 ? _L("Oblique rectangle — click the end of the base edge (this sets the angle)")
6480 : _L("Oblique rectangle — click to set the width");
6481 case Mode::RoundedRect:
6482 return step == 0 ? _L("Rounded rectangle — click one corner")
6483 : step == 1 ? _L("Rounded rectangle — click the opposite corner")
6484 : _L("Rounded rectangle — click to set the corner radius");
6485 case Mode::CenterCircle:
6486 return step == 0 ? _L("Circle — click the center")
6487 : _L("Circle — click to set the radius; it can then be typed");
6488 case Mode::TwoPointCircle:
6489 return step == 0 ? _L("Circle (2 points) — click one end of the diameter")
6490 : _L("Circle (2 points) — click the other end of the diameter");
6491 case Mode::ThreePointCircle:
6492 return step == 0 ? _L("Circle (3 points) — click the first point on the circle")
6493 : step == 1 ? _L("Circle (3 points) — click the second point")
6494 : _L("Circle (3 points) — click the third point");
6495 case Mode::ThreePointArc:
6496 return step == 0 ? _L("Arc — click the start point")
6497 : step == 1 ? _L("Arc — click the end point")
6498 : _L("Arc — click a point the arc passes through");
6499 case Mode::TangentArc:
6500 return step == 0 ? _L("Tangent arc — click the endpoint it leaves from")
6501 : _L("Tangent arc — click its far end");
6502 case Mode::CenterArc:
6503 return step == 0 ? _L("Center arc — click the center")
6504 : step == 1 ? _L("Center arc — click the start point (this sets the radius)")
6505 : _L("Center arc — click the end point");
6506 case Mode::Slot:
6507 return step == 0 ? _L("Slot — click one end of the centerline")
6508 : step == 1 ? _L("Slot — click the other end of the centerline")
6509 : _L("Slot — click to set the width");
6510 case Mode::ArcSlot:
6511 return step == 0 ? _L("Arc slot — click the center the slot curves about")
6512 : step == 1 ? _L("Arc slot — click the start of the centerline (this sets the radius)")
6513 : step == 2 ? _L("Arc slot — click the end of the centerline")
6514 : _L("Arc slot — click to set the width");
6515 case Mode::Polygon:
6516 return step == 0 ? _L("Polygon — click the center")
6517 : _L("Polygon — click a vertex (this sets size and orientation)");
6518 case Mode::Ellipse:
6519 return step == 0 ? _L("Ellipse — click the center")
6520 : step == 1 ? _L("Ellipse — click the end of the major axis")
6521 : _L("Ellipse — click a point on the minor axis");
6522 case Mode::EllipseArc:
6523 return step == 0 ? _L("Elliptical arc — click the center")
6524 : step == 1 ? _L("Elliptical arc — click the end of the major axis")
6525 : step == 2 ? _L("Elliptical arc — click a point on the minor axis")
6526 : step == 3 ? _L("Elliptical arc — click where the arc starts")
6527 : _L("Elliptical arc — click where the arc ends");
6528 case Mode::BSpline:
6529 return step == 0 ? _L("Spline — click the first control point")
6530 : pick_more(_L("Spline — click the next control point · right-click, "
6531 "double-click or Enter finishes the curve"), step);
6532 case Mode::Point:
6533 return _L("Point — click to place one; the tool stays armed for more");
6534 case Mode::Trim:
6535 return _L("Trim — click a segment where it crosses another entity · Esc to exit");
6536 case Mode::Extend:
6537 return _L("Extend — click a line or arc to grow it out to the nearest entity · "
6538 "Esc to exit");
6539 case Mode::Fillet:
6540 return step == 0 ? _L("Fillet — click the first of two lines that meet")
6541 : step == 1 ? _L("Fillet — click the second line")
6542 : _L("Fillet — drag the arrow, or click the number to type the radius · "
6543 "Enter applies · Esc cancels");
6544 case Mode::Chamfer:
6545 return step == 0 ? _L("Chamfer — click the first of two lines that meet")
6546 : step == 1 ? _L("Chamfer — click the second line")
6547 : _L("Chamfer — drag the arrow, or click the number to type the setback · "
6548 "Enter applies · Esc cancels");
6549 case Mode::Offset:
6550 return step == 0 ? _L("Offset — click a curve; its whole outline is offset")
6551 : _L("Offset — drag the arrow to either side, or click the number to type "
6552 "the distance · Enter applies · Esc cancels");
6553 case Mode::Mirror:
6554 // The two-phase pick is the one gesture users reported as unguided: nothing said the
6555 // AXIS comes first, and nothing said how it is applied.
6556 return step == 0
6557 ? _L("Mirror — first click the LINE to mirror about (a construction line works)")
6558 : picks == 0
6559 ? _L("Mirror — axis set · now click the entities to mirror · Esc cancels")
6560 : wxString::Format(_L_PLURAL("Mirror — axis set · %d to mirror · click another to add or "
6561 "remove it · Enter applies",
6562 "Mirror — axis set · %d to mirror · click another to add or "
6563 "remove it · Enter applies", picks), picks);
6564 case Mode::Move:
6565 return step == 0 ? _L("Move — click the entities to move")
6566 : pick_more(_L("Move — drag the handle, or click the number to type the "
6567 "distance · Enter applies"), picks);
6568 case Mode::Rotate:
6569 return step == 0 ? _L("Rotate — click the entities to rotate")
6570 : pick_more(_L("Rotate — drag the handle, or click the number to type the "
6571 "angle · Enter applies"), picks);
6572 case Mode::Scale:
6573 return step == 0 ? _L("Scale — click the entities to scale")
6574 : pick_more(_L("Scale — drag the handle, or click the number to type the "
6575 "factor · Enter applies"), picks);
6576 case Mode::Array:
6577 return step == 0 ? _L("Array — click the entities to repeat")
6578 : pick_more(_L("Array — drag the handle to set the step, click the count to "
6579 "type it · Enter applies"), picks);
6580 case Mode::PolarArray:
6581 return step == 0 ? _L("Polar array — click the entities to repeat")
6582 : pick_more(_L("Polar array — drag the handle to set the sweep, click the "
6583 "count to type it · Enter applies"), picks);
6584 case Mode::TransformArt:
6585 return _L("Drag a corner to scale, the center to move · Enter or ✓ when done, Esc to discard");
6586 }
6587 return wxString();
6588}
Mode
Definition DesignSketchTool.hpp:91
Mode
Definition CustomGCode.hpp:54

References _L, and _L_PLURAL.

Referenced by Slic3r::GUI::DesignPanel::on_sketch_step().

Here is the caller graph for this function:

◆ slider_behavior()

bool Slic3r::GUI::slider_behavior ( ImGuiID id,
const ImRect & region,
const ImS32 v_min,
const ImS32 v_max,
ImS32 * out_value,
ImRect * out_handle,
ImGuiSliderFlags flags,
const int fixed_value,
const ImVec4 & fixed_rect )
281{
282 ImGuiContext& context = *GImGui;
283 ImGuiIO& io = ImGui::GetIO();
284
285 const ImGuiAxis axis = (flags & ImGuiSliderFlags_Vertical) ? ImGuiAxis_Y : ImGuiAxis_X;
286
287 const ImVec2 handle_sz = out_handle->GetSize();
288 ImS32 v_range = (v_min < v_max ? v_max - v_min : v_min - v_max);
289 const float region_usable_sz = (region.Max[axis] - region.Min[axis]);
290 const float region_usable_pos_min = region.Min[axis];
291 const float region_usable_pos_max = region.Max[axis];
292
293 // Process interacting with the slider
294 ImS32 v_new = *out_value;
295 bool value_changed = false;
296
297 // drag behavior
298 if (context.ActiveId == id)
299 {
300 float mouse_pos_ratio = 0.0f;
301 if (context.ActiveIdSource == ImGuiInputSource_Mouse)
302 {
303 if (context.IO.MouseReleased[0])
304 {
305 ImGui::ClearActiveID();
306 }
307 if (context.IO.MouseDown[0])
308 {
309 const float mouse_abs_pos = context.IO.MousePos[axis];
310 mouse_pos_ratio = (region_usable_sz > 0.0f) ? ImClamp((mouse_abs_pos - region_usable_pos_min) / region_usable_sz, 0.0f, 1.0f) : 0.0f;
311 if (axis == ImGuiAxis_Y)
312 mouse_pos_ratio = 1.0f - mouse_pos_ratio;
313 v_new = v_min + (ImS32)(v_range * mouse_pos_ratio + 0.5f);
314 }
315 }
316 }
317 // click in fixed_rect behavior
318 if (ImGui::ItemHoverable(fixed_rect, id) && context.IO.MouseReleased[0])
319 {
320 v_new = fixed_value;
321 }
322
323 // apply result, output value
324 if (*out_value != v_new)
325 {
326 *out_value = v_new;
327 value_changed = true;
328 }
329
330 // Output handle position so it can be displayed by the caller
331 const ImS32 v_clamped = (v_min < v_max) ? ImClamp(*out_value, v_min, v_max) : ImClamp(*out_value, v_max, v_min);
332 float handle_pos_ratio = v_range != 0 ? ((float)(v_clamped - v_min) / (float)v_range) : 0.0f;
333 handle_pos_ratio = axis == ImGuiAxis_Y ? 1.0f - handle_pos_ratio : handle_pos_ratio;
334 const float handle_pos = region_usable_pos_min + (region_usable_pos_max - region_usable_pos_min) * handle_pos_ratio;
335
336 ImVec2 new_handle_center = axis == ImGuiAxis_Y ? ImVec2(out_handle->GetCenter().x, handle_pos) : ImVec2(handle_pos, out_handle->GetCenter().y);
337 *out_handle = ImRect(new_handle_center - handle_sz * 0.5f, new_handle_center + handle_sz * 0.5f);
338
339 return value_changed;
340}

References ImRect.

Referenced by Slic3r::GUI::IMSlider::horizontal_slider(), and Slic3r::GUI::IMSlider::vertical_slider().

Here is the caller graph for this function:

◆ smooth_cylinder()

GLModel::Geometry Slic3r::GUI::smooth_cylinder ( unsigned int resolution,
float radius,
float height )
1357{
1358 resolution = std::max<unsigned int>(4, resolution);
1359
1360 const unsigned int sectorCount = resolution;
1361 const float sectorStep = 2.0f * float(M_PI) / float(sectorCount);
1362
1363 GLModel::Geometry data;
1365 data.reserve_vertices(sectorCount * 4 + 2);
1366 data.reserve_indices(sectorCount * 4 * 3);
1367
1368 auto generate_vertices_on_circle = [sectorCount, sectorStep](float radius) {
1369 std::vector<Vec3f> ret;
1370 ret.reserve(sectorCount);
1371 for (unsigned int i = 0; i < sectorCount; ++i) {
1372 // from 0 to 2pi
1373 const float sectorAngle = sectorStep * i;
1374 ret.emplace_back(radius * std::cos(sectorAngle), radius * std::sin(sectorAngle), 0.0f);
1375 }
1376 return ret;
1377 };
1378
1379 const std::vector<Vec3f> base_vertices = generate_vertices_on_circle(radius);
1380 const Vec3f h = height * Vec3f::UnitZ();
1381
1382 // stem vertices
1383 for (unsigned int i = 0; i < sectorCount; ++i) {
1384 const Vec3f& v = base_vertices[i];
1385 const Vec3f n = v.normalized();
1386 data.add_vertex(v, n);
1387 data.add_vertex(v + h, n);
1388 }
1389
1390 // stem triangles
1391 for (unsigned int i = 0; i < sectorCount; ++i) {
1392 unsigned int v1 = i * 2;
1393 unsigned int v2 = (i < sectorCount - 1) ? v1 + 2 : 0;
1394 unsigned int v3 = v2 + 1;
1395 unsigned int v4 = v1 + 1;
1396 data.add_triangle(v1, v2, v3);
1397 data.add_triangle(v1, v3, v4);
1398 }
1399
1400 // bottom cap vertices
1401 Vec3f cap_center = Vec3f::Zero();
1402 unsigned int cap_center_id = data.vertices_count();
1403 Vec3f normal = -Vec3f::UnitZ();
1404
1405 data.add_vertex(cap_center, normal);
1406 for (unsigned int i = 0; i < sectorCount; ++i) {
1407 data.add_vertex(base_vertices[i], normal);
1408 }
1409
1410 // bottom cap triangles
1411 for (unsigned int i = 0; i < sectorCount; ++i) {
1412 data.add_triangle(cap_center_id, (i < sectorCount - 1) ? cap_center_id + i + 2 : cap_center_id + 1, cap_center_id + i + 1);
1413 }
1414
1415 // top cap vertices
1416 cap_center += h;
1417 cap_center_id = data.vertices_count();
1418 normal = -normal;
1419
1420 data.add_vertex(cap_center, normal);
1421 for (unsigned int i = 0; i < sectorCount; ++i) {
1422 data.add_vertex(base_vertices[i] + h, normal);
1423 }
1424
1425 // top cap triangles
1426 for (unsigned int i = 0; i < sectorCount; ++i) {
1427 data.add_triangle(cap_center_id, cap_center_id + i + 1, (i < sectorCount - 1) ? cap_center_id + i + 2 : cap_center_id + 1);
1428 }
1429
1430 return data;
1431}

References Slic3r::GUI::GLModel::Geometry::add_triangle(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::GUI::GLModel::Geometry::format, M_PI, Slic3r::normal(), Slic3r::GUI::GLModel::Geometry::P3N3, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), Slic3r::resolution(), Slic3r::GUI::GLModel::Geometry::Triangles, and Slic3r::GUI::GLModel::Geometry::vertices_count().

Referenced by Slic3r::GUI::GLGizmoBrimEars::GLGizmoBrimEars(), Slic3r::GUI::GLGizmoMeasure::GLGizmoMeasure(), Slic3r::GUI::Bed3D::Axes::render(), and Slic3r::GUI::Bed3D::render_gravity_arrow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ smooth_sphere()

GLModel::Geometry Slic3r::GUI::smooth_sphere ( unsigned int resolution,
float radius )
1294{
1295 resolution = std::max<unsigned int>(4, resolution);
1296
1297 const unsigned int sectorCount = resolution;
1298 const unsigned int stackCount = resolution;
1299
1300 const float sectorStep = float(2.0 * M_PI / sectorCount);
1301 const float stackStep = float(M_PI / stackCount);
1302
1303 GLModel::Geometry data;
1305 data.reserve_vertices((stackCount - 1) * sectorCount + 2);
1306 data.reserve_indices((2 * (stackCount - 1) * sectorCount) * 3);
1307
1308 // vertices
1309 for (unsigned int i = 0; i <= stackCount; ++i) {
1310 // from pi/2 to -pi/2
1311 const double stackAngle = 0.5 * M_PI - stackStep * i;
1312 const double xy = double(radius) * ::cos(stackAngle);
1313 const double z = double(radius) * ::sin(stackAngle);
1314 if (i == 0 || i == stackCount) {
1315 const Vec3f v(float(xy), 0.0f, float(z));
1316 data.add_vertex(v, (Vec3f)v.normalized());
1317 }
1318 else {
1319 for (unsigned int j = 0; j < sectorCount; ++j) {
1320 // from 0 to 2pi
1321 const double sectorAngle = sectorStep * j;
1322 const Vec3f v(float(xy * std::cos(sectorAngle)), float(xy * std::sin(sectorAngle)), float(z));
1323 data.add_vertex(v, (Vec3f)v.normalized());
1324 }
1325 }
1326 }
1327
1328 // triangles
1329 for (unsigned int i = 0; i < stackCount; ++i) {
1330 // Beginning of current stack.
1331 unsigned int k1 = (i == 0) ? 0 : (1 + (i - 1) * sectorCount);
1332 const unsigned int k1_first = k1;
1333 // Beginning of next stack.
1334 unsigned int k2 = (i == 0) ? 1 : (k1 + sectorCount);
1335 const unsigned int k2_first = k2;
1336 for (unsigned int j = 0; j < sectorCount; ++j) {
1337 // 2 triangles per sector excluding first and last stacks
1338 unsigned int k1_next = k1;
1339 unsigned int k2_next = k2;
1340 if (i != 0) {
1341 k1_next = (j + 1 == sectorCount) ? k1_first : (k1 + 1);
1342 data.add_triangle(k1, k2, k1_next);
1343 }
1344 if (i + 1 != stackCount) {
1345 k2_next = (j + 1 == sectorCount) ? k2_first : (k2 + 1);
1346 data.add_triangle(k1_next, k2, k2_next);
1347 }
1348 k1 = k1_next;
1349 k2 = k2_next;
1350 }
1351 }
1352
1353 return data;
1354}

References Slic3r::GUI::GLModel::Geometry::add_triangle(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::GUI::GLModel::Geometry::format, M_PI, Slic3r::GUI::GLModel::Geometry::P3N3, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), Slic3r::resolution(), and Slic3r::GUI::GLModel::Geometry::Triangles.

Referenced by Slic3r::GUI::GLGizmoMeasure::GLGizmoMeasure().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ smooth_torus()

GLModel::Geometry Slic3r::GUI::smooth_torus ( unsigned int primary_resolution,
unsigned int secondary_resolution,
float radius,
float thickness )
1434{
1435 const unsigned int torus_sector_count = std::max<unsigned int>(4, primary_resolution);
1436 const float torus_sector_step = 2.0f * float(M_PI) / float(torus_sector_count);
1437 const unsigned int section_sector_count = std::max<unsigned int>(4, secondary_resolution);
1438 const float section_sector_step = 2.0f * float(M_PI) / float(section_sector_count);
1439
1440 GLModel::Geometry data;
1442 data.reserve_vertices(torus_sector_count * section_sector_count);
1443 data.reserve_indices(torus_sector_count * section_sector_count * 2 * 3);
1444
1445 // vertices
1446 for (unsigned int i = 0; i < torus_sector_count; ++i) {
1447 const float section_angle = torus_sector_step * i;
1448 const float csa = std::cos(section_angle);
1449 const float ssa = std::sin(section_angle);
1450 const Vec3f section_center(radius * csa, radius * ssa, 0.0f);
1451 for (unsigned int j = 0; j < section_sector_count; ++j) {
1452 const float circle_angle = section_sector_step * j;
1453 const float thickness_xy = thickness * std::cos(circle_angle);
1454 const float thickness_z = thickness * std::sin(circle_angle);
1455 const Vec3f v(thickness_xy * csa, thickness_xy * ssa, thickness_z);
1456 data.add_vertex(section_center + v, (Vec3f)v.normalized());
1457 }
1458 }
1459
1460 // triangles
1461 for (unsigned int i = 0; i < torus_sector_count; ++i) {
1462 const unsigned int ii = i * section_sector_count;
1463 const unsigned int ii_next = ((i + 1) % torus_sector_count) * section_sector_count;
1464 for (unsigned int j = 0; j < section_sector_count; ++j) {
1465 const unsigned int j_next = (j + 1) % section_sector_count;
1466 const unsigned int i0 = ii + j;
1467 const unsigned int i1 = ii_next + j;
1468 const unsigned int i2 = ii_next + j_next;
1469 const unsigned int i3 = ii + j_next;
1470 data.add_triangle(i0, i1, i2);
1471 data.add_triangle(i0, i2, i3);
1472 }
1473 }
1474
1475 return data;
1476}

References Slic3r::GUI::GLModel::Geometry::add_triangle(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::GUI::GLModel::Geometry::format, M_PI, Slic3r::GUI::GLModel::Geometry::P3N3, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), and Slic3r::GUI::GLModel::Geometry::Triangles.

Here is the call graph for this function:

◆ sort_plugin_items_for_dialog()

template<class PluginItem>
void Slic3r::GUI::sort_plugin_items_for_dialog ( std::vector< PluginItem > & items,
PluginSortKey sort_key,
PluginSortOrder sort_order )
201 {
202 std::sort(items.begin(), items.end(),
203 [sort_key, sort_order](const PluginItem& lhs, const PluginItem& rhs)
204 {
205 if (const int cmp = compare_plugin_sort_key(lhs, rhs, sort_key); cmp != 0)
206 return sort_order == PluginSortOrder::Asc ? cmp < 0 : cmp > 0;
207 // why: ties fall back to ascending base order regardless of the primary direction.
208 return compare_plugin_base_order(lhs, rhs) < 0;
209 });
210 }

Referenced by Slic3r::GUI::PluginsDialog::build_plugins_payload().

Here is the caller graph for this function:

◆ sort_sequential_clearance_instances()

void Slic3r::GUI::sort_sequential_clearance_instances ( std::vector< SequentialClearanceInstance >::iterator first,
std::vector< SequentialClearanceInstance >::iterator last,
const std::map< ObjectID, int > & print_order )
inline
28{
29 if (!std::all_of(first, last, [&print_order](const SequentialClearanceInstance& instance) {
30 const auto order = print_order.find(instance.instance_id);
31 return order != print_order.end() && order->second > 0;
32 }))
33 return;
34
35 std::stable_sort(first, last, [&print_order](const SequentialClearanceInstance& lhs, const SequentialClearanceInstance& rhs) {
36 return print_order.at(lhs.instance_id) < print_order.at(rhs.instance_id);
37 });
38}
ObjectID instance_id
Definition SequentialPrintClearance.hpp:20
Definition SequentialPrintClearance.hpp:16

References Slic3r::GUI::SequentialClearanceInstance::instance_id.

Referenced by Slic3r::GUI::GLCanvas3D::update_sequential_clearance().

Here is the caller graph for this function:

◆ spin_frame()

wxWindow * Slic3r::GUI::spin_frame ( wxWindow * spin)
static
343{ return spin->GetParent(); }

Referenced by Slic3r::GUI::DesignPanel::DesignPanel().

Here is the caller graph for this function:

◆ standard_base_color_for()

DecomposeBaseColor Slic3r::GUI::standard_base_color_for ( DecomposeMode mode,
const wxColour & color )
static
113{
114 if (mode == DecomposeMode::CMYW) {
115 if (same_rgb(color, CMYW_CYAN)) return DecomposeBaseColor::Cyan;
119 } else if (mode == DecomposeMode::RYBW) {
120 if (same_rgb(color, RYBW_RED)) return DecomposeBaseColor::Red;
122 if (same_rgb(color, RYBW_BLUE)) return DecomposeBaseColor::Blue;
124 }
126}
static bool same_rgb(const wxColour &lhs, const wxColour &rhs)
Definition ColorDecomposeDialog.cpp:82
static const wxColour RYBW_WHITE(255, 255, 255)
static const wxColour RYBW_YELLOW(255, 255, 0)

References Blue, CMYW_CYAN(), CMYW_MAGENTA(), CMYW_WHITE(), CMYW_YELLOW(), Cyan, Magenta, None, Red, RYBW_BLUE(), RYBW_RED(), RYBW_WHITE(), RYBW_YELLOW(), same_rgb(), White, and Yellow.

Referenced by to_dialog_result().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ standard_base_color_from_key()

DecomposeBaseColor Slic3r::GUI::standard_base_color_from_key ( const std::string & key)
static
88{
89 if (key == "Cyan") return DecomposeBaseColor::Cyan;
90 if (key == "Magenta") return DecomposeBaseColor::Magenta;
91 if (key == "Yellow") return DecomposeBaseColor::Yellow;
92 if (key == "White") return DecomposeBaseColor::White;
93 if (key == "Red") return DecomposeBaseColor::Red;
94 if (key == "Green") return DecomposeBaseColor::Green;
95 if (key == "Blue") return DecomposeBaseColor::Blue;
97}

References Blue, Cyan, Green, Magenta, None, Red, White, and Yellow.

Referenced by to_dialog_result().

Here is the caller graph for this function:

◆ start_mcp_control_if_enabled()

void Slic3r::GUI::start_mcp_control_if_enabled ( )
2286{
2287 const char* env = std::getenv("ORCA_CAD_MCP");
2288 if (!env || !*env) return;
2289 std::string path = (std::strcmp(env, "1") == 0) ? "/tmp/orca-cad-mcp.sock" : env;
2290 static bool started = false;
2291 if (started) return;
2292 started = true;
2293 std::thread(server_thread, path).detach();
2294}

Referenced by Slic3r::GUI::MainFrame::init_tabpanel().

Here is the caller graph for this function:

◆ start_new_gcodeviewer()

void Slic3r::GUI::start_new_gcodeviewer ( const wxString * path_to_open)
150{
152}
static void start_new_slicer_or_gcodeviewer(const NewSlicerInstanceType instance_type, const std::vector< wxString > paths_to_open, bool single_instance)
Definition Process.cpp:43

References GCodeViewer, and start_new_slicer_or_gcodeviewer().

Referenced by start_new_gcodeviewer_open_file().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_new_gcodeviewer_open_file()

void Slic3r::GUI::start_new_gcodeviewer_open_file ( wxWindow * parent)
155{
156 wxFileDialog dialog(parent ? parent : wxGetApp().GetTopWindow(),
157 _L("Open G-code file:"),
158 from_u8(wxGetApp().app_config->get_last_dir()), wxString(),
159 file_wildcards(FT_GCODE), wxFD_OPEN | wxFD_FILE_MUST_EXIST);
160 if (dialog.ShowModal() == wxID_OK) {
161 wxString path = dialog.GetPath();
163 }
164}
wxString file_wildcards(FileType file_type, const std::string &custom_extension)
Definition GUI_App.cpp:695
void start_new_gcodeviewer(const wxString *path_to_open)
Definition Process.cpp:149

References _L, file_wildcards(), from_u8(), FT_GCODE, and start_new_gcodeviewer().

Here is the call graph for this function:

◆ start_new_slicer() [1/2]

void Slic3r::GUI::start_new_slicer ( const std::vector< wxString > & files,
bool single_instance )
145{
147}

References Slicer, and start_new_slicer_or_gcodeviewer().

Here is the call graph for this function:

◆ start_new_slicer() [2/2]

void Slic3r::GUI::start_new_slicer ( const wxString * path_to_open,
bool single_instance )
141{
143}

References Slicer, and start_new_slicer_or_gcodeviewer().

Referenced by Slic3r::GUI::MainFrame::init_menubar_as_editor(), and Slic3r::GUI::MainFrame::init_menubar_as_gcodeviewer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_new_slicer_or_gcodeviewer() [1/2]

void Slic3r::GUI::start_new_slicer_or_gcodeviewer ( const NewSlicerInstanceType instance_type,
const std::vector< wxString > paths_to_open,
bool single_instance )
static
44{
45#ifdef _WIN32
46 wxString path;
47 wxFileName::SplitPath(wxStandardPaths::Get().GetExecutablePath(), &path, nullptr, nullptr, wxPATH_NATIVE);
48 path += "\\";
49 path += (instance_type == NewSlicerInstanceType::Slicer) ? "orca-slicer.exe" : "bambu-gcodeviewer.exe";
50 std::vector<const wchar_t*> args;
51 args.reserve(4);
52 args.emplace_back(path.wc_str());
53 if (!paths_to_open.empty()) {
54 for (const auto& file : paths_to_open)
55 args.emplace_back(file);
56 }
57 if (instance_type == NewSlicerInstanceType::Slicer && single_instance)
58 args.emplace_back(L"--single-instance");
59 args.emplace_back(nullptr);
60 BOOST_LOG_TRIVIAL(info) << "Trying to spawn a new slicer \"" << into_u8(path) << "\"";
61 // Don't call with wxEXEC_HIDE_CONSOLE, OrcaSlicer in GUI mode would just show the splash screen. It would not open the main window though, it would
62 // just hang in the background.
63 if (wxExecute(const_cast<wchar_t**>(args.data()), wxEXEC_ASYNC) <= 0)
64 BOOST_LOG_TRIVIAL(error) << "Failed to spawn a new slicer \"" << into_u8(path);
65#else
66 // Own executable path.
67 boost::filesystem::path bin_path = into_path(wxStandardPaths::Get().GetExecutablePath());
68#if defined(__APPLE__)
69 {
70 auto bundle_path = bin_path.parent_path().parent_path().parent_path();
71 //bin_path = bin_path.parent_path() / "OrcaSlicer";
72 bin_path = "/usr/bin/open";
73 // On Apple the wxExecute fails, thus we use boost::process instead.
74 BOOST_LOG_TRIVIAL(info) << "Trying to spawn a new slicer \"" << bin_path.string() << "\"";
75 try {
76 std::vector<std::string> args = { "-n", "-a", bundle_path.string()};
77 if (!paths_to_open.empty()) {
78 for (const auto& file : paths_to_open)
79 args.emplace_back(into_u8(file));
80 }
81 args.emplace_back("--args");
82 if (instance_type == NewSlicerInstanceType::GCodeViewer)
83 args.emplace_back("--gcodeviewer");
84 if (instance_type == NewSlicerInstanceType::Slicer && single_instance)
85 args.emplace_back("--single-instance");
86 boost::process::spawn(bin_path, args);
87 }
88 catch (const std::exception& ex) {
89 BOOST_LOG_TRIVIAL(error) << "Failed to spawn a new slicer \"" << bin_path.string() << "\": " << ex.what();
90 }
91 }
92#else // Linux or Unix
93 {
94 std::vector<const char*> args;
95 args.reserve(3);
96#ifdef __linux__
97 static const char* gcodeviewer_param = "--gcodeviewer";
98 {
99 // If executed by an AppImage, start the AppImage, not the main process.
100 // see https://docs.appimage.org/packaging-guide/environment-variables.html#id2
101 const char* appimage_binary = std::getenv("APPIMAGE");
102 if (appimage_binary) {
103 args.emplace_back(appimage_binary);
104 if (instance_type == NewSlicerInstanceType::GCodeViewer)
105 args.emplace_back(gcodeviewer_param);
106 }
107 }
108#endif // __linux__
109 std::string my_path;
110 if (args.empty()) {
111 // Binary path was not set to the AppImage in the Linux specific block above, call the application directly.
112 my_path = (bin_path.parent_path() / ((instance_type == NewSlicerInstanceType::Slicer) ? "orca-slicer" : "bambu-gcodeviewer")).string();
113 args.emplace_back(my_path.c_str());
114 }
115 std::string to_open;
116 if (!paths_to_open.empty()) {
117 for (const auto& file : paths_to_open) {
118 to_open = into_u8(file);
119 args.emplace_back(to_open.c_str());
120 }
121 }
122 if (instance_type == NewSlicerInstanceType::Slicer && single_instance)
123 args.emplace_back("--single-instance");
124 args.emplace_back(nullptr);
125 BOOST_LOG_TRIVIAL(info) << "Trying to spawn a new slicer \"" << args[0] << "\"";
126 if (wxExecute(const_cast<char**>(args.data()), wxEXEC_ASYNC | wxEXEC_MAKE_GROUP_LEADER) <= 0)
127 BOOST_LOG_TRIVIAL(error) << "Failed to spawn a new slicer \"" << args[0];
128 }
129#endif // Linux or Unix
130#endif // Win32
131}
boost::filesystem::path into_path(const wxString &str)
Definition GUI.cpp:564

References GCodeViewer, into_path(), into_u8(), L, and Slicer.

Referenced by start_new_gcodeviewer(), start_new_slicer(), start_new_slicer(), and start_new_slicer_or_gcodeviewer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_new_slicer_or_gcodeviewer() [2/2]

void Slic3r::GUI::start_new_slicer_or_gcodeviewer ( const NewSlicerInstanceType instance_type,
const wxString * path_to_open,
bool single_instance )
static
133{
134 std::vector<wxString> paths;
135 if (path_to_open != nullptr)
136 paths.emplace_back(path_to_open->wc_str());
137 start_new_slicer_or_gcodeviewer(instance_type, paths, single_instance);
138}

References start_new_slicer_or_gcodeviewer().

Here is the call graph for this function:

◆ start_ping_test()

void Slic3r::GUI::start_ping_test ( )
361{
362 return;
363 wxArrayString output;
364 wxExecute("ping www.amazon.com", output, wxEXEC_NODISABLE);
365
366 wxString output_i;
367 std::string output_temp;
368
369 for (int i = 0; i < output.size(); i++) {
370 output_i = output[i].To8BitData();
371 output_temp = output_i.ToStdString(wxConvUTF8);
372 BOOST_LOG_TRIVIAL(info) << "ping amazon:" << output_temp;
373
374 }
375 wxExecute("ping www.apple.com", output, wxEXEC_NODISABLE);
376 for (int i = 0; i < output.size(); i++) {
377 output_i = output[i].To8BitData();
378 output_temp = output_i.ToStdString(wxConvUTF8);
379 BOOST_LOG_TRIVIAL(info) << "ping www.apple.com:" << output_temp;
380 }
381 wxExecute("ping www.bambulab.com", output, wxEXEC_NODISABLE);
382 for (int i = 0; i < output.size(); i++) {
383 output_i = output[i].To8BitData();
384 output_temp = output_i.ToStdString(wxConvUTF8);
385 BOOST_LOG_TRIVIAL(info) << "ping bambulab:" << output_temp;
386 }
387 //Get GateWay IP
388 wxExecute("ping 192.168.0.1", output, wxEXEC_NODISABLE);
389 for (int i = 0; i < output.size(); i++) {
390 output_i = output[i].To8BitData();
391 output_temp = output_i.ToStdString(wxConvUTF8);
392 BOOST_LOG_TRIVIAL(info) << "ping 192.168.0.1:" << output_temp;
393 }
394}

Referenced by Slic3r::GUI::MediaPlayCtrl::Stop().

Here is the caller graph for this function:

◆ starts_with_preset_name()

bool Slic3r::GUI::starts_with_preset_name ( const std::string & name,
const char * prefix )
static
441{
442 const size_t prefix_len = std::strlen(prefix);
443 return name.size() >= prefix_len && name.compare(0, prefix_len, prefix) == 0;
444}

Referenced by resolve_default_virtual_filament_preset_name().

Here is the caller graph for this function:

◆ staticbox_remove_margin()

void Slic3r::GUI::staticbox_remove_margin ( wxStaticBox * sb)
19 {
20 NSBox* nativeBox = (NSBox*)sb->GetHandle();
21 [nativeBox setBoxType:NSBoxCustom];
22 [nativeBox setBorderWidth:0];
23}

Referenced by LabeledStaticBox::Create().

Here is the caller graph for this function:

◆ stilized_arrow()

GLModel::Geometry Slic3r::GUI::stilized_arrow ( unsigned int resolution,
float tip_radius,
float tip_height,
float stem_radius,
float stem_height )
914{
915 resolution = std::max<unsigned int>(4, resolution);
916
919 data.reserve_vertices(6 * resolution + 2);
920 data.reserve_indices(6 * resolution * 3);
921
922 const float angle_step = 2.0f * float(PI) / float(resolution);
923 std::vector<float> cosines(resolution);
924 std::vector<float> sines(resolution);
925
926 for (unsigned int i = 0; i < resolution; ++i) {
927 const float angle = angle_step * float(i);
928 cosines[i] = ::cos(angle);
929 sines[i] = -::sin(angle);
930 }
931
932 const float total_height = tip_height + stem_height;
933
934 // tip vertices/normals
935 data.add_vertex(Vec3f(0.0f, 0.0f, total_height), (Vec3f)Vec3f::UnitZ());
936 for (unsigned int i = 0; i < resolution; ++i) {
937 data.add_vertex(Vec3f(tip_radius * sines[i], tip_radius * cosines[i], stem_height), Vec3f(sines[i], cosines[i], 0.0f));
938 }
939
940 // tip triangles
941 for (unsigned int i = 0; i < resolution; ++i) {
942 const unsigned int v3 = (i < resolution - 1) ? i + 2 : 1;
943 data.add_triangle(0, i + 1, v3);
944 }
945
946 // tip cap outer perimeter vertices
947 for (unsigned int i = 0; i < resolution; ++i) {
948 data.add_vertex(Vec3f(tip_radius * sines[i], tip_radius * cosines[i], stem_height), (Vec3f)(-Vec3f::UnitZ()));
949 }
950
951 // tip cap inner perimeter vertices
952 for (unsigned int i = 0; i < resolution; ++i) {
953 data.add_vertex(Vec3f(stem_radius * sines[i], stem_radius * cosines[i], stem_height), (Vec3f)(-Vec3f::UnitZ()));
954 }
955
956 // tip cap triangles
957 for (unsigned int i = 0; i < resolution; ++i) {
958 const unsigned int v2 = (i < resolution - 1) ? i + resolution + 2 : resolution + 1;
959 const unsigned int v3 = (i < resolution - 1) ? i + 2 * resolution + 2 : 2 * resolution + 1;
960 data.add_triangle(i + resolution + 1, v3, v2);
961 data.add_triangle(i + resolution + 1, i + 2 * resolution + 1, v3);
962 }
963
964 // stem bottom vertices
965 for (unsigned int i = 0; i < resolution; ++i) {
966 data.add_vertex(Vec3f(stem_radius * sines[i], stem_radius * cosines[i], stem_height), Vec3f(sines[i], cosines[i], 0.0f));
967 }
968
969 // stem top vertices
970 for (unsigned int i = 0; i < resolution; ++i) {
971 data.add_vertex(Vec3f(stem_radius * sines[i], stem_radius * cosines[i], 0.0f), Vec3f(sines[i], cosines[i], 0.0f));
972 }
973
974 // stem triangles
975 for (unsigned int i = 0; i < resolution; ++i) {
976 const unsigned int v2 = (i < resolution - 1) ? i + 3 * resolution + 2 : 3 * resolution + 1;
977 const unsigned int v3 = (i < resolution - 1) ? i + 4 * resolution + 2 : 4 * resolution + 1;
978 data.add_triangle(i + 3 * resolution + 1, v3, v2);
979 data.add_triangle(i + 3 * resolution + 1, i + 4 * resolution + 1, v3);
980 }
981
982 // stem cap vertices
983 data.add_vertex((Vec3f)Vec3f::Zero(), (Vec3f)(-Vec3f::UnitZ()));
984 for (unsigned int i = 0; i < resolution; ++i) {
985 data.add_vertex(Vec3f(stem_radius * sines[i], stem_radius * cosines[i], 0.0f), (Vec3f)(-Vec3f::UnitZ()));
986 }
987
988 // stem cap triangles
989 for (unsigned int i = 0; i < resolution; ++i) {
990 const unsigned int v3 = (i < resolution - 1) ? i + 5 * resolution + 3 : 5 * resolution + 2;
991 data.add_triangle(5 * resolution + 1, v3, i + 5 * resolution + 2);
992 }
993
994 return data;
995}

References Slic3r::GUI::GLModel::Geometry::add_triangle(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::angle(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::GUI::GLModel::Geometry::P3N3, PI, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), Slic3r::resolution(), and Slic3r::GUI::GLModel::Geometry::Triangles.

Referenced by Slic3r::GUI::GCodeViewer::SequentialView::Marker::init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop_current_job()

bool Slic3r::GUI::stop_current_job ( Worker & w,
unsigned timeout_ms = 0 )
inline
107{
108 w.cancel();
109 return w.wait_for_current_job(timeout_ms);
110}
virtual bool wait_for_current_job(unsigned timeout_ms=0)=0
virtual void cancel()=0

References Slic3r::GUI::Worker::cancel(), and Slic3r::GUI::Worker::wait_for_current_job().

Here is the call graph for this function:

◆ stop_queue()

bool Slic3r::GUI::stop_queue ( Worker & w,
unsigned timeout_ms = 0 )
inline
115{
116 w.cancel_all();
117 return w.wait_for_idle(timeout_ms);
118}
virtual bool wait_for_idle(unsigned timeout_ms=0)=0

References Slic3r::GUI::Worker::cancel_all(), and Slic3r::GUI::Worker::wait_for_idle().

Referenced by Slic3r::GUI::Plater::reslice().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ str_is_all_digit()

bool Slic3r::GUI::str_is_all_digit ( const std::string & str)
static
244 {
245 for (const char &c : str) {
246 if (!std::isdigit(c)) return false;
247 }
248 return true;
249}

Referenced by Slic3r::GUI::CreateFilamentPresetDialog::create_dialog_buttons().

Here is the caller graph for this function:

◆ straight_arrow()

GLModel::Geometry Slic3r::GUI::straight_arrow ( float tip_width,
float tip_height,
float stem_width,
float stem_height,
float thickness )
1162{
1163 GLModel::Geometry data;
1165 data.reserve_vertices(42);
1166 data.reserve_indices(72);
1167
1168 const float half_thickness = 0.5f * thickness;
1169 const float half_stem_width = 0.5f * stem_width;
1170 const float half_tip_width = 0.5f * tip_width;
1171 const float total_height = tip_height + stem_height;
1172
1173 // top face vertices
1174 data.add_vertex(Vec3f(half_stem_width, 0.0f, half_thickness), (Vec3f)Vec3f::UnitZ());
1175 data.add_vertex(Vec3f(half_stem_width, stem_height, half_thickness), (Vec3f)Vec3f::UnitZ());
1176 data.add_vertex(Vec3f(half_tip_width, stem_height, half_thickness), (Vec3f)Vec3f::UnitZ());
1177 data.add_vertex(Vec3f(0.0f, total_height, half_thickness), (Vec3f)Vec3f::UnitZ());
1178 data.add_vertex(Vec3f(-half_tip_width, stem_height, half_thickness), (Vec3f)Vec3f::UnitZ());
1179 data.add_vertex(Vec3f(-half_stem_width, stem_height, half_thickness), (Vec3f)Vec3f::UnitZ());
1180 data.add_vertex(Vec3f(-half_stem_width, 0.0f, half_thickness), (Vec3f)Vec3f::UnitZ());
1181
1182 // top face triangles
1183 data.add_triangle(0, 1, 6);
1184 data.add_triangle(6, 1, 5);
1185 data.add_triangle(4, 5, 3);
1186 data.add_triangle(5, 1, 3);
1187 data.add_triangle(1, 2, 3);
1188
1189 // bottom face vertices
1190 data.add_vertex(Vec3f(half_stem_width, 0.0f, -half_thickness), (Vec3f)(-Vec3f::UnitZ()));
1191 data.add_vertex(Vec3f(half_stem_width, stem_height, -half_thickness), (Vec3f)(-Vec3f::UnitZ()));
1192 data.add_vertex(Vec3f(half_tip_width, stem_height, -half_thickness), (Vec3f)(-Vec3f::UnitZ()));
1193 data.add_vertex(Vec3f(0.0f, total_height, -half_thickness), (Vec3f)(-Vec3f::UnitZ()));
1194 data.add_vertex(Vec3f(-half_tip_width, stem_height, -half_thickness), (Vec3f)(-Vec3f::UnitZ()));
1195 data.add_vertex(Vec3f(-half_stem_width, stem_height, -half_thickness), (Vec3f)(-Vec3f::UnitZ()));
1196 data.add_vertex(Vec3f(-half_stem_width, 0.0f, -half_thickness), (Vec3f)(-Vec3f::UnitZ()));
1197
1198 // bottom face triangles
1199 data.add_triangle(7, 13, 8);
1200 data.add_triangle(13, 12, 8);
1201 data.add_triangle(12, 11, 10);
1202 data.add_triangle(8, 12, 10);
1203 data.add_triangle(9, 8, 10);
1204
1205 // side faces vertices
1206 data.add_vertex(Vec3f(half_stem_width, 0.0f, -half_thickness), (Vec3f)Vec3f::UnitX());
1207 data.add_vertex(Vec3f(half_stem_width, stem_height, -half_thickness), (Vec3f)Vec3f::UnitX());
1208 data.add_vertex(Vec3f(half_stem_width, 0.0f, half_thickness), (Vec3f)Vec3f::UnitX());
1209 data.add_vertex(Vec3f(half_stem_width, stem_height, half_thickness), (Vec3f)Vec3f::UnitX());
1210
1211 data.add_vertex(Vec3f(half_stem_width, stem_height, -half_thickness), (Vec3f)(-Vec3f::UnitY()));
1212 data.add_vertex(Vec3f(half_tip_width, stem_height, -half_thickness), (Vec3f)(-Vec3f::UnitY()));
1213 data.add_vertex(Vec3f(half_stem_width, stem_height, half_thickness), (Vec3f)(-Vec3f::UnitY()));
1214 data.add_vertex(Vec3f(half_tip_width, stem_height, half_thickness), (Vec3f)(-Vec3f::UnitY()));
1215
1216 Vec3f normal(tip_height, half_tip_width, 0.0f);
1217 normal.normalize();
1218 data.add_vertex(Vec3f(half_tip_width, stem_height, -half_thickness), normal);
1219 data.add_vertex(Vec3f(0.0f, total_height, -half_thickness), normal);
1220 data.add_vertex(Vec3f(half_tip_width, stem_height, half_thickness), normal);
1221 data.add_vertex(Vec3f(0.0f, total_height, half_thickness), normal);
1222
1223 normal = { -tip_height, half_tip_width, 0.0f };
1224 normal.normalize();
1225 data.add_vertex(Vec3f(0.0f, total_height, -half_thickness), normal);
1226 data.add_vertex(Vec3f(-half_tip_width, stem_height, -half_thickness), normal);
1227 data.add_vertex(Vec3f(0.0f, total_height, half_thickness), normal);
1228 data.add_vertex(Vec3f(-half_tip_width, stem_height, half_thickness), normal);
1229
1230 data.add_vertex(Vec3f(-half_tip_width, stem_height, -half_thickness), (Vec3f)(-Vec3f::UnitY()));
1231 data.add_vertex(Vec3f(-half_stem_width, stem_height, -half_thickness), (Vec3f)(-Vec3f::UnitY()));
1232 data.add_vertex(Vec3f(-half_tip_width, stem_height, half_thickness), (Vec3f)(-Vec3f::UnitY()));
1233 data.add_vertex(Vec3f(-half_stem_width, stem_height, half_thickness), (Vec3f)(-Vec3f::UnitY()));
1234
1235 data.add_vertex(Vec3f(-half_stem_width, stem_height, -half_thickness), (Vec3f)(-Vec3f::UnitX()));
1236 data.add_vertex(Vec3f(-half_stem_width, 0.0f, -half_thickness), (Vec3f)(-Vec3f::UnitX()));
1237 data.add_vertex(Vec3f(-half_stem_width, stem_height, half_thickness), (Vec3f)(-Vec3f::UnitX()));
1238 data.add_vertex(Vec3f(-half_stem_width, 0.0f, half_thickness), (Vec3f)(-Vec3f::UnitX()));
1239
1240 data.add_vertex(Vec3f(-half_stem_width, 0.0f, -half_thickness), (Vec3f)(-Vec3f::UnitY()));
1241 data.add_vertex(Vec3f(half_stem_width, 0.0f, -half_thickness), (Vec3f)(-Vec3f::UnitY()));
1242 data.add_vertex(Vec3f(-half_stem_width, 0.0f, half_thickness), (Vec3f)(-Vec3f::UnitY()));
1243 data.add_vertex(Vec3f(half_stem_width, 0.0f, half_thickness), (Vec3f)(-Vec3f::UnitY()));
1244
1245 // side face triangles
1246 for (unsigned int i = 0; i < 7; ++i) {
1247 const unsigned int ii = i * 4;
1248 data.add_triangle(14 + ii, 15 + ii, 17 + ii);
1249 data.add_triangle(14 + ii, 17 + ii, 16 + ii);
1250 }
1251
1252 return data;
1253}

References Slic3r::GUI::GLModel::Geometry::add_triangle(), Slic3r::GUI::GLModel::Geometry::add_vertex(), Slic3r::GUI::GLModel::Geometry::format, Slic3r::normal(), Slic3r::GUI::GLModel::Geometry::P3N3, Slic3r::GUI::GLModel::Geometry::reserve_indices(), Slic3r::GUI::GLModel::Geometry::reserve_vertices(), and Slic3r::GUI::GLModel::Geometry::Triangles.

Referenced by Slic3r::GUI::Selection::init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ string_getter()

bool Slic3r::GUI::string_getter ( const bool is_undo,
int idx,
const char ** out_text )
static
6550{
6551 return wxGetApp().plater()->undo_redo_string_getter(is_undo, idx, out_text);
6552}

◆ StringReplace()

void Slic3r::GUI::StringReplace ( std::string & strBase,
std::string strSrc,
std::string strDes )
1769{
1770 std::string::size_type pos = 0;
1771 std::string::size_type srcLen = strSrc.size();
1772 std::string::size_type desLen = strDes.size();
1773 pos = strBase.find(strSrc, pos);
1774 while ((pos != std::string::npos)) {
1775 strBase.replace(pos, srcLen, strDes);
1776 pos = strBase.find(strSrc, (pos + desLen));
1777 }
1778}

Referenced by Slic3r::GUI::GuideFrame::LoadProfileFamily().

Here is the caller graph for this function:

◆ style_sidebar_icon_btn()

void Slic3r::GUI::style_sidebar_icon_btn ( ::Button * b)
static
248{
249 b->SetPaddingSize(b->FromDIP(wxSize(2, 2)));
250 b->SetMinSize(b->FromDIP(wxSize(24, 24))); // square, whatever the icon size
251 b->SetCornerRadius(b->FromDIP(4));
253 std::pair<wxColour, int>(wxColour(DesignRowList::hover_chip), StateColor::Hovered), // dark-mapped at paint
254 std::pair<wxColour, int>(dp_panel_bg(), StateColor::Normal))); // must stay last
255}
void SetMinSize(const wxSize &size) override
Definition Button.cpp:112
void SetPaddingSize(const wxSize &size)
Definition Button.cpp:124
static constexpr const char * hover_chip
Definition DesignRowList.hpp:54
void SetCornerRadius(double radius)
Definition StaticBox.cpp:62
static wxColour dp_panel_bg()
Definition DesignPanel.cpp:213

References dp_panel_bg(), Slic3r::GUI::DesignRowList::hover_chip, StateColor::Hovered, StateColor::Normal, StaticBox::SetBackgroundColor(), StaticBox::SetCornerRadius(), Button::SetMinSize(), and Button::SetPaddingSize().

Referenced by Slic3r::GUI::DesignPanel::refresh_icons(), and sidebar_icon_btn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ substitution_message()

wxString Slic3r::GUI::substitution_message ( const wxString & changes)
static
423{
424 return
425 _L("The configuration may be generated by a newer version of OrcaSlicer.") + " " +
426 _L("Some values have been replaced. Please check them:") + "\n" + changes + "\n";
427}

References _L.

Referenced by show_substitutions_info(), and show_substitutions_info().

Here is the caller graph for this function:

◆ substruct()

std::vector< std::string > Slic3r::GUI::substruct ( std::vector< std::string > const & l,
std::vector< std::string > const & r )
static
3714{
3715 std::vector<std::string> t;
3716 std::copy_if(l.begin(), l.end(), std::back_inserter(t), [&r](auto & e) { return std::find(r.begin(), r.end(), e) == r.end(); });
3717 return t;
3718}

References substruct().

Referenced by substruct(), and Slic3r::GUI::TabPrintModel::update_model_config().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ support_combo_value_for_config()

wxString Slic3r::GUI::support_combo_value_for_config ( const DynamicPrintConfig & config,
bool is_fff )
static
2033{
2034 const std::string support = is_fff ? "enable_support" : "supports_enable";
2035 const std::string buildplate_only = is_fff ? "support_on_build_plate_only" : "support_buildplate_only";
2036
2037 // BBS
2038#if 0
2039 return
2040 ! config.opt_bool(support) ?
2041 _("None") :
2042 (is_fff && !config.opt_bool("support_material_auto")) ?
2043 _("For support enforcers only") :
2044 (config.opt_bool(buildplate_only) ? _("Support on build plate only") :
2045 _("Everywhere"));
2046#else
2047 if (config.opt_bool(support)) {
2048 return (config.opt_bool(buildplate_only) ? _("Support on build plate only") : _("Everywhere"));
2049 } else {
2050 return _("For support enforcers only");
2051 }
2052#endif
2053}

References _, Slic3r::DynamicConfig::opt_bool(), and support_combo_value_for_config().

Referenced by Slic3r::GUI::Tab::on_value_change(), support_combo_value_for_config(), and Slic3r::GUI::Tab::update_frequently_changed_parameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ support_nozzle_volume()

bool Slic3r::GUI::support_nozzle_volume ( const MachineObject * obj)
75{
76 if (!obj)
77 return false;
78 Preset * machine_preset = get_printer_preset(obj);
79 if (machine_preset) {
80 int extruder_nums = machine_preset->config.option<ConfigOptionFloatsNullable>("nozzle_diameter")->values.size();
81 auto nozzle_volume_opt = machine_preset->config.option<ConfigOptionFloatsNullable>("nozzle_volume");
82 if (nozzle_volume_opt) {
83 int printer_variant_size = nozzle_volume_opt->values.size();
84 return (printer_variant_size / extruder_nums) > 1;
85 }
86 }
87 return false;
88}
Preset * get_printer_preset(const MachineObject *obj)
Definition Plater.cpp:19913

References Slic3r::Preset::config, get_printer_preset(), and Slic3r::ConfigBase::option().

Referenced by Slic3r::GUI::EditCalibrationHistoryDialog::EditCalibrationHistoryDialog(), Slic3r::GUI::NewCalibrationHistoryDialog::NewCalibrationHistoryDialog(), Slic3r::GUI::NewCalibrationHistoryDialog::on_ok(), Slic3r::GUI::EditCalibrationHistoryDialog::on_save(), and Slic3r::GUI::HistoryWindow::sync_history_data().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ switch_window_pools()

void Slic3r::GUI::switch_window_pools ( )
860{
861 for (auto p : spools) {
862 spools2.push_back(*p);
863 *p = new std::deque<wxWindow*>;
864 }
865}
std::vector< std::deque< wxWindow * > ** > spools
Definition Field.cpp:856

References spools, and spools2.

Referenced by Slic3r::GUI::GUI_App::recreate_GUI().

Here is the caller graph for this function:

◆ sync_loaded_project_filament_config()

void Slic3r::GUI::sync_loaded_project_filament_config ( DynamicConfig & proj_cfg)
static
8888{
8889 ConfigOptionStrings* filament_color = proj_cfg.opt<ConfigOptionStrings>("filament_colour");
8890 if (filament_color) {
8891 size_t filament_count = filament_color->size();
8892
8893 // Sync filament map
8894 ConfigOptionInts* filament_map = proj_cfg.opt<ConfigOptionInts>("filament_map", true);
8895 if (filament_map->size() != filament_count) {
8896 filament_map->values.resize(filament_count, 1);
8897 }
8898
8899 ConfigOptionInts* filament_nozzle_map = proj_cfg.opt<ConfigOptionInts>("filament_nozzle_map", true);
8900 if (filament_nozzle_map->size() != filament_count) {
8901 filament_nozzle_map->values.resize(filament_count, 0);
8902 }
8903
8904 ConfigOptionInts* filament_volume_map = proj_cfg.opt<ConfigOptionInts>("filament_volume_map", true);
8905 if (filament_volume_map->size() != filament_count) {
8906 filament_volume_map->values.resize(filament_count, static_cast<int>(NozzleVolumeType::nvtStandard));
8907 }
8908
8909 // Sync filament multi colour
8910 ConfigOptionStrings* filament_multi_color = proj_cfg.opt<ConfigOptionStrings>("filament_multi_colour", true);
8911 if (filament_multi_color->size() != filament_count) {
8912 filament_multi_color->values.resize(filament_count);
8913 }
8914 // If there is no multi-color data or color is not match, use single color as default value
8915 for (size_t i = 0; i < filament_count; i++) {
8916 std::vector<std::string> colors = Slic3r::split_string(filament_multi_color->values[i], ' ');
8917 if (i >= filament_multi_color->values.size() || colors.empty() || colors[0] != filament_color->values[i] ) {
8918 filament_multi_color->values[i] = filament_color->values[i];
8919 }
8920 }
8921 // Sync filament colour type
8922 ConfigOptionStrings* filament_color_type = proj_cfg.opt<ConfigOptionStrings>("filament_colour_type", true);
8923 if (filament_color_type && filament_color_type->size() != filament_count) {
8924 filament_color_type->values.resize(filament_count);
8925
8926 for (size_t i = 0; i < filament_count; i++) {
8927 if (i >= filament_color_type->values.size() || filament_color_type->values[i].empty()) {
8928 filament_color_type->values[i] = "1";
8929 }
8930 }
8931 }
8932 }
8933
8934 // Filament Track Switch state is derived live from the connected
8935 // printer; a loaded project must not carry a stale installed/active
8936 // flag, so clear both and let device sync re-derive them.
8937 if (auto* has_switcher = proj_cfg.opt<ConfigOptionBool>("has_filament_switcher"))
8938 has_switcher->value = false;
8939 if (auto* dynamic_map = proj_cfg.opt<ConfigOptionBool>("enable_filament_dynamic_map"))
8940 dynamic_map->value = false;
8941}
std::vector< std::string > split_string(const std::string &str, char delimiter)
Definition utils.cpp:1424
zaa_minimize_perimeter_height filament_nozzle_map((ConfigOptionInts, filament_map_2))((ConfigOptionStrings
zaa_minimize_perimeter_height filament_map((ConfigOptionInts, filament_volume_map))((ConfigOptionInts

References Slic3r::filament_map(), Slic3r::filament_nozzle_map(), Slic3r::nvtStandard, Slic3r::DynamicConfig::opt(), Slic3r::ConfigOptionVector< T >::size(), Slic3r::ConfigOptionVector< int >::size(), Slic3r::split_string(), Slic3r::ConfigOptionVector< T >::values, and Slic3r::ConfigOptionVector< int >::values.

Referenced by Slic3r::GUI::Plater::priv::load_files(), and Slic3r::GUI::Plater::load_gcode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ synchronize_model_after_cut()

void Slic3r::GUI::synchronize_model_after_cut ( Model & model,
const CutObjectBase & cut_id )
3573{
3574 for (ModelObject* obj : model.objects)
3575 if (obj->is_cut() && obj->cut_id.has_same_id(cut_id) && !obj->cut_id.is_equal(cut_id))
3576 obj->cut_id.copy(cut_id);
3577}
bool is_equal(const CutObjectBase &rhs)
Definition ObjectID.hpp:193
void copy(const CutObjectBase &rhs)
Definition ObjectID.hpp:168
bool has_same_id(const CutObjectBase &rhs)
Definition ObjectID.hpp:192
CutObjectBase cut_id
Definition Model.hpp:431

References Slic3r::CutObjectBase::copy(), Slic3r::ModelObject::cut_id, Slic3r::CutObjectBase::has_same_id(), Slic3r::ModelObject::is_cut(), Slic3r::CutObjectBase::is_equal(), and Slic3r::Model::objects.

Referenced by Slic3r::GUI::GLGizmoCut3D::perform_cut().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ take_snapshot()

void Slic3r::GUI::take_snapshot ( const std::string & snapshot_name)
static
142{
143 Plater* plater = wxGetApp().plater();
144 if (plater)
145 plater->take_snapshot(snapshot_name);
146}

References plater().

Referenced by Slic3r::GUI::ObjectList::add_category_to_settings_from_frequent(), Slic3r::GUI::ObjectList::add_category_to_settings_from_selection(), Slic3r::GUI::ObjectList::add_layer_range_after_current(), Slic3r::GUI::ObjectList::del_instances_from_object(), Slic3r::GUI::ObjectList::del_layer_from_object(), Slic3r::GUI::ObjectList::del_settings_from_config(), Slic3r::GUI::ObjectList::del_subobject_from_object(), Slic3r::GUI::ObjectList::delete_all_connectors_for_object(), Slic3r::GUI::ObjectList::delete_from_model_and_list(), Slic3r::GUI::ObjectList::edit_layer_range(), Slic3r::GUI::ObjectList::invalidate_cut_info_for_object(), Slic3r::GUI::ObjectList::layers_editing(), Slic3r::GUI::ObjectList::load_generic_subobject(), Slic3r::GUI::ObjectList::load_subobject(), Slic3r::GUI::ObjectList::OnDrop(), Slic3r::GUI::ObjectList::paste_settings_into_list(), queue_texture_displacement_bake(), Slic3r::GUI::ObjectList::set_extruder_for_selected_items(), Slic3r::GUI::ObjectList::set_volume_type(), Slic3r::GUI::ObjectList::split(), Slic3r::GUI::ObjectList::toggle_auto_drop(), Slic3r::GUI::ObjectList::toggle_printable_state(), Slic3r::GUI::ObjectList::update_filament_in_config(), and Slic3r::GUI::ObjectList::update_name_in_model().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ texture_displacement_bake_volume()

TextureDisplacementBakeVolume Slic3r::GUI::texture_displacement_bake_volume ( const ModelVolume & volume,
const std::vector< TextureDisplacementLayer > & layers,
const TextureDisplacementOptions & options,
const Vec3d & texture_anchor,
float resting_drop )
343{
345 out.volume_id = volume.id();
346 out.base_mesh = volume.mesh().its;
347 out.layers = layers;
348 out.options = options;
350 out.texture_anchor = texture_anchor;
351 out.resting_drop = resting_drop;
352 if (volume.has_texture_uv())
353 out.model_uv = volume.texture_uv;
354 for (int i = 0; i < int(TEXTURE_DISPLACEMENT_MAX_LAYERS); ++i)
355 out.facets_data[size_t(i)] = volume.texture_displacement_facet(i).get_data();
356 return out;
357}
Vec3d texture_anchor
Definition TextureDisplacementBakeJob.hpp:39
TextureDisplacementFacetsData facets_data
Definition TextureDisplacementBakeJob.hpp:29
float resting_drop
Definition TextureDisplacementBakeJob.hpp:40
indexed_triangle_set base_mesh
Definition TextureDisplacementBakeJob.hpp:27
TextureDisplacementOptions options
Definition TextureDisplacementBakeJob.hpp:30
ObjectID volume_id
Definition TextureDisplacementBakeJob.hpp:26
Transform3d volume_to_world
Definition TextureDisplacementBakeJob.hpp:33
std::vector< TextureDisplacementLayer > layers
Definition TextureDisplacementBakeJob.hpp:28
std::vector< Vec2f > model_uv
Definition TextureDisplacementBakeJob.hpp:36
Definition TextureDisplacementBakeJob.hpp:25

References Slic3r::GUI::TextureDisplacementBakeVolume::base_mesh, Slic3r::GUI::TextureDisplacementBakeVolume::facets_data, Slic3r::FacetsAnnotation::get_data(), Slic3r::ModelVolume::has_texture_uv(), Slic3r::ObjectBase::id(), Slic3r::TriangleMesh::its, Slic3r::GUI::TextureDisplacementBakeVolume::layers, Slic3r::ModelVolume::mesh(), Slic3r::GUI::TextureDisplacementBakeVolume::model_uv, Slic3r::GUI::TextureDisplacementBakeVolume::options, Slic3r::GUI::TextureDisplacementBakeVolume::resting_drop, Slic3r::GUI::TextureDisplacementBakeVolume::texture_anchor, texture_displacement_bake_volume(), Slic3r::ModelVolume::texture_displacement_facet(), Slic3r::TEXTURE_DISPLACEMENT_MAX_LAYERS, Slic3r::texture_displacement_volume_to_world(), Slic3r::ModelVolume::texture_uv, Slic3r::GUI::TextureDisplacementBakeVolume::volume_id, and Slic3r::GUI::TextureDisplacementBakeVolume::volume_to_world.

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::bake(), and texture_displacement_bake_volume().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ texture_entry_is_mixed()

bool Slic3r::GUI::texture_entry_is_mixed ( TextureFilamentKind kind)
static
408{
410}

References ExistingMixed, and NewMixed.

Referenced by Slic3r::GUI::FilamentSelectPopup::FilamentSelectPopup(), Slic3r::GUI::TextureImportDialog::apply_auto_standard_mix(), Slic3r::GUI::TextureImportDialog::rebuild_mapping_rows(), and Slic3r::GUI::TextureImportDialog::reset_auto_mix().

Here is the caller graph for this function:

◆ texture_entry_is_physical()

◆ texture_entry_is_pla_basic()

bool Slic3r::GUI::texture_entry_is_pla_basic ( const TextureFilamentEntry & entry)
static
413{
415 entry.name.find(DEFAULT_VIRTUAL_FILAMENT_BASIC_TYPE) != std::string::npos ||
416 entry.preset_name.find(DEFAULT_VIRTUAL_FILAMENT_BASIC_TYPE) != std::string::npos;
417}
static constexpr const char * DEFAULT_VIRTUAL_FILAMENT_SHORT_TYPE
Definition TextureImportDialog.cpp:82
static constexpr const char * DEFAULT_VIRTUAL_FILAMENT_BASIC_TYPE
Definition TextureImportDialog.cpp:81
std::string preset_name
Definition TextureImportDialog.hpp:68
std::string type
Definition TextureImportDialog.hpp:67
std::string name
Definition TextureImportDialog.hpp:66

References DEFAULT_VIRTUAL_FILAMENT_BASIC_TYPE, DEFAULT_VIRTUAL_FILAMENT_SHORT_TYPE, Slic3r::GUI::TextureFilamentEntry::name, Slic3r::GUI::TextureFilamentEntry::preset_name, and Slic3r::GUI::TextureFilamentEntry::type.

Referenced by Slic3r::GUI::TextureImportDialog::apply_auto_standard_mix().

Here is the caller graph for this function:

◆ texture_entry_official_basic()

bool Slic3r::GUI::texture_entry_official_basic ( const TextureFilamentEntry & entry)
static
420{
422 return false;
423 // NewPhysical entries are created by add_virtual_filament with a fixed Bambu Basic name.
425 return !official_basic_type_from_preset_name(entry.name).empty();
426 // ExistingPhysical: resolve the filament preset name from project_config_index.
427 auto& pb = *wxGetApp().preset_bundle;
428 const size_t cfg = entry.project_config_index;
429 if (cfg < pb.filament_presets.size())
430 return !official_basic_type_from_preset_name(pb.filament_presets[cfg]).empty();
431 return false;
432}
TextureFilamentKind kind
Definition TextureImportDialog.hpp:62
static bool texture_entry_is_physical(TextureFilamentKind kind)
Definition TextureImportDialog.cpp:402
size_t project_config_index
Definition TextureImportDialog.hpp:64

References Slic3r::GUI::TextureFilamentEntry::kind, Slic3r::GUI::TextureFilamentEntry::name, NewPhysical, official_basic_type_from_preset_name(), Slic3r::GUI::TextureFilamentEntry::project_config_index, and texture_entry_is_physical().

Referenced by Slic3r::GUI::TextureImportDialog::add_decomposed_mixed_filament().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ texture_library()

const std::vector< TextureLibraryEntry > & Slic3r::GUI::texture_library ( bool force_rescan)
374{
375 const uint64_t generation = texture_library_generation();
376 if (g_library_scanned && !force_rescan && generation == g_library_scan_generation)
377 return g_library;
378
379 g_library.clear();
380 scan_dir(boost::filesystem::path(Slic3r::resources_dir()) / "textures" / "displacement", TextureSource::Shipped, g_library);
381 const std::string user_dir = user_texture_dir();
382 if (!user_dir.empty())
383 scan_dir(boost::filesystem::path(user_dir), TextureSource::User, g_library);
384 sort_user_textures(g_library);
385 scan_plugin_textures(g_library);
386
387 g_library_scan_generation = generation;
388 g_library_scanned = true;
389 return g_library;
390}
std::string user_texture_dir()
Definition TextureLibrary.cpp:361
uint64_t texture_library_generation()
Definition TextureLibrary.cpp:351

References Slic3r::resources_dir(), Shipped, texture_library_generation(), User, and user_texture_dir().

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::add_texture_layer(), remove_user_texture(), Slic3r::GUI::GLGizmoTextureDisplacement::render_texture_library_popup(), and Slic3r::GUI::anonymous_namespace{TextureLibrary.cpp}::write_user_texture().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ texture_library_generation()

uint64_t Slic3r::GUI::texture_library_generation ( )
352{
353 return g_library_generation.load();
354}

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::render_texture_library_popup(), and texture_library().

Here is the caller graph for this function:

◆ texture_normalize_color_hex()

std::string Slic3r::GUI::texture_normalize_color_hex ( std::string hex)
static
386{
387 if (hex.empty())
388 return "#808080";
389 if (hex.front() != '#')
390 hex = "#" + hex;
391 return decompose_normalize_color_hex(std::move(hex));
392}

References decompose_normalize_color_hex().

Referenced by Slic3r::GUI::TextureImportDialog::add_decomposed_mixed_filament(), Slic3r::GUI::TextureImportDialog::add_virtual_filament(), Slic3r::GUI::TextureImportDialog::add_virtual_mixed_filament(), Slic3r::GUI::TextureImportDialog::apply_auto_standard_mix(), Slic3r::GUI::TextureImportDialog::compact_used_virtual_filaments(), Slic3r::GUI::TextureImportDialog::on_computation_complete(), and wxBEGIN_EVENT_TABLE().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ texture_recipe_mode()

Slic3r::ColorDecomposeRecipeMode Slic3r::GUI::texture_recipe_mode ( TextureAutoMixMode mode)
static

References Slic3r::CMYW, CMYW, and Slic3r::RYBW.

Referenced by Slic3r::GUI::TextureImportDialog::apply_auto_standard_mix().

Here is the caller graph for this function:

◆ texture_rgba_to_hex()

std::string Slic3r::GUI::texture_rgba_to_hex ( const std::array< float, 4 > & rgba)
static
395{
396 return wxString::Format("#%02X%02X%02X",
397 (unsigned char)std::clamp(rgba[0] * 255.f, 0.f, 255.f),
398 (unsigned char)std::clamp(rgba[1] * 255.f, 0.f, 255.f),
399 (unsigned char)std::clamp(rgba[2] * 255.f, 0.f, 255.f)).ToStdString();
400}

◆ tip_now()

double Slic3r::GUI::tip_now ( )
static
4065{
4066 using clock = std::chrono::steady_clock;
4067 static const clock::time_point base = clock::now();
4068 return std::chrono::duration<double>(clock::now() - base).count();
4069}

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::panel_tooltip(), and Slic3r::GUI::GLGizmoTextureDisplacement::render_tip_media().

Here is the caller graph for this function:

◆ to_dialog_result()

ColorDecomposeResult Slic3r::GUI::to_dialog_result ( const ColorDecomposeRecipeResult & recipe,
const wxColour & fallback )
static
130{
132 result.mode = recipe.mode;
133 result.matched_color = hex_to_wx_colour(recipe.matched_color_hex, fallback);
134 for (const auto& comp_recipe : recipe.components) {
136 comp.colour = hex_to_wx_colour(comp_recipe.color_hex, fallback);
137 comp.ratio = comp_recipe.ratio;
138 comp.filament_index = static_cast<int>(comp_recipe.filament_index);
139 comp.base_color = standard_base_color_from_key(comp_recipe.base_color);
141 comp.base_color = standard_base_color_for(recipe.mode, comp.colour);
142 result.components.push_back(comp);
143 }
144 return result;
145}
static DecomposeBaseColor standard_base_color_from_key(const std::string &key)
Definition ColorDecomposeDialog.cpp:87
DecomposeBaseColor base_color
Definition ColorDecomposeDialog.hpp:44
int ratio
Definition ColorDecomposeDialog.hpp:42
static DecomposeBaseColor standard_base_color_for(DecomposeMode mode, const wxColour &color)
Definition ColorDecomposeDialog.cpp:112
wxColour matched_color
Definition ColorDecomposeDialog.hpp:49
wxColour colour
Definition ColorDecomposeDialog.hpp:41
int filament_index
Definition ColorDecomposeDialog.hpp:43
static wxColour hex_to_wx_colour(const std::string &hex, const wxColour &fallback)
Definition ColorDecomposeDialog.cpp:76
Definition ColorDecomposeDialog.hpp:47
std::vector< ColorDecomposeRecipeComponent > components
Definition ColorDecomposeRecipe.hpp:40
std::string matched_color_hex
Definition ColorDecomposeRecipe.hpp:39
ColorDecomposeRecipeMode mode
Definition ColorDecomposeRecipe.hpp:38

References Slic3r::GUI::DecomposeComponent::base_color, Slic3r::GUI::DecomposeComponent::colour, Slic3r::ColorDecomposeRecipeResult::components, Slic3r::GUI::ColorDecomposeResult::components, Slic3r::GUI::DecomposeComponent::filament_index, hex_to_wx_colour(), Slic3r::GUI::ColorDecomposeResult::matched_color, Slic3r::ColorDecomposeRecipeResult::matched_color_hex, Slic3r::ColorDecomposeRecipeResult::mode, Slic3r::GUI::ColorDecomposeResult::mode, None, Slic3r::GUI::DecomposeComponent::ratio, standard_base_color_for(), and standard_base_color_from_key().

Referenced by Slic3r::GUI::ColorDecomposeDialog::compute_decomposition().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_hex()

std::string Slic3r::GUI::to_hex ( const wxColour & c)
static
97{
98 return wxString::Format("#%02X%02X%02X", c.Red(), c.Green(), c.Blue()).ToStdString();
99}

Referenced by blend_n_colors(), and recompute_mixed_slot_colors().

Here is the caller graph for this function:

◆ to_squared_power_of_two()

bool Slic3r::GUI::to_squared_power_of_two ( const std::string & filename,
int max_size_px,
int & w,
int & h )
static
780{
781 auto is_power_of_two = [](int v) { return v != 0 && (v & (v - 1)) == 0; };
782 auto upper_power_of_two = [](int v) { v--; v |= v >> 1; v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; v++; return v; };
783
784 int new_w = std::max(w, h);
785 if (!is_power_of_two(new_w))
786 new_w = upper_power_of_two(new_w);
787
788 while (new_w > max_size_px) {
789 new_w /= 2;
790 }
791
792 const int new_h = new_w;
793 const bool ret = (new_w != w || new_h != h);
794 w = new_w;
795 h = new_h;
796 return ret;
797}

Referenced by Slic3r::GUI::GLTexture::load_from_png(), and Slic3r::GUI::GLTexture::load_from_svg().

Here is the caller graph for this function:

◆ to_string() [1/6]

std::string Slic3r::GUI::to_string ( libvgcode::EGCodeExtrusionRole role)
static
397{
398 switch (role)
399 { // ORCA matched terms
400 case libvgcode::EGCodeExtrusionRole::None: { return _u8L("Unknown"); }
401 case libvgcode::EGCodeExtrusionRole::Perimeter: { return _u8L("Inner wall"); }
402 case libvgcode::EGCodeExtrusionRole::ExternalPerimeter: { return _u8L("Outer wall"); }
403 case libvgcode::EGCodeExtrusionRole::OverhangPerimeter: { return _u8L("Overhang wall"); }
404 case libvgcode::EGCodeExtrusionRole::InternalInfill: { return _u8L("Sparse infill"); }
405 case libvgcode::EGCodeExtrusionRole::SolidInfill: { return _u8L("Internal solid infill"); }
406 case libvgcode::EGCodeExtrusionRole::TopSolidInfill: { return _u8L("Top surface"); }
407 case libvgcode::EGCodeExtrusionRole::Ironing: { return _u8L("Ironing"); }
408 case libvgcode::EGCodeExtrusionRole::BridgeInfill: { return _u8L("Bridge"); }
409 case libvgcode::EGCodeExtrusionRole::GapFill: { return _u8L("Gap infill"); }
410 case libvgcode::EGCodeExtrusionRole::Skirt: { return _u8L("Skirt"); }
411 case libvgcode::EGCodeExtrusionRole::SupportMaterial: { return _u8L("Support"); }
412 case libvgcode::EGCodeExtrusionRole::SupportMaterialInterface: { return _u8L("Support interface"); }
413 case libvgcode::EGCodeExtrusionRole::WipeTower: { return _u8L("Prime tower"); }
414 case libvgcode::EGCodeExtrusionRole::Custom: { return _u8L("Custom"); }
415 // ORCA
416 case libvgcode::EGCodeExtrusionRole::BottomSurface: { return _u8L("Bottom surface"); }
417 case libvgcode::EGCodeExtrusionRole::InternalBridgeInfill: { return _u8L("Internal bridge"); } // ORCA
418 case libvgcode::EGCodeExtrusionRole::Brim: { return _u8L("Brim"); }
419 case libvgcode::EGCodeExtrusionRole::SupportTransition: { return _u8L("Support transition"); }
420 case libvgcode::EGCodeExtrusionRole::Mixed: { return _u8L("Mixed"); }
421 default: { return _u8L("Unknown"); }
422 }
423}
@ SolidInfill
Definition Types.hpp:150
@ InternalInfill
Definition Types.hpp:149
@ ExternalPerimeter
Definition Types.hpp:147
@ Brim
Definition Types.hpp:163
@ SupportTransition
Definition Types.hpp:164
@ SupportMaterialInterface
Definition Types.hpp:157
@ InternalBridgeInfill
Definition Types.hpp:162
@ Mixed
Definition Types.hpp:165
@ None
Definition Types.hpp:145
@ GapFill
Definition Types.hpp:154
@ TopSolidInfill
Definition Types.hpp:151
@ Perimeter
Definition Types.hpp:146
@ Custom
Definition Types.hpp:159
@ OverhangPerimeter
Definition Types.hpp:148
@ BridgeInfill
Definition Types.hpp:153
@ WipeTower
Definition Types.hpp:158
@ Skirt
Definition Types.hpp:155
@ Ironing
Definition Types.hpp:152
@ BottomSurface
Definition Types.hpp:161
@ SupportMaterial
Definition Types.hpp:156

References _u8L, libvgcode::BottomSurface, libvgcode::BridgeInfill, libvgcode::Brim, libvgcode::Custom, libvgcode::ExternalPerimeter, libvgcode::GapFill, libvgcode::InternalBridgeInfill, libvgcode::InternalInfill, libvgcode::Ironing, libvgcode::Mixed, libvgcode::None, libvgcode::OverhangPerimeter, libvgcode::Perimeter, libvgcode::Skirt, libvgcode::SolidInfill, libvgcode::SupportMaterial, libvgcode::SupportMaterialInterface, libvgcode::SupportTransition, libvgcode::TopSolidInfill, and libvgcode::WipeTower.

◆ to_string() [2/6]

std::string Slic3r::GUI::to_string ( libvgcode::EMoveType type)
static
378{
379 switch (type)
380 {
381 case libvgcode::EMoveType::Noop: { return _u8L("Noop"); }
382 case libvgcode::EMoveType::Retract: { return _u8L("Retract"); }
383 case libvgcode::EMoveType::Unretract: { return _u8L("Unretract"); }
384 case libvgcode::EMoveType::Seam: { return _u8L("Seam"); }
385 case libvgcode::EMoveType::ToolChange: { return _u8L("Tool Change"); }
386 case libvgcode::EMoveType::ColorChange: { return _u8L("Color Change"); }
387 case libvgcode::EMoveType::PausePrint: { return _u8L("Pause Print"); }
388 case libvgcode::EMoveType::CustomGCode: { return _u8L("Custom G-code"); }
389 case libvgcode::EMoveType::Travel: { return _u8L("Travel"); }
390 case libvgcode::EMoveType::Wipe: { return _u8L("Wipe"); }
391 case libvgcode::EMoveType::Extrude: { return _u8L("Extrude"); }
392 default: { return _u8L("Unknown"); }
393 }
394}
@ Retract
Definition Types.hpp:123
@ Travel
Definition Types.hpp:130
@ Noop
Definition Types.hpp:122
@ Unretract
Definition Types.hpp:124
@ ToolChange
Definition Types.hpp:126
@ PausePrint
Definition Types.hpp:128
@ Wipe
Definition Types.hpp:131
@ Seam
Definition Types.hpp:125
@ CustomGCode
Definition Types.hpp:129
@ ColorChange
Definition Types.hpp:127
@ Extrude
Definition Types.hpp:132

References _u8L, libvgcode::ColorChange, libvgcode::CustomGCode, libvgcode::Extrude, libvgcode::Noop, libvgcode::PausePrint, libvgcode::Retract, libvgcode::Seam, libvgcode::ToolChange, libvgcode::Travel, libvgcode::Unretract, and libvgcode::Wipe.

Referenced by Slic3r::GUI::GLCanvas3D::_picking_pass(), Slic3r::GUI::anonymous_namespace{PluginsDialog.cpp}::build_plugin_payload_item(), Slic3r::GUI::PluginsDialog::build_plugins_payload(), Slic3r::GUI::GUI_App::check_new_version_sf(), Slic3r::GUI::Plater::import_model_id(), and Slic3r::GUI::GCodeViewer::SequentialView::Marker::render_position_window().

Here is the caller graph for this function:

◆ to_string() [3/6]

std::string Slic3r::GUI::to_string ( PluginSortKey sort_key)
inline
35 {
36 switch (sort_key)
37 {
38 case PluginSortKey::Status: return "status";
39 case PluginSortKey::Name: return "name";
40 case PluginSortKey::Source: return "source";
41 case PluginSortKey::Version: return "version";
42 case PluginSortKey::None: return "none";
43 }
44
45 return "status";
46 }

References Name, None, Source, Status, and Version.

◆ to_string() [4/6]

std::string Slic3r::GUI::to_string ( PluginSortOrder sort_order)
inline
49 {
50 return sort_order == PluginSortOrder::Desc ? "desc" : "asc";
51 }

References Desc.

◆ to_string() [5/6]

std::string Slic3r::GUI::to_string ( PluginSource source)
inline
19 {
20 switch (source)
21 {
22 case PluginSource::Mine: return "mine";
23 case PluginSource::Subscribed: return "subscribed";
24 case PluginSource::Orphaned: return "orphaned";
25 case PluginSource::Local: return "local";
26 }
27
28 return "local";
29 }
@ Local
Definition PluginSource.hpp:15
@ Subscribed
Definition PluginSource.hpp:13

References Local, Mine, Orphaned, and Subscribed.

◆ to_string() [6/6]

std::string Slic3r::GUI::to_string ( PluginStatus status)
inline
20 {
21 switch (status)
22 {
23 case PluginStatus::Activated: return "Activated";
24 case PluginStatus::Error: return "Error";
25 case PluginStatus::RuntimeError: return "RuntimeError";
26 case PluginStatus::Inactive: return "Inactive";
27 case PluginStatus::Loading: return "Loading";
28 }
29
30 return "Inactive";
31 }

References Activated, Error, Inactive, Loading, and RuntimeError.

◆ to_wstring_name()

wxString Slic3r::GUI::to_wstring_name ( std::string name)
static
287{
288 if (name == "hardened_steel") {
289 return _L("Hardened Steel");
290 } else if (name == "stainless_steel") {
291 return _L("Stainless Steel");
292 } else if (name == "tungsten_carbide") {
293 return _L("Tungsten Carbide");
294 } else if (name == "brass") {
295 return _L("Brass");
296 }
297
298 return wxEmptyString;
299}

References _L.

Referenced by is_same_nozzle_type().

Here is the caller graph for this function:

◆ touch_user_texture()

void Slic3r::GUI::touch_user_texture ( const std::string & path)
393{
394 if (!in_user_texture_dir(path))
395 return;
396 const std::string name = boost::filesystem::path(path).filename().string();
397 std::vector<std::string> names = recent_texture_names();
398 names.erase(std::remove(names.begin(), names.end(), name), names.end());
399 names.insert(names.begin(), name);
400 store_recent_texture_names(std::move(names));
401 if (g_library_scanned)
402 sort_user_textures(g_library);
403}

Referenced by Slic3r::GUI::GLGizmoTextureDisplacement::set_layer_texture().

Here is the caller graph for this function:

◆ trace_autoedit()

void Slic3r::GUI::trace_autoedit ( const char * why,
size_t n )
static
1593{
1594 if (!std::getenv("ORCA_CAD_UXTRACE")) return;
1595 fprintf(stderr, "[UX] autoedit %s steps=%zu\n", why, n);
1596 fflush(stderr);
1597}

References trace_autoedit().

Referenced by Slic3r::GUI::DesignSketchTool::open_primary_autoedit(), Slic3r::GUI::DesignSketchTool::render(), and trace_autoedit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ translate_entity()

void Slic3r::GUI::translate_entity ( SketchEntity & e,
const Vec2d & d )
static
10422{
10423 e.p0 += d;
10424 e.p1 += d;
10425 e.center += d;
10426 for (auto& cp : e.ctrl) cp += d; // BSpline poles
10427}

References Slic3r::SketchEntity::center, Slic3r::SketchEntity::ctrl, Slic3r::SketchEntity::p0, Slic3r::SketchEntity::p1, and translate_entity().

Referenced by Slic3r::GUI::DesignSketchTool::apply_dimension(), and translate_entity().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tri_barycentric()

void Slic3r::GUI::tri_barycentric ( TriPoint p,
TriPoint v0,
TriPoint v1,
TriPoint v2,
double & w0,
double & w1,
double & w2 )
55{
56 double total = std::abs(tri_signed_area2(v0, v1, v2));
57 if (total < 1e-9) { w0 = w1 = w2 = 1.0 / 3.0; return; }
58 w0 = std::abs(tri_signed_area2(p, v1, v2)) / total;
59 w1 = std::abs(tri_signed_area2(v0, p, v2)) / total;
60 w2 = 1.0 - w0 - w1;
61 w0 = std::clamp(w0, 0.0, 1.0);
62 w1 = std::clamp(w1, 0.0, 1.0);
63 w2 = std::clamp(w2, 0.0, 1.0);
64 double s = w0 + w1 + w2;
65 if (s > 0) { w0 /= s; w1 /= s; w2 /= s; }
66}
double tri_signed_area2(TriPoint a, TriPoint b, TriPoint c)
Definition FilamentBitmapUtils.cpp:38

References tri_signed_area2().

Referenced by Slic3r::GUI::MixedFilamentDialog::create_triangle_picker(), draw_mixed_triangle_picker(), and tri_clamp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tri_clamp()

TriPoint Slic3r::GUI::tri_clamp ( TriPoint p,
TriPoint v0,
TriPoint v1,
TriPoint v2 )
69{
70 double w0, w1, w2;
71 tri_barycentric(p, v0, v1, v2, w0, w1, w2);
72 return {w0 * v0.x + w1 * v1.x + w2 * v2.x,
73 w0 * v0.y + w1 * v1.y + w2 * v2.y};
74}
double x
Definition FilamentBitmapUtils.hpp:22
double y
Definition FilamentBitmapUtils.hpp:22

References tri_barycentric(), Slic3r::GUI::TriPoint::x, and Slic3r::GUI::TriPoint::y.

Referenced by Slic3r::GUI::MixedFilamentDialog::create_triangle_picker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tri_contains()

bool Slic3r::GUI::tri_contains ( TriPoint p,
TriPoint v0,
TriPoint v1,
TriPoint v2 )
44{
45 double total = tri_signed_area2(v0, v1, v2);
46 if (std::abs(total) < 1e-9) return false;
47 double s0 = tri_signed_area2(p, v1, v2) / total;
48 double s1 = tri_signed_area2(v0, p, v2) / total;
49 double s2 = 1.0 - s0 - s1;
50 return s0 >= -0.001 && s1 >= -0.001 && s2 >= -0.001;
51}

References tri_signed_area2().

Referenced by Slic3r::GUI::MixedFilamentDialog::create_triangle_picker(), and draw_mixed_triangle_picker().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tri_signed_area2()

double Slic3r::GUI::tri_signed_area2 ( TriPoint a,
TriPoint b,
TriPoint c )
39{
40 return (b.x - a.x) * (c.y - a.y) - (c.x - a.x) * (b.y - a.y);
41}

References Slic3r::GUI::TriPoint::x, and Slic3r::GUI::TriPoint::y.

Referenced by tri_barycentric(), and tri_contains().

Here is the caller graph for this function:

◆ try_pop_up_before_slice()

bool Slic3r::GUI::try_pop_up_before_slice ( bool is_slice_all,
Plater * plater_ref,
PartPlate * partplate_ref,
bool force_pop_up = false )

Try to pop up the filament map dialog before slicing.

Only pop up in multi extruder machines. If user don't want the pop up, we pop up if the applied filament map mode in manual

Parameters
is_slice_allIn slice all
plater_refPlater to get/set global filament map
partplate_refPartplate to get/set plate filament map mode
Returns
whether continue slicing
128{
129 auto full_config = wxGetApp().preset_bundle->full_config();
130 const auto nozzle_diameters = full_config.option<ConfigOptionFloats>("nozzle_diameter");
131 if (nozzle_diameters->size() <= 1)
132 return true;
133
134 // The filament-grouping dialog is specifically designed for BBL dual-nozzle printers
135 // (e.g. H2D) where filaments must be assigned to a left or right nozzle.
136 // For toolchangers (≥3 tools) and all non-BBL printers the dialog is irrelevant and
137 // confusing; skip it entirely so slicing proceeds without interruption. (#12390)
138 PresetBundle* preset = wxGetApp().preset_bundle;
139 if (!preset || !preset->is_bbl_vendor() || nozzle_diameters->size() != 2)
140 return true;
141
142 bool sync_plate = true;
143
144 std::vector<std::string> filament_colors = full_config.option<ConfigOptionStrings>("filament_colour")->values;
145 std::vector<std::string> filament_types = full_config.option<ConfigOptionStrings>("filament_type")->values;
146 FilamentMapMode applied_mode = get_applied_map_mode(full_config, plater_ref,partplate_ref, sync_plate);
147 std::vector<int> applied_maps = get_applied_map(full_config, plater_ref, partplate_ref, sync_plate);
148 std::vector<int> applied_volume_maps = get_applied_volume_map(full_config, plater_ref, partplate_ref, sync_plate);
149 applied_maps.resize(filament_colors.size(), 1);
150 applied_volume_maps.resize(filament_colors.size(), 0);
151
152 if (!force_pop_up && applied_mode != fmmManual)
153 return true;
154
155 std::vector<int> filament_lists;
156 if (is_slice_all) {
157 filament_lists.resize(filament_colors.size());
158 std::iota(filament_lists.begin(), filament_lists.end(), 1);
159 }
160 else {
161 filament_lists = partplate_ref->get_extruders();
162 }
163
164 FilamentMapDialog map_dlg(plater_ref,
165 filament_colors,
167 applied_maps,
168 applied_volume_maps,
169 filament_lists,
170 applied_mode,
171 plater_ref->get_machine_sync_status(),
172 false,
173 false
174 );
175 auto ret = map_dlg.ShowModal();
176
177 if (ret == wxID_OK) {
178 FilamentMapMode new_mode = map_dlg.get_mode();
179 std::vector<int> new_maps = map_dlg.get_filament_maps();
180 std::vector<int> new_volume_maps = map_dlg.get_filament_volume_maps();
181 if (sync_plate) {
182 if (is_slice_all) {
183 auto plate_list = plater_ref->get_partplate_list().get_plate_list();
184 for (int i = 0; i < plate_list.size(); ++i) {
185 plate_list[i]->set_filament_map_mode(new_mode);
186 if (new_mode == fmmManual) {
187 plate_list[i]->set_filament_maps(new_maps);
188 plate_list[i]->set_filament_volume_maps(new_volume_maps);
189 }
190 }
191 }
192 else {
193 partplate_ref->set_filament_map_mode(new_mode);
194 if (new_mode == fmmManual) {
195 partplate_ref->set_filament_maps(new_maps);
196 partplate_ref->set_filament_volume_maps(new_volume_maps);
197 }
198 }
199 }
200 else {
201 plater_ref->set_global_filament_map_mode(new_mode);
202 if (new_mode == fmmManual) {
203 plater_ref->set_global_filament_map(new_maps);
204 plater_ref->set_global_filament_volume_map(new_volume_maps);
205 }
206 }
207 plater_ref->update();
208 // check whether able to slice, if not, return false
210 return false;
211 }
212 return true;
213 }
214 return false;
215}
std::vector< PartPlate * > & get_plate_list()
Definition PartPlate.hpp:965
void set_filament_maps(const std::vector< int > &f_maps)
Definition PartPlate.cpp:5800
void set_filament_map_mode(const FilamentMapMode &mode)
Definition PartPlate.cpp:5774
void set_filament_volume_maps(const std::vector< int > &f_maps)
Definition PartPlate.cpp:5822
void set_global_filament_map(const std::vector< int > &filament_map)
Definition Plater.cpp:21973
void update(bool conside_update_flag=false, bool force_background_processing_update=false)
Definition Plater.cpp:19092
void set_global_filament_volume_map(const std::vector< int > &filament_volume_map)
Definition Plater.cpp:21980
bool get_machine_sync_status()
Definition Plater.cpp:23761
void set_global_filament_map_mode(FilamentMapMode mode)
Definition Plater.cpp:21963
std::string & get_left_extruder_unprintable_text()
Definition GLCanvas3D.cpp:269
static std::vector< int > get_applied_map(DynamicConfig &proj_config, const Plater *plater_ref, const PartPlate *partplate_ref, const bool sync_plate)
Definition FilamentMapDialog.cpp:47
static const std::vector< std::string > filament_types
Definition CreatePresetsDialog.cpp:123
static FilamentMapMode get_applied_map_mode(DynamicConfig &proj_config, const Plater *plater_ref, const PartPlate *partplate_ref, const bool sync_plate)
Definition FilamentMapDialog.cpp:40
static std::vector< int > get_applied_volume_map(DynamicConfig &proj_config, const Plater *plater_ref, const PartPlate *partplate_ref, const bool sync_plate)
Definition FilamentMapDialog.cpp:54
std::string & get_right_extruder_unprintable_text()
Definition GLCanvas3D.cpp:274

References Slic3r::empty(), filament_types, Slic3r::fmmManual, get_applied_map(), get_applied_map_mode(), get_applied_volume_map(), Slic3r::GUI::PartPlate::get_extruders(), Slic3r::GUI::FilamentMapDialog::get_filament_maps(), Slic3r::GUI::FilamentMapDialog::get_filament_volume_maps(), get_left_extruder_unprintable_text(), Slic3r::GUI::Plater::get_machine_sync_status(), Slic3r::GUI::FilamentMapDialog::get_mode(), Slic3r::GUI::Plater::get_partplate_list(), Slic3r::GUI::PartPlateList::get_plate_list(), get_right_extruder_unprintable_text(), Slic3r::PresetBundle::is_bbl_vendor(), Slic3r::GUI::PartPlate::set_filament_map_mode(), Slic3r::GUI::PartPlate::set_filament_maps(), Slic3r::GUI::PartPlate::set_filament_volume_maps(), Slic3r::GUI::Plater::set_global_filament_map(), Slic3r::GUI::Plater::set_global_filament_map_mode(), Slic3r::GUI::Plater::set_global_filament_volume_map(), Slic3r::GUI::FilamentMapDialog::ShowModal(), and Slic3r::GUI::Plater::update().

Referenced by Slic3r::GUI::GLCanvas3D::_set_warning_notification(), Slic3r::GUI::NotificationManager::bbl_show_filament_map_invalid_notification_before_slice(), and Slic3r::GUI::MainFrame::create_side_tools().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tryPopUpMultiNozzleDialog()

std::optional< NozzleOption > Slic3r::GUI::tryPopUpMultiNozzleDialog ( MachineObject * obj)
1279{
1280 if (!obj)
1281 return std::nullopt;
1282 auto rack = obj->GetNozzleSystem()->GetNozzleRack();
1283 if (!rack || !rack->IsSupported())
1284 return std::nullopt;
1285 MultiNozzleSyncDialog dialog(wxGetApp().plater_,rack);
1286
1287 bool has_unreliable = rack->HasUnreliableNozzles();
1288 bool has_unknown = rack->HasUnknownNozzles();
1289
1290 auto config = wxGetApp().preset_bundle->printers.get_edited_preset().config;
1291
1292 if (dialog.ShowModal() == wxID_OK) {
1293 auto selected_option = dialog.GetSelectedOption();
1294 if (!selected_option)
1295 return std::nullopt;
1296 auto& preset_bundle = GUI::wxGetApp().preset_bundle;
1297 auto& project_config = preset_bundle->project_config;
1298
1299 ConfigOptionEnumsGeneric* nozzle_volume_type_opt = project_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type");
1300
1301 // write to preset bundle config
1302 for (int extruder_id = 0; extruder_id < 2; ++extruder_id) {
1303 NozzleVolumeType volume_type;
1304 int nozzle_count;
1305 bool clear_all = true;
1306 if (!selected_option->extruder_nozzle_stats.count(extruder_id)) {
1307 nozzle_count = 0;
1308 // Reset the concrete volume types (Standard/High Flow); Hybrid is a mix marker, never a stats key.
1309 // TPU High Flow is a concrete variant that exists only on 0.4/0.6 nozzles, so reset it too, but
1310 // only there (same guard that skips High Flow on 0.2).
1311 std::vector<NozzleVolumeType> reset_types{nvtStandard, nvtHighFlow};
1312 if (extruder_supports_tpu_high_flow(preset_bundle, extruder_id))
1313 reset_types.push_back(nvtTPUHighFlow);
1314 for (NozzleVolumeType vt : reset_types) {
1315 volume_type = vt;
1316 setExtruderNozzleCount(preset_bundle, extruder_id, volume_type, nozzle_count, clear_all);
1317 clear_all = false;
1318 }
1319 }
1320 else {
1321 for (auto& stat : selected_option->extruder_nozzle_stats[extruder_id]) {
1322 volume_type = stat.first;
1323 nozzle_count = stat.second;
1324 setExtruderNozzleCount(preset_bundle, extruder_id, volume_type, nozzle_count, clear_all);
1325 clear_all = false;
1326 }
1327 }
1328 }
1329 // The stats now hold the device's per-type breakdown: protect it from being collapsed by a manual
1330 // flow switch, and refresh the sidebar badges.
1332 if (nozzle_volume_type_opt) {
1333 for (int extruder_id = 0; extruder_id < 2 && extruder_id < (int) nozzle_volume_type_opt->values.size(); ++extruder_id)
1334 updateNozzleCountDisplay(preset_bundle, extruder_id, NozzleVolumeType(nozzle_volume_type_opt->values[extruder_id]));
1335 }
1336 return selected_option;
1337 }
1338
1339 return std::nullopt;
1340}
Definition MultiNozzleSync.hpp:173
bool extruder_supports_tpu_high_flow(PresetBundle *preset_bundle, int extruder_id)
Definition MultiNozzleSync.cpp:254
void setNozzleStatsFromMachine(bool from_machine)
Definition MultiNozzleSync.cpp:220

References extruder_supports_tpu_high_flow(), Slic3r::DevNozzleSystem::GetNozzleRack(), Slic3r::MachineObject::GetNozzleSystem(), Slic3r::GUI::MultiNozzleSyncDialog::GetSelectedOption(), Slic3r::nvtHighFlow, Slic3r::nvtStandard, Slic3r::nvtTPUHighFlow, setExtruderNozzleCount(), setNozzleStatsFromMachine(), Slic3r::GUI::MultiNozzleSyncDialog::ShowModal(), tryPopUpMultiNozzleDialog(), updateNozzleCountDisplay(), and Slic3r::ConfigOptionVector< int >::values.

Referenced by Slic3r::GUI::Sidebar::priv::get_nozzle_options(), and tryPopUpMultiNozzleDialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ two_col_form()

wxFlexGridSizer * Slic3r::GUI::two_col_form ( )
static
132{
133 auto* f = new wxFlexGridSizer(2, 6, 8);
134 f->AddGrowableCol(1, 1);
135 f->SetFlexibleDirection(wxHORIZONTAL);
136 return f;
137}

References Slic3r::f().

Referenced by Slic3r::GUI::DesignPanel::DesignPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unbind_events()

void Slic3r::GUI::unbind_events ( wxEvtHandler * h)
static
933{
934 static_cast<myEvtHandler *>(h)->UnbindAll();
935}
Definition Field.cpp:913

Referenced by free_window().

Here is the caller graph for this function:

◆ update_all_extruder_variants()

void Slic3r::GUI::update_all_extruder_variants ( int extruder_idx = -1)
static
2062{
2063 for (auto tab : wxGetApp().tabs_list)
2064 tab->update_extruder_variants(extruder_idx);
2065 if (auto tab = wxGetApp().plate_tab)
2066 tab->update_extruder_variants(extruder_idx);
2067 for (auto tab : wxGetApp().model_tabs_list)
2068 tab->update_extruder_variants(extruder_idx);
2069}

References update_all_extruder_variants().

Referenced by Slic3r::GUI::TabPrinter::build_unregular_pages(), Slic3r::GUI::Tab::on_value_change(), Slic3r::GUI::TabPrinter::sync_extruders_count(), and update_all_extruder_variants().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_children()

void Slic3r::GUI::update_children ( ModelNode * parent)
static
347{
348 if (parent->IsContainer()) {
349 bool toggle = parent->IsToggled();
350 for (std::unique_ptr<ModelNode> &child : parent->GetChildren()) {
351 child->Toggle(toggle);
352 child->UpdateEnabling();
353 update_children(child.get());
354 }
355 }
356}
bool IsToggled() const
Definition UnsavedChangesDialog.hpp:113
static void update_children(ModelNode *parent)
Definition UnsavedChangesDialog.cpp:346

References Slic3r::GUI::ModelNode::GetChildren(), Slic3r::GUI::ModelNode::IsContainer(), Slic3r::GUI::ModelNode::IsToggled(), and update_children().

Referenced by update_children(), and Slic3r::GUI::DiffModel::UpdateItemEnabling().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_custom_filaments()

wxString Slic3r::GUI::update_custom_filaments ( )
static
158{
159 json m_Res = json::object();
160 m_Res["command"] = "update_custom_filaments";
161 m_Res["sequence_id"] = "2000";
162 json m_CustomFilaments = json::array();
163 PresetBundle * preset_bundle = wxGetApp().preset_bundle;
164 std::map<std::string, std::vector<Preset const *>> temp_filament_id_to_presets = preset_bundle->filaments.get_filament_presets();
165
166 std::vector<std::pair<std::string, std::string>> need_sort;
167 bool need_delete_some_filament = false;
168 for (std::pair<std::string, std::vector<Preset const *>> filament_id_to_presets : temp_filament_id_to_presets) {
169 std::string filament_id = filament_id_to_presets.first;
170 if (filament_id.empty()) continue;
171 if (filament_id == "null") {
172 need_delete_some_filament = true;
173 }
174 bool filament_with_base_id = false;
175 bool not_need_show = false;
176 std::string filament_name;
177 for (const Preset *preset : filament_id_to_presets.second) {
178 if (preset->is_system || preset->is_project_embedded) {
179 not_need_show = true;
180 break;
181 }
182 if (preset->inherits() != "") continue;
183 if (!preset->base_id.empty()) filament_with_base_id = true;
184
185 if (!not_need_show) {
186 auto filament_vendor = dynamic_cast<ConfigOptionStrings *>(const_cast<Preset *>(preset)->config.option("filament_vendor", false));
187 if (filament_vendor && filament_vendor->values.size() && filament_vendor->values[0] == "Generic") not_need_show = true;
188 }
189
190 if (filament_name.empty()) {
191 std::string preset_name = preset->name;
192 size_t index_at = preset_name.find(" @");
193 if (std::string::npos != index_at) { preset_name = preset_name.substr(0, index_at); }
194 filament_name = preset_name;
195 }
196 }
197 if (not_need_show) continue;
198 if (!filament_name.empty()) {
199 if (filament_with_base_id) {
200 need_sort.push_back(std::make_pair(into_u8(_L("[Action Required] ")) + filament_name, filament_id));
201 } else {
202
203 need_sort.push_back(std::make_pair(filament_name, filament_id));
204 }
205 }
206 }
207 std::sort(need_sort.begin(), need_sort.end(), [](const std::pair<std::string, std::string> &a, const std::pair<std::string, std::string> &b) { return a.first < b.first; });
208 if (need_delete_some_filament) {
209 need_sort.push_back(std::make_pair(into_u8(_L("[Action Required]")), "null"));
210 }
211 json temp_j;
212 for (std::pair<std::string, std::string> &filament_name_to_id : need_sort) {
213 temp_j["name"] = filament_name_to_id.first;
214 temp_j["id"] = filament_name_to_id.second;
215 m_CustomFilaments.push_back(temp_j);
216 }
217 m_Res["data"] = m_CustomFilaments;
218 wxString strJS = wxString::Format("HandleStudio(%s)", wxString::FromUTF8(m_Res.dump(-1, ' ', false, json::error_handler_t::ignore)));
219 return strJS;
220}
std::map< std::string, std::vector< Preset const * > > get_filament_presets() const
Definition Preset.cpp:3334
bool is_project_embedded
Definition Preset.hpp:281
static std::string & inherits(DynamicPrintConfig &cfg)
Definition Preset.hpp:357
bool is_system
Definition Preset.hpp:270
std::string base_id
Definition Preset.hpp:328
zaa_minimize_perimeter_height filament_vendor((ConfigOptionBools, filament_is_support))((ConfigOptionBools

References _L, Slic3r::Preset::base_id, Slic3r::Preset::config, Slic3r::filament_vendor(), Slic3r::PresetBundle::filaments, Slic3r::PresetCollection::get_filament_presets(), Slic3r::Preset::inherits(), into_u8(), Slic3r::Preset::is_project_embedded, Slic3r::Preset::is_system, Slic3r::Preset::name, and Slic3r::ConfigBase::option().

Referenced by Slic3r::GUI::GuideFrame::OnScriptMessage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_dark_children_ui()

void Slic3r::GUI::update_dark_children_ui ( wxWindow * window,
bool just_buttons_update = false )
static
4663{
4664 /*bool is_btn = dynamic_cast<wxButton*>(window) != nullptr;
4665 is_btn = false;*/
4666 if (!window) return;
4667
4668 if (ScalableButton* btn = dynamic_cast<ScalableButton*>(window)) {
4669 btn->UpdateDarkUI();
4670 } else {
4671 wxGetApp().UpdateDarkUI(window);
4672 }
4673
4674 auto children = window->GetChildren();
4675 for (auto child : children) {
4677 }
4678}
Definition wxExtensions.hpp:249
static void update_dark_children_ui(wxWindow *window, bool just_buttons_update=false)
Definition GUI_App.cpp:4662

References update_dark_children_ui().

Referenced by update_dark_children_ui(), Slic3r::GUI::GUI_App::update_ui_from_settings(), Slic3r::GUI::GUI_App::UpdateDarkUIWin(), Slic3r::GUI::GUI_App::UpdateDlgDarkUI(), and Slic3r::GUI::GUI_App::UpdateFrameDarkUI().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_dark_config()

void Slic3r::GUI::update_dark_config ( )
339{
340 wxSystemAppearance app = wxSystemSettings::GetAppearance();
341 GUI::wxGetApp().app_config->set("dark_color_mode", app.IsDark() ? "1" : "0");
342 wxGetApp().Update_dark_mode_flag();
343}

Referenced by Slic3r::GUI::DPIAware< wxFrame >::DPIAware().

Here is the caller graph for this function:

◆ update_object_cut_id()

void Slic3r::GUI::update_object_cut_id ( CutObjectBase & cut_id,
ModelObjectCutAttributes attributes,
const int dowels_count )
3522{
3523 // we don't save cut information, if result will not contains all parts of initial object
3524 if (!attributes.has(ModelObjectCutAttribute::KeepUpper) ||
3527 return;
3528
3529 if (cut_id.id().invalid())
3530 cut_id.init();
3531 // increase check sum, if it's needed
3532 {
3533 int cut_obj_cnt = -1;
3534 if (attributes.has(ModelObjectCutAttribute::KeepUpper)) cut_obj_cnt++;
3535 if (attributes.has(ModelObjectCutAttribute::KeepLower)) cut_obj_cnt++;
3536 if (attributes.has(ModelObjectCutAttribute::CreateDowels)) cut_obj_cnt+= dowels_count;
3537 if (cut_obj_cnt > 0)
3538 cut_id.increase_check_sum(size_t(cut_obj_cnt));
3539 }
3540}
void increase_check_sum(size_t cnt)
Definition ObjectID.hpp:197
void init()
Definition ObjectID.hpp:191
bool invalid() const
Definition ObjectID.hpp:37
@ CreateDowels
Definition CutUtils.hpp:15
@ InvalidateCutInfo
Definition CutUtils.hpp:15

References Slic3r::CreateDowels, Slic3r::enum_bitmask< option_type, typename >::has(), Slic3r::ObjectBase::id(), Slic3r::CutObjectBase::increase_check_sum(), Slic3r::CutObjectBase::init(), Slic3r::ObjectID::invalid(), Slic3r::InvalidateCutInfo, Slic3r::KeepLower, and Slic3r::KeepUpper.

Referenced by Slic3r::GUI::GLGizmoCut3D::perform_cut().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_parents()

void Slic3r::GUI::update_parents ( ModelNode * node)
static
359{
360 ModelNode* parent = node->GetParent();
361 if (parent) {
362 bool toggle = false;
363 for (std::unique_ptr<ModelNode> &child : parent->GetChildren()) {
364 if (child->IsToggled()) {
365 toggle = true;
366 break;
367 }
368 }
369 parent->Toggle(toggle);
370 parent->UpdateEnabling();
371 update_parents(parent);
372 }
373}
Definition UnsavedChangesDialog.hpp:54
void UpdateEnabling()
Definition UnsavedChangesDialog.cpp:214
ModelNode * GetParent()
Definition UnsavedChangesDialog.hpp:119
void Toggle(bool toggle=true)
Definition UnsavedChangesDialog.hpp:114
static void update_parents(ModelNode *node)
Definition UnsavedChangesDialog.cpp:358

References Slic3r::GUI::ModelNode::GetChildren(), Slic3r::GUI::ModelNode::GetParent(), Slic3r::GUI::ModelNode::Toggle(), update_parents(), and Slic3r::GUI::ModelNode::UpdateEnabling().

Referenced by update_parents(), and Slic3r::GUI::DiffModel::UpdateItemEnabling().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_selection()

void Slic3r::GUI::update_selection ( wxDataViewItemArray & sels,
ObjectList::SELECTION_MODE mode,
ObjectDataViewModel * model )
static
4534{
4535 if (mode == ObjectList::smInstance)
4536 {
4537 for (auto& item : sels)
4538 {
4539 ItemType type = model->GetItemType(item);
4540 if (type == itObject)
4541 continue;
4542 if (type == itInstanceRoot) {
4543 wxDataViewItem obj_item = model->GetParent(item);
4544 sels.Remove(item);
4545 sels.Add(obj_item);
4546 update_selection(sels, mode, model);
4547 return;
4548 }
4549 if (type == itInstance)
4550 {
4551 wxDataViewItemArray instances;
4552 model->GetChildren(model->GetParent(item), instances);
4553 assert(instances.Count() > 0);
4554 size_t selected_instances_cnt = 0;
4555 for (auto& inst : instances) {
4556 if (sels.Index(inst) == wxNOT_FOUND)
4557 break;
4558 selected_instances_cnt++;
4559 }
4560
4561 if (selected_instances_cnt == instances.Count())
4562 {
4563 wxDataViewItem obj_item = model->GetObject(item);
4564 for (auto& inst : instances)
4565 sels.Remove(inst);
4566 sels.Add(obj_item);
4567 update_selection(sels, mode, model);
4568 return;
4569 }
4570 }
4571 else
4572 return;
4573 }
4574 }
4575}
wxDataViewItem GetParent(const wxDataViewItem &item) const override
Definition ObjectDataViewModel.cpp:2015
unsigned int GetChildren(const wxDataViewItem &parent, wxDataViewItemArray &array) const override
Definition ObjectDataViewModel.cpp:2078
ItemType GetItemType(const wxDataViewItem &item) const
Definition ObjectDataViewModel.cpp:2148
wxDataViewItem GetObject(const wxDataViewItem &item) const
Definition ObjectDataViewModel.cpp:2031
@ smInstance
Definition GUI_ObjectList.hpp:103
ItemType
Definition ObjectDataViewModel.hpp:34
static void update_selection(wxDataViewItemArray &sels, ObjectList::SELECTION_MODE mode, ObjectDataViewModel *model)
Definition GUI_ObjectList.cpp:4533

References Slic3r::GUI::ObjectDataViewModel::GetChildren(), Slic3r::GUI::ObjectDataViewModel::GetItemType(), Slic3r::GUI::ObjectDataViewModel::GetObject(), Slic3r::GUI::ObjectDataViewModel::GetParent(), itInstance, itInstanceRoot, itObject, Slic3r::GUI::ObjectList::smInstance, and update_selection().

Referenced by Slic3r::GUI::ObjectList::remove(), Slic3r::GUI::CalibrateFilamentComboBox::update(), and update_selection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_speed_parameter()

void Slic3r::GUI::update_speed_parameter ( const std::string & key)
157{
158 auto preset_bundle = wxGetApp().preset_bundle;
159 auto& printer_config = preset_bundle->printers.get_edited_preset().config;
160 auto& filament_config = preset_bundle->filaments.get_edited_preset().config;
161 auto& print_config = preset_bundle->prints.get_edited_preset().config;
162
163 int extruder_nums = preset_bundle->get_printer_extruder_count();
164 std::vector<int> extruder_types = printer_config.option<ConfigOptionEnumsGeneric>("extruder_type")->values;
165 std::vector<int> nozzle_volume_types = preset_bundle->project_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type")->values;
166
167 float nozzle_diameter = printer_config.option<ConfigOptionFloats>("nozzle_diameter")->values[0];
168 float layer_height = print_config.option<ConfigOptionFloat>("layer_height")->value;
169 float line_width = print_config.get_abs_value("line_width", nozzle_diameter);
170 if (line_width <= 0.) line_width = Flow::auto_extrusion_width(frPerimeter, nozzle_diameter);
171
172 Flow flow = Flow(line_width, layer_height, nozzle_diameter);
173
174 for (size_t i = 0; i < extruder_nums; ++i) {
175 int index = get_index_for_extruder_parameter(filament_config, "filament_max_volumetric_speed", i, ExtruderType(extruder_types[i]), NozzleVolumeType(nozzle_volume_types[i]));
176 double filament_max_volumetric_speed = filament_config.option<ConfigOptionFloats>("filament_max_volumetric_speed")->get_at(index);
177 double max_speed = filament_max_volumetric_speed / flow.mm3_per_mm();
178
179 index = get_index_for_extruder_parameter(print_config, key, i, ExtruderType(extruder_types[i]), NozzleVolumeType(nozzle_volume_types[i]));
180 ConfigOptionFloatsNullable *speed_opt = print_config.option<ConfigOptionFloatsNullable>(key);
181 speed_opt->values[index] = max_speed;
182 }
183}
static float auto_extrusion_width(FlowRole role, float nozzle_diameter)
Definition Flow.cpp:27
double mm3_per_mm() const
Definition Flow.cpp:226
@ frPerimeter
Definition Flow.hpp:20

References Slic3r::Flow::auto_extrusion_width(), Slic3r::frPerimeter, Slic3r::get_index_for_extruder_parameter(), layer_height, Slic3r::Flow::mm3_per_mm(), Slic3r::nozzle_diameter(), printer_config(), and Slic3r::ConfigOptionVector< double >::values.

Referenced by Slic3r::GUI::Plater::_calib_pa_tower().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateNozzleCountDisplay()

void Slic3r::GUI::updateNozzleCountDisplay ( PresetBundle * preset_bundle,
int extruder_id,
NozzleVolumeType volume_type )
264{
265 auto *plater = wxGetApp().plater();
266 if (!preset_bundle || !plater)
267 return;
268
269 auto *max_nozzle_count = preset_bundle->printers.get_edited_preset().config.option<ConfigOptionIntsNullable>("extruder_max_nozzle_count");
270 // Skip nil entries: a nullable-int nil is INT_MAX (> 1) and would otherwise falsely pass the gate.
271 const bool support_multi_nozzle = max_nozzle_count &&
272 std::any_of(max_nozzle_count->values.begin(), max_nozzle_count->values.end(),
273 [](int v) { return v > 1 && v != ConfigOptionIntsNullable::nil_value(); });
274
275 int display_count = -1; // hides the badge
276 if (support_multi_nozzle)
277 display_count = volume_type == nvtHybrid ? getExtruderNozzleCountTotal(preset_bundle, extruder_id)
278 : getExtruderNozzleCount(preset_bundle, extruder_id, volume_type);
279 plater->sidebar().set_extruder_nozzle_count(extruder_id, display_count);
280}

References Slic3r::Preset::config, Slic3r::PresetCollection::get_edited_preset(), getExtruderNozzleCount(), getExtruderNozzleCountTotal(), Slic3r::nvtHybrid, Slic3r::ConfigBase::option(), plater(), and Slic3r::PresetBundle::printers.

Referenced by Slic3r::GUI::Sidebar::priv::get_nozzle_options(), Slic3r::GUI::Plater::priv::load_files(), manuallySetNozzleCount(), Slic3r::GUI::TabPrinter::on_preset_loaded(), Slic3r::GUI::TabPrinter::set_extruder_volume_type(), and tryPopUpMultiNozzleDialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdatePositionAlignment()

void Slic3r::GUI::UpdatePositionAlignment ( wxWindow * w,
wxPoint base_position,
bool align_right )
inlinestatic
3338 {
3339 if (!align_right) {
3340 base_position.x -= w->GetSize().x;
3341 }
3342 w->SetPosition(base_position);
3343}

Referenced by Slic3r::GUI::FinishSyncAmsDialog::Layout(), Slic3r::GUI::SyncNozzleAndAmsDialog::Layout(), Slic3r::GUI::FinishSyncAmsDialog::update_info(), and Slic3r::GUI::SyncNozzleAndAmsDialog::update_info().

Here is the caller graph for this function:

◆ url_encode() [1/3]

std::string Slic3r::GUI::url_encode ( const std::string & value)
static
33 {
34 std::ostringstream escaped;
35 escaped.fill('0');
36 escaped << std::hex;
37 for (std::string::const_iterator i = value.begin(), n = value.end(); i != n; ++i) {
38 std::string::value_type c = (*i);
39
40 // Keep alphanumeric and other accepted characters intact
41 if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') {
42 escaped << c;
43 continue;
44 }
45
46 // Any other characters are percent-encoded
47 escaped << std::uppercase;
48 escaped << '%' << std::setw(2) << int((unsigned char)c);
49 escaped << std::nouppercase;
50 }
51 return escaped.str();
52}

Referenced by Slic3r::GUI::PrivacyUpdateDialog::ShowReleaseNote(), Slic3r::GUI::UpdateVersionDialog::ShowReleaseNote(), and Slic3r::GUI::MarkdownTip::ShowTip().

Here is the caller graph for this function:

◆ url_encode() [2/3]

std::string Slic3r::GUI::url_encode ( const std::string & value)
static
34 {
35 std::ostringstream escaped;
36 escaped.fill('0');
37 escaped << std::hex;
38 for (std::string::const_iterator i = value.begin(), n = value.end(); i != n; ++i) {
39 std::string::value_type c = (*i);
40
41 // Keep alphanumeric and other accepted characters intact
42 if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') {
43 escaped << c;
44 continue;
45 }
46
47 // Any other characters are percent-encoded
48 escaped << std::uppercase;
49 escaped << '%' << std::setw(2) << int((unsigned char)c);
50 escaped << std::nouppercase;
51 }
52 return escaped.str();
53}

◆ url_encode() [3/3]

std::string Slic3r::GUI::url_encode ( const std::string & value)
static
459 {
460 std::ostringstream escaped;
461 escaped.fill('0');
462 escaped << std::hex;
463 for (std::string::const_iterator i = value.begin(), n = value.end(); i != n; ++i) {
464 std::string::value_type c = (*i);
465
466 // Keep alphanumeric and other accepted characters intact
467 if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') {
468 escaped << c;
469 continue;
470 }
471
472 // Any other characters are percent-encoded
473 escaped << std::uppercase;
474 escaped << '%' << std::setw(2) << int((unsigned char)c);
475 escaped << std::nouppercase;
476 }
477 return escaped.str();
478}

◆ url_get_param()

std::string Slic3r::GUI::url_get_param ( const std::string & url,
const std::string & key )
36{
37 size_t start = url.find(key);
38 if (start == std::string::npos) return "";
39 size_t eq = url.find('=', start);
40 if (eq == std::string::npos) return "";
41 std::string key_str = url.substr(start, eq - start);
42 if (key_str != key)
43 return "";
44 start += key.size() + 1;
45 size_t end = url.find('&', start);
46 if (end == std::string::npos) end = url.length(); // Last param
47 std::string result = url.substr(start, end - start);
48 return result;
49}

Referenced by Slic3r::GUI::HttpServer::auth_handle_request(), and Slic3r::GUI::OAuthJob::process().

Here is the caller graph for this function:

◆ use_nozzle_row_font()

void Slic3r::GUI::use_nozzle_row_font ( ComboBox * combo)
static
740{
741 // A read-only combo draws its value with the font of the TextInput it is built on, and its
742 // dropped list carries a font of its own.
743 combo->SetFont(Label::Body_13);
744 combo->GetDropDown().SetFont(Label::Body_13);
745
746 // A row is as tall as the tags of the variant switch: a line of Body_10 text plus the 3 points of
747 // padding they put above and below it. TextInput::messureSize() instead sizes a combo as its
748 // (hidden) text control plus 8, and on macOS that control's best height is a fixed 16 points
749 // whatever font it carries, so the box would keep the height of the Body_14 it was created with.
750 // Handing the control the height the row asks for, less those 8 points, keeps messureSize()'s own
751 // arithmetic landing on the small box however often it re-measures.
752 const int row_height = combo->GetTextExtent("0.4 mm").y + 2 * combo->FromDIP(3);
753 auto *text_ctrl = combo->GetTextCtrl();
754 text_ctrl->SetFont(Label::Body_13);
755 text_ctrl->SetInitialSize(wxSize(text_ctrl->GetBestSize().x, row_height - 8));
756
757 combo->SetMinSize(wxSize(combo->GetMinSize().x, row_height));
758 combo->SetSize(wxSize(combo->GetSize().x, row_height));
759}
DropDown & GetDropDown()
Definition ComboBox.hpp:43
virtual bool SetFont(wxFont const &font) override
Definition ComboBox.cpp:219

References Label::Body_13, ComboBox::GetDropDown(), and ComboBox::SetFont().

Referenced by Slic3r::GUI::ExtruderGroup::ExtruderGroup(), and Slic3r::GUI::ExtruderGroup::create_nozzle_row().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ user_texture_dir()

std::string Slic3r::GUI::user_texture_dir ( )
362{
363 const boost::filesystem::path dir = boost::filesystem::path(Slic3r::data_dir()) / "textures" / "displacement";
364 boost::system::error_code ec;
365 boost::filesystem::create_directories(dir, ec);
366 if (ec) {
367 BOOST_LOG_TRIVIAL(error) << "Could not create the user texture directory " << dir.string() << ": " << ec.message();
368 return {};
369 }
370 return dir.string();
371}

References Slic3r::data_dir().

Referenced by Slic3r::GUI::anonymous_namespace{TextureLibrary.cpp}::in_user_texture_dir(), texture_library(), and Slic3r::GUI::anonymous_namespace{TextureLibrary.cpp}::write_user_texture().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ utf8_offset()

size_t Slic3r::GUI::utf8_offset ( const std::string & str,
size_t count )
static
900{
901 const char* const begin = str.c_str();
902 const char* const end = begin + str.size();
903 const char* pos = begin;
904 for (size_t i = 0; i < count && pos < end; ++i) {
905 unsigned int codepoint = 0;
906 pos += ImTextCharFromUtf8(&codepoint, pos, end);
907 }
908 return pos - begin;
909}

References count.

Referenced by Slic3r::GUI::GCodeViewer::SequentialView::GCodeWindow::render().

Here is the caller graph for this function:

◆ validate_custom_gcode_cb() [1/2]

void Slic3r::GUI::validate_custom_gcode_cb ( Tab * tab,
ConfigOptionsGroupShp opt_group,
const t_config_option_key & opt_key,
const boost::any & value )
static
4360 {
4361 tab->validate_custom_gcodes_was_shown = !Tab::validate_custom_gcode(opt_group->title, boost::any_cast<std::string>(value));
4362 tab->update_dirty();
4363 tab->on_value_change(opt_key, value);
4364}
const wxString title
Definition OptionsGroup.hpp:161
static bool validate_custom_gcode(const wxString &title, const std::string &gcode)
Definition Tab.cpp:4333
virtual void on_value_change(const std::string &opt_key, const boost::any &value)
Definition Tab.cpp:2071
bool validate_custom_gcodes_was_shown
Definition Tab.hpp:521
void update_dirty()
Definition Tab.cpp:1610

References Slic3r::GUI::Tab::on_value_change(), Slic3r::GUI::OptionsGroup::title, Slic3r::GUI::Tab::update_dirty(), Slic3r::GUI::Tab::validate_custom_gcode(), and Slic3r::GUI::Tab::validate_custom_gcodes_was_shown.

Here is the call graph for this function:

◆ validate_custom_gcode_cb() [2/2]

void Slic3r::GUI::validate_custom_gcode_cb ( Tab * tab,
const wxString & title,
const t_config_option_key & opt_key,
const boost::any & value )
static
4354 {
4355 tab->validate_custom_gcodes_was_shown = !Tab::validate_custom_gcode(title, boost::any_cast<std::string>(value));
4356 tab->update_dirty();
4357 tab->on_value_change(opt_key, value);
4358}

References Slic3r::GUI::Tab::on_value_change(), Slic3r::GUI::Tab::update_dirty(), Slic3r::GUI::Tab::validate_custom_gcode(), and Slic3r::GUI::Tab::validate_custom_gcodes_was_shown.

Referenced by Slic3r::GUI::TabFilament::build(), Slic3r::GUI::TabPrint::build(), and Slic3r::GUI::TabPrinter::build_fff().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ validate_thumbnails_string()

ThumbnailErrors Slic3r::GUI::validate_thumbnails_string ( wxString & str,
const wxString & def_ext = "PNG" )
146{
147 std::string input_string = into_u8(str);
148
149 str.Clear();
150
151 auto [thumbnails_list, errors] = GCodeThumbnails::make_and_check_thumbnail_list(input_string);
152 if (!thumbnails_list.empty()) {
154 for (const auto& [format, size] : thumbnails_list)
155 str += format_wxstr("%1%x%2%/%3%, ", size.x(), size.y(), extentions[int(format)]);
156 str.resize(str.Len() - 2);
157 }
158
159 return errors;
160}
std::pair< GCodeThumbnailDefinitionsList, ThumbnailErrors > make_and_check_thumbnail_list(const std::string &thumbnails_string, const std::string_view def_ext)
Definition Thumbnails.cpp:546

References format(), format_wxstr(), Slic3r::ConfigOptionEnum< T >::get_enum_names(), into_u8(), and Slic3r::GCodeThumbnails::make_and_check_thumbnail_list().

Referenced by Slic3r::GUI::Field::get_value_by_opt_type().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ variant_keys()

std::vector< std::string > Slic3r::GUI::variant_keys ( DynamicPrintConfig const & config)
static
3766{
3767 std::vector<std::string> t;
3768 for (const std::string &opt_key : config.keys()) {
3769 auto opt = config.option(opt_key);
3770 if (opt->type() & coVectorType) {
3771 auto vec = dynamic_cast<ConfigOptionVectorBase const *>(opt);
3772 for (size_t i = 0; i < vec->size(); i++)
3773 if (!vec->is_nil(i))
3774 t.push_back(opt_key + "#" + std::to_string(i));
3775 } else {
3776 t.push_back(opt_key);
3777 }
3778 }
3779 return t;
3780}
@ coVectorType
Definition Config.hpp:181

References Slic3r::coVectorType, Slic3r::DynamicConfig::keys(), and Slic3r::ConfigBase::option().

Referenced by Slic3r::GUI::Tab::check_extruder_options_status(), Slic3r::GUI::Tab::switch_excluder(), Slic3r::GUI::Tab::sync_excluder(), Slic3r::GUI::Tab::update_all_extruder_options_status(), and Slic3r::GUI::TabPrintModel::update_model_config().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ verify_instances_rotation_synchronized()

void Slic3r::GUI::verify_instances_rotation_synchronized ( const Model & model,
const GLVolumePtrs & volumes )
static
3023{
3024 for (int idx_object = 0; idx_object < int(model.objects.size()); ++idx_object) {
3025 int idx_volume_first = -1;
3026 for (int i = 0; i < (int)volumes.size(); ++i) {
3027 if (volumes[i]->object_idx() == idx_object) {
3028 idx_volume_first = i;
3029 break;
3030 }
3031 }
3032 //assert(idx_volume_first != -1); // object without instances?
3033 if (idx_volume_first == -1)
3034 continue;
3035 const Transform3d &rotation0 = volumes[idx_volume_first]->get_instance_transformation().get_matrix();
3036 for (int i = idx_volume_first + 1; i < (int)volumes.size(); ++i)
3037 if (volumes[i]->object_idx() == idx_object) {
3038 const Transform3d &rotation = volumes[i]->get_instance_transformation().get_matrix();
3039 assert(is_rotation_xy_synchronized(rotation, rotation0));
3040 }
3041 }
3042}
static bool is_rotation_xy_synchronized(const Transform3d &rot_xyz_from, const Transform3d &rot_xyz_to)
Definition Selection.cpp:3009

References is_rotation_xy_synchronized(), and Slic3r::Model::objects.

Referenced by Slic3r::GUI::Selection::synchronize_unselected_instances().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ version_greater_or_equal_to()

bool Slic3r::GUI::version_greater_or_equal_to ( const std::string & version,
unsigned int major,
unsigned int minor )
static
147{
148 if (version == "N/A")
149 return false;
150
151 std::vector<std::string> tokens;
152 boost::split(tokens, version, boost::is_any_of(" "), boost::token_compress_on);
153
154 if (tokens.empty())
155 return false;
156
157 std::vector<std::string> numbers;
158 boost::split(numbers, tokens[0], boost::is_any_of("."), boost::token_compress_on);
159
160 unsigned int gl_major = 0;
161 unsigned int gl_minor = 0;
162
163 if (numbers.size() > 0)
164 gl_major = ::atoi(numbers[0].c_str());
165
166 if (numbers.size() > 1)
167 gl_minor = ::atoi(numbers[1].c_str());
168
169 if (gl_major < major)
170 return false;
171 else if (gl_major > major)
172 return true;
173 else
174 return gl_minor >= minor;
175}

Referenced by Slic3r::GUI::OpenGLManager::GLInfo::is_glsl_version_greater_or_equal_to(), and Slic3r::GUI::OpenGLManager::GLInfo::is_version_greater_or_equal_to().

Here is the caller graph for this function:

◆ view_type_config_map()

const std::vector< std::pair< std::string, libvgcode::EViewType > > & Slic3r::GUI::view_type_config_map ( )
static
184{
185 static const std::vector<std::pair<std::string, libvgcode::EViewType>> map = {
186 { "summary", libvgcode::EViewType::Summary },
187 { "feature_type", libvgcode::EViewType::FeatureType },
188 { "color_print", libvgcode::EViewType::ColorPrint },
189 { "speed", libvgcode::EViewType::Speed },
190 { "actual_speed", libvgcode::EViewType::ActualSpeed },
191 { "acceleration", libvgcode::EViewType::Acceleration },
192 { "jerk", libvgcode::EViewType::Jerk },
193 { "height", libvgcode::EViewType::Height },
194 { "width", libvgcode::EViewType::Width },
195 { "volumetric_flow_rate", libvgcode::EViewType::VolumetricFlowRate },
196 { "actual_volumetric_flow_rate", libvgcode::EViewType::ActualVolumetricFlowRate },
197 { "layer_time_linear", libvgcode::EViewType::LayerTimeLinear },
198 { "layer_time_logarithmic", libvgcode::EViewType::LayerTimeLogarithmic },
199 { "fan_speed", libvgcode::EViewType::FanSpeed },
200 { "temperature", libvgcode::EViewType::Temperature },
201 { "pressure_advance", libvgcode::EViewType::PressureAdvance },
202 };
203 return map;
204}

References libvgcode::Acceleration, libvgcode::ActualSpeed, libvgcode::ActualVolumetricFlowRate, libvgcode::ColorPrint, libvgcode::FanSpeed, libvgcode::FeatureType, libvgcode::Height, libvgcode::Jerk, libvgcode::LayerTimeLinear, libvgcode::LayerTimeLogarithmic, libvgcode::PressureAdvance, libvgcode::Speed, libvgcode::Summary, libvgcode::Temperature, libvgcode::VolumetricFlowRate, and libvgcode::Width.

Referenced by Slic3r::GUI::GCodeViewer::default_view_type_choices(), Slic3r::GUI::GCodeViewer::view_type_from_config_name(), and Slic3r::GUI::GCodeViewer::view_type_to_config_name().

Here is the caller graph for this function:

◆ warning_catcher()

void Slic3r::GUI::warning_catcher ( wxWindow * parent,
const wxString & message )
330{
331 MessageDialog msg(parent, message, _L("Warning"), wxOK | wxICON_WARNING);
332 msg.ShowModal();
333}

References _L, and Slic3r::GUI::DPIAware< P >::ShowModal().

Referenced by Slic3r::GUI::Plater::priv::split_object().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WKWebView_evaluateJavaScript()

void Slic3r::GUI::WKWebView_evaluateJavaScript ( void * web,
wxString const & script,
void(* callback )(wxString const &) )
89{
90 [(WKWebView*)web evaluateJavaScript:wxCFStringRef(script).AsNSString() completionHandler: ^(id result, NSError *error) {
91 if (callback && error != nil) {
92 wxString err = wxCFStringRef(error.localizedFailureReason).AsString();
93 callback(err);
94 }
95 }];
96}

Referenced by WebView::RunScript().

Here is the caller graph for this function:

◆ WKWebView_force_display()

void Slic3r::GUI::WKWebView_force_display ( void * web)
110{
111 WKWebView * webView = (WKWebView*)web;
112 if (!webView)
113 return;
114 [webView setNeedsLayout:YES];
115 [webView setNeedsDisplay:YES];
116 [[webView layer] setNeedsDisplay];
117}

Referenced by Slic3r::GUI::ColorPickerDialog::repaint_webview(), and Slic3r::GUI::SpeedDialWebDialog::repaint_webview().

Here is the caller graph for this function:

◆ WKWebView_setTransparentBackground()

void Slic3r::GUI::WKWebView_setTransparentBackground ( void * web)
99{
100 WKWebView * webView = (WKWebView*)web;
101 [webView layer].backgroundColor = [NSColor clearColor].CGColor;
102 [webView registerForDraggedTypes: @[NSFilenamesPboardType]];
103}

Referenced by WebView::CreateWebView().

Here is the caller graph for this function:

◆ world_matrix_fixed() [1/2]

Transform3d Slic3r::GUI::world_matrix_fixed ( const GLVolume & gl_volume,
const ModelObjectPtrs & objects )

Get transformation to world.

  • use fix after store to 3mf when exists
Parameters
gl_volumeScene volume
objectsTo identify Model volume with fix transformation
Returns
Fixed Transformation of gl_volume
279{
280 Transform3d res = gl_volume.world_matrix();
281
282 const ModelVolume *mv = get_model_volume(gl_volume, objects);
283 if (!mv)
284 return res;
285
286 const std::optional<EmbossShape> &es = mv->emboss_shape;
287 if (!es.has_value())
288 return res;
289
290 const std::optional<Transform3d> &fix = es->fix_3mf_tr;
291 if (!fix.has_value())
292 return res;
293
294 return res * fix->inverse();
295}

References Slic3r::ModelVolume::emboss_shape, get_model_volume(), and Slic3r::GLVolume::world_matrix().

Referenced by calc_surface_offset(), anonymous_namespace{SurfaceDrag.cpp}::start_dragging(), and world_matrix_fixed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ world_matrix_fixed() [2/2]

Transform3d Slic3r::GUI::world_matrix_fixed ( const Selection & selection)

Get transformation to world.

  • use fix after store to 3mf when exists NOTE: when not one volume selected return identity
Parameters
selectionSelected volume
Returns
Fixed Transformation of selected volume in selection
298{
299 const GLVolume *gl_volume = get_selected_gl_volume(selection);
300 assert(gl_volume != nullptr);
301 if (gl_volume == nullptr)
302 return Transform3d::Identity();
303
304 return world_matrix_fixed(*gl_volume, selection.get_model()->objects);
305}

References Slic3r::GUI::Selection::get_model(), get_selected_gl_volume(), Slic3r::Model::objects, and world_matrix_fixed().

Here is the call graph for this function:

◆ world_to_screen_px()

wxPoint Slic3r::GUI::world_to_screen_px ( const Camera & cam,
const Vec3d & world )
static
90{
91 // NB: multiply the raw 4x4 matrices, NOT the Transform3d objects — the projection is not
92 // affine, so Transform*Transform mangles it (Eigen assumes affine) and yields garbage w.
93 const Eigen::Matrix4d m = cam.get_projection_matrix().matrix() * cam.get_view_matrix().matrix();
94 const Eigen::Vector4d clip = m * world.homogeneous();
95 if (std::abs(clip.w()) < 1e-9) return wxPoint(-1, -1);
96 const Vec3d ndc = clip.head<3>() / clip.w();
97 const std::array<int, 4>& vp = cam.get_viewport();
98 const double sx = vp[0] + (ndc.x() * 0.5 + 0.5) * vp[2];
99 const double sy = vp[1] + (1.0 - (ndc.y() * 0.5 + 0.5)) * vp[3]; // GL y-up -> wx y-down
100 return wxPoint(int(sx + 0.5), int(sy + 0.5));
101}
const Transform3d & get_view_matrix() const
Definition Camera.hpp:115

References Slic3r::GUI::Camera::get_projection_matrix(), Slic3r::GUI::Camera::get_view_matrix(), and Slic3r::GUI::Camera::get_viewport().

Referenced by Slic3r::GUI::DesignSketchTool::constrain_value_anchor(), Slic3r::GUI::DesignSketchTool::draw_dim_label(), Slic3r::GUI::DesignSketchTool::open_next_autoedit_dim(), Slic3r::GUI::DesignSketchTool::open_selection_dimension_editor(), Slic3r::GUI::DesignSketchTool::open_value_editor(), and Slic3r::GUI::DesignSketchTool::resolve_solid_pick().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wrap_2pi()

double Slic3r::GUI::wrap_2pi ( double a)
static
2962{
2963 while (a < 0.0) a += 2.0 * M_PI;
2964 while (a >= 2.0 * M_PI) a -= 2.0 * M_PI;
2965 return a;
2966}

References M_PI.

◆ write_plan_value()

void Slic3r::GUI::write_plan_value ( std::vector< SketchEntityConstraintDef > & defs,
double v )
static
8444{
8445 for (auto& d : defs)
8446 d.value = (d.type == SketchConstraintType::Angle) ? v * M_PI / 180.0 : v;
8447}
@ Angle
Definition SketchEngine.hpp:104

References Slic3r::Angle, and M_PI.

Referenced by Slic3r::GUI::DesignPanel::apply_live_constraint().

Here is the caller graph for this function:

◆ wx_colour_to_recipe_rgb()

ColorDecomposeRgb Slic3r::GUI::wx_colour_to_recipe_rgb ( const wxColour & color)
static
68{
69 return {
70 static_cast<unsigned char>(color.Red()),
71 static_cast<unsigned char>(color.Green()),
72 static_cast<unsigned char>(color.Blue())
73 };
74}

Referenced by Slic3r::GUI::ColorDecomposeDialog::compute_decomposition().

Here is the caller graph for this function:

◆ WX_DECLARE_HASH_MAP()

Slic3r::GUI::WX_DECLARE_HASH_MAP ( wxString ,
MsgButton * ,
wxStringHash ,
wxStringEqual ,
MsgButtonsHash  )

◆ WX_DECLARE_LIST()

Slic3r::GUI::WX_DECLARE_LIST ( AmsRadioSelector ,
AmsRadioSelectorList  )

◆ WX_DEFINE_ARRAY() [1/2]

Slic3r::GUI::WX_DEFINE_ARRAY ( AmsPanel * ,
AmsPanelHash  )

◆ WX_DEFINE_ARRAY() [2/2]

Slic3r::GUI::WX_DEFINE_ARRAY ( AuFiles * ,
AuFilesHash  )

◆ WX_DEFINE_ARRAY_PTR()

Slic3r::GUI::WX_DEFINE_ARRAY_PTR ( ObjectDataViewModelNode * ,
MyObjectTreeModelNodePtrArray  )

◆ WX_DEFINE_LIST()

Slic3r::GUI::WX_DEFINE_LIST ( AmsRadioSelectorList )

◆ wxBEGIN_EVENT_TABLE() [1/5]

Slic3r::GUI::wxBEGIN_EVENT_TABLE ( CameraPopup ,
PopupWindow  )

References Slic3r::GUI::CameraPopup::OnKillFocus(), Slic3r::GUI::CameraPopup::OnMouse(), Slic3r::GUI::CameraPopup::OnSetFocus(), and Slic3r::GUI::CameraPopup::OnSize().

Here is the call graph for this function:

◆ wxBEGIN_EVENT_TABLE() [2/5]

Slic3r::GUI::wxBEGIN_EVENT_TABLE ( ObjectGrid ,
wxGrid  )
822{
823 input_string = wxEmptyString;
824
825 if (type != coBool)
826 return false;
827
828 bool consumed = false;
829 wxGridCellCoords coords(row, col);
830
831 //found the grid window for this event
832 /*wxGridWindow *gridWindow =
833 DevicePosToGridWindow(event.GetPosition() + m_gridWin->GetPosition());
834 if ( !gridWindow )
835 gridWindow = m_gridWin;
836 wxPoint position = CalcGridWindowUnscrolledPosition(event.GetPosition(), gridWindow);*/
837
838 //compute the position considering the scrolled rows
839#if HAS_COL_HEADER
840 wxPoint event_position = event.GetPosition();
841 event_position.y -= m_colLabelHeight;
842
843 wxPoint position = CalcGridWindowUnscrolledPosition(event_position, nullptr);
844#else
845 wxPoint position = CalcGridWindowUnscrolledPosition(event.GetPosition(), nullptr);
846#endif
847
848 int col_right_pos = GetColRight(col);
849 int row_up_pos = GetRowTop(row);
850 int row_down_pos = GetRowBottom(row);
851 int row_offset = ((row_down_pos - row_up_pos) - grid_cell_checkbox_size) /2;
852 if (row_offset < 0)
853 row_offset = 0;
854 bool checkbox_hovered = false;
855 if ((position.x > (col_right_pos - grid_cell_checkbox_size)) && (position.y >= (row_up_pos + row_offset)) && (position.y <= (row_down_pos - row_offset)))
856 checkbox_hovered = true;
857 //wxGridCellRenderer *render = this->GetCellRenderer(row, col);
858 //wxDC temp_dc;
859 //wxGridCellAttr temp_attr;
860 //const wxRect checkBoxRect =
861 // wxGetContentRect(render->GetBestSize(*this, temp_attr, temp_dc, row, col),
862 // rect, hAlign, vAlign);
863 // Process the mouse down event depending on the current cursor mode. Note
864 // that this assumes m_cursorMode was set in the mouse move event hendler.
865 if ( m_cursorMode == WXGRID_CURSOR_SELECT_CELL)
866 {
867 if (!event.ShiftDown() && !event.CmdDown())
868 {
869 DisableCellEditControl();
870 MakeCellVisible(coords);
871 ClearSelection();
872
873 if ( m_selection )
874 {
875 // In row or column selection mode just clicking on the cell
876 // should select the row or column containing it: this is more
877 // convenient for the kinds of controls that use such selection
878 // mode and is compatible with 2.8 behaviour (see #12062).
879 switch ( m_selection->GetSelectionMode() )
880 {
881 case wxGridSelectNone:
882 case wxGridSelectCells:
883 //case wxGridSelectRowsOrColumns:
884 // nothing to do in these cases
885 //BBS: select this cell when first click
886 m_selection->SelectBlock(coords.GetRow(), coords.GetCol(),
887 coords.GetRow(), coords.GetCol(),
888 event);
889 consumed = true;
890 break;
891
892 default:
893 consumed = false;
894 break;
895 }
896 }
897 else
898 consumed = true;
899
900 if (checkbox_hovered)
901 m_waitForSlowClick = true;
902 else
903 m_waitForSlowClick = false;
904 SetCurrentCell(coords);
905 }
906 }
907 return consumed;
908}
static const int grid_cell_checkbox_size
Definition GUI_ObjectTable.cpp:63

References Slic3r::coBool, grid_cell_checkbox_size, Slic3r::GUI::ObjectGrid::OnChar(), Slic3r::GUI::ObjectGrid::OnColHeadLeftClick(), Slic3r::GUI::ObjectGrid::OnKeyDown(), Slic3r::GUI::ObjectGrid::OnKeyUp(), and Slic3r::GUI::ObjectGrid::OnRangeSelected().

Here is the call graph for this function:

◆ wxBEGIN_EVENT_TABLE() [3/5]

Slic3r::GUI::wxBEGIN_EVENT_TABLE ( ObjectTablePanel ,
wxPanel  )
2771 : wxPanel( parent, id, pos, size, style, name ), m_model(modelObj), m_plater(platerObj), m_float_validator(2, nullptr, wxNUM_VAL_ZERO_AS_BLANK)
2772{
2773 //m_bg_colour = wxColour(0xfa, 0xfa, 0xfa);
2774 m_float_validator.SetRange(0, 100);
2775 m_bg_colour = wxColour("#FFFFFF");
2776 //m_hover_colour = wxColour(61, 70, 72);
2777 SetBackgroundColour(m_bg_colour);
2778
2779 SetSize(wxSize(-1, FromDIP(450)));
2780 SetMinSize(wxSize(-1, FromDIP(450)));
2781 //SetMaxSize(wxSize(-1, FromDIP(450)));
2782
2783
2784 //m_search_line = new wxTextCtrl(this, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER);
2785
2786 init_bitmap();
2787
2788 init_filaments_and_colors();
2789
2790 m_top_sizer = new wxBoxSizer(wxHORIZONTAL);
2791 //m_top_sizer->Add(m_search_line, 0, wxEXPAND | wxLEFT | wxTOP | wxRIGHT, 10);
2792
2793
2794 m_object_grid = new ObjectGrid(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS);
2795 m_object_grid_table = new ObjectGridTable(this);
2796 this->load_data();
2797 //m_object_grid_table->SetAttrProvider(new MyGridCellAttrProvider);
2798 //m_object_grid->AssignTable(m_object_grid_table);
2799
2800 m_side_window = new wxScrolledWindow(this, wxID_ANY, wxDefaultPosition, wxSize(FromDIP(440),FromDIP(480)), wxVSCROLL);
2801 m_side_window->SetScrollRate(0, FromDIP(20));
2802 m_page_sizer = new wxBoxSizer(wxVERTICAL);
2803 //m_page_top_sizer = new wxBoxSizer(wxHORIZONTAL);
2804 m_side_window->SetBackgroundColour(wxColour(0xff, 0xff, 0xff));
2805 m_side_window->SetSizer(m_page_sizer);
2806 m_side_window->SetScrollbars(1, FromDIP(20), 1, 2);
2807 //m_side_window->ShowScrollbars(wxSHOW_SB_NEVER, wxSHOW_SB_NEVER);
2808
2809 //m_side_window->EnableScrolling(false, true);
2810 //m_side_window->SetSize(wxSize(128, 512));
2811
2812 /* m_page_text = new wxStaticText(m_side_window, wxID_ANY, wxString(L("Per Object Setting")), wxDefaultPosition, wxSize(-1, 32), wxALIGN_CENTRE_HORIZONTAL|wxST_ELLIPSIZE_END);
2813 m_page_text->SetMaxSize(wxSize(256, 32));
2814 m_page_text->SetFont(Label::Head_18);
2815 m_page_top_sizer->Add(m_page_text, 0, wxEXPAND, 5);*/
2816
2817
2818
2819
2820 //TODO, adjust later
2821 /*
2822 _bmp_reset = ScalableBitmap(m_side_window, "undo");
2823 m_bmp_reset_disable = ScalableBitmap(m_side_window, "dot");
2824 m_global_reset = new ScalableButton(m_side_window, wxID_ANY, m_bmp_reset);
2825 m_global_reset->SetToolTip(_(L("Reset All")));
2826
2827 m_global_reset->SetBitmapDisabled(m_bmp_reset_disable.bmp());
2828
2829 m_global_reset->Bind(wxEVT_BUTTON, [this](wxEvent &event) {
2830 m_object_grid_table->resetValuesInCurrentCell(event);
2831 });
2832 m_global_reset->Enable(false);
2833 m_page_top_sizer->AddSpacer(16);
2834 m_page_top_sizer->Add(m_global_reset, 0, wxEXPAND, 5);*/
2835
2836
2837
2838 //create object settings
2839 m_side_window->SetFont(::Label::Body_12);
2840 m_object_settings = new ObjectTableSettings(m_side_window, m_object_grid_table);
2841 m_object_settings->Hide();
2842 //m_page_sizer->Add(m_page_top_sizer, 0, wxALIGN_CENTER_HORIZONTAL, 0);
2843 m_page_sizer->Add(m_object_settings->get_sizer(), 1, wxEXPAND | wxALL, 2 );
2844 m_side_window->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& evt) {
2845 m_object_grid->SetFocus();
2846 evt.Skip();
2847 });
2848
2849 auto m_line_left = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(2, -1), wxTAB_TRAVERSAL);
2850 m_line_left->SetBackgroundColour(wxColour(0xA6, 0xa9, 0xAA));
2851
2852
2853 m_top_sizer->Add(m_object_grid, 1, wxEXPAND,0);
2854 m_top_sizer->Add(m_line_left, 0, wxEXPAND, 0);
2855 m_top_sizer->Add(m_side_window, 0, wxEXPAND, 0);
2856
2857 //wxBoxSizer * page_sizer = new wxBoxSizer(wxHORIZONTAL);
2858
2859 SetFont(::Label::Body_13);
2860 SetSizer(m_top_sizer);
2861 Layout();
2862}
Definition GUI_ObjectTable.hpp:284
Definition GUI_ObjectTable.hpp:231
Definition GUI_ObjectTableSettings.hpp:49

References Label::Body_12, Label::Body_13, Slic3r::GUI::ObjectTablePanel::OnCellLeftClick(), Slic3r::GUI::ObjectTablePanel::OnCellValueChanged(), Slic3r::GUI::ObjectTablePanel::OnColSize(), Slic3r::GUI::ObjectTablePanel::OnRangeSelected(), Slic3r::GUI::ObjectTablePanel::OnRowSize(), Slic3r::GUI::ObjectTablePanel::OnSelectCell(), style, and wxMouseEvent.

Here is the call graph for this function:

◆ wxBEGIN_EVENT_TABLE() [4/5]

Slic3r::GUI::wxBEGIN_EVENT_TABLE ( SliceInfoPopup ,
PopupWindow  )

References Slic3r::GUI::SliceInfoPopup::OnKillFocus(), Slic3r::GUI::SliceInfoPopup::OnMouse(), Slic3r::GUI::SliceInfoPopup::OnSetFocus(), and Slic3r::GUI::SliceInfoPopup::OnSize().

Here is the call graph for this function:

◆ wxBEGIN_EVENT_TABLE() [5/5]

Slic3r::GUI::wxBEGIN_EVENT_TABLE ( TextureImportDialog ,
DPIDialog  )
1749 : DPIDialog(parent, wxID_ANY, _L("Import Model"),
1750 wxDefaultPosition, wxDefaultSize,
1751 (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) & ~(wxMINIMIZE_BOX | wxMAXIMIZE_BOX))
1752 , m_textured_mesh(textured_mesh)
1753 , m_filament_entries(filament_entries)
1754 , m_initial_cancel_callback(std::move(initial_cancel_callback))
1755 , m_initial_progress_callback(std::move(initial_progress_callback))
1756{
1757 SetSize(wxSize(FromDIP(960), FromDIP(640)));
1758
1759 m_filament_colors_rgba.reserve(m_filament_entries.size());
1760 m_filament_color_strs.reserve(m_filament_entries.size());
1761 m_filament_names.reserve(m_filament_entries.size());
1762 for (size_t i = 0; i < m_filament_entries.size(); ++i) {
1763 auto& entry = m_filament_entries[i];
1764 entry.dialog_index = (int)i;
1765 entry.color_hex = texture_normalize_color_hex(entry.color_hex);
1766 if (entry.name.empty())
1767 entry.name = GUI::format(_u8L("Filament %d"), i + 1);
1768 m_filament_color_strs.push_back(entry.color_hex);
1769 m_filament_names.push_back(entry.name);
1770 m_filament_colors_rgba.push_back(parse_color_string(entry.color_hex));
1771 }
1772
1773 m_existing_filament_count = m_filament_colors_rgba.size();
1774 m_default_virtual_filament_preset_name = resolve_default_virtual_filament_preset_name();
1775
1776 Bind(EVT_TEXTURE_COMPUTE_DONE, &TextureImportDialog::on_computation_complete, this);
1777 Bind(EVT_TEXTURE_COMPUTE_PROGRESS, &TextureImportDialog::on_computation_progress, this);
1778 Bind(EVT_TEXTURE_COMPUTE_ERROR, &TextureImportDialog::on_computation_error, this);
1779 Bind(EVT_TEXTURE_MESH_REPAIR_DECISION, &TextureImportDialog::on_mesh_repair_decision_required, this);
1780
1781 build_ui();
1782 SetMinSize(wxSize(FromDIP(800), FromDIP(500)));
1783 CenterOnParent();
1784 wxGetApp().UpdateDlgDarkUI(this);
1785
1786 m_preview_canvas->set_mesh_data(m_textured_mesh.vertices, m_textured_mesh.indices);
1787
1788 // Pre-computed face colors (OBJ vertex colors / MTL face colors):
1789 // use them directly as the Original preview, skip texture decode.
1790 if (!m_textured_mesh.precomputed_face_colors.empty()) {
1791 m_preview_canvas->set_original_face_colors(m_textured_mesh.precomputed_face_colors);
1792 } else if (!m_textured_mesh.textures.empty()) {
1793 std::vector<std::vector<unsigned char>> tex_pixels_rgb;
1794 std::vector<int> tex_widths, tex_heights;
1795 tex_pixels_rgb.reserve(m_textured_mesh.textures.size());
1796 tex_widths.reserve(m_textured_mesh.textures.size());
1797 tex_heights.reserve(m_textured_mesh.textures.size());
1798
1799 for (const auto& ti : m_textured_mesh.textures) {
1800 std::vector<unsigned char> bgr_pixels;
1801 int w = 0, h = 0;
1802 if (Slic3r::decode_texture_to_pixels(ti, bgr_pixels, w, h) && !bgr_pixels.empty()) {
1803 // Convert BGR to RGB for OpenGL
1804 for (size_t p = 0; p < bgr_pixels.size(); p += 3)
1805 std::swap(bgr_pixels[p], bgr_pixels[p + 2]);
1806 tex_pixels_rgb.push_back(std::move(bgr_pixels));
1807 } else {
1808 tex_pixels_rgb.push_back({});
1809 }
1810 tex_widths.push_back(w);
1811 tex_heights.push_back(h);
1812 }
1813
1814 const size_t nf = m_textured_mesh.indices.size();
1815 const bool has_mapping = !m_textured_mesh.material_texture_map.empty();
1816
1817 // Build per-face UV array
1818 std::vector<std::array<std::array<float,2>, 3>> face_uvs(nf);
1819 for (size_t fi = 0; fi < nf; ++fi) {
1820 if (m_textured_mesh.has_face_uvs()) {
1821 const auto& ui = m_textured_mesh.uv_indices[fi];
1822 for (int vi = 0; vi < 3; ++vi) {
1823 int idx = ui[vi];
1824 if (idx >= 0 && static_cast<size_t>(idx) < m_textured_mesh.uv_coords.size())
1825 face_uvs[fi][vi] = m_textured_mesh.uv_coords[idx];
1826 else
1827 face_uvs[fi][vi] = {0.f, 0.f};
1828 }
1829 } else if (!m_textured_mesh.uvs.empty()) {
1830 const auto& face = m_textured_mesh.indices[fi];
1831 for (int vi = 0; vi < 3; ++vi) {
1832 int idx = face[vi];
1833 if (idx >= 0 && static_cast<size_t>(idx) < m_textured_mesh.uvs.size())
1834 face_uvs[fi][vi] = m_textured_mesh.uvs[idx];
1835 else
1836 face_uvs[fi][vi] = {0.f, 0.f};
1837 }
1838 }
1839 }
1840
1841 // Build per-face texture index
1842 std::vector<int> face_tex_ids(nf, 0);
1843 for (size_t fi = 0; fi < nf; ++fi) {
1844 int mat_idx = (fi < m_textured_mesh.material_ids.size())
1845 ? m_textured_mesh.material_ids[fi] : -1;
1846 if (has_mapping && mat_idx >= 0
1847 && static_cast<size_t>(mat_idx) < m_textured_mesh.material_texture_map.size())
1848 face_tex_ids[fi] = m_textured_mesh.material_texture_map[mat_idx];
1849 else if (!tex_pixels_rgb.empty())
1850 face_tex_ids[fi] = 0;
1851 else
1852 face_tex_ids[fi] = -1;
1853 }
1854
1855 m_preview_canvas->set_texture_render_data(
1856 tex_pixels_rgb, tex_widths, tex_heights, face_uvs, face_tex_ids);
1857
1858 // Still sample per-face colors as fallback
1859 std::vector<std::array<std::size_t, 3>> orig_colors;
1860 if (Slic3r::sample_original_face_colors(m_textured_mesh, orig_colors))
1861 m_preview_canvas->set_original_face_colors(orig_colors);
1862 }
1863
1864 set_state(TextureImportState::Idle);
1865}
Definition GUI_Utils.hpp:300
void on_computation_progress(wxCommandEvent &evt)
Definition TextureImportDialog.cpp:2419
void on_computation_complete(wxCommandEvent &evt)
Definition TextureImportDialog.cpp:2430
void on_mesh_repair_decision_required(wxCommandEvent &evt)
Definition TextureImportDialog.cpp:2562
void on_computation_error(wxCommandEvent &evt)
Definition TextureImportDialog.cpp:2512
static std::string texture_normalize_color_hex(std::string hex)
Definition TextureImportDialog.cpp:385
static std::string resolve_default_virtual_filament_preset_name()
Definition TextureImportDialog.cpp:446
static std::array< float, 4 > parse_color_string(const std::string &hex)
Definition TextureImportDialog.cpp:359
@ Idle
Definition TextureImportDialog.hpp:43
bool sample_original_face_colors(const TexturedMesh &textured, std::vector< std::array< std::size_t, 3 > > &out_face_colors)
Definition TexturePainting.cpp:699
bool decode_texture_to_pixels(const TextureImage &img, std::vector< unsigned char > &out_pixels, int &out_w, int &out_h)
Definition TexturePainting.cpp:618

References _L, _u8L, Slic3r::decode_texture_to_pixels(), format(), Slic3r::GUI::TextureImportDialog::ID_BTN_APPLY, Slic3r::GUI::TextureImportDialog::ID_BTN_SKIP, Slic3r::GUI::TextureImportDialog::ID_COLOR_16, Slic3r::GUI::TextureImportDialog::ID_COLOR_4, Slic3r::GUI::TextureImportDialog::ID_COLOR_8, Slic3r::GUI::TextureImportDialog::ID_COLOR_AUTO, Idle, Slic3r::GUI::TextureImportDialog::on_apply_clicked(), Slic3r::GUI::TextureImportDialog::on_color_preset_clicked(), Slic3r::GUI::TextureImportDialog::on_computation_complete(), Slic3r::GUI::TextureImportDialog::on_computation_error(), Slic3r::GUI::TextureImportDialog::on_computation_progress(), Slic3r::GUI::TextureImportDialog::on_mesh_repair_decision_required(), Slic3r::GUI::TextureImportDialog::on_ok_clicked(), Slic3r::GUI::TextureImportDialog::on_skip_clicked(), parse_color_string(), resolve_default_virtual_filament_preset_name(), Slic3r::sample_original_face_colors(), and texture_normalize_color_hex().

Here is the call graph for this function:

◆ wxDECLARE_EVENT() [1/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_ADD_CUSTOM_FILAMENT ,
ColorEvent  )

◆ wxDECLARE_EVENT() [2/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_ADD_FILAMENT ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [3/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_ALREADY_READ_HMS ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [4/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_CLIBRATION_AGAIN ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [5/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_CLIBRATION_CANCEL ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [6/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_EXTRUSION_CALI ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [7/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_FILAMENT_BACKUP ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [8/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_GUIDE_WIKI ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [9/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_LOAD ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [10/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_ON_FILAMENT_EDIT ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [11/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_ON_SELECTED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [12/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_REFRESH_RFID ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [13/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_RETRY ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [14/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_SETTINGS ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [15/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_SHOW_HUMIDITY_TIPS ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [16/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_SWITCH ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [17/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_UNLOAD ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [18/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_UNSELETED_AMS ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [19/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AMS_UNSELETED_VAMS ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [20/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AUXILIARY_DONE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [21/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AUXILIARY_IMPORT ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [22/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AUXILIARY_UPDATE_COVER ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [23/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AUXILIARY_UPDATE_DELETE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [24/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_AUXILIARY_UPDATE_RENAME ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [25/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_BIND_MACHINE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [26/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_BIND_MACHINE_FAIL ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [27/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_BIND_MACHINE_SUCCESS ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [28/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_BIND_UPDATE_MESSAGE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [29/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_CALI_ACTION ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [30/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_CALI_TRAY_CHANGED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [31/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_CALIBRATION_JOB_FINISHED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [32/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_CHECK_IP_ADDRESS_FAILED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [33/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_CHECK_IP_ADDRESS_LAYOUT ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [34/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_CHECK_PRIVACY_SHOW ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [35/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_CHECK_PRIVACY_VER ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [36/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_CHECKBOX_CHANGE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [37/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_CLEAR_IPADDRESS ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [38/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_CLOSE_IPADDRESS_DLG ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [39/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_CONNECT_LAN_MODE_PRINT ,
wxCommandEvent  )

References wxDECLARE_EVENT().

Here is the call graph for this function:

◆ wxDECLARE_EVENT() [40/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_CONNECT_LAN_PRINT ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [41/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_CREATE_FILAMENT ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [42/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_CUSTOMEVT_TICKSCHANGED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [43/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_DEL_FILAMENT ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [44/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_DEVICE_CHANGED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [45/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_DIFF_DIALOG_TRANSFER ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [46/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_DISSMISS_MACHINE_LIST ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [47/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_DOWNLOAD_NETWORK_FAILED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [48/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_DWNLDR_FILE_CANCELED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [49/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_DWNLDR_FILE_COMPLETE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [50/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_DWNLDR_FILE_ERROR ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [51/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_DWNLDR_FILE_NAME_CHANGE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [52/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_DWNLDR_FILE_PAUSED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [53/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_DWNLDR_FILE_PROGRESS ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [54/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_EDIT_PRINT_NAME ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [55/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_EJECT_DRIVE_NOTIFICAION_CLICKED ,
EjectDriveNotificationClickedEvent  )

◆ wxDECLARE_EVENT() [56/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_ENTER_IP_ADDRESS ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [57/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_ERROR_DIALOG_BTN_CLICKED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [58/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_EXPORT_GCODE_NOTIFICAION_CLICKED ,
ExportGcodeNotificationClickedEvent  )

◆ wxDECLARE_EVENT() [59/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_FAN_ADD ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [60/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_FAN_CHANGED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [61/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_FAN_DEC ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [62/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_FAN_SWITCH_OFF ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [63/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_FAN_SWITCH_ON ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [64/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_FANCTRL_SWITCH ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [65/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_FILAMENT_COLOR_CHANGED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [66/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_FINISHED_UPDATE_MACHINE_LIST ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [67/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_ADAPTIVE_LAYER_HEIGHT_PROFILE ,
Event< float >  )

◆ wxDECLARE_EVENT() [68/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_ARRANGE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [69/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_ARRANGE_PARTPLATE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [70/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_COLLAPSE_SIDEBAR ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [71/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_COLOR_MODE_CHANGED ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [72/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_ENABLE_ACTION_BUTTONS ,
Event< bool >  )

◆ wxDECLARE_EVENT() [73/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_FORCE_UPDATE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [74/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_GIZMO_HIGHLIGHTER_TIMER ,
wxTimerEvent  )

◆ wxDECLARE_EVENT() [75/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_INCREASE_INSTANCES ,
Event< int >  )

◆ wxDECLARE_EVENT() [76/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_INSTANCE_MOVED ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [77/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_INSTANCE_ROTATED ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [78/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_INSTANCE_SCALED ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [79/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_MOUSE_DRAGGING_FINISHED ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [80/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_MOUSE_DRAGGING_STARTED ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [81/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_OBJECT_SELECT ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [82/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_ORIENT ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [83/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_ORIENT_PARTPLATE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [84/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_PLATE_NAME_CHANGE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [85/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_PLATE_RIGHT_CLICK ,
RBtnPlateEvent  )

◆ wxDECLARE_EVENT() [86/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_PLATE_SELECT ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [87/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_PRINTABLE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [88/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_QUESTION_MARK ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [89/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_REDO ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [90/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_RELOAD_FROM_DISK ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [91/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_REMOVE_OBJECT ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [92/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_RENDER_TIMER ,
wxTimerEvent  )

◆ wxDECLARE_EVENT() [93/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_RESET_LAYER_HEIGHT_PROFILE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [94/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_RESETGIZMOS ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [95/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_RIGHT_CLICK ,
RBtnEvent  )

◆ wxDECLARE_EVENT() [96/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [97/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_SELECT_ALL ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [98/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_SELECT_CURR_PLATE_ALL ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [99/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_SMOOTH_LAYER_HEIGHT_PROFILE ,
HeightProfileSmoothEvent  )

◆ wxDECLARE_EVENT() [100/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_SWITCH_TO_GLOBAL ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [101/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_SWITCH_TO_OBJECT ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [102/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_TAB ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [103/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_TOOLBAR_HIGHLIGHTER_TIMER ,
wxTimerEvent  )

◆ wxDECLARE_EVENT() [104/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_UNDO ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [105/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_UPDATE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [106/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_UPDATE_BED_SHAPE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [107/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLCANVAS_UPDATE_GEOMETRY ,
Vec3dsEvent< 2 >  )

◆ wxDECLARE_EVENT() [108/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_ADD ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [109/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_ADD_PLATE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [110/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_ARRANGE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [111/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_CLONE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [112/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_COPY ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [113/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_CUT ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [114/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_DEL_PLATE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [115/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_DELETE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [116/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_DELETE_ALL ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [117/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_EXPORT_ALL_SLICED_FILE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [118/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_EXPORT_GCODE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [119/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_EXPORT_SLICED_FILE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [120/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_FEWER ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [121/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_FILLCOLOR ,
IntEvent  )

◆ wxDECLARE_EVENT() [122/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_LAYERSEDITING ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [123/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_MORE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [124/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_OPEN_PROJECT ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [125/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_ORIENT ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [126/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_PASTE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [127/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_PRINT_ALL ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [128/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_PRINT_MULTI_MACHINE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [129/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_PRINT_PLATE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [130/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_PRINT_SELECT ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [131/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_SELECT_SLICED_PLATE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [132/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_SEND_GCODE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [133/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_SEND_TO_PRINTER ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [134/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_SEND_TO_PRINTER_ALL ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [135/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_SLICE_ALL ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [136/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_SLICE_PLATE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [137/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_SPLIT_OBJECTS ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [138/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_SPLIT_VOLUMES ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [139/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLTOOLBAR_UPLOAD_GCODE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [140/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLVIEWTOOLBAR_3D ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [141/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLVIEWTOOLBAR_ASSEMBLE ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [142/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_GLVIEWTOOLBAR_PREVIEW ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [143/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_HTTP_ERROR ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [144/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_INDEX_PAGE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [145/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_INSTALL_NETWORK_FAILED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [146/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_INSTALL_PLUGIN_HINT ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [147/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_INSTALL_PLUGIN_NETWORKING ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [148/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_INSTANCE_GO_TO_FRONT ,
InstanceGoToFrontEvent  )

◆ wxDECLARE_EVENT() [149/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_LOAD_MODEL_OTHER_INSTANCE ,
LoadFromOtherInstanceEvent  )

◆ wxDECLARE_EVENT() [150/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_LOCK_DISABLE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [151/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_LOCK_ENABLE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [152/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_MODIFY_FILAMENT ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [153/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_MULTI_CLOUD_TASK_SELECTED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [154/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_MULTI_DEVICE_SELECTED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [155/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_MULTI_DEVICE_SELECTED_FINHSH ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [156/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_MULTI_DEVICE_VIEW ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [157/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_MULTI_LOCAL_TASK_SELECTED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [158/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_MULTI_REFRESH ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [159/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_NEED_RESORT_LAYERS ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [160/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_NOTICE_CHILDE_SIZE_CHANGED ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [161/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_NOTICE_FULL_SCREEN_CHANGED ,
IntEvent  )

◆ wxDECLARE_EVENT() [162/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_NOZZLE_SELECTED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [163/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_OAUTH_COMPLETE_MESSAGE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [164/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_OBJ_LIST_OBJECT_SELECT ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [165/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_OPEN_FILAMENT_MAP_SETTINGS_DIALOG ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [166/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_OPEN_PLATESETTINGSDIALOG ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [167/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_PARTPLATE_LIST_PLATE_SELECT ,
IntEvent  )

◆ wxDECLARE_EVENT() [168/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_PRESET_UPDATE_AVAILABLE_CLICKED ,
PresetUpdateAvailableClickedEvent  )

◆ wxDECLARE_EVENT() [169/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_PREVIEW_ONLY_MODE_HINT ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [170/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_PRINT_FROM_SDCARD_VIEW ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [171/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_PRINTER_CONFIG_UPDATE_AVAILABLE_CLICKED ,
PrinterConfigUpdateAvailableClickedEvent  )

◆ wxDECLARE_EVENT() [172/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_PRINTHOST_CANCEL ,
PrintHostQueueDialog::Event  )

◆ wxDECLARE_EVENT() [173/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_PRINTHOST_ERROR ,
PrintHostQueueDialog::Event  )

◆ wxDECLARE_EVENT() [174/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_PRINTHOST_INFO ,
PrintHostQueueDialog::Event  )

◆ wxDECLARE_EVENT() [175/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_PRINTHOST_PROGRESS ,
PrintHostQueueDialog::Event  )

◆ wxDECLARE_EVENT() [176/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_PRIVACY_UPDATE_CANCEL ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [177/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_PRIVACY_UPDATE_CONFIRM ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [178/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_PROJECT_RELOAD ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [179/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_REMOVABLE_DRIVE_EJECTED ,
RemovableDriveEjectEvent  )

◆ wxDECLARE_EVENT() [180/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_REMOVABLE_DRIVES_CHANGED ,
RemovableDrivesChangedEvent  )

◆ wxDECLARE_EVENT() [181/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_REPAIR_MODEL ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [182/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_RESPONSE_MESSAGE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [183/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_SDCARD_ABSENT_HINT ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [184/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_SECONDARY_CHECK_CANCEL ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [185/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_SECONDARY_CHECK_CONFIRM ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [186/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_SECONDARY_CHECK_DONE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [187/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_SECONDARY_CHECK_RESUME ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [188/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_SECONDARY_CHECK_RETRY ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [189/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_SELECTED_COLOR ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [190/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_SET_BED_TYPE_CONFIRM ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [191/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_SET_FINISH_MAPPING ,
wxCommandEvent  )

Referenced by wxDECLARE_EVENT(), wxDECLARE_EVENT(), and wxDECLARE_EVENT().

Here is the caller graph for this function:

◆ wxDECLARE_EVENT() [192/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_SHOW_IP_DIALOG ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [193/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_SLICING_UPDATE ,
Slic3r::SlicingStatusEvent  )

◆ wxDECLARE_EVENT() [194/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_START_DOWNLOAD_OTHER_INSTANCE ,
StartDownloadOtherInstanceEvent  )

◆ wxDECLARE_EVENT() [195/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_SWITCH_PRINT_OPTION ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [196/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_TEXTURE_COMPUTE_DONE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [197/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_TEXTURE_COMPUTE_ERROR ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [198/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_TEXTURE_COMPUTE_PROGRESS ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [199/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_TEXTURE_MESH_REPAIR_DECISION ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [200/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_UNBIND_MACHINE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [201/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_UPDATE_BUNDLE_COMPLETE ,
wxCommandEvent  )

References build_plate_tilt_up_direction(), has_filaments(), is_soluble_filament(), is_support_filament(), and wxDECLARE_EVENT().

Here is the call graph for this function:

◆ wxDECLARE_EVENT() [202/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_UPDATE_MACHINE_LIST ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [203/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_UPDATE_NOZZLE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [204/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_UPDATE_PLUGINS_WHEN_LAUNCH ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [205/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_UPDATE_PRESET_BUNDLE ,
wxCommandEvent  )

References wxDECLARE_EVENT().

Here is the call graph for this function:

◆ wxDECLARE_EVENT() [206/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_UPDATE_PRESET_CB ,
SimpleEvent  )

◆ wxDECLARE_EVENT() [207/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_UPDATE_RESULT ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [208/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_UPDATE_TEXT_MSG ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [209/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_UPDATE_WINDOWS_POSITION ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [210/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_UPGRADE_NETWORK_SUCCESS ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [211/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_UPGRADE_UPDATE_MESSAGE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [212/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_USER_LOGIN ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [213/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_USER_LOGIN_HANDLE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [214/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_VAMS_ON_FILAMENT_EDIT ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [215/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_VCAMERA_SWITCH ,
wxMouseEvent  )

References wxMouseEvent.

◆ wxDECLARE_EVENT() [216/223]

Slic3r::GUI::wxDECLARE_EVENT ( EVT_WILL_DISMISS_MACHINE_LIST ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [217/223]

Slic3r::GUI::wxDECLARE_EVENT ( wxCUSTOMEVT_LAST_VOLUME_IS_DELETED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [218/223]

Slic3r::GUI::wxDECLARE_EVENT ( wxEVT_DRAG_DROP_COMPLETED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [219/223]

Slic3r::GUI::wxDECLARE_EVENT ( wxEVT_GRADIENT_CURVE_CHANGED ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [220/223]

Slic3r::GUI::wxDECLARE_EVENT ( wxEVT_INVALID_MANUAL_MAP ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [221/223]

Slic3r::GUI::wxDECLARE_EVENT ( wxEVT_NOZZLE_JUMP_UPGRADE ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [222/223]

Slic3r::GUI::wxDECLARE_EVENT ( wxEVT_REFRESH_DATA ,
wxCommandEvent  )

◆ wxDECLARE_EVENT() [223/223]

Slic3r::GUI::wxDECLARE_EVENT ( wxEVT_THREAD_DONE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [1/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_ADD_CUSTOM_FILAMENT ,
ColorEvent  )

◆ wxDEFINE_EVENT() [2/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_ADD_FILAMENT ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [3/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_ALREADY_READ_HMS ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [4/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_CLIBRATION_AGAIN ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [5/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_CLIBRATION_CANCEL ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [6/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_EXTRUSION_CALI ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [7/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_FILAMENT_BACKUP ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [8/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_GUIDE_WIKI ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [9/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_LOAD ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [10/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_ON_FILAMENT_EDIT ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [11/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_ON_SELECTED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [12/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_REFRESH_RFID ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [13/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_RETRY ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [14/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_SETTINGS ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [15/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_SHOW_HUMIDITY_TIPS ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [16/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_SWITCH ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [17/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_UNLOAD ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [18/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AMS_UNSELETED_VAMS ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [19/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AUXILIARY_DONE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [20/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AUXILIARY_IMPORT ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [21/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AUXILIARY_UPDATE_COVER ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [22/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AUXILIARY_UPDATE_DELETE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [23/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_AUXILIARY_UPDATE_RENAME ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [24/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_BACKUP_POST ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [25/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_BIND_MACHINE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [26/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_BIND_MACHINE_FAIL ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [27/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_BIND_MACHINE_SUCCESS ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [28/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_BIND_UPDATE_MESSAGE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [29/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_CALI_ACTION ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [30/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_CALI_TRAY_CHANGED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [31/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_CALIBRATION_JOB_FINISHED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [32/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_CHECK_IP_ADDRESS_FAILED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [33/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_CHECK_IP_ADDRESS_LAYOUT ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [34/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_CHECK_PRIVACY_SHOW ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [35/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_CHECK_PRIVACY_VER ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [36/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_CHECKBOX_CHANGE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [37/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_CLEAR_IPADDRESS ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [38/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_CLOSE_IPADDRESS_DLG ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [39/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_CONNECT_LAN_MODE_PRINT ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [40/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_CONNECT_LAN_PRINT ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [41/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_CREATE_FILAMENT ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [42/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_CUSTOMEVT_TICKSCHANGED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [43/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_DEL_FILAMENT ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [44/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_DEVICE_CHANGED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [45/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_DIFF_DIALOG_TRANSFER ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [46/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_DISSMISS_MACHINE_LIST ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [47/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_DOWNLOAD_NETWORK_FAILED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [48/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_DOWNLOAD_PROJECT ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [49/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_DWNLDR_FILE_CANCELED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [50/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_DWNLDR_FILE_COMPLETE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [51/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_DWNLDR_FILE_ERROR ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [52/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_DWNLDR_FILE_NAME_CHANGE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [53/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_DWNLDR_FILE_PAUSED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [54/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_DWNLDR_FILE_PROGRESS ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [55/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_EDIT_PRINT_NAME ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [56/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_EJECT_DRIVE_NOTIFICAION_CLICKED ,
EjectDriveNotificationClickedEvent  )

◆ wxDEFINE_EVENT() [57/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_ENTER_FORCE_UPGRADE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [58/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_ENTER_IP_ADDRESS ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [59/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_ERROR_DIALOG_BTN_CLICKED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [60/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_EXPORT_BEGAN ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [61/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_EXPORT_FINISHED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [62/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_EXPORT_GCODE_NOTIFICAION_CLICKED ,
ExportGcodeNotificationClickedEvent  )

◆ wxDEFINE_EVENT() [63/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_FAN_ADD ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [64/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_FAN_CHANGED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [65/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_FAN_DEC ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [66/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_FAN_SWITCH_OFF ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [67/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_FAN_SWITCH_ON ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [68/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_FANCTRL_SWITCH ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [69/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_FILAMENT_COLOR_CHANGED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [70/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_FINISHED_UPDATE_MACHINE_LIST ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [71/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_FINISHED_UPDATE_MLIST ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [72/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_ADAPTIVE_LAYER_HEIGHT_PROFILE ,
Event< float >  )

◆ wxDEFINE_EVENT() [73/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_ARRANGE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [74/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_ARRANGE_PARTPLATE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [75/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_COLLAPSE_SIDEBAR ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [76/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_COLOR_MODE_CHANGED ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [77/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_ENABLE_ACTION_BUTTONS ,
Event< bool >  )

◆ wxDEFINE_EVENT() [78/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_FORCE_UPDATE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [79/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_GIZMO_HIGHLIGHTER_TIMER ,
wxTimerEvent  )

◆ wxDEFINE_EVENT() [80/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_INCREASE_INSTANCES ,
Event< int >  )

◆ wxDEFINE_EVENT() [81/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_INSTANCE_MOVED ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [82/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_INSTANCE_ROTATED ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [83/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_INSTANCE_SCALED ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [84/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_MOUSE_DRAGGING_FINISHED ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [85/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_MOUSE_DRAGGING_STARTED ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [86/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_OBJECT_SELECT ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [87/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_ORIENT ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [88/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_ORIENT_PARTPLATE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [89/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_PLATE_NAME_CHANGE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [90/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_PLATE_RIGHT_CLICK ,
RBtnPlateEvent  )

◆ wxDEFINE_EVENT() [91/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_PLATE_SELECT ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [92/244]

◆ wxDEFINE_EVENT() [93/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_QUESTION_MARK ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [94/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_REDO ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [95/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_RELOAD_FROM_DISK ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [96/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_REMOVE_OBJECT ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [97/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_RENDER_TIMER ,
wxTimerEvent  )

◆ wxDEFINE_EVENT() [98/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_RESET_LAYER_HEIGHT_PROFILE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [99/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_RESETGIZMOS ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [100/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_RIGHT_CLICK ,
RBtnEvent  )

◆ wxDEFINE_EVENT() [101/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [102/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_SELECT_ALL ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [103/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_SELECT_CURR_PLATE_ALL ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [104/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_SMOOTH_LAYER_HEIGHT_PROFILE ,
HeightProfileSmoothEvent  )

◆ wxDEFINE_EVENT() [105/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_SWITCH_TO_GLOBAL ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [106/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_SWITCH_TO_OBJECT ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [107/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_TAB ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [108/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_TOOLBAR_HIGHLIGHTER_TIMER ,
wxTimerEvent  )

◆ wxDEFINE_EVENT() [109/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_UNDO ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [110/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_UPDATE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [111/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_UPDATE_BED_SHAPE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [112/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLCANVAS_UPDATE_GEOMETRY ,
Vec3dsEvent< 2 >  )

◆ wxDEFINE_EVENT() [113/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_ADD ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [114/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_ADD_PLATE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [115/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_ARRANGE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [116/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_CLONE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [117/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_COPY ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [118/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_CUT ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [119/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_DEL_PLATE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [120/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_DELETE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [121/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_DELETE_ALL ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [122/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_EXPORT_ALL_SLICED_FILE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [123/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_EXPORT_GCODE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [124/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_EXPORT_SLICED_FILE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [125/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_FEWER ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [126/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_FILLCOLOR ,
IntEvent  )

◆ wxDEFINE_EVENT() [127/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_LAYERSEDITING ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [128/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_MORE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [129/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_OPEN_PROJECT ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [130/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_ORIENT ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [131/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_PASTE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [132/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_PRINT_ALL ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [133/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_PRINT_MULTI_MACHINE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [134/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_PRINT_PLATE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [135/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_PRINT_SELECT ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [136/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_SELECT_SLICED_PLATE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [137/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_SEND_GCODE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [138/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_SEND_TO_PRINTER ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [139/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_SEND_TO_PRINTER_ALL ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [140/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_SLICE_ALL ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [141/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_SLICE_PLATE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [142/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_SPLIT_OBJECTS ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [143/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_SPLIT_VOLUMES ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [144/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLTOOLBAR_UPLOAD_GCODE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [145/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLVIEWTOOLBAR_3D ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [146/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLVIEWTOOLBAR_ASSEMBLE ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [147/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_GLVIEWTOOLBAR_PREVIEW ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [148/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_HTTP_ERROR ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [149/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_IMPORT_MODEL_ID ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [150/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_INDEX_PAGE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [151/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_INSTALL_NETWORK_FAILED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [152/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_INSTALL_PLUGIN_HINT ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [153/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_INSTALL_PLUGIN_NETWORKING ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [154/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_INSTANCE_GO_TO_FRONT ,
InstanceGoToFrontEvent  )

◆ wxDEFINE_EVENT() [155/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_LOAD_MODEL_OTHER_INSTANCE ,
LoadFromOtherInstanceEvent  )

◆ wxDEFINE_EVENT() [156/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_LOAD_PRINTER_URL ,
LoadPrinterViewEvent  )

◆ wxDEFINE_EVENT() [157/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_LOAD_URL ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [158/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_LOCK_DISABLE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [159/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_LOCK_ENABLE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [160/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_MODIFY_FILAMENT ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [161/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_MULTI_CLOUD_TASK_SELECTED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [162/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_MULTI_DEVICE_SELECTED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [163/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_MULTI_DEVICE_SELECTED_FINHSH ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [164/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_MULTI_DEVICE_VIEW ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [165/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_MULTI_LOCAL_TASK_SELECTED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [166/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_MULTI_REFRESH ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [167/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_NEED_RESORT_LAYERS ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [168/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_NOTICE_CHILDE_SIZE_CHANGED ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [169/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_NOTICE_FULL_SCREEN_CHANGED ,
IntEvent  )

◆ wxDEFINE_EVENT() [170/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_NOZZLE_SELECTED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [171/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_OAUTH_COMPLETE_MESSAGE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [172/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_OBJ_LIST_OBJECT_SELECT ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [173/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_OPEN_FILAMENT_MAP_SETTINGS_DIALOG ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [174/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_OPEN_PLATESETTINGSDIALOG ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [175/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PARTPLATE_LIST_PLATE_SELECT ,
IntEvent  )

◆ wxDEFINE_EVENT() [176/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PRESET_UPDATE_AVAILABLE_CLICKED ,
PresetUpdateAvailableClickedEvent  )

◆ wxDEFINE_EVENT() [177/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PREVIEW_ONLY_MODE_HINT ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [178/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PRINT_FINISHED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [179/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PRINT_FROM_SDCARD_VIEW ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [180/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PRINT_JOB_CANCEL ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [181/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PRINTER_CONFIG_UPDATE_AVAILABLE_CLICKED ,
PrinterConfigUpdateAvailableClickedEvent  )

◆ wxDEFINE_EVENT() [182/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PRINTER_PICK ,
PrinterPickerEvent  )

◆ wxDEFINE_EVENT() [183/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PRINTHOST_CANCEL ,
PrintHostQueueDialog::Event  )

◆ wxDEFINE_EVENT() [184/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PRINTHOST_ERROR ,
PrintHostQueueDialog::Event  )

◆ wxDEFINE_EVENT() [185/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PRINTHOST_INFO ,
PrintHostQueueDialog::Event  )

◆ wxDEFINE_EVENT() [186/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PRINTHOST_PROGRESS ,
PrintHostQueueDialog::Event  )

◆ wxDEFINE_EVENT() [187/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PRIVACY_UPDATE_CANCEL ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [188/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PRIVACY_UPDATE_CONFIRM ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [189/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PROCESS_COMPLETED ,
SlicingProcessCompletedEvent  )

◆ wxDEFINE_EVENT() [190/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_PROJECT_RELOAD ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [191/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_REMOVABLE_DRIVE_EJECTED ,
RemovableDriveEjectEvent  )

◆ wxDEFINE_EVENT() [192/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_REMOVABLE_DRIVES_CHANGED ,
RemovableDrivesChangedEvent  )

◆ wxDEFINE_EVENT() [193/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_REPAIR_MODEL ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [194/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_RESPONSE_MESSAGE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [195/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_RESTORE_PROJECT ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [196/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SCHEDULE_BACKGROUND_PROCESS ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [197/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SDCARD_ABSENT_HINT ,
wxCommandEvent  )

References wxDEFINE_EVENT().

Here is the call graph for this function:

◆ wxDEFINE_EVENT() [198/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SECONDARY_CHECK_CANCEL ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [199/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SECONDARY_CHECK_CONFIRM ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [200/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SECONDARY_CHECK_DONE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [201/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SECONDARY_CHECK_RESUME ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [202/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SECONDARY_CHECK_RETRY ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [203/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SELECT_TAB ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [204/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SELECTED_COLOR ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [205/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SEND_CALIBRATION_FINISHED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [206/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SEND_FINISHED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [207/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SEND_JOB_SUCCESS ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [208/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SET_BED_TYPE_CONFIRM ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [209/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SET_FINISH_MAPPING ,
wxCommandEvent  )

Referenced by wxDEFINE_EVENT().

Here is the caller graph for this function:

◆ wxDEFINE_EVENT() [210/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SHOW_DIALOG ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [211/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SHOW_IP_DIALOG ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [212/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SHOW_NO_NEW_VERSION ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [213/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SLICING_COMPLETED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [214/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SLICING_UPDATE ,
SlicingStatusEvent  )

◆ wxDEFINE_EVENT() [215/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_START_DOWNLOAD_OTHER_INSTANCE ,
StartDownloadOtherInstanceEvent  )

◆ wxDEFINE_EVENT() [216/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SWITCH_PRINT_OPTION ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [217/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_SYNC_CLOUD_PRESET ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [218/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_TEXTURE_COMPUTE_DONE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [219/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_TEXTURE_COMPUTE_ERROR ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [220/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_TEXTURE_COMPUTE_PROGRESS ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [221/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_TEXTURE_MESH_REPAIR_DECISION ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [222/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_UNBIND_MACHINE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [223/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_UPDATE_BUNDLE_COMPLETE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [224/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_UPDATE_MACHINE_LIST ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [225/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_UPDATE_NOZZLE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [226/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_UPDATE_PLUGINS_WHEN_LAUNCH ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [227/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_UPDATE_PRESET_BUNDLE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [228/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_UPDATE_PRESET_CB ,
SimpleEvent  )

◆ wxDEFINE_EVENT() [229/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_UPDATE_RESULT ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [230/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_UPDATE_TEXT_MSG ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [231/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_UPDATE_USER_MACHINE_LIST ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [232/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_UPDATE_USER_MLIST ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [233/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_UPDATE_WINDOWS_POSITION ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [234/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_UPGRADE_NETWORK_SUCCESS ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [235/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_UPGRADE_UPDATE_MESSAGE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [236/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_USER_LOGIN ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [237/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_USER_LOGIN_HANDLE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [238/244]

Slic3r::GUI::wxDEFINE_EVENT ( EVT_VAMS_ON_FILAMENT_EDIT ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [239/244]

Slic3r::GUI::wxDEFINE_EVENT ( wxCUSTOMEVT_LAST_VOLUME_IS_DELETED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [240/244]

Slic3r::GUI::wxDEFINE_EVENT ( wxEVT_DRAG_DROP_COMPLETED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [241/244]

Slic3r::GUI::wxDEFINE_EVENT ( wxEVT_GRADIENT_CURVE_CHANGED ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [242/244]

Slic3r::GUI::wxDEFINE_EVENT ( wxEVT_INVALID_MANUAL_MAP ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [243/244]

Slic3r::GUI::wxDEFINE_EVENT ( wxEVT_NOZZLE_JUMP_UPGRADE ,
wxCommandEvent  )

◆ wxDEFINE_EVENT() [244/244]

Slic3r::GUI::wxDEFINE_EVENT ( wxEVT_REFRESH_DATA ,
wxCommandEvent  )

◆ wxImage_to_wxBitmap_with_alpha()

wxBitmap Slic3r::GUI::wxImage_to_wxBitmap_with_alpha ( wxImage && image,
float scale = 1.0f )
static
60{
61#ifdef __WXGTK2__
62 // Broken alpha workaround
63 wxMemoryOutputStream stream;
64 image.SaveFile(stream, wxBITMAP_TYPE_PNG);
65 wxStreamBuffer *buf = stream.GetOutputStreamBuffer();
66 return wxBitmap::NewFromPNGData(buf->GetBufferStart(), buf->GetBufferSize());
67#else
68#ifdef __APPLE__
69 // This is a c-tor native to Mac OS. We need to let the Mac OS wxBitmap implementation
70 // know that the image may already be scaled appropriately for Retina,
71 // and thereby that it's not supposed to upscale it.
72 // Contrary to intuition, the `scale` argument isn't "please scale this to such and such"
73 // but rather "the wxImage is sized for backing scale such and such".
74 return wxBitmap(std::move(image), -1, scale);
75#else
76 return wxBitmap(std::move(image));
77#endif
78#endif
79}

References scale().

Referenced by Slic3r::GUI::BitmapCache::insert(), Slic3r::GUI::BitmapCache::insert_raw_rgba(), Slic3r::GUI::BitmapCache::load_png(), Slic3r::GUI::BitmapCache::load_svg2(), and Slic3r::GUI::BitmapCache::mksolid().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wxIMPLEMENT_CLASS() [1/3]

Slic3r::GUI::wxIMPLEMENT_CLASS ( CameraPopup ,
PopupWindow  )

◆ wxIMPLEMENT_CLASS() [2/3]

Slic3r::GUI::wxIMPLEMENT_CLASS ( ObjectTablePanel ,
wxPanel  )

◆ wxIMPLEMENT_CLASS() [3/3]

Slic3r::GUI::wxIMPLEMENT_CLASS ( SliceInfoPopup ,
PopupWindow  )

◆ wxMakeEventFunctor()

wxEventFunctor & Slic3r::GUI::wxMakeEventFunctor ( const int ,
wxEventFunctorRef func )
908{
909 return *func.func;
910}
wxEventFunctor * func
Definition Field.cpp:904

References Slic3r::GUI::wxEventFunctorRef::func.

◆ xf_compose()

Transform3d Slic3r::GUI::xf_compose ( const Vec3d & t,
const Vec3d & axis,
const Vec3d & pivot,
double deg )
static
5680{
5681 Transform3d r = Transform3d::Identity();
5682 if (std::abs(deg) > 1e-12 && axis.norm() > 1e-9)
5683 r = Transform3d(Eigen::Translation3d(pivot))
5684 * Transform3d(Eigen::AngleAxisd(deg * M_PI / 180.0, axis.normalized()))
5685 * Transform3d(Eigen::Translation3d(-pivot));
5686 return Transform3d(Eigen::Translation3d(t)) * r;
5687}

References M_PI.

Referenced by Slic3r::GUI::DesignPanel::xf_live_preview().

Here is the caller graph for this function:

◆ zero_pressure_advance_where_disabled()

void Slic3r::GUI::zero_pressure_advance_where_disabled ( DynamicPrintConfig * filament_config)
static
396{
397 auto enable_pa = filament_config->option<ConfigOptionBools>("enable_pressure_advance");
398 auto pa = filament_config->option<ConfigOptionFloats>("pressure_advance");
399 auto adaptive_pa = filament_config->option<ConfigOptionBools>("adaptive_pressure_advance");
400 if (!enable_pa || !pa || !adaptive_pa || pa->empty() || adaptive_pa->empty())
401 return;
402 // All variant keys share the variant count; widen a short one rather than index past it.
403 if (pa->size() < enable_pa->size())
404 pa->resize(enable_pa->size());
405 if (adaptive_pa->size() < enable_pa->size())
406 adaptive_pa->resize(enable_pa->size());
407 for (size_t variant = 0; variant < enable_pa->size(); ++variant) {
408 if (enable_pa->get_at(variant))
409 continue;
410 enable_pa->values[variant] = true;
411 pa->values[variant] = 0.0;
412 adaptive_pa->values[variant] = false;
413 }
414}
bool empty() const override
Definition Config.hpp:723
void resize(size_t n, const ConfigOption *opt_default=nullptr) override
Definition Config.hpp:687

References Slic3r::ConfigOptionVector< double >::empty(), Slic3r::ConfigOptionVector< unsigned char >::empty(), Slic3r::ConfigBase::option(), Slic3r::ConfigOptionVector< double >::resize(), Slic3r::ConfigOptionVector< unsigned char >::resize(), Slic3r::ConfigOptionVector< double >::size(), Slic3r::ConfigOptionVector< unsigned char >::size(), Slic3r::ConfigOptionVector< double >::values, and Slic3r::ConfigOptionVector< unsigned char >::values.

Referenced by Slic3r::GUI::Plater::Calib_Cornering(), Slic3r::GUI::Plater::calib_input_shaping_damp(), and Slic3r::GUI::Plater::calib_input_shaping_freq().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ABORT_WAIT_MAX_MS

int Slic3r::GUI::ABORT_WAIT_MAX_MS = 10000
constexpr

◆ ACCESSORY_DISPLAY_STR

const std::unordered_map<wxString, wxString> Slic3r::GUI::ACCESSORY_DISPLAY_STR
static
Initial value:
= {
{"N3F", "AMS 2 PRO"},
{"N3S", "AMS HT"},
{"O2L_PC", L("Air Pump")},
{"O2L_10B", L("Laser 10W")},
{"O2L_40B", L("Laser 40W")},
{"O2L_PCM", L("Cutting Module")},
{"O2L_ACM", L("Active Cutting Module")},
{"O2L_UCM", L("Ultrasonic Cutting Module")},
{"O2L-AFP", L("Auto Fire Extinguishing System")},
{"O2L-FTS", L("Filament Track Switch")},
}
42 {
43 {"N3F", "AMS 2 PRO"},
44 {"N3S", "AMS HT"},
45 {"O2L_PC", L("Air Pump")},
46 {"O2L_10B", L("Laser 10W")},
47 {"O2L_40B", L("Laser 40W")},
48 {"O2L_PCM", L("Cutting Module")},
49 {"O2L_ACM", L("Active Cutting Module")},
50 {"O2L_UCM", L("Ultrasonic Cutting Module")},
51 {"O2L-AFP", L("Auto Fire Extinguishing System")},
52 {"O2L-FTS", L("Filament Track Switch")},
53};

Referenced by Slic3r::GUI::MachineInfoPanel::update_ams_ext().

◆ ADD_VOLUME_MENU_ITEMS

const constexpr std::array<std::pair<const char *, const char *>, 11> Slic3r::GUI::ADD_VOLUME_MENU_ITEMS
staticconstexpr
Initial value:
= {{
{L("Add Part"), "menu_add_part" },
{L("Add Negative Part"), "menu_add_negative" },
{L("Add Modifier"), "menu_add_modifier"},
{L("Add Support Blocker"), "menu_support_blocker"},
{L("Add Support Enforcer"), "menu_support_enforcer"},
{L("Add Precise Seam"), "menu_precise_seam_center"},
{L("Add Precise Seam"), "menu_precise_seam_left"},
{L("Add Precise Seam"), "menu_precise_seam_right"},
{L("Add Precise Seam"), "menu_precise_seam_enforced"},
{L("Add Precise Seam"), "menu_precise_seam_blocked"},
{L("Add Precise Seam"), "menu_precise_seam_neutral"},
}}
370 {{
371 // menu_item Name menu_item bitmap name
372 {L("Add Part"), "menu_add_part" }, // ~ModelVolumeType::MODEL_PART
373 {L("Add Negative Part"), "menu_add_negative" }, // ~ModelVolumeType::NEGATIVE_VOLUME
374 {L("Add Modifier"), "menu_add_modifier"}, // ~ModelVolumeType::PARAMETER_MODIFIER
375 {L("Add Support Blocker"), "menu_support_blocker"}, // ~ModelVolumeType::SUPPORT_BLOCKER
376 {L("Add Support Enforcer"), "menu_support_enforcer"}, // ~ModelVolumeType::SUPPORT_ENFORCER
377 // Precise Seam modifiers (all 6 subtypes - only first one shown in menu, others used for tree icons)
378 {L("Add Precise Seam"), "menu_precise_seam_center"}, // ~ModelVolumeType::PRECISE_SEAM_CENTER
379 {L("Add Precise Seam"), "menu_precise_seam_left"}, // ~ModelVolumeType::PRECISE_SEAM_LEFT
380 {L("Add Precise Seam"), "menu_precise_seam_right"}, // ~ModelVolumeType::PRECISE_SEAM_RIGHT
381 {L("Add Precise Seam"), "menu_precise_seam_enforced"}, // ~ModelVolumeType::PRECISE_SEAM_ENFORCED
382 {L("Add Precise Seam"), "menu_precise_seam_blocked"}, // ~ModelVolumeType::PRECISE_SEAM_BLOCKED
383 {L("Add Precise Seam"), "menu_precise_seam_neutral"}, // ~ModelVolumeType::PRECISE_SEAM_NEUTRAL
384}};

Referenced by append_menu_itemm_add_(), Slic3r::GUI::MenuFactory::append_menu_items_add_volume(), and Slic3r::GUI::MenuFactory::get_volume_bitmaps().

◆ AMS_DRY_STATUS_IMAGE_SIZE

const int Slic3r::GUI::AMS_DRY_STATUS_IMAGE_SIZE = 96

◆ AMS_FAVORITE_FILAMENT_IDS_KEY

const char* Slic3r::GUI::AMS_FAVORITE_FILAMENT_IDS_KEY = "ams_favorite_filament_ids"
static

◆ AMS_TRAY_DEFAULT_COL

const wxColour Slic3r::GUI::AMS_TRAY_DEFAULT_COL = wxColour(255, 255, 255)
static

◆ AngleResolution

const unsigned int Slic3r::GUI::AngleResolution = 64

Referenced by init_from_angle_arc().

◆ BACKGROUND_COLOR_DARK

◆ BACKGROUND_COLOR_LIGHT

◆ BackGroundColor

const wxColour Slic3r::GUI::BackGroundColor = wxColour("#FFFFFF")
static

◆ bed_temp_range

const int Slic3r::GUI::bed_temp_range[2] = {20, 120}
static

◆ bed_type_thumbnails

std::map<BedType, std::string> Slic3r::GUI::bed_type_thumbnails
static
Initial value:
= {
{BedType::btPC, "bed_cool" },
{BedType::btEP, "bed_engineering" },
{BedType::btPEI, "bed_high_templ" },
{BedType::btPTE, "bed_pei" },
{BedType::btPCT, "bed_pei_cool" },
{BedType::btSuperTack, "bed_cool_supertack" }
}
@ btPEI
Definition PrintConfig.hpp:511
@ btEP
Definition PrintConfig.hpp:510
@ btPC
Definition PrintConfig.hpp:509
@ btSuperTack
Definition PrintConfig.hpp:514
@ btPTE
Definition PrintConfig.hpp:512
@ btPCT
Definition PrintConfig.hpp:513
453 {
454 {BedType::btPC, "bed_cool" },
455 {BedType::btEP, "bed_engineering" },
456 {BedType::btPEI, "bed_high_templ" },
457 {BedType::btPTE, "bed_pei" },
458 {BedType::btPCT, "bed_pei_cool" },
459 {BedType::btSuperTack, "bed_cool_supertack" }
460};

Referenced by Slic3r::GUI::Sidebar::get_cur_select_bed_image().

◆ BgDisableColor

const wxColour Slic3r::GUI::BgDisableColor = wxColour("#CECECE")
static

◆ BgNormalColor [1/3]

◆ BgNormalColor [2/3]

const wxColour Slic3r::GUI::BgNormalColor = wxColour("#FFFFFF")
static

◆ BgNormalColor [3/3]

const wxColour Slic3r::GUI::BgNormalColor = wxColour("#FFFFFF")
static

◆ BgSelectColor [1/3]

◆ BgSelectColor [2/3]

const wxColour Slic3r::GUI::BgSelectColor = wxColour("#E5F0EE")
static

◆ BgSelectColor [3/3]

const wxColour Slic3r::GUI::BgSelectColor = wxColour("#E5F0EE")
static

◆ BOLD_MARKER_END

const std::string Slic3r::GUI::BOLD_MARKER_END = "</b>"

◆ BOLD_MARKER_START

const std::string Slic3r::GUI::BOLD_MARKER_START = "<b>"

◆ BorderDisableColor

const wxColour Slic3r::GUI::BorderDisableColor = wxColour("#EEEEEE")
static

◆ BorderNormalColor [1/3]

const wxColour Slic3r::GUI::BorderNormalColor = wxColour("#CECECE")
static

◆ BorderNormalColor [2/3]

const wxColour Slic3r::GUI::BorderNormalColor = wxColour("#CECECE")
static

◆ BorderNormalColor [3/3]

const wxColour Slic3r::GUI::BorderNormalColor = wxColour("#CECECE")
static

◆ BorderSelectColor

const wxColour Slic3r::GUI::BorderSelectColor = wxColour("#009688")
static

◆ BorderSelectedColor [1/2]

const wxColour Slic3r::GUI::BorderSelectedColor = wxColour("#009688")
static

◆ BorderSelectedColor [2/2]

const wxColour Slic3r::GUI::BorderSelectedColor = wxColour("#009688")
static

◆ BRAND_COLOR

const ImU32 Slic3r::GUI::BRAND_COLOR = IM_COL32(0, 150, 136, 255)
static

◆ BRIM_EAR_RADIUS_MAX

◆ BRIM_EAR_RADIUS_MIN

◆ btn_bg_green [1/2]

StateColor Slic3r::GUI::btn_bg_green(std::pair< wxColour, int >(wxColour(194, 194, 194), StateColor::Disabled), std::pair< wxColour, int >(wxColour(27, 136, 68), StateColor::Pressed), std::pair< wxColour, int >(wxColour(61, 203, 115), StateColor::Hovered), std::pair< wxColour, int >(wxColour(0, 177, 66), StateColor::Normal)) ( std::pair< wxColour, int > wxColour(194, 194, 194), StateColor::Disabled,
std::pair< wxColour, int > wxColour(27, 136, 68), StateColor::Pressed,
std::pair< wxColour, int > wxColour(61, 203, 115), StateColor::Hovered,
std::pair< wxColour, int > wxColour(0, 177, 66), StateColor::Normal )
static

◆ btn_bg_green [2/2]

StateColor Slic3r::GUI::btn_bg_green(std::pair< wxColour, int >(wxColour(206, 206, 206), StateColor::Disabled), std::pair< wxColour, int >(wxColour(0, 137, 123), StateColor::Pressed), std::pair< wxColour, int >(wxColour(38, 166, 154), StateColor::Hovered), std::pair< wxColour, int >(wxColour(0, 150, 136), StateColor::Normal)) ( std::pair< wxColour, int > wxColour(206, 206, 206), StateColor::Disabled,
std::pair< wxColour, int > wxColour(0, 137, 123), StateColor::Pressed,
std::pair< wxColour, int > wxColour(38, 166, 154), StateColor::Hovered,
std::pair< wxColour, int > wxColour(0, 150, 136), StateColor::Normal )
static

◆ build_commit_hash

const char *const Slic3r::GUI::build_commit_hash = GIT_COMMIT_HASH

◆ build_commit_label

◆ BUTTON_HOVER_COL

◆ BUTTON_NORMAL1_COL

const wxColour Slic3r::GUI::BUTTON_NORMAL1_COL = wxColour(238, 238, 238)
static

◆ BUTTON_NORMAL2_COL

const wxColour Slic3r::GUI::BUTTON_NORMAL2_COL = wxColour(206, 206, 206)
static

◆ BUTTON_PRESS_COL

const wxColour Slic3r::GUI::BUTTON_PRESS_COL = wxColour(172, 172, 172)
static

◆ cameraProjection

const float Slic3r::GUI::cameraProjection[16] = {1.f, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f, 0.f, 0.f, 0.f, 1.f}
static
6772{1.f, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f, 0.f, 0.f, 0.f, 1.f};

Referenced by Slic3r::GUI::GLCanvas3D::_render_3d_navigator().

◆ cannot_input_key

std::set<int> Slic3r::GUI::cannot_input_key = {9, 10, 13, 33, 35, 36, 37, 38, 40, 41, 42, 44, 46, 47, 59, 60, 62, 63, 64, 92, 94, 95, 124, 126}
static

◆ CANVAS_BORDER_COLOR

const wxColour Slic3r::GUI::CANVAS_BORDER_COLOR = wxColour(0xCECECE)
static

◆ CANVAS_TOOLBAR_BUTTON

float Slic3r::GUI::CANVAS_TOOLBAR_BUTTON = 36.f
staticconstexpr

◆ CANVAS_TOOLBAR_MARGIN

◆ CANVAS_TOOLBAR_PADDING

float Slic3r::GUI::CANVAS_TOOLBAR_PADDING = 2.f
staticconstexpr

◆ CANVAS_TOOLBAR_SPACING

float Slic3r::GUI::CANVAS_TOOLBAR_SPACING = 6.f
staticconstexpr

◆ check_gcode_failed_str [1/2]

auto Slic3r::GUI::check_gcode_failed_str = _u8L("Abnormal print file data: please slice again.")
static

◆ check_gcode_failed_str [2/2]

auto Slic3r::GUI::check_gcode_failed_str = _u8L("Abnormal print file data: please slice again.")
static

◆ CIRCLE_ID

const int Slic3r::GUI::CIRCLE_ID = 300
static

◆ COLOR_PICKER_MAX_GRADIENT_COLORS

◆ config_filename

const std::string Slic3r::GUI::config_filename = "test_config.3mf"
static

◆ CONFIG_KEY_GROUP

const char* Slic3r::GUI::CONFIG_KEY_GROUP = "printhost_group"
static

◆ CONFIG_KEY_PATH

◆ CONFIG_KEY_STORAGE

const char* Slic3r::GUI::CONFIG_KEY_STORAGE = "printhost_storage"
static

◆ conflict_ids_mutex

std::mutex Slic3r::GUI::conflict_ids_mutex
static

◆ CONNECTOR_DEF_COLOR

const ColorRGBA Slic3r::GUI::CONNECTOR_DEF_COLOR = ColorRGBA(1.0f, 1.0f, 1.0f, 0.5f)
static

◆ CONNECTOR_ERR_COLOR

const ColorRGBA Slic3r::GUI::CONNECTOR_ERR_COLOR = ColorRGBA(1.0f, 0.3f, 0.3f, 0.5f)
static

◆ CTRL_STR

const std::string Slic3r::GUI::CTRL_STR
static
Initial value:
=
"Ctrl"

◆ ctrlWidth

int Slic3r::GUI::ctrlWidth = 50
constexpr

◆ CUT_PLANE_DEF_COLOR

const ColorRGBA Slic3r::GUI::CUT_PLANE_DEF_COLOR = ColorRGBA(0.9f, 0.9f, 0.9f, 0.5f)
static

◆ CUT_PLANE_ERR_COLOR

const ColorRGBA Slic3r::GUI::CUT_PLANE_ERR_COLOR = ColorRGBA(1.0f, 0.8f, 0.8f, 0.5f)
static

◆ DEF_COLOR

const ColorRGBA Slic3r::GUI::DEF_COLOR = {0.7f, 0.7f, 0.7f, 1.f}
static
59{0.7f, 0.7f, 0.7f, 1.f};

Referenced by Slic3r::GUI::GLGizmoBrimEars::render_points().

◆ default_champer_temp_max

const int Slic3r::GUI::default_champer_temp_max = 60
static

◆ default_champer_temp_min

const int Slic3r::GUI::default_champer_temp_min = 20
static

◆ DEFAULT_PROJECT_NAME

const wxString Slic3r::GUI::DEFAULT_PROJECT_NAME = L("Untitled")

◆ desc_fail_not_exist [1/2]

auto Slic3r::GUI::desc_fail_not_exist = _u8L("Print file not found; please slice it again and send it for printing.")
static

◆ desc_fail_not_exist [2/2]

auto Slic3r::GUI::desc_fail_not_exist = _u8L("Print file not found; please slice it again and send it for printing.")
static

◆ desc_file_too_large [1/2]

auto Slic3r::GUI::desc_file_too_large = _u8L("The size of the print file is too large. Please adjust the file size and try again.")
static

◆ desc_file_too_large [2/2]

auto Slic3r::GUI::desc_file_too_large = _u8L("The size of the print file is too large. Please adjust the file size and try again.")
static

◆ desc_network_error [1/2]

auto Slic3r::GUI::desc_network_error = _u8L("Check the current status of the Bambu Lab server by clicking on the link above.")
static

◆ desc_network_error [2/2]

auto Slic3r::GUI::desc_network_error = _u8L("Check the current status of the Bambu Lab server by clicking on the link above.")
static

◆ desc_upload_ftp_failed [1/2]

auto Slic3r::GUI::desc_upload_ftp_failed = _u8L("Failed to upload print file via FTP. Please check the network status and try again.")
static

◆ desc_upload_ftp_failed [2/2]

auto Slic3r::GUI::desc_upload_ftp_failed = _u8L("Failed to upload print file via FTP. Please check the network status and try again.")
static

◆ dialogStack

◆ DISCONNECT_TEXT_COL

◆ DOWEL_COLOR

const ColorRGBA Slic3r::GUI::DOWEL_COLOR = ColorRGBA::DARK_YELLOW()
static

◆ DOWNLOAD_MAX_CHUNK_SIZE

const size_t Slic3r::GUI::DOWNLOAD_MAX_CHUNK_SIZE = 10 * 1024 * 1024

◆ DOWNLOAD_SIZE_LIMIT

const size_t Slic3r::GUI::DOWNLOAD_SIZE_LIMIT = 1024 * 1024 * 1024

◆ dynamic_filament_list

◆ dynamic_lists

std::map<std::string, DynamicList*> Slic3r::GUI::dynamic_lists
static

◆ dynamic_physical_filament_list

DynamicFilamentList Slic3r::GUI::dynamic_physical_filament_list(true) ( true )
static

◆ EDGE_ID

const int Slic3r::GUI::EDGE_ID = 200
static

◆ ERR_COLOR

const ColorRGBA Slic3r::GUI::ERR_COLOR = {1.0f, 0.3f, 0.3f, 0.5f}
static
61{1.0f, 0.3f, 0.3f, 0.5f};

Referenced by Slic3r::GUI::GLGizmoBrimEars::render_points().

◆ error_messages

const std::map<int, std::string> Slic3r::GUI::error_messages
static
Initial value:
= {
{SendToPrinterDialog::ERROR_PIPE, L("Reconnecting the printer, the operation cannot be completed immediately, please try again later.")},
{SendToPrinterDialog::ERROR_RES_BUSY, L("The device cannot handle more conversations. Please retry later.")},
{SendToPrinterDialog::ERROR_TIME_OUT, L("Timeout, please try again.")},
{SendToPrinterDialog::FILE_NO_EXIST, L("File does not exist.")},
{SendToPrinterDialog::FILE_CHECK_ERR, L("File checksum error. Please retry.")},
{SendToPrinterDialog::FILE_TYPE_ERR, L("Not supported on the current printer version.")},
{SendToPrinterDialog::STORAGE_UNAVAILABLE, L("Current firmware does not support file transfer to internal storage.")},
{SendToPrinterDialog::API_VERSION_UNSUPPORT, L("The firmware version of the printer is too low. Please update the firmware and try again.")},
{SendToPrinterDialog::FILE_EXIST, L("The file already exists, do you want to replace it?")},
{SendToPrinterDialog::STORAGE_SPACE_NOT_ENOUGH, L("Insufficient storage space, please clear the space and try again.")},
{SendToPrinterDialog::FILE_CREATE_ERR, L("File creation failed, please try again.")},
{SendToPrinterDialog::FILE_WRITE_ERR, L("File write failed, please try again.")},
{SendToPrinterDialog::MD5_COMPARE_ERR, L("MD5 verification failed, please try again.")},
{SendToPrinterDialog::FILE_RENAME_ERR, L("File renaming failed, please try again.")},
{SendToPrinterDialog::SEND_ERR, L("File upload failed, please try again.")}
}
@ ERROR_TIME_OUT
Definition SendToPrinter.hpp:153
@ FILE_WRITE_ERR
Definition SendToPrinter.hpp:166
@ FILE_EXIST
Definition SendToPrinter.hpp:163
@ API_VERSION_UNSUPPORT
Definition SendToPrinter.hpp:162
@ MD5_COMPARE_ERR
Definition SendToPrinter.hpp:167
@ SEND_ERR
Definition SendToPrinter.hpp:169
@ ERROR_PIPE
Definition SendToPrinter.hpp:150
@ ERROR_RES_BUSY
Definition SendToPrinter.hpp:152
@ STORAGE_UNAVAILABLE
Definition SendToPrinter.hpp:161
@ FILE_NO_EXIST
Definition SendToPrinter.hpp:154
@ FILE_TYPE_ERR
Definition SendToPrinter.hpp:160
@ FILE_CREATE_ERR
Definition SendToPrinter.hpp:165
@ FILE_CHECK_ERR
Definition SendToPrinter.hpp:159
@ STORAGE_SPACE_NOT_ENOUGH
Definition SendToPrinter.hpp:164
@ FILE_RENAME_ERR
Definition SendToPrinter.hpp:168
101 {
102 {SendToPrinterDialog::ERROR_PIPE, L("Reconnecting the printer, the operation cannot be completed immediately, please try again later.")},
103 {SendToPrinterDialog::ERROR_RES_BUSY, L("The device cannot handle more conversations. Please retry later.")},
104 {SendToPrinterDialog::ERROR_TIME_OUT, L("Timeout, please try again.")},
105 {SendToPrinterDialog::FILE_NO_EXIST, L("File does not exist.")},
106 {SendToPrinterDialog::FILE_CHECK_ERR, L("File checksum error. Please retry.")},
107 {SendToPrinterDialog::FILE_TYPE_ERR, L("Not supported on the current printer version.")},
108 {SendToPrinterDialog::STORAGE_UNAVAILABLE, L("Current firmware does not support file transfer to internal storage.")},
109 {SendToPrinterDialog::API_VERSION_UNSUPPORT, L("The firmware version of the printer is too low. Please update the firmware and try again.")},
110 {SendToPrinterDialog::FILE_EXIST, L("The file already exists, do you want to replace it?")},
111 {SendToPrinterDialog::STORAGE_SPACE_NOT_ENOUGH, L("Insufficient storage space, please clear the space and try again.")},
112 {SendToPrinterDialog::FILE_CREATE_ERR, L("File creation failed, please try again.")},
113 {SendToPrinterDialog::FILE_WRITE_ERR, L("File write failed, please try again.")},
114 {SendToPrinterDialog::MD5_COMPARE_ERR, L("MD5 verification failed, please try again.")},
115 {SendToPrinterDialog::FILE_RENAME_ERR, L("File renaming failed, please try again.")},
116 {SendToPrinterDialog::SEND_ERR, L("File upload failed, please try again.")}
117};

Referenced by ParseErrorCode(), and Slic3r::GUI::MediaPlayCtrl::Stop().

◆ extruder_variant_keys

std::pair<std::string, std::string> Slic3r::GUI::extruder_variant_keys[]
static
Initial value:
{
{},
{"print_extruder_id", "print_extruder_variant"},
{},
{"", "filament_extruder_variant"},
{},
{"printer_extruder_id", "printer_extruder_variant"},
}
149 {
150 {}, // invalid
151 {"print_extruder_id", "print_extruder_variant"}, // Preset::TYPE_PRINT
152 {}, // invalid
153 {"", "filament_extruder_variant"}, // Preset::TYPE_FILAMENT filament don't use id anymore
154 {}, // invalid
155 {"printer_extruder_id", "printer_extruder_variant"}, // Preset::TYPE_PRINTER
156};

Referenced by Slic3r::GUI::Tab::check_extruder_options_status(), Slic3r::GUI::Tab::switch_excluder(), Slic3r::GUI::Tab::sync_excluder(), and Slic3r::GUI::Tab::update_all_extruder_options_status().

◆ fail_image

wxImage Slic3r::GUI::fail_image
static

◆ failed_in_cloud_service_str [1/2]

auto Slic3r::GUI::failed_in_cloud_service_str = _u8L("Cloud service connection failed. Please try again.")
static

◆ failed_in_cloud_service_str [2/2]

auto Slic3r::GUI::failed_in_cloud_service_str = _u8L("Cloud service connection failed. Please try again.")
static

◆ filament_printable_error_msg

◆ filament_types

const std::vector<std::string> Slic3r::GUI::filament_types
static
Initial value:
= {"PLA", "rPLA", "PLA+", "PLA Tough", "PETG", "ABS", "ASA", "FLEX", "HIPS", "PA", "PACF",
"NYLON", "PVA", "PVB", "PC", "PCABS", "PCTG", "PCCF", "PHA", "PP", "PEI", "PET",
"PETGCF", "PTBA", "PTBA90A", "PEEK", "TPU93A", "TPU75D", "TPU", "TPU92A", "TPU98A", "Misc",
"TPE", "GLAZE", "Nylon", "CPE", "METAL", "ABST", "Carbon Fiber", "SBS"}
123 {"PLA", "rPLA", "PLA+", "PLA Tough", "PETG", "ABS", "ASA", "FLEX", "HIPS", "PA", "PACF",
124 "NYLON", "PVA", "PVB", "PC", "PCABS", "PCTG", "PCCF", "PHA", "PP", "PEI", "PET",
125 "PETGCF", "PTBA", "PTBA90A", "PEEK", "TPU93A", "TPU75D", "TPU", "TPU92A", "TPU98A", "Misc",
126 "TPE", "GLAZE", "Nylon", "CPE", "METAL", "ABST", "Carbon Fiber", "SBS"};

Referenced by Slic3r::GUI::ColorDecomposeDialog::ColorDecomposeDialog(), Slic3r::GUI::EditFilamentPresetDialog::EditFilamentPresetDialog(), Slic3r::GUI::PartPlate::check_filament_printable(), Slic3r::GUI::PartPlate::check_mixture_filament_compatible(), Slic3r::GUI::PartPlate::check_mixture_of_pla_and_petg(), Slic3r::GUI::CreateFilamentPresetDialog::get_filament_presets_by_machine(), Slic3r::GUI::CreatePresetForPrinterDialog::get_visible_printer_and_compatible_filament_presets(), Slic3r::GUI::CrealityPrintHostSendDialog::init(), Slic3r::GUI::CalibrationPresetPage::is_filaments_compatiable(), Slic3r::GUI::Plater::open_filament_map_setting_dialog(), and try_pop_up_before_slice().

◆ filament_vendors

const std::vector<std::string> Slic3r::GUI::filament_vendors
static
Initial value:
=
{"3Dgenius", "3DJake", "3DXTECH", "3D BEST-Q", "3D Hero",
"3D-Fuel", "Aceaddity", "AddNorth", "Amazon Basics", "AMOLEN",
"Ankermake", "Anycubic", "Atomic", "AzureFilm", "BASF",
"Bblife", "BCN3D", "Beyond Plastic", "California Filament", "Capricorn",
"CC3D", "colorFabb", "Comgrow", "Cookiecad", "Creality",
"CERPRiSE", "Das Filament", "DO3D", "DOW", "DREMC",
"DSM", "Duramic", "ELEGOO", "Eryone", "Essentium",
"eSUN", "Extrudr", "Fiberforce", "Fiberlogy", "FilaCube",
"Filamentive", "Fillamentum", "FLASHFORGE", "Formfutura", "Francofil",
"FusRock", "FilamentOne", "Fil X", "GEEETECH", "Giantarm",
"Gizmo Dorks", "GreenGate3D", "HATCHBOX", "Hello3D", "IC3D",
"IEMAI", "IIID Max", "INLAND", "iProspect", "iSANMATE",
"Justmaker", "Keene Village Plastics", "Kexcelled", "LDO", "MakerBot",
"MatterHackers", "MIKA3D", "NinjaTek", "Nobufil", "Novamaker",
"OVERTURE", "OVVNYXE", "Polymaker", "Priline", "Printed Solid",
"Protopasta", "Prusament", "Push Plastic", "R3D", "re3D",
"Re-pet3D", "Recreus", "Regen", "RatRig", "Sain SMART",
"SliceWorx", "Snapmaker", "SnoLabs", "Spectrum", "SUNLU",
"TTYT3D", "Tianse", "UltiMaker", "Valment", "Verbatim",
"VO3D", "Voxelab", "VOXELPLA", "YOOPAI", "Yousu",
"Ziro", "Zyltech"}
101 {"3Dgenius", "3DJake", "3DXTECH", "3D BEST-Q", "3D Hero",
102 "3D-Fuel", "Aceaddity", "AddNorth", "Amazon Basics", "AMOLEN",
103 "Ankermake", "Anycubic", "Atomic", "AzureFilm", "BASF",
104 "Bblife", "BCN3D", "Beyond Plastic", "California Filament", "Capricorn",
105 "CC3D", "colorFabb", "Comgrow", "Cookiecad", "Creality",
106 "CERPRiSE", "Das Filament", "DO3D", "DOW", "DREMC",
107 "DSM", "Duramic", "ELEGOO", "Eryone", "Essentium",
108 "eSUN", "Extrudr", "Fiberforce", "Fiberlogy", "FilaCube",
109 "Filamentive", "Fillamentum", "FLASHFORGE", "Formfutura", "Francofil",
110 "FusRock", "FilamentOne", "Fil X", "GEEETECH", "Giantarm",
111 "Gizmo Dorks", "GreenGate3D", "HATCHBOX", "Hello3D", "IC3D",
112 "IEMAI", "IIID Max", "INLAND", "iProspect", "iSANMATE",
113 "Justmaker", "Keene Village Plastics", "Kexcelled", "LDO", "MakerBot",
114 "MatterHackers", "MIKA3D", "NinjaTek", "Nobufil", "Novamaker",
115 "OVERTURE", "OVVNYXE", "Polymaker", "Priline", "Printed Solid",
116 "Protopasta", "Prusament", "Push Plastic", "R3D", "re3D",
117 "Re-pet3D", "Recreus", "Regen", "RatRig", "Sain SMART",
118 "SliceWorx", "Snapmaker", "SnoLabs", "Spectrum", "SUNLU",
119 "TTYT3D", "Tianse", "UltiMaker", "Valment", "Verbatim",
120 "VO3D", "Voxelab", "VOXELPLA", "YOOPAI", "Yousu",
121 "Ziro", "Zyltech"};

Referenced by Slic3r::GUI::CreateFilamentPresetDialog::create_vendor_item().

◆ file_is_not_exists_str [1/2]

auto Slic3r::GUI::file_is_not_exists_str = _u8L("Print file not found; please slice again.")
static

◆ file_is_not_exists_str [2/2]

auto Slic3r::GUI::file_is_not_exists_str = _u8L("Print file not found; please slice again.")
static

◆ file_over_size_str [1/2]

auto Slic3r::GUI::file_over_size_str = _u8L("The print file exceeds the maximum allowable size (1GB). Please simplify the model and slice again.")
static

◆ file_over_size_str [2/2]

auto Slic3r::GUI::file_over_size_str = _u8L("The print file exceeds the maximum allowable size (1GB). Please simplify the model and slice again.")
static

◆ file_wildcards_by_type

const FileWildcards Slic3r::GUI::file_wildcards_by_type[FT_SIZE]
static
Initial value:
= {
{ L("STEP files"), { ".stp"sv, ".step"sv } },
{ L("STL files"), { ".stl"sv } },
{ L("OBJ files"), { ".obj"sv } },
{ L("AMF files"), { ".amf"sv, ".zip.amf"sv, ".xml"sv } },
{ L("3MF files"), { ".3mf"sv } },
{L("G-code 3MF files"), {".gcode.3mf"sv}},
{ L("G-code files"), { ".gcode"sv} },
{L("Supported files"), {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".gltf"sv, ".glb"sv, ".fbx"sv, ".drc"sv}},
{ L("ZIP files"), { ".zip"sv } },
{ L("Project files"), { ".3mf"sv} },
{ L("Known files"), { ".stl"sv, ".obj"sv } },
{ L("INI files"), { ".ini"sv } },
{ L("SVG files"), { ".svg"sv } },
{ L("Texture"), { ".png"sv, ".svg"sv } },
{ L("Masked SLA files"), { ".sl1"sv, ".sl1s"sv } },
{ L("Draco files"), { ".drc"sv } },
}
665 {
666 /* FT_STEP */ { L("STEP files"), { ".stp"sv, ".step"sv } },
667 /* FT_STL */ { L("STL files"), { ".stl"sv } },
668 /* FT_OBJ */ { L("OBJ files"), { ".obj"sv } },
669 /* FT_AMF */ { L("AMF files"), { ".amf"sv, ".zip.amf"sv, ".xml"sv } },
670 /* FT_3MF */ { L("3MF files"), { ".3mf"sv } },
671 /* FT_GCODE_3MF */ {L("G-code 3MF files"), {".gcode.3mf"sv}},
672 /* FT_GCODE */ { L("G-code files"), { ".gcode"sv} },
673#ifdef __APPLE__
674 /* FT_MODEL */
675 {L("Supported files"), {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".gltf"sv, ".glb"sv, ".fbx"sv, ".usd"sv, ".usda"sv, ".usdc"sv, ".usdz"sv, ".abc"sv, ".ply"sv, ".drc"sv}},
676#else
677 /* FT_MODEL */
678 {L("Supported files"), {".3mf"sv, ".stl"sv, ".oltp"sv, ".stp"sv, ".step"sv, ".svg"sv, ".amf"sv, ".obj"sv, ".gltf"sv, ".glb"sv, ".fbx"sv, ".drc"sv}},
679#endif
680 /* FT_ZIP */ { L("ZIP files"), { ".zip"sv } },
681 /* FT_PROJECT */ { L("Project files"), { ".3mf"sv} },
682 /* FT_GALLERY */ { L("Known files"), { ".stl"sv, ".obj"sv } },
683
684 /* FT_INI */ { L("INI files"), { ".ini"sv } },
685 /* FT_SVG */ { L("SVG files"), { ".svg"sv } },
686 /* FT_TEX */ { L("Texture"), { ".png"sv, ".svg"sv } },
687 /* FT_SL1 */ { L("Masked SLA files"), { ".sl1"sv, ".sl1s"sv } },
688 /* FT_DRC */ { L("Draco files"), { ".drc"sv } },
689};

Referenced by file_wildcards().

◆ font_icons

const std::map<const wchar_t, std::string> Slic3r::GUI::font_icons
static
77 {
78 {ImGui::PrintIconMarker , "cog" },
79 {ImGui::PrinterIconMarker , "printer" },
80 // remove sla_printer
81 //{ImGui::PrinterSlaIconMarker , "sla_printer" },
82 {ImGui::FilamentIconMarker , "spool" },
83 {ImGui::MaterialIconMarker , "blank_16" },
84 {ImGui::MinimalizeButton , "notification_minimalize" },
85 {ImGui::MinimalizeHoverButton , "notification_minimalize_hover" },
86 {ImGui::RightArrowButton , "notification_right" },
87 {ImGui::RightArrowHoverButton , "notification_right_hover" },
88 //{ImGui::PreferencesButton , "notification_preferences" },
89 //{ImGui::PreferencesHoverButton , "notification_preferences_hover"},
90#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
91 {ImGui::SliderFloatEditBtnIcon, "edit_button" },
92#endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
93 {ImGui::ClipboardBtnIcon , "copy_menu" },
94 {ImGui::CircleButtonIcon , "circle_paint" },
95 {ImGui::TriangleButtonIcon , "triangle_paint" },
96 {ImGui::FillButtonIcon , "fill_paint" },
97 {ImGui::HeightRangeIcon , "height_range" },
98 {ImGui::ConfirmIcon , "confirm" },
99 {ImGui::GapFillIcon , "gap_fill" },
100 {ImGui::FoldButtonIcon , "im_fold" },
101 {ImGui::UnfoldButtonIcon , "im_unfold" },
102 {ImGui::gCodeButtonIcon , "im_code" }, //ORCA
103 {ImGui::VisibleIcon , "im_visible" }, //ORCA
104 {ImGui::HiddenIcon , "im_hidden" }, //ORCA
105 {ImGui::SphereButtonIcon , "toolbar_modifier_sphere" },
106 // dark mode icon
107 {ImGui::MinimalizeDarkButton , "notification_minimalize_dark" },
108 {ImGui::MinimalizeHoverDarkButton , "notification_minimalize_hover_dark" },
109 {ImGui::RightArrowDarkButton , "notification_right_dark" },
110 {ImGui::RightArrowHoverDarkButton , "notification_right_hover_dark" },
111 //{ImGui::PreferencesDarkButton , "notification_preferences_dark" },
112 //{ImGui::PreferencesHoverDarkButton , "notification_preferences_hover_dark"},
113
114 {ImGui::ClipboardBtnDarkIcon , "copy_menu_dark" },
115 {ImGui::CircleButtonDarkIcon , "circle_paint_dark" },
116 {ImGui::TriangleButtonDarkIcon , "triangle_paint_dark" },
117 {ImGui::FillButtonDarkIcon , "fill_paint_dark" },
118 {ImGui::HeightRangeDarkIcon , "height_range_dark" },
119 {ImGui::ConfirmDarkIcon , "confirm_dark" },
120 {ImGui::GapFillDarkIcon , "gap_fill_dark" },
121 {ImGui::SphereButtonDarkIcon , "toolbar_modifier_sphere_dark" },
122
123 {ImGui::TextSearchIcon , "im_text_search" },
124 {ImGui::TextSearchCloseIcon , "im_text_search_close" },
125
126 {ImGui::ExpandBtn , "expand_btn" },
127 {ImGui::CollapseBtn , "collapse_btn" },
128 {ImGui::RevertBtn , "revert_btn" },
129
130 //{ImGui::HorizontalHide , "horizontal_hide" }, // ORCA use ExpandBtn / CollapseBtn
131 //{ImGui::HorizontalShow , "horizontal_show" },
132
133 {ImGui::CloseBlockNotifButton , "block_notification_close" },
134 {ImGui::CloseBlockNotifHoverButton , "block_notification_close_hover" },
135
136 {ImGui::CollapseArrowIcon, "notification_collapse" },
137 {ImGui::ExpandArrowIcon, "notification_expand" },
138 {ImGui::OpenArrowIcon, "notification_arrow_open" },
139};

Referenced by Slic3r::GUI::ImGuiWrapper::init_font().

◆ font_icons_extra_large

const std::map<const wchar_t, std::string> Slic3r::GUI::font_icons_extra_large
static
Initial value:
= {
}
184 {
185 //BBS do not use notification_clippy
186 //{ImGui::ClippyMarker , "notification_clippy" },
187};

Referenced by Slic3r::GUI::ImGuiWrapper::init_font().

◆ font_icons_large

const std::map<const wchar_t, std::string> Slic3r::GUI::font_icons_large
static
140 {
141 {ImGui::CloseNotifButton , "notification_close" },
142 {ImGui::CloseNotifHoverButton , "notification_close_hover" },
143 //BBS removed
144 {ImGui::EjectButton , "notification_eject_sd" },
145 {ImGui::EjectHoverButton , "notification_eject_sd_hover" },
146 //{ImGui::WarningMarker , "notification_warning" },
147 //{ImGui::ErrorMarker , "notification_error" },
148 {ImGui::CancelButton , "notification_cancel" },
149 {ImGui::CancelHoverButton , "notification_cancel_hover" },
150
151// {ImGui::SinkingObjectMarker , "move" },
152// {ImGui::CustomSupportsMarker , "toolbar_support" },
153// {ImGui::CustomSeamMarker , "seam" },
154// {ImGui::MmuSegmentationMarker , "mmu_segmentation" },
155// {ImGui::VarLayerHeightMarker , "layers" },
156 //{ImGui::DocumentationButton , "notification_documentation" },
157 //{ImGui::DocumentationHoverButton, "notification_documentation_hover"},
158 //{ImGui::InfoMarker , "notification_info" },
159 // dark mode icon
160 {ImGui::CloseNotifDarkButton , "notification_close_dark" },
161 {ImGui::CloseNotifHoverDarkButton , "notification_close_hover_dark" },
162 //{ImGui::DocumentationDarkButton , "notification_documentation_dark" },
163 //{ImGui::DocumentationHoverDarkButton, "notification_documentation_hover_dark"},
164 {ImGui::BlockNotifErrorIcon, "block_notification_error" },
165 {ImGui::PrevArrowBtnIcon, "notification_arrow_left" },
166 {ImGui::NextArrowBtnIcon, "notification_arrow_right" },
167 {ImGui::CompleteIcon, "notification_slicing_complete" },
168 {ImGui::FilamentGreen, "filament_green" },
169
170 {ImGui::PlayButton, "notification_play" },
171 {ImGui::PlayDarkButton, "notification_play_dark" },
172 {ImGui::PlayHoverButton, "notification_play_hover" },
173 {ImGui::PlayHoverDarkButton, "notification_play_hover_dark" },
174 {ImGui::PauseButton, "notification_pause" },
175 {ImGui::PauseDarkButton, "notification_pause_dark" },
176 {ImGui::PauseHoverButton, "notification_pause_hover" },
177 {ImGui::PauseHoverDarkButton, "notification_pause_hover_dark" },
178 {ImGui::OpenButton, "notification_open" },
179 {ImGui::OpenDarkButton, "notification_open_dark" },
180 {ImGui::OpenHoverButton, "notification_open_hover" },
181 {ImGui::OpenHoverDarkButton, "notification_open_hover_dark" },
182};

Referenced by Slic3r::GUI::ImGuiWrapper::init_font().

◆ FREQ_SETTINGS_BUNDLE_FFF

SettingsFactory::Bundle Slic3r::GUI::FREQ_SETTINGS_BUNDLE_FFF
static
Initial value:
=
{
{ L("Quality"), { "layer_height" } },
{ L("Shell"), { "wall_loops", "top_shell_layers", "bottom_shell_layers"} },
{ L("Infill") , { "sparse_infill_density", "sparse_infill_pattern" } },
{ L("Support") , { "enable_support", "support_type", "support_threshold_angle", "support_threshold_overlap",
"support_base_pattern", "support_on_build_plate_only","support_critical_regions_only",
"support_remove_small_overhang",
"support_base_pattern_spacing", "support_expansion"}},
{ L("Flush options") , { "flush_into_infill", "flush_into_objects", "flush_into_support"} }
}
84{
85 //BBS
86 { L("Quality"), { "layer_height" } },
87 { L("Shell"), { "wall_loops", "top_shell_layers", "bottom_shell_layers"} },
88 { L("Infill") , { "sparse_infill_density", "sparse_infill_pattern" } },
89 // BBS
90 { L("Support") , { "enable_support", "support_type", "support_threshold_angle", "support_threshold_overlap",
91 "support_base_pattern", "support_on_build_plate_only","support_critical_regions_only",
92 "support_remove_small_overhang",
93 "support_base_pattern_spacing", "support_expansion"}},
94 //BBS
95 { L("Flush options") , { "flush_into_infill", "flush_into_objects", "flush_into_support"} }
96};

Referenced by Slic3r::GUI::MenuFactory::append_menu_item_settings(), Slic3r::GUI::MenuFactory::append_menu_items_flush_options(), and create_freq_settings_popupmenu().

◆ FREQ_SETTINGS_BUNDLE_SLA

SettingsFactory::Bundle Slic3r::GUI::FREQ_SETTINGS_BUNDLE_SLA
static
Initial value:
=
{
}
100{
101 // BBS: remove SLA freq settings
102};

Referenced by Slic3r::GUI::MenuFactory::append_menu_item_settings(), and create_freq_settings_popupmenu().

◆ g_dialog_height

int Slic3r::GUI::g_dialog_height = 0
static

◆ g_dialog_max_height

◆ g_dialog_max_width

◆ g_dialog_width

int Slic3r::GUI::g_dialog_width = 0
static

◆ g_extra_height

const int Slic3r::GUI::g_extra_height = 64
static

◆ g_max_size_from_parent

◆ g_min_row_count

const int Slic3r::GUI::g_min_row_count = 16
static

◆ g_min_row_size

const int Slic3r::GUI::g_min_row_size = 36
static

◆ g_min_setting_width

const int Slic3r::GUI::g_min_setting_width = 464
static

◆ g_overflow_row_count

const int Slic3r::GUI::g_overflow_row_count = 50
static

◆ g_vscroll_width

const int Slic3r::GUI::g_vscroll_width = 48
static

◆ gcode_filename

const std::string Slic3r::GUI::gcode_filename = "temp.gcode"
static

◆ GCODE_VIEWER_SLIDER_SCALE

◆ GRABBER_COLOR

◆ grey

◆ GreyColor

◆ grid_cell_border_height

const int Slic3r::GUI::grid_cell_border_height = 2
static

◆ grid_cell_border_width

const int Slic3r::GUI::grid_cell_border_width = 2
static

◆ grid_cell_checkbox_size

const int Slic3r::GUI::grid_cell_checkbox_size = 16
static

Referenced by wxBEGIN_EVENT_TABLE().

◆ GROOVE_COLOR_DARK

const ImU32 Slic3r::GUI::GROOVE_COLOR_DARK = IM_COL32(45, 45, 49, 255)
static

◆ GROOVE_COLOR_LIGHT

const ImU32 Slic3r::GUI::GROOVE_COLOR_LIGHT = IM_COL32(206, 206, 206, 255)
static

◆ GROOVE_WIDTH

const float Slic3r::GUI::GROOVE_WIDTH = 12.0f
static

◆ GROUP_STATIC_LINE_COL

const wxColour Slic3r::GUI::GROUP_STATIC_LINE_COL = wxColour(206, 206, 206)
static

◆ GROUP_TITLE_FONT_COL

wxColour Slic3r::GUI::GROUP_TITLE_FONT_COL = wxColour(172, 172, 172)
static

◆ HORIZONTAL_SLIDER_WINDOW_HEIGHT

const float Slic3r::GUI::HORIZONTAL_SLIDER_WINDOW_HEIGHT = 64.0f
static

◆ HOVER_COLOR [1/2]

const ColorRGBA Slic3r::GUI::HOVER_COLOR = {0.7f, 0.7f, 0.7f, 0.5f}
static

◆ HOVER_COLOR [2/2]

const Slic3r::ColorRGBA Slic3r::GUI::HOVER_COLOR = ColorRGBA::GREEN()
static

◆ HOVERED_DOWEL_COLOR

const ColorRGBA Slic3r::GUI::HOVERED_DOWEL_COLOR = ColorRGBA(0.0f, 0.5f, 0.5f, 1.0f)
static

◆ HOVERED_ERR_COLOR

const ColorRGBA Slic3r::GUI::HOVERED_ERR_COLOR = ColorRGBA(1.0f, 0.3f, 0.3f, 1.0f)
static

◆ HOVERED_PLAG_COLOR

const ColorRGBA Slic3r::GUI::HOVERED_PLAG_COLOR = ColorRGBA::CYAN()
static

◆ HYPERTEXT_MARKER_END

const std::string Slic3r::GUI::HYPERTEXT_MARKER_END = "</a>"

◆ HYPERTEXT_MARKER_START

const std::string Slic3r::GUI::HYPERTEXT_MARKER_START = "<a>"

◆ IMEX_GHOST_ALPHA

float Slic3r::GUI::IMEX_GHOST_ALPHA = 0.55f
staticconstexpr

◆ INFO_ITEMS

const std::map<InfoItemType, InfoItemAtributes> Slic3r::GUI::INFO_ITEMS
Initial value:
{
{ InfoItemType::CustomSupports, {L("Support Painting"), "toolbar_support" }, },
{ InfoItemType::MmSegmentation, {L("Color Painting"), "mmu_segmentation"}, },
{ InfoItemType::CutConnectors, {L("Cut connectors"), "cut_connectors" }, },
{ InfoItemType::FuzzySkin, {L("Paint-on fuzzy skin"), "objlist_fuzzy_skin_paint" }, },
}
@ CutConnectors
Definition ObjectDataViewModel.hpp:82
87 {
88// info_item Type info_item Name info_item BitmapName
89 { InfoItemType::CustomSupports, {L("Support Painting"), "toolbar_support" }, },
90 //{ InfoItemType::CustomSeam, {L("Paint-on seam"), "seam_" }, },
91 { InfoItemType::MmSegmentation, {L("Color Painting"), "mmu_segmentation"}, },
92 //{ InfoItemType::Sinking, {L("Sinking"), "objlist_sinking"}, },
93 { InfoItemType::CutConnectors, {L("Cut connectors"), "cut_connectors" }, },
94 { InfoItemType::FuzzySkin, {L("Paint-on fuzzy skin"), "objlist_fuzzy_skin_paint" }, },
95};

Referenced by Slic3r::GUI::ObjectDataViewModel::ObjectDataViewModel(), Slic3r::GUI::ObjectDataViewModelNode::ObjectDataViewModelNode(), and Slic3r::GUI::ObjectDataViewModel::Rescale().

◆ is_in_full_screen_mode

bool Slic3r::GUI::is_in_full_screen_mode = false

◆ IsFinishFn

template<class Fn>
bool Slic3r::GUI::IsFinishFn = std::is_invocable_v<Fn, bool, std::exception_ptr&>
constexpr

◆ IsProcessFn

template<class Fn>
bool Slic3r::GUI::IsProcessFn = std::is_invocable_v<Fn, Job::Ctl&>
constexpr

◆ kArcFacets

int Slic3r::GUI::kArcFacets = 24
staticconstexpr

◆ kBearChin

const Vec2d Slic3r::GUI::kBearChin[]
static
Initial value:
= {
{-0.2682, -0.3578}, {+0.2628, -0.3578}, {+0.2237, -0.1786},
}
4684 { // the CHIN BAR, flat. The muzzle is relief — see kBearCrest.
4685 {-0.2682, -0.3578}, {+0.2628, -0.3578}, {+0.2237, -0.1786},
4686};

Referenced by Slic3r::GUI::DesignSketchTool::render_mate_face().

◆ kBearCrest

const Vec3d Slic3r::GUI::kBearCrest[]
static
Initial value:
= {
{-0.0048, -0.1793, +0.2073},
{-0.0048, +0.1605, +0.1279},
}
4702 { // nose (tall) -> tail (short)
4703 {-0.0048, -0.1793, +0.2073},
4704 {-0.0048, +0.1605, +0.1279},
4705};

Referenced by Slic3r::GUI::DesignSketchTool::render_mate_face().

◆ kBearMarks

const Vec3d Slic3r::GUI::kBearMarks[]
static
Initial value:
= {
{-0.1997, +0.1760, +0.0590},
{+0.1947, +0.1760, +0.0590},
{+0.2797, +0.0760, +0.0380},
}
4688 {
4689 {-0.1997, +0.1760, +0.0590},
4690 {+0.1947, +0.1760, +0.0590},
4691 {+0.2797, +0.0760, +0.0380},
4692};

Referenced by Slic3r::GUI::DesignSketchTool::render_mate_face().

◆ kBearOutline

const Vec2d Slic3r::GUI::kBearOutline[]
static
Initial value:
= {
{+0.3842, +0.3294}, {+0.3156, +0.4002}, {+0.2424, +0.3294},
{-0.2524, +0.3294}, {-0.3377, +0.3877}, {-0.3693, +0.3298},
{-0.3256, +0.2631}, {-0.4893, -0.3337}, {-0.3960, -0.4002},
{+0.4151, -0.4002}, {+0.5000, -0.3154}, {+0.3156, +0.2631},
}
4678 { // 12 verts, RDP eps 0.030, CCW
4679 {+0.3842, +0.3294}, {+0.3156, +0.4002}, {+0.2424, +0.3294},
4680 {-0.2524, +0.3294}, {-0.3377, +0.3877}, {-0.3693, +0.3298},
4681 {-0.3256, +0.2631}, {-0.4893, -0.3337}, {-0.3960, -0.4002},
4682 {+0.4151, -0.4002}, {+0.5000, -0.3154}, {+0.3156, +0.2631},
4683};

Referenced by Slic3r::GUI::DesignSketchTool::render_mate_face().

◆ kBearPlateZ

const double Slic3r::GUI::kBearPlateZ = +0.0360
static

◆ kBearSnoutBase

const Vec2d Slic3r::GUI::kBearSnoutBase[]
static
Initial value:
= {
{-0.0727, -0.2417},
{+0.0630, -0.2417},
{+0.0259, +0.1939},
{-0.0356, +0.1939},
}
4696 { // CCW from the nose end
4697 {-0.0727, -0.2417},
4698 {+0.0630, -0.2417},
4699 {+0.0259, +0.1939},
4700 {-0.0356, +0.1939},
4701};

Referenced by Slic3r::GUI::DesignSketchTool::render_mate_face().

◆ kBedRow

int Slic3r::GUI::kBedRow = 1
static

◆ kCadRightClickDriftPx

int Slic3r::GUI::kCadRightClickDriftPx = 3
inlineconstexpr

◆ kCellDip

int Slic3r::GUI::kCellDip = 20
staticconstexpr

◆ kCloudUrl

const char* const Slic3r::GUI::kCloudUrl = "https://cloud.orcaslicer.com"
static

◆ kDecomposeBambuPresetPrefix

◆ kDecomposePetgBasicType

◆ kDecomposePetgFilamentId

const char* Slic3r::GUI::kDecomposePetgFilamentId = "GFG00"
inlineconstexpr

◆ kDecomposePetgShortType

const char* Slic3r::GUI::kDecomposePetgShortType = "PETG"
inlineconstexpr

◆ kDecomposePlaBasicType

◆ kDecomposePlaFilamentId

const char* Slic3r::GUI::kDecomposePlaFilamentId = "GFA00"
inlineconstexpr

◆ kDecomposePlaShortType

const char* Slic3r::GUI::kDecomposePlaShortType = "PLA"
inlineconstexpr

◆ kDpTokens

const DpToken Slic3r::GUI::kDpTokens[TokCount]
static
Initial value:
= {
{ wxColour(0xEC,0xEC,0xEE), wxColour(0x36,0x36,0x3C) },
{ wxColour(0xD7,0xD7,0xDB), wxColour(0x4D,0x4D,0x54) },
{ wxColour(0xFB,0xFB,0xFD), wxColour(0x2D,0x2D,0x30) },
{ wxColour(0x66,0x66,0x68), wxColour(0x81,0x81,0x83) },
{ wxColour(0x35,0x35,0x37), wxColour(0xC8,0xC8,0xC8) },
{ wxColour(0x2C,0x2C,0x2E), wxColour(0xE0,0xE0,0xE0) },
{ wxColour(0xA0,0xA0,0xA2), wxColour(0x80,0x80,0x80) },
{ wxColour(0xDB,0xDB,0xDB), wxColour(0x4A,0x4A,0x51) },
}
197 {
198 { wxColour(0xEC,0xEC,0xEE), wxColour(0x36,0x36,0x3C) }, // ribbon
199 { wxColour(0xD7,0xD7,0xDB), wxColour(0x4D,0x4D,0x54) }, // ribbon hover
200 { wxColour(0xFB,0xFB,0xFD), wxColour(0x2D,0x2D,0x30) }, // sidebar / lists
201 { wxColour(0x66,0x66,0x68), wxColour(0x81,0x81,0x83) }, // secondary text
202 { wxColour(0x35,0x35,0x37), wxColour(0xC8,0xC8,0xC8) }, // control text
203 { wxColour(0x2C,0x2C,0x2E), wxColour(0xE0,0xE0,0xE0) }, // list item text
204 { wxColour(0xA0,0xA0,0xA2), wxColour(0x80,0x80,0x80) }, // dimmed list item
205 // Prepare's control-outline grey, sampled from its sidebar: #DBDBDB on light, #4A4A51 on the
206 // #2D2D31 dark panel. Every framed thing in Design uses this so the tab matches.
207 { wxColour(0xDB,0xDB,0xDB), wxColour(0x4A,0x4A,0x51) },
208};

Referenced by dp_retheme(), dp_tok(), make_card(), and make_spin().

◆ kFontKey

const char* Slic3r::GUI::kFontKey = "cad_text_font"
static

◆ kGapDip

int Slic3r::GUI::kGapDip = 6
staticconstexpr

◆ kHeightKey

const char* Slic3r::GUI::kHeightKey = "cad_text_height"
static

◆ kIconPx

int Slic3r::GUI::kIconPx = 16
staticconstexpr

◆ kImexIconPx

int Slic3r::GUI::kImexIconPx = 20
staticconstexpr

◆ kLeftNavWidth

const int Slic3r::GUI::kLeftNavWidth = 220 + 1
static

◆ kNameColPx

int Slic3r::GUI::kNameColPx = 176
staticconstexpr

◆ kOfferRowCount

const int Slic3r::GUI::kOfferRowCount = 9
static

◆ kOfferRowFlat

const bool Slic3r::GUI::kOfferRowFlat[]
static
Initial value:
= {
false,
false,
false,
false,
false,
false,
false,
false,
true,
}
92 {
93 false,
94 false,
95 false,
96 false,
97 false,
98 false,
99 false,
100 false,
101 true,
102};

Referenced by Slic3r::GUI::DesignPanel::show_offer_menu().

◆ kOfferRowNames

const char* const Slic3r::GUI::kOfferRowNames[]
static
Initial value:
= {
L("Create"),
L("Add material"),
L("Remove"),
L("Fillet / chamfer / draft"),
L("Repeat"),
L("Transform"),
L("Reference"),
L("Modify"),
"Top",
}
78 {
79 L("Create"),
80 L("Add material"),
81 L("Remove"),
82 L("Fillet / chamfer / draft"),
83 L("Repeat"),
84 L("Transform"),
85 L("Reference"),
86 L("Modify"),
87 "Top",
88};

Referenced by Slic3r::GUI::anonymous_namespace{McpControl.cpp}::action_list_verbs(), and Slic3r::GUI::DesignPanel::show_offer_menu().

◆ kOfferVerbCount

◆ kOfferVerbs

const OfferVerb Slic3r::GUI::kOfferVerbs[]
static
104 {
105 {"sketch", L_CONTEXT("Sketch", "Design"), 0, "Shift+S", "key:S+S", L("Select a flat face or a reference plane to sketch on"), 0x00000403u, 0, 0, false, false, nullptr, "design_sketch", L("Sketch on the selected flat face or plane, or click one next")},
106 {"extrude", L_CONTEXT("Extrude", "Design"), 1, "Shift+E", "key:S+E", L("Create a sketch, or pick a solid face, first"), 0x00004002u, 0, 0, false, false, nullptr, "design_extrude", L("Extrude a sketch profile, or push/pull a picked face")},
107 {"revolve", L_CONTEXT("Revolve", "Design"), 1, "Shift+R", "key:S+R", L("Create a sketch profile to revolve first"), 0x00004000u, 0, 0, false, false, nullptr, "design_revolve", L("Revolve a profile about an axis")},
108 {"sweep", L_CONTEXT("Sweep", "Design"), 1, "Shift+W", "key:S+W", L("Create a profile sketch to sweep first"), 0x00004000u, 0, 2, false, false, nullptr, "design_sweep", L("Sweep a profile along a path")},
109 {"loft", L_CONTEXT("Loft", "Design"), 1, "Shift+L", "key:S+L", L("Create at least two profile sketches to loft"), 0x00004000u, 0, 2, false, false, nullptr, "design_loft", L("Loft (skin) between two or more profiles")},
110 {"thicken", L_CONTEXT("Thicken", "Design"), 1, nullptr, "fly:material#4", L("Thicken needs a solid body — add or import one first"), 0x0000000au, 1, 0, false, false, nullptr, "design_thicken", L("Offset a solid face into a thin plate (new body)")},
111 {"rib", L_CONTEXT("Rib", "Design"), 1, "R", "fly:material#5", L("Rib needs a solid body — add or import one first"), 0x00010000u, 1, 0, false, false, nullptr, "design_rib", L("Grow a thin wall from an open sketch line, fused to a body")},
112 {"boolean", L_CONTEXT("Join", "Design"), 1, "Shift+B", "btn:bool#0", L("Boolean needs two bodies — add or import a second one"), 0x00000200u, 2, 0, false, false, nullptr, "design_boolean", L("Fuse the tool body into the target — one solid, no seam")},
113 {"bool_subtract", L_CONTEXT("Subtract", "Design"), 1, nullptr, "btn:bool#1", L("Boolean needs two bodies — add or import a second one"), 0x00000200u, 2, 0, false, false, nullptr, "design_boolean", L("Cut the tool body out of the target")},
114 {"bool_intersect", L_CONTEXT("Intersect", "Design"), 1, nullptr, "btn:bool#2", L("Boolean needs two bodies — add or import a second one"), 0x00000200u, 2, 0, false, false, nullptr, "design_boolean", L("Keep only where the two bodies overlap")},
115 {"surf_extrude", L_CONTEXT("Surface Extrude", "Design"), 1, "Shift+G", "key:S+G", L("Create a sketch first"), 0x00004000u, 0, 0, false, false, nullptr, "design_extrude", L("Extrude a sketch into a sheet body (no end caps)")},
116 {"surf_revolve", L_CONTEXT("Surface Revolve", "Design"), 1, nullptr, "fly:surface#1", L("Create a sketch profile to revolve first"), 0x00004000u, 0, 0, false, false, nullptr, "design_revolve", L("Revolve a sketch profile into a sheet body")},
117 {"surf_loft", L_CONTEXT("Surface Loft", "Design"), 1, nullptr, "fly:surface#2", L("Create at least two profile sketches to loft"), 0x00004000u, 0, 2, false, false, nullptr, "design_loft", L("Loft (skin) between 2+ profiles, open (no end caps)")},
118 {"surf_fill", L_CONTEXT("Surface Fill", "Design"), 1, nullptr, "fly:surface#3", L("Create a closed sketch first"), 0x00004000u, 0, 0, false, false, nullptr, "design_surface", L("Fill a sketch boundary with a smooth face")},
119 {"thicken_surf", L_CONTEXT("Thicken Surface", "Design"), 1, nullptr, "fly:surface#5", L("Thicken Surface needs a surface body — make one with a Surface tool first"), 0x00000100u, 0, 0, true, false, nullptr, "design_thicken", L("Thicken a sheet body into a solid")},
120 {"hole", L_CONTEXT("Hole", "Design"), 2, "Shift+H", "key:S+H", L("Pick a face or a plane to drill into"), 0x00000402u, 1, 0, false, false, nullptr, "design_hole", L("Drill a hole, centered on a picked face or placed on a plane")},
121 {"thread", L_CONTEXT("Thread", "Design"), 2, "Shift+T", "key:S+T", L("Pick a cylindrical surface (bore / outer) or a circular edge for a thread"), 0x00000024u, 1, 0, false, false, nullptr, "design_thread", L("Thread a cylindrical surface (inner bore / outer) or a circular edge")},
122 {"shell", L_CONTEXT("Shell", "Design"), 2, "Shift+K", "key:S+K", L("Shell needs a solid body — add or import one first"), 0x00000082u, 1, 0, false, false, nullptr, "design_shell", L("Hollow the body to a wall thickness, opening a picked face")},
123 {"cut", L_CONTEXT("Cut", "Design"), 2, "Shift+X", "key:S+X", L("Cut needs a solid body — add or import one first"), 0x000004feu, 1, 0, false, false, nullptr, "design_cut", L("Trim the body with a plane — drag the offset arrow; keep one half or both")},
124 {"split", L_CONTEXT("Split", "Design"), 2, nullptr, nullptr, L("Split needs a solid body — add or import one first"), 0x000000feu, 1, 0, false, false, nullptr, nullptr, L("Split the body along a picked face into two solids")},
125 {"fillet", L_CONTEXT("Fillet", "Design"), 3, "Shift+F", "btn:dress#0", L("Pick an edge to round"), 0x000000b2u, 1, 0, false, false, nullptr, "design_filletedge", L("Pick an edge, then drag the radius arrow or type it")},
126 {"chamfer", L_CONTEXT("Chamfer", "Design"), 3, nullptr, "btn:dress#1", L("Pick an edge to bevel"), 0x000000b2u, 1, 0, false, false, nullptr, "design_chamfer", L("Pick an edge, then drag the distance arrow or type it")},
127 {"draft", L_CONTEXT("Draft", "Design"), 3, "Shift+D", "key:S+D", L("Pick a face to taper"), 0x0000000au, 1, 0, false, false, nullptr, "design_draft", L("Tilt a picked face by a draft angle")},
128 {"surf_offset", L_CONTEXT("Surface Offset", "Design"), 3, nullptr, "fly:surface#4", L("Surface Offset needs a surface body — make one with a Surface tool first"), 0x00000100u, 0, 0, true, false, nullptr, "design_offset", L("Offset a sheet body's shell by a signed distance")},
129 {"pattern", L_CONTEXT("Linear pattern", "Design"), 4, "Shift+N", "btn:pat#0", L("Pattern needs a solid body — add or import one first"), 0x00006082u, 1, 0, false, false, nullptr, "design_array", L("Repeat the body along a direction — drag the spacing, set the count")},
130 {"pattern_circular", L_CONTEXT("Circular pattern", "Design"), 4, nullptr, "btn:pat#1", L("Pattern needs a solid body — add or import one first"), 0x00006082u, 1, 0, false, false, nullptr, "design_polararray", L("Repeat the body around an axis — set the count and sweep")},
131 {"mirror", L_CONTEXT("Mirror", "Design"), 4, "Shift+Z", "key:S+Z", L("Mirror needs a body — add or import one first"), 0x000004feu, 1, 0, false, false, nullptr, "design_mirror", L("Reflect a body about a plane")},
132 {"pat_curve", L_CONTEXT("Pattern on Curve", "Design"), 4, nullptr, nullptr, L("Pattern on Curve needs a body and a curve"), 0x00000090u, 1, 0, false, false, nullptr, nullptr, L("Repeat the body along a picked curve")},
133 {"transform", L_CONTEXT("Move", "Design"), 5, "Shift+Y", "key:S+Y", L("Transform needs a body — add or import one first"), 0x000021feu, 1, 0, false, false, nullptr, "design_move", L("Move and/or rotate an existing body")},
134 {"mate", L_CONTEXT("Mate", "Design"), 5, nullptr, "fly:placement#2", L("Mate needs two coordinate systems — create them first"), 0x00001202u, 2, 0, false, false, nullptr, "design_c_coincident", L("Assembly: align two coordinate systems (fastened, planar, revolute, slider, cylindrical)")},
135 {"align", L_CONTEXT("Align to", "Design"), 5, nullptr, nullptr, L("Align needs a body — add or import one first"), 0x00000002u, 1, 0, false, false, nullptr, nullptr, L("Align the body to a picked face or plane")},
136 {"plane", L_CONTEXT("Plane", "Design"), 6, "Shift+P", "key:S+P", nullptr, 0x00000453u, 0, 0, false, false, nullptr, "design_plane", L("Reference plane (offset / tilt / midplane / tangent / two edges / coincident)")},
137 {"axis", L_CONTEXT("Axis", "Design"), 6, "Shift+A", "key:S+A", nullptr, 0x00000057u, 0, 0, false, false, nullptr, "design_line", L("Datum axis (two points, face normal, cylinder centerline, two planes, along edge)")},
138 {"coordsys_v", L_CONTEXT("Coordinate system", "Design"), 6, "Shift+C", "key:S+C", nullptr, 0x00000043u, 0, 0, false, false, nullptr, "design_point", L("Datum coordinate system (world point, or face + direction edge)")},
139 {"helix", L_CONTEXT("Helix", "Design"), 6, nullptr, "fly:plane#3", nullptr, 0x00000405u, 0, 0, false, false, nullptr, "design_thread", L("Helical curve (spring path) — use as a sweep path for coils / springs / augers")},
140 {"project", L_CONTEXT("Project", "Design"), 6, nullptr, "fly:plane#4", L("Project needs a body — add or import one first"), 0x00000482u, 1, 0, false, false, nullptr, "design_sketch", L("Project body edges onto a plane as sketch entities")},
141 {"measure", L_CONTEXT("Measure", "Design"), 6, nullptr, nullptr, nullptr, 0x000b03feu, 0, 0, false, false, nullptr, nullptr, L("Measure between the picked points, edges or faces")},
142 {"mass_props", L_CONTEXT("Volume and area", "Design"), 6, nullptr, "btn:mass", nullptr, 0x000000feu, 1, 0, false, false, nullptr, "info", L("Report the volume and surface area of the selected body")},
143 {"interference", L_CONTEXT("Interference", "Design"), 6, nullptr, "btn:interference", L("Interference needs at least two bodies"), 0x00000280u, 2, 0, false, false, nullptr, nullptr, L("Check whether two bodies overlap — reports, changes nothing")},
144 {"edit_feature", L_CONTEXT("Edit", "Design"), 7, nullptr, "btn:edit", nullptr, 0x00007d8eu, 0, 0, false, false, nullptr, "design_edit", L("Reopen the selected feature to change what it was made from")},
145 {"rename", L_CONTEXT("Rename…", "Design"), 8, "F2", "btn:rename", L("Select a feature, or a body, to rename it"), 0x00004080u, 0, 0, false, false, nullptr, nullptr, L("Give this feature a name you will recognise in the tree (a body takes its name from the feature that makes it)")},
146 {"delete_face", L_CONTEXT("Delete Face", "Design"), 7, nullptr, "fly:dressup#3", L("Delete Face needs a body — add or import one first"), 0x0000000eu, 1, 0, false, false, nullptr, "design_delete", L("Remove faces from a body and heal the solid")},
147 {"colour", L_CONTEXT("Color", "Design"), 8, nullptr, "btn:colour", nullptr, 0x000001feu, 1, 0, false, false, nullptr, "color_palette", L("Set the selected body's display color")},
148 {"zoom_to", L_CONTEXT("Zoom to selection", "Design"), 8, nullptr, "btn:zoom_to", nullptr, 0x000041feu, 0, 0, false, false, nullptr, "design_zoom", L("Frame the selection in the view, keeping the view direction")},
149 {"delete", L_CONTEXT("Delete", "Design"), 7, "Del", "btn:delete", nullptr, 0x000f7c00u, 0, 0, false, false, nullptr, "design_delete", L("Delete what is selected")},
150 {"delete_body", L_CONTEXT("Delete Body", "Design"), 7, nullptr, "btn:delete_body", nullptr, 0x000001feu, 1, 0, false, false, nullptr, "design_delete", L("Delete this whole body — removes the feature it was made from")},
151 {"sk_line_t", L_CONTEXT("Line", "Design"), 0, "L", "key:L", nullptr, 0x000f8000u, 0, 0, false, true, L("Line"), "design_line", L("Line — click start, then end")},
152 {"sk_polyline", L_CONTEXT("Polyline", "Design"), 0, nullptr, "fly:design_line#1", nullptr, 0x000f8000u, 0, 0, false, true, L("Line"), "design_polyline", L("Click points; click the first point to close the loop, right-click to end it open")},
153 {"sk_rect", L_CONTEXT("Corner rectangle", "Design"), 0, "R", "key:R", nullptr, 0x000f8000u, 0, 0, false, true, L("Rectangle"), "design_rect", L("Rectangle — click two opposite corners")},
154 {"sk_rect_center", L_CONTEXT("Center rectangle", "Design"), 0, nullptr, "fly:design_rect#1", nullptr, 0x000f8000u, 0, 0, false, true, L("Rectangle"), "design_crect", L("Click center, then a corner")},
155 {"sk_rect_oblique", L_CONTEXT("Oblique rectangle", "Design"), 0, nullptr, "fly:design_rect#2", nullptr, 0x000f8000u, 0, 0, false, true, L("Rectangle"), "design_rect_oblique", L("Click two corners of one edge, then a point for the width")},
156 {"sk_rect_rounded", L_CONTEXT("Rounded rectangle", "Design"), 0, nullptr, "fly:design_rect#3", nullptr, 0x000f8000u, 0, 0, false, true, L("Rectangle"), "design_rect_rounded", L("Click two opposite corners, then a point for the corner radius")},
157 {"sk_circle", L_CONTEXT("Center circle", "Design"), 0, "C", "key:C", nullptr, 0x000f8000u, 0, 0, false, true, L("Circle"), "design_circle", L("Circle — click center, then radius")},
158 {"sk_circle_2pt", L_CONTEXT("2-point circle", "Design"), 0, nullptr, "fly:design_circle#1", nullptr, 0x000f8000u, 0, 0, false, true, L("Circle"), "design_circle2pt", L("Click two ends of the diameter")},
159 {"sk_circle_3pt", L_CONTEXT("3-point circle", "Design"), 0, nullptr, "fly:design_circle#2", nullptr, 0x000f8000u, 0, 0, false, true, L("Circle"), "design_circle3pt", L("Click three points on the circle")},
160 {"sk_arc_t", L_CONTEXT("3-point arc", "Design"), 0, "A", "key:A", nullptr, 0x000f8000u, 0, 0, false, true, L("Arc"), "design_arc3pt", L("Arc — click start, end, then a point")},
161 {"sk_arc_tangent", L_CONTEXT("Tangent arc", "Design"), 0, nullptr, "fly:design_arc3pt#1", nullptr, 0x000f8000u, 0, 0, false, true, L("Arc"), "design_tangentarc", L("Click start (on the last entity) then end")},
162 {"sk_arc_center", L_CONTEXT("Center-point arc", "Design"), 0, nullptr, "fly:design_arc3pt#2", nullptr, 0x000f8000u, 0, 0, false, true, L("Arc"), "design_arc_center", L("Click center, then start, then a point for the end angle")},
163 {"sk_slot", L_CONTEXT("Slot", "Design"), 0, "S", "key:S", nullptr, 0x000f8000u, 0, 0, false, true, L("Slot"), "design_slot", L("Slot — two centerline ends, then the width")},
164 {"sk_slot_arc", L_CONTEXT("Arc slot", "Design"), 0, nullptr, "fly:design_slot#1", nullptr, 0x000f8000u, 0, 0, false, true, L("Slot"), "design_slot_arc", L("Click center, start, end, then a point for the width")},
165 {"sk_ellipse", L_CONTEXT("Ellipse", "Design"), 0, "E", "key:E", nullptr, 0x000f8000u, 0, 0, false, true, L("Ellipse"), "design_ellipse", L("Ellipse — center, major end, minor point")},
166 {"sk_ellipse_arc", L_CONTEXT("Elliptical arc", "Design"), 0, nullptr, "fly:design_ellipse#1", nullptr, 0x000f8000u, 0, 0, false, true, L("Ellipse"), "design_ellipse_arc", L("Click center, major-axis end, minor point, then arc start and end")},
167 {"sk_spline", L_CONTEXT("Spline", "Design"), 0, "B", "key:B", nullptr, 0x000f8000u, 0, 0, false, true, nullptr, "design_bspline", L("Spline — click control points")},
168 {"sk_poly_3", L_CONTEXT("Triangle", "Design"), 0, nullptr, "btn:poly#3", nullptr, 0x000f8000u, 0, 0, false, true, L("Polygon"), "design_polygon", L("Triangle — click center, then a vertex")},
169 {"sk_poly_4", L_CONTEXT("Square", "Design"), 0, nullptr, "btn:poly#4", nullptr, 0x000f8000u, 0, 0, false, true, L("Polygon"), "design_polygon", L("Square — click center, then a vertex")},
170 {"sk_poly_5", L_CONTEXT("Pentagon", "Design"), 0, nullptr, "btn:poly#5", nullptr, 0x000f8000u, 0, 0, false, true, L("Polygon"), "design_polygon", L("Pentagon — click center, then a vertex")},
171 {"sk_polygon", L_CONTEXT("Hexagon", "Design"), 0, "G", "btn:poly#6", nullptr, 0x000f8000u, 0, 0, false, true, L("Polygon"), "design_polygon", L("Hexagon — click center, then a vertex")},
172 {"sk_poly_8", L_CONTEXT("Octagon", "Design"), 0, nullptr, "btn:poly#8", nullptr, 0x000f8000u, 0, 0, false, true, L("Polygon"), "design_polygon", L("Octagon — click center, then a vertex")},
173 {"sk_poly_12", L_CONTEXT("Dodecagon", "Design"), 0, nullptr, "btn:poly#12", nullptr, 0x000f8000u, 0, 0, false, true, L("Polygon"), "design_polygon", L("Dodecagon — click center, then a vertex")},
174 {"sk_poly_inscribed", L_CONTEXT("Inscribed", "Design"), 0, nullptr, "btn:polyfit#0", nullptr, 0x000f8000u, 0, 0, false, true, L("Polygon"), "design_polygon", L("Measure the polygon to its corners (inscribed)")},
175 {"sk_poly_circumscribed", L_CONTEXT("Circumscribed", "Design"), 0, nullptr, "btn:polyfit#1", nullptr, 0x000f8000u, 0, 0, false, true, L("Polygon"), "design_polygon", L("Measure the polygon to its flats (circumscribed)")},
176 {"sk_point_t", L_CONTEXT("Point", "Design"), 0, "P", "key:P", nullptr, 0x000f8000u, 0, 0, false, true, nullptr, "design_point", L("Point — click to place")},
177 {"sk_text", L_CONTEXT("Text", "Design"), 0, nullptr, "btn:text", nullptr, 0x000f8000u, 0, 0, false, true, nullptr, "design_text", L("Type text; it becomes a Text feature on this sketch's plane, editable later")},
178 {"sk_svg", L_CONTEXT("SVG", "Design"), 0, nullptr, "btn:svg", nullptr, 0x000f8000u, 0, 0, false, true, nullptr, "design_svg", L("Import an SVG outline into this sketch as editable lines")},
179 {"sk_offset", L_CONTEXT("Offset", "Design"), 1, "O", "key:O", nullptr, 0x000b0000u, 0, 0, false, true, nullptr, "design_offset", L("Offset — pick an entity, drag the distance")},
180 {"sk_trim", L_CONTEXT("Trim", "Design"), 2, "T", "key:T", nullptr, 0x000b0000u, 0, 0, false, true, nullptr, "design_trim", L("Trim — click a segment to trim it")},
181 {"sk_fillet", L_CONTEXT("Fillet", "Design"), 3, "F", "key:F", nullptr, 0x00090000u, 0, 0, false, true, nullptr, "design_filletedge", L("Fillet — pick two lines, set the radius")},
182 {"sk_chamfer", L_CONTEXT("Chamfer", "Design"), 3, "H", "key:H", nullptr, 0x00090000u, 0, 0, false, true, nullptr, "design_chamfer", L("Chamfer — pick two lines, set the distance")},
183 {"sk_array", L_CONTEXT("Linear array", "Design"), 4, nullptr, "fly:design_array#0", nullptr, 0x000b0000u, 0, 0, false, true, L("Array"), "design_array", L("Pick entities, drag the spacing handle, click the count; click empty to apply")},
184 {"sk_array_polar", L_CONTEXT("Polar array", "Design"), 4, nullptr, "fly:design_array#1", nullptr, 0x000b0000u, 0, 0, false, true, L("Array"), "design_polararray", L("Pick entities, drag the sweep handle, click the count; click empty to apply")},
185 {"sk_mirror", L_CONTEXT("Mirror", "Design"), 4, "M", "key:M", nullptr, 0x000b0000u, 0, 0, false, true, nullptr, "design_mirror", L("Mirror — pick axis, then entities")},
186 {"sk_move", L_CONTEXT("Move", "Design"), 5, nullptr, "fly:design_move#0", nullptr, 0x000f0000u, 0, 0, false, true, L("Move"), "design_move", L("Pick entities, then drag the handle or click the distance; click empty to apply")},
187 {"sk_rotate", L_CONTEXT("Rotate", "Design"), 5, nullptr, "fly:design_move#1", nullptr, 0x000f0000u, 0, 0, false, true, L("Move"), "design_rotate", L("Pick entities, then drag around the pivot or click the angle; click empty to apply")},
188 {"sk_scale", L_CONTEXT("Scale", "Design"), 5, nullptr, "fly:design_move#2", nullptr, 0x000f0000u, 0, 0, false, true, L("Move"), "design_scale", L("Pick entities, then drag the handle or click the factor; click empty to apply")},
189 {"sk_dimension", L_CONTEXT("Dimension", "Design"), 6, "D", "key:D", nullptr, 0x000f8000u, 0, 0, false, true, nullptr, "design_dimension", L("Dimension — click 2 points or an entity")},
190 {"sk_constrain", L_CONTEXT("Constrain", "Design"), 6, "K", "key:K", nullptr, 0x000f0000u, 0, 0, false, true, nullptr, "design_constrain", L("Constrain the selected sketch entities to each other")},
191 // Same verb, model-mode vocabulary: offered when a SKETCH is selected (bit 14, SkLoop), the
192 // state a user is in right after finishing one. Without this row the only way in was the
193 // toolbar icon, and constraints read as absent — see the Onshape-comparison report.
194 // It sits in the Reference row, the address the sketch-mode Constrain has: one verb, one row.
195 {"constrain", L_CONTEXT("Constrain sketch", "Design"), 6, nullptr, "btn:constrain", L("Select a sketch to constrain it"), 0x00004000u, 0, 1, false, false, nullptr, "design_constrain", L("Add dimensions and relations (coincident, tangent, parallel...) to the selected sketch")},
196 {"sk_construct", L_CONTEXT("Construction", "Design"), 6, "Q", "key:Q", nullptr, 0x000b8000u, 0, 0, false, true, nullptr, nullptr, L("Toggle construction: geometry that guides but is never built")},
197 {"sk_extend", L_CONTEXT("Extend", "Design"), 7, "X", "key:X", nullptr, 0x000b0000u, 0, 0, false, true, nullptr, "design_extend", L("Extend — click a line/arc to extend it")},
198 {"sk_delete", L_CONTEXT("Delete", "Design"), 7, "Del", "btn:sk_delete", nullptr, 0x000f0000u, 0, 0, false, true, nullptr, "design_delete", L("Delete the selected sketch entities")},
199 // Typing the defining number of the element you pointed at. Three rows rather than one so
200 // each names the quantity in the drawing-office word for THAT element; all three land on
201 // the same handler, because dimension_kind() already resolves the quantity from the
202 // selection. Without these, an element's own numbers were reachable only by arming the
203 // Dimension tool and re-picking geometry that was already selected.
204 {"sk_length", L_CONTEXT("Length…", "Design"), 7, "V", "key:V", nullptr, 0x00010000u, 0, 0, false, true, nullptr, "design_dimension", L("Type the length of this line")},
205 {"sk_radius", L_CONTEXT("Radius / diameter…", "Design"), 7, "V", "key:V", nullptr, 0x00020000u, 0, 0, false, true, nullptr, "design_dimension", L("Type the radius of this arc, or the diameter of this circle")},
206 {"sk_angdist", L_CONTEXT("Angle / distance…", "Design"), 7, "V", "key:V", nullptr, 0x00080000u, 0, 0, false, true, nullptr, "design_dimension", L("Type the angle between two lines, or the distance between the two picks")},
207};
#define L_CONTEXT(s, context)
Definition DesignOffer.hpp:17

Referenced by Slic3r::GUI::DesignPanel::DesignPanel(), Slic3r::GUI::anonymous_namespace{McpControl.cpp}::action_list_verbs(), Slic3r::GUI::anonymous_namespace{McpControl.cpp}::action_run_verb(), Slic3r::GUI::DesignPanel::mcp_run_verb(), and Slic3r::GUI::DesignPanel::show_offer_menu().

◆ kOrcaSourceKey

◆ kOrcaSourceName

const char* Slic3r::GUI::kOrcaSourceName = "OrcaSlicer"
inlineconstexpr

◆ kOriginRow

int Slic3r::GUI::kOriginRow = 0
staticconstexpr

◆ kPadDip

◆ kSidebarContextMenuFilamentId

int Slic3r::GUI::kSidebarContextMenuFilamentId = -2
inlineconstexpr

◆ label_scale_values

const char* Slic3r::GUI::label_scale_values[2][3]
static
Initial value:
= {
{ "##scale_x", "##scale_y", "##scale_z"},
{ "##size_x", "##size_y", "##size_z"}
}
651 {
652{ "##scale_x", "##scale_y", "##scale_z"},
653{ "##size_x", "##size_y", "##size_z"}
654};

Referenced by Slic3r::GUI::GizmoObjectManipulation::do_render_scale_input_window().

◆ label_values

const char* Slic3r::GUI::label_values[3][3]
static
Initial value:
= {
{ "##position_x", "##position_y", "##position_z"},
{ "##rotation_x", "##rotation_y", "##rotation_z"},
{ "##absolute_rotation_x", "##absolute_rotation_y", "##absolute_rotation_z"}
}
645 {
646{ "##position_x", "##position_y", "##position_z"},
647{ "##rotation_x", "##rotation_y", "##rotation_z"},
648{ "##absolute_rotation_x", "##absolute_rotation_y", "##absolute_rotation_z"}
649};

Referenced by Slic3r::GUI::GizmoObjectManipulation::do_render_move_window(), and Slic3r::GUI::GizmoObjectManipulation::do_render_rotate_window().

◆ LabelDisableColor

const wxColour Slic3r::GUI::LabelDisableColor = wxColour("#ACACAC")
static

◆ LabelEnableColor

const wxColour Slic3r::GUI::LabelEnableColor = wxColour("#262E30")
static

◆ last_directory

std::string Slic3r::GUI::last_directory = ""
static

◆ layer_height

◆ LayerIcon

char Slic3r::GUI::LayerIcon[] = "height_range_layer"
staticconstexpr

◆ LayerRootIcon

char Slic3r::GUI::LayerRootIcon[] = "height_range_modifier"
staticconstexpr

◆ LEFT_MARGIN

const float Slic3r::GUI::LEFT_MARGIN = 13.0f + 100.0f
static

◆ LEFT_OFFSET

const int Slic3r::GUI::LEFT_OFFSET = 2

◆ LeftExtruderIdx

◆ legacy_preset_map

const std::unordered_map<std::string, std::pair<std::string, std::string> > Slic3r::GUI::legacy_preset_map
static
Initial value:
{{
}}
1800 {{
1801}};

Referenced by Slic3r::GUI::ConfigWizard::priv::load_vendors().

◆ license_list

const std::vector< std::string > Slic3r::GUI::license_list
Initial value:
= {
"",
"CC0",
"BY",
"BY-SA",
"BY-ND",
"BY-NC",
"BY-NC-SA",
"BY-NC-ND",
}
84 {
85 "",
86 "CC0",
87 "BY",
88 "BY-SA",
89 "BY-ND",
90 "BY-NC",
91 "BY-NC-SA",
92 "BY-NC-ND",
93};

Referenced by Slic3r::GUI::DesignerPanel::init_license_list(), and Slic3r::GUI::DesignerPanel::on_select_license().

◆ LockIcon

◆ LOGICAL_BED_GAP

const constexpr double Slic3r::GUI::LOGICAL_BED_GAP = 1. / 5.
staticconstexpr

Referenced by bed_stride_x(), and bed_stride_y().

◆ login_failed_str

auto Slic3r::GUI::login_failed_str = _u8L("Login failed")
static

◆ LOWER_PART_COLOR

◆ m_bitmap_cache

◆ m_is_dark_mode

◆ m_tick_rect

ImVec4 Slic3r::GUI::m_tick_rect
static

◆ m_tick_value

int Slic3r::GUI::m_tick_value = -1
static

◆ MachineBedTypeString

std::string Slic3r::GUI::MachineBedTypeString[7]
static
Initial value:
= {
"auto",
"suprtack",
"pc",
"ep",
"pei",
"pte",
"pct",
}
85 {
86 "auto",
87 "suprtack",
88 "pc",
89 "ep",
90 "pei",
91 "pte",
92 "pct",
93};

Referenced by Slic3r::GUI::CalibUtils::send_to_print(), and Slic3r::GUI::CalibUtils::send_to_print().

◆ mainframe_text_field

NSTextField* Slic3r::GUI::mainframe_text_field = nil

◆ MAPPED_NOZZLE_STR_MAX_CHARS_PER_LINE

size_t Slic3r::GUI::MAPPED_NOZZLE_STR_MAX_CHARS_PER_LINE = 7
staticconstexpr

◆ marker_radii

std::array<double, 4> Slic3r::GUI::marker_radii { 9., 7., 6., 5. }
staticconstexpr

◆ MAX_COMPONENTS

◆ MAX_LAYER_VALUE

◆ MAX_PA_HISTORY_RESULTS_NUMS

const int Slic3r::GUI::MAX_PA_HISTORY_RESULTS_NUMS = 16
static

◆ MAX_PA_K_VALUE

◆ MEASURE_PLNE_NORMAL_OFFSET

const float Slic3r::GUI::MEASURE_PLNE_NORMAL_OFFSET = 0.05

◆ MESH_IMPORT_MERGE_ANGLE_DEG

double Slic3r::GUI::MESH_IMPORT_MERGE_ANGLE_DEG = 5.0
staticconstexpr

◆ MESH_IMPORT_TOLERANCE

double Slic3r::GUI::MESH_IMPORT_TOLERANCE = 0.01
staticconstexpr

◆ MESH_IMPORT_TRIANGLE_WARN

size_t Slic3r::GUI::MESH_IMPORT_TRIANGLE_WARN = 50000
staticconstexpr

◆ message_containing_retry

std::unordered_set<std::string> Slic3r::GUI::message_containing_retry
static
Initial value:
{
"0701-8004",
"0701-8005",
"0701-8007",
"0701-8012",
"0702-8012",
"0703-8012",
"07FF-8012",
"07FF-8013",
}
37 {
38 "0701-8004",
39 "0701-8005",
40 "0701-8007",
41 "0701-8012",
42 "0702-8012",
43 "0703-8012",
44 "07FF-8012",
45 "07FF-8013",
46};

Referenced by Slic3r::GUI::DeviceErrorDialog::show_error_code().

◆ MIN_COMPONENT_RATIO

◆ MIN_LAYER_VALUE

◆ MIN_PA_K_VALUE

◆ MIN_PA_K_VALUE_STEP

const float Slic3r::GUI::MIN_PA_K_VALUE_STEP = 0.001
static

Referenced by is_pa_params_valid().

◆ model_filename

◆ MODIFIER_COLOR

const ColorRGBA Slic3r::GUI::MODIFIER_COLOR = ColorRGBA(0.75f, 0.75f, 0.75f, 0.5f)
static

◆ mutex_delete_cache_presets

◆ NA_STR [1/4]

◆ NA_STR [2/4]

const wxString Slic3r::GUI::NA_STR = _L("N/A")
static

◆ NA_STR [3/4]

wxString Slic3r::GUI::NA_STR = _L("N/A")
static

◆ NA_STR [4/4]

const wxString Slic3r::GUI::NA_STR = _L("N/A")
static

◆ NAVIGATOR_SIZE

float Slic3r::GUI::NAVIGATOR_SIZE = 128.f
staticconstexpr

◆ NEUTRAL_COLOR

const Slic3r::ColorRGBA Slic3r::GUI::NEUTRAL_COLOR = {0.5f, 0.5f, 0.5f, 1.0f}
static
43{0.5f, 0.5f, 0.5f, 1.0f};

Referenced by Slic3r::GUI::GLGizmoMeasure::on_render().

◆ none

std::string Slic3r::GUI::none {"none"}
static

◆ NORMAL_FAN_TEXT_COL

const wxColour Slic3r::GUI::NORMAL_FAN_TEXT_COL = wxColour(107, 107, 107)
static

◆ NORMAL_TEXT_COL

◆ not_show_fan_speed_warning_dlg

bool Slic3r::GUI::not_show_fan_speed_warning_dlg = false
static

◆ not_support_auto_pa_cali_filaments

std::vector<std::string> Slic3r::GUI::not_support_auto_pa_cali_filaments
Initial value:
= {
"GFU03",
"GFU04"
}
98 {
99 "GFU03", // TPU 90A
100 "GFU04" // TPU 85A
101};

Referenced by Slic3r::GUI::CalibUtils::is_support_auto_pa_cali().

◆ nozzle_diameter_list

◆ nozzle_diameter_map

std::unordered_map<std::string, float> Slic3r::GUI::nozzle_diameter_map
static
Initial value:
= {{"0.15", 0.15}, {"0.2", 0.2}, {"0.25", 0.25}, {"0.3", 0.3},
{"0.35", 0.35}, {"0.4", 0.4}, {"0.5", 0.5}, {"0.6", 0.6},
{"0.75", 0.75}, {"0.8", 0.8}, {"1.0", 1.0}, {"1.2", 1.2},
{"1.75", 1.75}}
224 {{"0.15", 0.15}, {"0.2", 0.2}, {"0.25", 0.25}, {"0.3", 0.3},
225 {"0.35", 0.35}, {"0.4", 0.4}, {"0.5", 0.5}, {"0.6", 0.6},
226 {"0.75", 0.75}, {"0.8", 0.8}, {"1.0", 1.0}, {"1.2", 1.2},
227 {"1.75", 1.75}};

Referenced by Slic3r::GUI::CreateFilamentPresetDialog::create_filament_preset_item(), Slic3r::GUI::CreatePrinterPresetDialog::create_page2_dialog_buttons(), Slic3r::GUI::CreatePrinterPresetDialog::generate_process_presets_data(), Slic3r::GUI::CreateFilamentPresetDialog::get_filament_presets_by_machine(), Slic3r::GUI::CreatePrinterPresetDialog::on_select_printer_model(), and Slic3r::GUI::CreateFilamentPresetDialog::sort_printer_by_nozzle().

◆ nozzle_diameter_vec

std::vector<std::string> Slic3r::GUI::nozzle_diameter_vec = {"0.4", "0.15", "0.2", "0.25", "0.3", "0.35", "0.5", "0.6", "0.75", "0.8", "1.0", "1.2", "1.75"}
static
223{"0.4", "0.15", "0.2", "0.25", "0.3", "0.35", "0.5", "0.6", "0.75", "0.8", "1.0", "1.2", "1.75"};

Referenced by Slic3r::GUI::CreatePrinterPresetDialog::create_nozzle_diameter_item().

◆ nozzle_not_set_text

wxString Slic3r::GUI::nozzle_not_set_text = _L("The printer nozzle information has not been set.\nPlease configure it before proceeding with the calibration.")
static

◆ nozzle_volume_type_not_match_text

wxString Slic3r::GUI::nozzle_volume_type_not_match_text = _L("The nozzle type does not match the actual printer nozzle type.\nPlease click the Sync button above and restart the calibration.")
static

◆ ONE_LAYER_BUTTON_SIZE

const ImVec2 Slic3r::GUI::ONE_LAYER_BUTTON_SIZE = ImVec2(56.0f, 56.0f)
static

◆ ONE_LAYER_MARGIN

const ImVec2 Slic3r::GUI::ONE_LAYER_MARGIN = ImVec2(20.0f, 20.0f)
static

◆ orange

◆ PA_LINE

int Slic3r::GUI::PA_LINE = 0
static

◆ PA_PATTERN

int Slic3r::GUI::PA_PATTERN = 1
static

◆ PAGE_TITLE_FONT

const wxFont Slic3r::GUI::PAGE_TITLE_FONT = Label::Body_14
static

◆ PAGE_TITLE_FONT_COL

◆ ParamsInfo

const std::map<ParamType, std::string> Slic3r::GUI::ParamsInfo
Initial value:
{
{ ParamType::Scalar, "custom-gcode_single" },
{ ParamType::Vector, "custom-gcode_vector" },
{ ParamType::FilamentVector,"custom-gcode_vector-index" },
}
456 {
457// Type BitmapName
458 { ParamType::Scalar, "custom-gcode_single" },
459 { ParamType::Vector, "custom-gcode_vector" },
460 { ParamType::FilamentVector,"custom-gcode_vector-index" },
461};

Referenced by Slic3r::GUI::ParamsNode::ParamsNode().

◆ percent_bg

StateColor Slic3r::GUI::percent_bg(std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Disabled), std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Pressed), std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Hovered), std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Enabled), std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Normal)) ( std::pair< wxColour, int > wxColour(255, 255, 255), StateColor::Disabled,
std::pair< wxColour, int > wxColour(255, 255, 255), StateColor::Pressed,
std::pair< wxColour, int > wxColour(255, 255, 255), StateColor::Hovered,
std::pair< wxColour, int > wxColour(255, 255, 255), StateColor::Enabled,
std::pair< wxColour, int > wxColour(255, 255, 255), StateColor::Normal )

◆ PLAG_COLOR

const ColorRGBA Slic3r::GUI::PLAG_COLOR = ColorRGBA::YELLOW()
static

◆ PLANE_ID

const int Slic3r::GUI::PLANE_ID = 400
static

◆ plate_keys

const std::vector<std::string> Slic3r::GUI::plate_keys = { "curr_bed_type", "skirt_start_angle", "first_layer_print_sequence", "first_layer_sequence_choice", "other_layers_print_sequence", "other_layers_sequence_choice", "print_sequence", "spiral_mode"}
static
147{ "curr_bed_type", "skirt_start_angle", "first_layer_print_sequence", "first_layer_sequence_choice", "other_layers_print_sequence", "other_layers_sequence_choice", "print_sequence", "spiral_mode"};

Referenced by Slic3r::GUI::TabPrintPlate::TabPrintPlate(), and Slic3r::GUI::TabPrintModel::update_model_config().

◆ PLATE_TOOLBAR_SCROLLBAR

float Slic3r::GUI::PLATE_TOOLBAR_SCROLLBAR = 14.f
staticconstexpr

◆ POINT_ID

◆ print_canceled_str [1/2]

auto Slic3r::GUI::print_canceled_str = _u8L("Task canceled.")
static

◆ print_canceled_str [2/2]

auto Slic3r::GUI::print_canceled_str = _u8L("Task canceled.")
static

◆ printer_model_map

const std::unordered_map<std::string, std::vector<std::string> > Slic3r::GUI::printer_model_map
static
141 {{"Anker", {"Anker M5", "Anker M5 All-Metal Hot End", "Anker M5C"}},
142 {"Anycubic", {"Anycubic i3 Mega S", "Anycubic Chiron", "Anycubic Vyper", "Anycubic Kobra", "Anycubic Kobra Max",
143 "Anycubic Kobra Plus", "Anycubic 4Max Pro", "Anycubic 4Max Pro 2", "Anycubic Kobra 2", "Anycubic Kobra 2 Plus",
144 "Anycubic Kobra 2 Max", "Anycubic Kobra 2 Pro", "Anycubic Kobra 2 Neo", "Anycubic Kobra 3", "Anycubic Kobra 3 Max", "Anycubic Kobra S1", "Anycubic Predator", }},
145 {"Artillery", {"Artillery Sidewinder X1", "Artillery Genius", "Artillery Genius Pro", "Artillery Sidewinder X2", "Artillery Hornet",
146 "Artillery Sidewinder X3 Pro", "Artillery Sidewinder X3 Plus", "Artillery Sidewinder X4 Pro", "Artillery Sidewinder X4 Plus"}},
147 {"Bambulab", {"Bambu Lab X1 Carbon", "Bambu Lab X1", "Bambu Lab X1E", "Bambu Lab P1P", "Bambu Lab P1S",
148 "Bambu Lab A1 mini", "Bambu Lab A1"}},
149 {"BIQU", {"BIQU B1", "BIQU BX", "BIQU Hurakan"}},
150 {"Blocks", {"BLOCKS Pro S100", "BLOCKS RD50 V2", "BLOCKS RF50"}},
151 {"Chuanying", {"Chuanying X1"}},
152 {"Co Print", {"Co Print ChromaSet"}},
153 {"Comgrow", {"Comgrow T300", "Comgrow T500"}},
154 {"CONSTRUCT3D", {"Construct 1 XL", "Construct 1"}},
155 {"Creality", {"Creality CR-10 V2", "Creality CR-10 Max", "Creality CR-10 SE", "Creality CR-6 SE", "Creality CR-6 Max",
156 "Creality CR-M4", "Creality Ender-3 V2", "Creality Ender-3 V2 Neo", "Creality Ender-3 S1", "Creality Ender-3",
157 "Creality Ender-3 Pro", "Creality Ender-3 S1 Pro", "Creality Ender-3 S1 Plus", "Creality Ender-3 V3 SE", "Creality Ender-3 V3 KE",
158 "Creality Ender-3 V3", "Creality Ender-3 V3 Plus", "Creality Ender-5", "Creality Ender-5 Max", "Creality Ender-5 Plus",
159 "Creality Ender-5 Pro (2019)", "Creality Ender-5S", "Creality Ender-5 S1", "Creality Ender-6", "Creality Sermoon V1",
160 "Creality K1", "Creality K1C", "Creality K1 Max", "Creality K1 SE", "Creality K2 Plus",
161 "Creality Hi"}},
162 {"DeltaMaker", {"DeltaMaker 2", "DeltaMaker 2T", "DeltaMaker 2XT"}},
163 {"Dremel", {"Dremel 3D20", "Dremel 3D40", "Dremel 3D45"}},
164 {"Elegoo", {"Elegoo Centauri Carbon 2", "Elegoo Centauri Carbon", "Elegoo Centauri", "Elegoo Neptune", "Elegoo Neptune X", "Elegoo Neptune 2",
165 "Elegoo Neptune 2S", "Elegoo Neptune 2D", "Elegoo Neptune 3", "Elegoo Neptune 3 Pro", "Elegoo Neptune 3 Plus",
166 "Elegoo Neptune 3 Max", "Elegoo Neptune 4 Pro", "Elegoo Neptune 4", "Elegoo Neptune 4 Max", "Elegoo Neptune 4 Plus",
167 "Elegoo OrangeStorm Giga"}},
168 {"Flashforge", {"Flashforge Adventurer 5M", "Flashforge Adventurer 5M Pro", "Flashforge AD5X", "Flashforge Adventurer 3 Series", "Flashforge Adventurer 4 Series",
169 "Flashforge Guider 3 Ultra", "Flashforge Guider 2s", "Flashforge Artemis"}},
170 {"FLSun", {"FLSun Q5", "FLSun QQ-S Pro", "FLSun Super Racer (SR)", "FLSun V400", "FLSun T1",
171 "FLSun S1"}},
172 {"FlyingBear", {"FlyingBear Reborn3", "FlyingBear S1", "FlyingBear Ghost 6"}},
173 {"Folgertech", {"Folgertech i3", "Folgertech FT-5", "Folgertech FT-6"}},
174 {"Geeetech", {"Geeetech Thunder", "Geeetech Mizar M", "Geeetech Mizar S", "Geeetech Mizar Pro", "Geeetech Mizar Max",
175 "Geeetech Mizar", "Geeetech A10 Pro", "Geeetech A10 M", "Geeetech A10 T", "Geeetech A20",
176 "Geeetech A20 M", "Geeetech A20 T", "Geeetech A30 Pro", "Geeetech A30 M", "Geeetech A30 T",
177 "Geeetech M1"}},
178 {"Ginger Additive", {"ginger G1"}},
179 {"InfiMech", {"InfiMech TX", "InfiMech TX Hardened Steel Nozzle"}},
180 {"Kingroon", {"Kingroon KP3S PRO S1", "Kingroon KP3S PRO V2", "Kingroon KP3S 3.0", "Kingroon KP3S V1", "Kingroon KLP1"}},
181 {"Lulzbot", {"Lulzbot Taz 6", "Lulzbot Taz 4 or 5", "Lulzbot Taz Pro Dual", "Lulzbot Taz Pro S"}},
182 {"MagicMaker", {"MM hqs hj", "MM hqs SF", "MM hj SK", "MM BoneKing", "MM slb"}},
183 {"Mellow", {"M1"}},
184 {"Orca Arena Printer",{"Orca Arena X1 Carbon"}},
185 {"Peopoly", {"Peopoly Magneto X"}},
186 {"Positron 3D", {"The Positron"}},
187 {"Prusa", {"Prusa CORE One", "Prusa CORE One HF", "Prusa CORE One L", "Prusa CORE One L HF", "MK4IS", "MK4S", "MK4S HF",
188 "Prusa XL", "Prusa XL 5T", "MK3.5", "MK3S", "MINI", "MINIIS"}},
189 {"Qidi", {"Qidi X-Plus 4", "Qidi Q1 Pro", "Qidi X-Max 3", "Qidi X-Plus 3", "Qidi X-Smart 3",
190 "Qidi X-Plus", "Qidi X-Max", "Qidi X-CF Pro"}},
191 {"Raise3D", {"Raise3D Pro3", "Raise3D Pro3 Plus"}},
192 {"RatRig", {"RatRig V-Core 3 200", "RatRig V-Core 3 300", "RatRig V-Core 3 400", "RatRig V-Core 3 500", "RatRig V-Minion",
193 "RatRig V-Cast", "RatRig V-Core 4 300", "RatRig V-Core 4 400", "RatRig V-Core 4 500", "RatRig V-Core 4 HYBRID 300",
194 "RatRig V-Core 4 HYBRID 400", "RatRig V-Core 4 HYBRID 500", "RatRig V-Core 4 IDEX 300", "RatRig V-Core 4 IDEX 300 COPY MODE", "RatRig V-Core 4 IDEX 300 MIRROR MODE",
195 "RatRig V-Core 4 IDEX 400", "RatRig V-Core 4 IDEX 400 COPY MODE", "RatRig V-Core 4 IDEX 400 MIRROR MODE", "RatRig V-Core 4 IDEX 500", "RatRig V-Core 4 IDEX 500 COPY MODE",
196 "RatRig V-Core 4 IDEX 500 MIRROR MODE"}},
197 {"re3D", {"re3D Gigabot 4", "re3D Gigabot 4 XLT", "re3D Terabot 4",
198 "re3D GigabotX 2", "re3D GigabotX 2 XLT", "re3D TerabotX 2"}},
199 {"RolohaunDesign", {"Rook MK1 LDO"}},
200 {"SecKit", {"SecKit SK-Tank", "Seckit Go3"}},
201 {"Snapmaker", {"Snapmaker J1", "Snapmaker A250", "Snapmaker A350", "Snapmaker A250 Dual", "Snapmaker A350 Dual",
202 "Snapmaker A250 QSKit", "Snapmaker A350 QSKit", "Snapmaker A250 BKit", "Snapmaker A350 BKit", "Snapmaker A250 QS+B Kit",
203 "Snapmaker A350 QS+B Kit", "Snapmaker A250 Dual QSKit", "Snapmaker A350 Dual QSKit", "Snapmaker A250 Dual BKit", "Snapmaker A350 Dual BKit",
204 "Snapmaker A250 Dual QS+B Kit", "Snapmaker A350 Dual QS+B Kit", "Snapmaker Artisan"}},
205 {"Sovol", {"Sovol SV01 Pro", "Sovol SV02", "Sovol SV05", "Sovol SV06", "Sovol SV06 Plus",
206 "Sovol SV06 ACE", "Sovol SV06 Plus ACE", "Sovol SV07", "Sovol SV07 Plus", "Sovol SV08"}},
207 {"Thinker X400", {"Thinker X400"}},
208 {"Tronxy", {"Tronxy X5SA 400 Marlin Firmware"}},
209 {"TwoTrees", {"TwoTrees SP-5 Klipper", "TwoTrees SK1"}},
210 {"UltiMaker", {"UltiMaker 2"}},
211 {"Vivedino", {"Troodon 2.0 - RRF", "Troodon 2.0 - Klipper"}},
212 {"Volumic", {"EXO42 Performance", "EXO65 Performance", "SH65 Performance", "EXO42", "EXO65",
213 "SH65", "VS30SC2", "VS30SC", "VS30ULTRA", "VS30MK3",
214 "VS30MK2", "VS20MK2"}},
215 {"Voron", {"Voron 2.4 250", "Voron 2.4 300", "Voron 2.4 350", "Voron Trident 250", "Voron Trident 300",
216 "Voron Trident 350", "Voron 0.1", "Voron Switchwire 250"}},
217 {"Voxelab", {"Voxelab Aquila X2"}},
218 {"Vzbot", {"Vzbot 235 AWD", "Vzbot 330 AWD"}},
219 {"Wanhao", {"Wanhao D12-300"}},
220 {"Z-Bolt", {"Z-Bolt S300", "Z-Bolt S300 Dual", "Z-Bolt S400", "Z-Bolt S400 Dual", "Z-Bolt S600",
221 "Z-Bolt S600 Dual"}}};

Referenced by Slic3r::GUI::CreatePrinterPresetDialog::create_printer_item().

◆ printer_thumbnails

std::map<std::string, std::string> Slic3r::GUI::printer_thumbnails = {}
static

◆ printer_vendors

const std::vector<std::string> Slic3r::GUI::printer_vendors
static
Initial value:
=
{"Anker", "Anycubic", "Artillery", "Bambulab", "BIQU",
"Blocks", "Chuanying", "Co Print", "Comgrow", "CONSTRUCT3D",
"Creality", "DeltaMaker", "Dremel", "Elegoo", "Flashforge",
"FLSun", "FlyingBear", "Folgertech", "Geeetech", "Ginger Additive",
"InfiMech", "Kingroon", "Lulzbot", "MagicMaker", "Mellow",
"Orca Arena Printer", "Peopoly", "Positron 3D", "Prusa", "Qidi",
"Raise3D", "RatRig", "re3D", "RolohaunDesign", "SecKit",
"Snapmaker", "Sovol", "Thinker X400", "Tronxy", "TwoTrees",
"UltiMaker", "Vivedino", "Volumic", "Voron", "Voxelab",
"Vzbot", "Wanhao", "Z-Bolt"}
129 {"Anker", "Anycubic", "Artillery", "Bambulab", "BIQU",
130 "Blocks", "Chuanying", "Co Print", "Comgrow", "CONSTRUCT3D",
131 "Creality", "DeltaMaker", "Dremel", "Elegoo", "Flashforge",
132 "FLSun", "FlyingBear", "Folgertech", "Geeetech", "Ginger Additive",
133 "InfiMech", "Kingroon", "Lulzbot", "MagicMaker", "Mellow",
134 "Orca Arena Printer", "Peopoly", "Positron 3D", "Prusa", "Qidi",
135 "Raise3D", "RatRig", "re3D", "RolohaunDesign", "SecKit",
136 "Snapmaker", "Sovol", "Thinker X400", "Tronxy", "TwoTrees",
137 "UltiMaker", "Vivedino", "Volumic", "Voron", "Voxelab",
138 "Vzbot", "Wanhao", "Z-Bolt"};

Referenced by Slic3r::GUI::CreatePrinterPresetDialog::create_printer_item().

◆ printjob_cancel_str [1/2]

auto Slic3r::GUI::printjob_cancel_str = _u8L("Task canceled.")
static

◆ printjob_cancel_str [2/2]

auto Slic3r::GUI::printjob_cancel_str = _u8L("Task canceled.")
static

◆ ranges_language_independent

const ImWchar Slic3r::GUI::ranges_language_independent[]
static
Initial value:
=
{
0x0100, 0x024F,
0x0370, 0x03FF,
0x0400, 0x04FF,
0x1E00, 0x1EFF,
0,
}
2651{
2652 0x0100, 0x024F, // Latin Extended-A and Extended-B
2653 0x0370, 0x03FF, // Greek and Coptic
2654 0x0400, 0x04FF, // Cyrillic
2655 0x1E00, 0x1EFF, // Latin Extended Additional (Vietnamese)
2656 0,
2657};

Referenced by Slic3r::GUI::ImGuiWrapper::init_font().

◆ RightExtruderIdx

◆ s_doc_worker_busy

◆ s_filament_temp_pair_warning_suppressed_for_session

std::unordered_set<std::string> Slic3r::GUI::s_filament_temp_pair_warning_suppressed_for_session
static

◆ s_jump_liveview_error_codes

const std::unordered_set<std::string> Slic3r::GUI::s_jump_liveview_error_codes = { "0300-8003", "0300-8002", "0300-800A"}
static
371{ "0300-8003", "0300-8002", "0300-800A"};

Referenced by Slic3r::GUI::DeviceErrorDialog::show_error_code().

◆ s_keys_down

std::set<int> Slic3r::GUI::s_keys_down
static

◆ s_nozzle_mapping_last_request_time

◆ s_nozzle_stats_from_machine

bool Slic3r::GUI::s_nozzle_stats_from_machine = false
static

◆ ScaleLongEvery

const unsigned int Slic3r::GUI::ScaleLongEvery = 2

Referenced by init_from_scale().

◆ ScaleLongTooth

const float Slic3r::GUI::ScaleLongTooth = 0.1f

Referenced by init_from_scale().

◆ ScaleStepRad

const float Slic3r::GUI::ScaleStepRad = 2.0f * float(PI) / ScaleStepsCount

◆ ScaleStepsCount

const unsigned int Slic3r::GUI::ScaleStepsCount = 72

◆ SCENE_CANVAS_NAME

const char* const Slic3r::GUI::SCENE_CANVAS_NAME = "OrcaSceneCanvas"
static

◆ SEL_SPHERE_1_ID

◆ SEL_SPHERE_2_ID

◆ SELECTED_1ST_COLOR

const Slic3r::ColorRGBA Slic3r::GUI::SELECTED_1ST_COLOR = {0.25f, 0.75f, 0.75f, 1.0f}
static

◆ SELECTED_2ND_COLOR

const Slic3r::ColorRGBA Slic3r::GUI::SELECTED_2ND_COLOR = {0.75f, 0.25f, 0.75f, 1.0f}
static

◆ SELECTED_COLOR

const ColorRGBA Slic3r::GUI::SELECTED_COLOR = {0.0f, 0.5f, 0.5f, 1.0f}
static
60{0.0f, 0.5f, 0.5f, 1.0f};

Referenced by Slic3r::GUI::GLGizmoBrimEars::render_points().

◆ SELECTED_DOWEL_COLOR

const ColorRGBA Slic3r::GUI::SELECTED_DOWEL_COLOR = ColorRGBA::DARK_GRAY()
static

◆ SELECTED_PLAG_COLOR

const ColorRGBA Slic3r::GUI::SELECTED_PLAG_COLOR = ColorRGBA::GRAY()
static

◆ send_print_failed_str [1/2]

auto Slic3r::GUI::send_print_failed_str = _u8L("Failed to send the print job. Please try again.")
static

◆ send_print_failed_str [2/2]

auto Slic3r::GUI::send_print_failed_str = _u8L("Failed to send the print job. Please try again.")
static

◆ SEND_SYSTEM_INFO_DOMAIN

const std::string Slic3r::GUI::SEND_SYSTEM_INFO_DOMAIN = "bambu-lab.com"
static

◆ SEND_SYSTEM_INFO_URL

const std::string Slic3r::GUI::SEND_SYSTEM_INFO_URL = "https://files." + SEND_SYSTEM_INFO_DOMAIN + "/wp-json/v1/ps"
static

◆ sending_over_cloud_str [1/2]

auto Slic3r::GUI::sending_over_cloud_str = _u8L("Sending print job through cloud service")
static

◆ sending_over_cloud_str [2/2]

auto Slic3r::GUI::sending_over_cloud_str = _u8L("Sending print job through cloud service")
static

◆ sending_over_lan_str [1/2]

auto Slic3r::GUI::sending_over_lan_str = _u8L("Sending print job over LAN")
static

◆ sending_over_lan_str [2/2]

auto Slic3r::GUI::sending_over_lan_str = _u8L("Sending print job over LAN")
static

◆ sep

◆ SHADOW_WIDTH

int Slic3r::GUI::SHADOW_WIDTH = 3
staticconstexpr

◆ SLIDER_BOTTOM_MARGIN

const float Slic3r::GUI::SLIDER_BOTTOM_MARGIN = 64.0f
static

◆ SLIDER_DEFAULT_BOTTOM_MARGIN

const float Slic3r::GUI::SLIDER_DEFAULT_BOTTOM_MARGIN = 10.0f
static

◆ SLIDER_DEFAULT_RIGHT_MARGIN

const float Slic3r::GUI::SLIDER_DEFAULT_RIGHT_MARGIN = 10.0f
static

◆ SLIDER_RIGHT_MARGIN

const float Slic3r::GUI::SLIDER_RIGHT_MARGIN = IMSlider::vertical_slider_window_width()
inlinestatic

◆ SnapRegionsCount

const unsigned int Slic3r::GUI::SnapRegionsCount = 8

◆ special_key

std::set<char> Slic3r::GUI::special_key = {'\n', '\t', '\r', '\v', '@', ';'}
static
231{'\n', '\t', '\r', '\v', '@', ';'};

Referenced by remove_special_key().

◆ spools

std::vector<std::deque<wxWindow *>**> Slic3r::GUI::spools

◆ spools2

std::vector<std::deque<wxWindow *>*> Slic3r::GUI::spools2

◆ STAGE_TEXT_COL

const wxColour Slic3r::GUI::STAGE_TEXT_COL = wxColour(0, 150, 136)
static

◆ STATIC_BOX_LINE_COL

◆ STATIC_LIGHT_DIR

const Vec3d Slic3r::GUI::STATIC_LIGHT_DIR = Vec3d(-0.4, -0.6, 1.0).normalized()
static

◆ STATUS_PANEL_BG

◆ STATUS_TITLE_BG

◆ STD_REMESH_EDGE_MM

◆ STD_REMESH_SHARP_DEG

◆ STD_SUBDIV_BORDER_MM

◆ STD_SUBDIV_COLOR_MM

◆ STD_SUBDIV_DETAIL_MM

◆ STD_SUBDIV_MAX_EDGE_MM

◆ STD_SUBDIV_MIN_EDGE_MM

◆ SVG_VOLUME_ICONS

const constexpr std::array<std::pair<const char *, const char *>, 3> Slic3r::GUI::SVG_VOLUME_ICONS
staticconstexpr
Initial value:
{{
{L("Add SVG part"), "svg_part"},
{L("Add negative SVG"), "svg_negative"},
{L("Add SVG modifier"), "svg_modifier"},
}}
394 {{
395 {L("Add SVG part"), "svg_part"}, // ~ModelVolumeType::MODEL_PART
396 {L("Add negative SVG"), "svg_negative"}, // ~ModelVolumeType::NEGATIVE_VOLUME
397 {L("Add SVG modifier"), "svg_modifier"}, // ~ModelVolumeType::PARAMETER_MODIFIER
398}};

Referenced by Slic3r::GUI::MenuFactory::get_svg_volume_bitmaps().

◆ SWITCH_FONT

const wxFont Slic3r::GUI::SWITCH_FONT = Label::Body_10
static

◆ task_canceled_text

wxString Slic3r::GUI::task_canceled_text = _L("Task canceled")
static

◆ TEMP_BLANK_STR

◆ temp_dir

wxString Slic3r::GUI::temp_dir
static

◆ TEXT_COL

const wxColour Slic3r::GUI::TEXT_COL = wxColour(43, 52, 54)

◆ TEXT_FAILED_CLR

const wxColour Slic3r::GUI::TEXT_FAILED_CLR = wxColour(255, 111, 0)
static

◆ TEXT_LIGHT_FONT_COL

◆ TEXT_NORMAL_CLR

const wxColour Slic3r::GUI::TEXT_NORMAL_CLR = wxColour(0, 150, 136)
static

◆ TEXT_VOLUME_ICONS

const constexpr std::array<std::pair<const char *, const char *>, 3> Slic3r::GUI::TEXT_VOLUME_ICONS
staticconstexpr
Initial value:
{{
{L("Add text"), "add_text_part"},
{L("Add negative text"), "add_text_negative" },
{L("Add text modifier"), "add_text_modifier"},
}}
387 {{
388// menu_item Name menu_item bitmap name
389 {L("Add text"), "add_text_part"}, // ~ModelVolumeType::MODEL_PART
390 {L("Add negative text"), "add_text_negative" }, // ~ModelVolumeType::NEGATIVE_VOLUME
391 {L("Add text modifier"), "add_text_modifier"}, // ~ModelVolumeType::PARAMETER_MODIFIER
392}};

Referenced by Slic3r::GUI::MenuFactory::get_text_volume_bitmaps().

◆ TextDisableColor

const wxColour Slic3r::GUI::TextDisableColor = wxColour("#CECECE")
static

◆ TextErrorColor

const wxColour Slic3r::GUI::TextErrorColor = wxColour("#E14747")
static

◆ TextNormalBlackColor [1/2]

const wxColour Slic3r::GUI::TextNormalBlackColor = wxColour("#262E30")
static

◆ TextNormalBlackColor [2/2]

const wxColour Slic3r::GUI::TextNormalBlackColor = wxColour("#262E30")
static

◆ TextNormalColor

const wxColour Slic3r::GUI::TextNormalColor = wxColour("#262E30")
static

◆ TextNormalGreyColor [1/2]

◆ TextNormalGreyColor [2/2]

const wxColour Slic3r::GUI::TextNormalGreyColor = wxColour("#6B6B6B")
static

◆ TextSelectColor

const wxColour Slic3r::GUI::TextSelectColor = wxColour("#262E30")
static

◆ TIME_FORMATS

wchar_t const* Slic3r::GUI::TIME_FORMATS[] = {_T("%Y-%m-%d"), _T("%Y-%m"), _T("%Y")}
staticconstexpr
525{_T("%Y-%m-%d"), _T("%Y-%m"), _T("%Y")};

Referenced by Slic3r::GUI::ImageGrid::render(), and Slic3r::GUI::ImageGrid::renderContent1().

◆ time_out

◆ timeout_period

int Slic3r::GUI::timeout_period = 200000
constexpr

◆ timeout_to_upload_str [1/2]

auto Slic3r::GUI::timeout_to_upload_str = _u8L("Upload task timed out. Please check the network status and try again.")
static

◆ timeout_to_upload_str [2/2]

auto Slic3r::GUI::timeout_to_upload_str = _u8L("Upload task timed out. Please check the network status and try again.")
static

◆ TIP_DELAY

double Slic3r::GUI::TIP_DELAY = 0.45
staticconstexpr

◆ TIP_DELAY_AGAIN

double Slic3r::GUI::TIP_DELAY_AGAIN = 0.10
staticconstexpr

◆ TIP_STICKY

double Slic3r::GUI::TIP_STICKY = 0.70
staticconstexpr

◆ titleWidth

◆ TRIANGLE_BASE

const float Slic3r::GUI::TRIANGLE_BASE = 10.0f
static

◆ TRIANGLE_HEIGHT

const float Slic3r::GUI::TRIANGLE_HEIGHT = TRIANGLE_BASE * 1.618033f
static

◆ type_icon_names

const std::map<Preset::Type, std::string> Slic3r::GUI::type_icon_names
static
Initial value:
= {
{Preset::TYPE_PRINT, "cog" },
{Preset::TYPE_FILAMENT, "spool" },
{Preset::TYPE_SLA_MATERIAL, "blank_16" },
{Preset::TYPE_PRINTER, "printer" },
}
85 {
86 {Preset::TYPE_PRINT, "cog" },
87 {Preset::TYPE_SLA_PRINT, "cog" },
88 {Preset::TYPE_FILAMENT, "spool" },
89 {Preset::TYPE_SLA_MATERIAL, "blank_16" },
90 {Preset::TYPE_PRINTER, "printer" },
91};

Referenced by get_icon_name().

◆ UndefFloat

const float Slic3r::GUI::UndefFloat = -999.f

◆ UndefLabel

const std::string Slic3r::GUI::UndefLabel = " "

◆ UP_LIMIT

◆ upload_ftp_failed_str [1/2]

auto Slic3r::GUI::upload_ftp_failed_str = _u8L("Failed to upload file to ftp. Please try again.")
static

◆ upload_ftp_failed_str [2/2]

auto Slic3r::GUI::upload_ftp_failed_str = _u8L("Failed to upload file to ftp. Please try again.")
static

◆ UPPER_PART_COLOR

◆ URL_CHANGELOG

const char* Slic3r::GUI::URL_CHANGELOG = "%1%"
static

◆ URL_DEV

const char* Slic3r::GUI::URL_DEV = "%1%"
static

◆ URL_DOWNLOAD

const char* Slic3r::GUI::URL_DOWNLOAD = "%1%"
static

◆ VERTICAL_SLIDER_WINDOW_WIDTH

const float Slic3r::GUI::VERTICAL_SLIDER_WINDOW_WIDTH = 164.0f
static

◆ wait_sending_finish

wxString Slic3r::GUI::wait_sending_finish = _L("Print task sending times out.")
static

◆ waiting_auth_str

auto Slic3r::GUI::waiting_auth_str = _u8L("Logging in")
static

◆ WARNING_INFO_BG_COL

const wxColour Slic3r::GUI::WARNING_INFO_BG_COL = wxColour(255, 111, 0)
static

◆ warning_text

◆ WarningIcon

◆ WarningManifoldIcon

◆ wxMouseEvent

Slic3r::GUI::wxMouseEvent

Referenced by Slic3r::GUI::AMSControl::AMSControl(), Slic3r::GUI::AMSHumidity::AMSHumidity(), Slic3r::GUI::AMSRoad::AMSRoad(), Slic3r::GUI::CameraPopup::CameraPopup(), CenteredTitle::CenteredTitle(), Slic3r::GUI::CloudTaskManagerPage::CloudTaskManagerPage(), Slic3r::GUI::ConfigWizardIndex::ConfigWizardIndex(), Slic3r::GUI::ConfirmBeforeSendDialog::ConfirmBeforeSendDialog(), Slic3r::GUI::DesignCanvas::DesignCanvas(), Slic3r::GUI::DesignPanel::DesignPanel(), Slic3r::GUI::DesignRowList::DesignRowList(), Slic3r::GUI::ExtruderGroup::ExtruderGroup(), Slic3r::GUI::FilamentMapBtnPanel::FilamentMapBtnPanel(), Slic3r::GUI::FilamentMapManualPanel::FilamentMapManualPanel(), Slic3r::GUI::FilamentSelectPopup::FilamentSelectPopup(), Slic3r::GUI::anonymous_namespace{PrintHostDialogs.cpp}::FlashforgeSlotCard::FlashforgeSlotCard(), Slic3r::GUI::HMSNotifyItem::HMSNotifyItem(), Slic3r::GUI::HyperLink::HyperLink(), Slic3r::GUI::InputIpAddressDialog::InputIpAddressDialog(), Slic3r::GUI::SavePresetDialog::Item::Item(), Slic3r::GUI::LocalTaskManagerPage::LocalTaskManagerPage(), Slic3r::GUI::MultiMachineManagerPage::MultiMachineManagerPage(), Slic3r::GUI::ObjectList::ObjectList(), Slic3r::GUI::PlaterPresetComboBox::PlaterPresetComboBox(), Slic3r::GUI::PrivacyUpdateDialog::PrivacyUpdateDialog(), Slic3r::GUI::PublishSettingsDialog::PublishSettingsDialog(), Slic3r::GUI::PurgeModeBtnPanel::PurgeModeBtnPanel(), Slic3r::GUI::PurgeModeDialog::PurgeModeDialog(), Slic3r::GUI::RatioLabelPanel::RatioLabelPanel(), Slic3r::GUI::SafetyOptionsDialog::SafetyOptionsDialog(), Slic3r::GUI::SelectMachineDialog::SelectMachineDialog(), Slic3r::GUI::SendFailedConfirm::SendFailedConfirm(), Slic3r::GUI::ShortcutCaptureDialog::ShortcutCaptureDialog(), Slic3r::GUI::Sidebar::Sidebar(), StepMeshDialog::StepMeshDialog(), Slic3r::GUI::SyncAmsInfoDialog::SyncAmsInfoDialog(), Slic3r::GUI::TroubleshootDialog::TroubleshootDialog(), Slic3r::GUI::UpdatePluginDialog::UpdatePluginDialog(), Slic3r::GUI::UpdateVersionDialog::UpdateVersionDialog(), Slic3r::GUI::UVEditorPanel::UVEditorPanel(), Slic3r::GUI::UVToolButton::UVToolButton(), Slic3r::GUI::ZUserLogin::ZUserLogin(), Slic3r::GUI::GLGizmoBrimEars::~GLGizmoBrimEars(), Slic3r::GUI::GLCanvas3D::_perform_layer_editing_action(), Slic3r::GUI::AmsMapingPopup::add_ams_mapping(), Slic3r::GUI::anonymous_namespace{PublishSettingsDialog.cpp}::add_checkbox_label(), Slic3r::GUI::AmsMapingPopup::add_ext_ams_mapping(), Slic3r::GUI::PluginField::add_plugin_row(), Slic3r::GUI::IMEXModesCtrl::add_row(), Slic3r::GUI::AMSControl::AddAmsPreview(), Slic3r::GUI::AMSControl::AddAmsPreview(), Slic3r::GUI::AmsItem::AddCan(), Slic3r::GUI::AmsItem::AddLiteCan(), Slic3r::GUI::DesignSketchTool::arc_mouse_angle(), Slic3r::GUI::Choice::BUILD(), Slic3r::GUI::ColourPicker::BUILD(), Slic3r::GUI::TextCtrl::BUILD(), Slic3r::GUI::UnsavedChangesDialog::build(), Slic3r::GUI::TextureImportDialog::build_preview_panel(), Slic3r::GUI::GLCanvas3D::clicked_button_matches_action(), Slic3r::GUI::MixedFilamentDialog::commit_ratio_editor_from_background(), Slic3r::GUI::Tab::compatible_widget_create(), Slic3r::GUI::ProgressDialog::Create(), Slic3r::GUI::AMSMaterialsSetting::create(), Slic3r::GUI::CalibrationPresetPage::create_ams_items_sizer(), Slic3r::GUI::DiffPresetDialog::create_buttons(), Slic3r::GUI::CalibrationDialog::create_check_option(), Slic3r::GUI::PreferencesDialog::create_debug_page(), Slic3r::GUI::PreferencesDialog::create_item_language_combobox(), Slic3r::GUI::CameraPopup::create_item_radiobox(), Slic3r::GUI::AutoMixSelectPopup::create_item_row(), Slic3r::GUI::FilamentSelectPopup::create_item_row(), Slic3r::GUI::FilamentSelectPopup::create_mixed_item_row(), Slic3r::GUI::ColorDecomposeDialog::create_mode_card(), Slic3r::GUI::SendMultiMachinePage::create_page(), Slic3r::GUI::PrintingTaskPanel::create_panel(), Slic3r::GUI::Tab::create_preset_tab(), Slic3r::GUI::CreatePrinterPresetDialog::create_presets_template_item(), Slic3r::GUI::CreateFilamentPresetDialog::create_radio_item(), Slic3r::GUI::CreatePrinterPresetDialog::create_radio_item(), Slic3r::GUI::ExportConfigsDialog::create_radio_item(), Slic3r::GUI::MixedFilamentDialog::create_ratio_slider(), Slic3r::GUI::StatusBasePanel::create_settings_group(), Slic3r::GUI::MixedFilamentDialog::create_triangle_picker(), Slic3r::GUI::NetworkPluginDownloadDialog::create_update_available_ui(), Slic3r::GUI::CaliPageCaption::create_wiki(), Slic3r::GUI::FilamentPickerDialog::CreateColorGrid(), Slic3r::GUI::TextureImportDialog::dismiss_filament_popup_on_wheel(), Slic3r::GUI::DesignSketchTool::drag_cut_arrow(), Slic3r::GUI::DesignSketchTool::drag_datum_handle(), Slic3r::GUI::DesignSketchTool::drag_draft_arc(), Slic3r::GUI::DesignSketchTool::drag_extrude_arrow(), Slic3r::GUI::DesignSketchTool::drag_fillet_arrow(), Slic3r::GUI::DesignSketchTool::drag_helix_handle(), Slic3r::GUI::DesignSketchTool::drag_hole_handle(), Slic3r::GUI::DesignSketchTool::drag_move_arc(), Slic3r::GUI::DesignSketchTool::drag_pattern_handle(), Slic3r::GUI::DesignSketchTool::drag_revolve_arc(), Slic3r::GUI::DesignSketchTool::drag_rib_handle(), Slic3r::GUI::DesignSketchTool::drag_shell_arrow(), Slic3r::GUI::DesignSketchTool::drag_thread_handle(), Slic3r::GUI::anonymous_namespace{Plater.cpp}::emboss_svg(), Slic3r::GUI::StatusBasePanel::expand_filament_loading(), Slic3r::GUI::DesignSketchTool::fillet_axis_proj(), Slic3r::GUI::Newer3mfVersionDialog::get_btn_sizer(), Slic3r::GUI::ScoreDialog::get_button_sizer(), Slic3r::GUI::GLGizmosManager::gizmos_toolbar_on_mouse(), Slic3r::GUI::TexturePreviewCanvas::handle_reset_overlay_mouse(), Slic3r::GUI::DesignSketchTool::handle_solid_click(), Slic3r::GUI::DesignSketchTool::hit_test_base_pick(), Slic3r::GUI::DesignSketchTool::hit_test_cut_arrow(), Slic3r::GUI::DesignSketchTool::hit_test_datum_handle(), Slic3r::GUI::DesignSketchTool::hit_test_draft_handle(), Slic3r::GUI::DesignSketchTool::hit_test_extrude_arrow(), Slic3r::GUI::DesignSketchTool::hit_test_fillet_arrow(), Slic3r::GUI::DesignSketchTool::hit_test_helix_handle(), Slic3r::GUI::DesignSketchTool::hit_test_hole_handle(), Slic3r::GUI::DesignSketchTool::hit_test_move_arc(), Slic3r::GUI::DesignSketchTool::hit_test_move_arrow(), Slic3r::GUI::DesignSketchTool::hit_test_pattern_handle(), Slic3r::GUI::DesignSketchTool::hit_test_revolve_handle(), Slic3r::GUI::DesignSketchTool::hit_test_rib_handle(), Slic3r::GUI::DesignSketchTool::hit_test_shell_arrow(), Slic3r::GUI::DesignSketchTool::hit_test_thread_handle(), Slic3r::GUI::DesignSketchTool::hole_axis_proj(), Slic3r::GUI::DesignSketchTool::infer_at(), BBLTopbar::Init(), Slic3r::GUI::ElegooPrintHostSendDialog::init(), Slic3r::GUI::DeviceErrorDialog::init_button(), Slic3r::GUI::PrintErrorDialog::init_button(), Slic3r::GUI::GLCanvas3D::is_camera_pan(), Slic3r::GUI::GLCanvas3D::is_camera_rotate(), Slic3r::GUI::Sidebar::priv::layout_printer(), make_spin(), Slic3r::GUI::FilamentGroupPopup::MakeSmartFilamentSection(), anonymous_namespace{SurfaceDrag.cpp}::mouse_position(), Slic3r::GUI::ImageGrid::mouseDown(), Slic3r::GUI::ImageGrid::mouseEnterWindow(), Slic3r::GUI::ImageGrid::mouseLeaveWindow(), Slic3r::GUI::ImageGrid::mouseMoved(), Slic3r::GUI::ImageGrid::mouseReleased(), Slic3r::GUI::ImageGrid::mouseWheelMoved(), Slic3r::GUI::AuFolderPanel::on_add(), Slic3r::GUI::AMSControl::on_ams_setting_click(), Slic3r::GUI::AMSControl::on_ams_setting_click(), Slic3r::GUI::ModelMallDialog::on_back(), Slic3r::GUI::StatusPanel::on_camera_enter(), Slic3r::GUI::StatusPanel::on_camera_leave(), Slic3r::GUI::AMSControl::on_clibration_again_click(), Slic3r::GUI::AMSControl::on_clibration_cancel_click(), Slic3r::GUI::AMSMaterialsSetting::on_clr_picker(), Slic3r::GUI::ColorPickerPopup::on_custom_clr_picker(), Slic3r::GUI::AuFile::on_dclick(), Slic3r::GUI::Sidebar::on_enter_image_printer_bed(), Slic3r::GUI::CameraItem::on_enter_win(), Slic3r::GUI::AMSLib::on_enter_window(), Slic3r::GUI::ModelMallDialog::on_forward(), Slic3r::GUI::GradientCurveEditor::on_leave(), Slic3r::GUI::UVEditorCanvas::on_leave(), Slic3r::GUI::Sidebar::on_leave_image_printer_bed(), Slic3r::GUI::AMSLib::on_leave_window(), AuxiliaryList::on_left_dclick(), Slic3r::GUI::AMSLib::on_left_down(), Slic3r::GUI::AmsMapingPopup::on_left_down(), Slic3r::GUI::anonymous_namespace{PrintHostDialogs.cpp}::FlashforgeMaterialMapWidget::on_left_down(), Slic3r::GUI::anonymous_namespace{PrintHostDialogs.cpp}::FlashforgeSlotCard::on_left_down(), Slic3r::GUI::FanControlNew::on_left_down(), Slic3r::GUI::FanControlNewSwitchPanel::on_left_down(), Slic3r::GUI::FanControlPopupNew::on_left_down(), Slic3r::GUI::FanOperate::on_left_down(), Slic3r::GUI::GradientCurveEditor::on_left_down(), Slic3r::GUI::PrintOptionItem::on_left_down(), Slic3r::GUI::SendModeSwitchButton::on_left_down(), Slic3r::GUI::GradientCurveEditor::on_left_up(), Slic3r::GUI::CameraItem::on_level_win(), Slic3r::GUI::FanControlNew::on_mode_change(), Slic3r::GUI::FanControlPopupNew::on_mode_changed(), Slic3r::GUI::GradientCurveEditor::on_motion(), Slic3r::GUI::DesignSketchTool::on_mouse(), Slic3r::GUI::DragCanvas::on_mouse(), Slic3r::GUI::GLCanvas3D::on_mouse(), Slic3r::GUI::GLGizmoBase::on_mouse(), Slic3r::GUI::GLGizmoBrimEars::on_mouse(), Slic3r::GUI::GLGizmoCut3D::on_mouse(), Slic3r::GUI::GLGizmoEmboss::on_mouse(), Slic3r::GUI::GLGizmoFlatten::on_mouse(), Slic3r::GUI::GLGizmoMeasure::on_mouse(), Slic3r::GUI::GLGizmoMeshBoolean::on_mouse(), Slic3r::GUI::GLGizmoMove3D::on_mouse(), Slic3r::GUI::GLGizmoPainterBase::on_mouse(), Slic3r::GUI::GLGizmoRotate3D::on_mouse(), Slic3r::GUI::GLGizmoRotate::on_mouse(), Slic3r::GUI::GLGizmoScale3D::on_mouse(), Slic3r::GUI::GLGizmosManager::on_mouse(), Slic3r::GUI::GLGizmoSVG::on_mouse(), Slic3r::GUI::GLGizmoTextureDisplacement::on_mouse(), Slic3r::GUI::GLToolbar::on_mouse(), Slic3r::GUI::TexturePreviewCanvas::on_mouse(), Slic3r::GUI::UVEditorCanvas::on_mouse(), Slic3r::GUI::GLGizmoTextureDisplacement::on_mouse_adjust_texture(), Slic3r::GUI::GLGizmoEmboss::on_mouse_change_selection(), Slic3r::GUI::AuFile::on_mouse_enter(), Slic3r::GUI::MachineObjectPanel::on_mouse_enter(), Slic3r::GUI::MObjectPanel::on_mouse_enter(), Slic3r::GUI::PinCodePanel::on_mouse_enter(), Slic3r::GUI::SideToolsPanel::on_mouse_enter(), Slic3r::GUI::SliceInfoPanel::on_mouse_enter(), Slic3r::GUI::PageMaterials::on_mouse_enter_profiles(), Slic3r::GUI::GLGizmoEmboss::on_mouse_for_rotation(), Slic3r::GUI::GLGizmoSVG::on_mouse_for_rotation(), Slic3r::GUI::GLGizmoEmboss::on_mouse_for_translate(), Slic3r::GUI::GLGizmoSVG::on_mouse_for_translate(), Slic3r::GUI::DesignSketchTool::on_mouse_impl(), Slic3r::GUI::AuFile::on_mouse_leave(), Slic3r::GUI::MachineObjectPanel::on_mouse_leave(), Slic3r::GUI::MObjectPanel::on_mouse_leave(), Slic3r::GUI::PinCodePanel::on_mouse_leave(), Slic3r::GUI::SideToolsPanel::on_mouse_leave(), Slic3r::GUI::SliceInfoPanel::on_mouse_leave(), Slic3r::GUI::PageMaterials::on_mouse_leave_profiles(), Slic3r::GUI::SideToolsPanel::on_mouse_left_down(), Slic3r::GUI::AuFile::on_mouse_left_up(), Slic3r::GUI::MachineObjectPanel::on_mouse_left_up(), Slic3r::GUI::MObjectPanel::on_mouse_left_up(), Slic3r::GUI::PinCodePanel::on_mouse_left_up(), Slic3r::GUI::SideToolsPanel::on_mouse_left_up(), Slic3r::GUI::AmsRMGroup::on_mouse_move(), Slic3r::GUI::ConfigWizardIndex::on_mouse_move(), Slic3r::GUI::PageMaterials::on_mouse_move_on_profiles(), Slic3r::GUI::GLGizmoTextureDisplacement::on_mouse_seam(), on_mouse_surface_drag(), Slic3r::GUI::GLCanvas3D::on_mouse_wheel(), Slic3r::GUI::GLGizmosManager::on_mouse_wheel(), Slic3r::GUI::IMSlider::on_mouse_wheel(), Slic3r::GUI::InputIpAddressDialog::on_ok(), Slic3r::GUI::CalibrationPanel::on_printer_clicked(), Slic3r::GUI::MonitorBasePanel::on_printer_clicked(), Slic3r::GUI::MonitorPanel::on_printer_clicked(), Slic3r::GUI::ModelMallDialog::on_refresh(), Slic3r::GUI::SelectMachineDialog::on_rename_click(), Slic3r::GUI::SelectMachineDialog::on_reselect_dialog_btn_clicked(), Slic3r::GUI::GradientCurveEditor::on_right_down(), Slic3r::GUI::ConfirmBeforeSendDialog::on_show(), Slic3r::GUI::SecondaryCheckDialog::on_show(), Slic3r::GUI::MachineInfoPanel::on_show_release_note(), Slic3r::GUI::PrintingTaskPanel::on_stage_clicked(), Slic3r::GUI::CalibrationDialog::on_start_calibration(), Slic3r::GUI::MonitorBasePanel::on_status(), Slic3r::GUI::StatusPanel::on_switch_vcamera(), Slic3r::GUI::FanControlNew::on_swith_fan(), Slic3r::GUI::MonitorBasePanel::on_tasklist(), Slic3r::GUI::SliceInfoPanel::on_thumbnail_enter(), Slic3r::GUI::StatusPanel::on_thumbnail_enter(), Slic3r::GUI::SliceInfoPanel::on_thumbnail_leave(), Slic3r::GUI::StatusPanel::on_thumbnail_leave(), Slic3r::GUI::MonitorBasePanel::on_timelapse(), Slic3r::GUI::MonitorBasePanel::on_video(), Slic3r::GUI::ScoreDialog::OnBitmapClicked(), Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::OnBitmapHoverEnter(), Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::OnBitmapHoverLeave(), Slic3r::GUI::wgtDeviceNozzleRackNozzleItem::OnBtnNozzleStatus(), Slic3r::GUI::AMSrefresh::OnClick(), Slic3r::GUI::AMSPreview::OnEnterWindow(), Slic3r::GUI::AMSrefresh::OnEnterWindow(), Slic3r::GUI::CapsuleButton::OnEnterWindow(), Slic3r::GUI::DevicePickItem::OnEnterWindow(), Slic3r::GUI::FilamentGroupPopup::OnEnterWindow(), Slic3r::GUI::FilamentMapBtnPanel::OnEnterWindow(), Slic3r::GUI::MultiMachineItem::OnEnterWindow(), Slic3r::GUI::MultiTaskItem::OnEnterWindow(), Slic3r::GUI::PurgeModeBtnPanel::OnEnterWindow(), Slic3r::GUI::SendDeviceItem::OnEnterWindow(), Slic3r::GUI::wgtDeviceNozzleRackNozzleItem::OnItemSelected(), Slic3r::GUI::OG_CustomCtrl::OnLeaveWin(), Slic3r::GUI::WikiLabel::OnLeaveWin(), Slic3r::GUI::AMSPreview::OnLeaveWindow(), Slic3r::GUI::AMSrefresh::OnLeaveWindow(), Slic3r::GUI::CapsuleButton::OnLeaveWindow(), Slic3r::GUI::DevicePickItem::OnLeaveWindow(), Slic3r::GUI::FilamentGroupPopup::OnLeaveWindow(), Slic3r::GUI::FilamentMapBtnPanel::OnLeaveWindow(), Slic3r::GUI::MultiMachineItem::OnLeaveWindow(), Slic3r::GUI::MultiTaskItem::OnLeaveWindow(), Slic3r::GUI::PurgeModeBtnPanel::OnLeaveWindow(), Slic3r::GUI::SendDeviceItem::OnLeaveWindow(), Slic3r::GUI::ColorPanel::OnLeftDown(), Slic3r::GUI::DevicePickItem::OnLeftDown(), Slic3r::GUI::MultiMachineItem::OnLeftDown(), Slic3r::GUI::MultiTaskItem::OnLeftDown(), Slic3r::GUI::OG_CustomCtrl::OnLeftDown(), Slic3r::GUI::SendDeviceItem::OnLeftDown(), Slic3r::GUI::WikiLabel::OnLeftDown(), Slic3r::GUI::CameraPopup::OnLeftUp(), Slic3r::GUI::ColorPanel::OnLeftUp(), Slic3r::GUI::SelectMachinePopup::OnLeftUp(), Slic3r::GUI::SelectMObjectPopup::OnLeftUp(), Slic3r::GUI::OG_CustomCtrl::OnMotion(), Slic3r::GUI::WikiLabel::OnMotion(), Slic3r::GUI::CameraPopup::OnMouse(), Slic3r::GUI::SliceInfoPopup::OnMouse(), BBLTopbar::OnMouseLeftDClock(), BBLTopbar::OnMouseLeftDown(), Slic3r::GUI::FilamentPickerDialog::OnMouseLeftDown(), Slic3r::GUI::SkipPartCanvas::OnMouseLeftDown(), BBLTopbar::OnMouseLeftUp(), Slic3r::GUI::FilamentPickerDialog::OnMouseLeftUp(), Slic3r::GUI::SkipPartCanvas::OnMouseLeftUp(), BBLTopbar::OnMouseMotion(), Slic3r::GUI::SkipPartCanvas::OnMouseMotion(), Slic3r::GUI::FilamentPickerDialog::OnMouseMove(), Slic3r::GUI::SkipPartCanvas::OnMouseRightDown(), Slic3r::GUI::SkipPartCanvas::OnMouseRightUp(), Slic3r::GUI::SkipPartCanvas::OnMouseWheel(), Slic3r::GUI::DevicePickItem::OnMove(), Slic3r::GUI::MultiMachineItem::OnMove(), Slic3r::GUI::MultiTaskItem::OnMove(), Slic3r::GUI::SendDeviceItem::OnMove(), Slic3r::GUI::SendMultiMachinePage::OnSelectRadio(), Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::OnStatusIconClick(), Slic3r::GUI::PrinterPartsDialog::OnWikiClicked(), Slic3r::GUI::ExtrusionCalibration::open_bitmap(), Slic3r::GUI::Sidebar::operator=(), Slic3r::GUI::AmsHumidityTipPopup::ProcessLeftDown(), Slic3r::GUI::AmsIntroducePopup::ProcessLeftDown(), Slic3r::GUI::AmsMapingPopup::ProcessLeftDown(), Slic3r::GUI::AmsMapingTipPopup::ProcessLeftDown(), Slic3r::GUI::AmsTutorialPopup::ProcessLeftDown(), Slic3r::GUI::ColorPickerPopup::ProcessLeftDown(), Slic3r::GUI::SelectMachinePopup::ProcessLeftDown(), Slic3r::GUI::SelectMObjectPopup::ProcessLeftDown(), Slic3r::GUI::SliceInfoPopup::ProcessLeftDown(), Slic3r::GUI::ImGuiWrapper::read_glsl_version(), Slic3r::GUI::DesignPanel::rebuild_constraint_list(), Slic3r::GUI::TextureImportDialog::rebuild_mapping_rows(), Slic3r::GUI::MixedFilamentDialog::rebuild_recommendation_items(), Slic3r::GUI::StatusPanel::refresh_thumbnail_webrequest(), Slic3r::GUI::SelectMachineDialog::reset_and_sync_ams_list(), Slic3r::GUI::SyncAmsInfoDialog::reset_and_sync_ams_list(), Slic3r::GUI::DesignSketchTool::screen_to_plane(), Slic3r::GUI::DesignSketchTool::screen_tol(), Slic3r::GUI::SelectMachineDialog::set_default_from_sdcard(), Slic3r::GUI::DesignCanvas::set_on_context_menu(), Slic3r::GUI::ogStaticText::SetPathEnd(), Slic3r::GUI::MsgDialog::show_dsa_button(), Slic3r::GUI::PublishSettingsDialog::show_menu(), Slic3r::GUI::SelectMachineDialog::show_timelapse_folder_popup(), Slic3r::GUI::DesignSketchTool::snap_chain_start(), Slic3r::GUI::DesignSketchTool::snap_vertex(), Slic3r::GUI::DesignSketchTool::start_cut_drag(), Slic3r::GUI::DesignSketchTool::start_fillet_drag(), Slic3r::GUI::DesignSketchTool::start_hole_drag(), Slic3r::GUI::DesignSketchTool::start_shell_drag(), Slic3r::GUI::DesignSketchTool::start_thread_drag(), Slic3r::GUI::SendMultiMachinePage::sync_ams_list(), Slic3r::GUI::UnsavedChangesDialog::update(), Slic3r::GUI::DesignSketchTool::update_hover(), Slic3r::GUI::Sidebar::update_mixed_filament_list(), Slic3r::GUI::ColorDecomposeDialog::update_mode_card_content(), Slic3r::GUI::ImGuiWrapper::update_mouse_data(), Slic3r::GUI::DesignSketchTool::update_solid_hover(), Slic3r::GUI::ConfirmBeforeSendDialog::update_text(), Slic3r::GUI::GUI_App::UpdateDarkUI(), Slic3r::GUI::PrinterMsgPanel::UpdateInfos(), Slic3r::GUI::AMSControl::UpdatePassRoad(), Slic3r::GUI::GLGizmoBase::use_grabbers(), wxBEGIN_EVENT_TABLE(), and wxDECLARE_EVENT().

◆ zoom_bd

StateColor Slic3r::GUI::zoom_bd(std::pair< wxColour, int >(wxColour(144, 144, 144), StateColor::Disabled), std::pair< wxColour, int >(wxColour(38, 46, 48), StateColor::Enabled)) ( std::pair< wxColour, int > wxColour(144, 144, 144), StateColor::Disabled,
std::pair< wxColour, int > wxColour(38, 46, 48), StateColor::Enabled )
static

◆ zoom_bg

StateColor Slic3r::GUI::zoom_bg(std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Disabled), std::pair< wxColour, int >(wxColour(206, 206, 206), StateColor::Pressed), std::pair< wxColour, int >(wxColour(238, 238, 238), StateColor::Hovered), std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Enabled), std::pair< wxColour, int >(wxColour(255, 255, 255), StateColor::Normal)) ( std::pair< wxColour, int > wxColour(255, 255, 255), StateColor::Disabled,
std::pair< wxColour, int > wxColour(206, 206, 206), StateColor::Pressed,
std::pair< wxColour, int > wxColour(238, 238, 238), StateColor::Hovered,
std::pair< wxColour, int > wxColour(255, 255, 255), StateColor::Enabled,
std::pair< wxColour, int > wxColour(255, 255, 255), StateColor::Normal )
static

◆ zoom_text

StateColor Slic3r::GUI::zoom_text(std::pair< wxColour, int >(wxColour(144, 144, 144), StateColor::Disabled), std::pair< wxColour, int >(wxColour(38, 46, 48), StateColor::Enabled)) ( std::pair< wxColour, int > wxColour(144, 144, 144), StateColor::Disabled,
std::pair< wxColour, int > wxColour(38, 46, 48), StateColor::Enabled )
static