OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
anonymous_namespace{EmbossJob.cpp}::CreateVolumeJob Class Reference

Create new TextVolume on the surface of ModelObject Should not be stopped NOTE: EmbossDataBase::font_file doesn't have to be valid !!! More...

Inheritance diagram for anonymous_namespace{EmbossJob.cpp}::CreateVolumeJob:
Collaboration diagram for anonymous_namespace{EmbossJob.cpp}::CreateVolumeJob:

Public Types

enum  JobPrepareState { PREPARE_STATE_DEFAULT = 0 , PREPARE_STATE_MENU = 1 }

Public Member Functions

 CreateVolumeJob (DataCreateVolume &&input)
 Create Volume.
void process (Ctl &ctl) override
void finalize (bool canceled, std::exception_ptr &eptr) override

Private Attributes

DataCreateVolume m_input
TriangleMesh m_result

Detailed Description

Create new TextVolume on the surface of ModelObject Should not be stopped NOTE: EmbossDataBase::font_file doesn't have to be valid !!!

Member Enumeration Documentation

◆ JobPrepareState

Enumerator
PREPARE_STATE_DEFAULT 
PREPARE_STATE_MENU 
22 {
25 };
@ PREPARE_STATE_MENU
Definition Job.hpp:24
@ PREPARE_STATE_DEFAULT
Definition Job.hpp:23

Constructor & Destructor Documentation

◆ CreateVolumeJob()

CreateVolumeJob::CreateVolumeJob ( DataCreateVolume && input)
explicit

Create Volume.

310: m_input(std::move(input)){ assert(check(m_input, true)); }
DataCreateVolume m_input
Definition EmbossJob.cpp:103
bool check(const DataBase &input, bool check_fontfile=true, bool use_surface=false)
Assert check of inputs data.
Definition EmbossJob.cpp:719

References anonymous_namespace{EmbossJob.cpp}::check(), and m_input.

Here is the call graph for this function:

Member Function Documentation

◆ finalize()

void CreateVolumeJob::finalize ( bool canceled,
std::exception_ptr & eptr )
overridevirtual

Reimplemented from Slic3r::GUI::Job.

317 {
318 if (!::finalize(canceled, eptr, *m_input.base))
319 return;
320 if (m_result.its.empty())
321 return create_message(_u8L("Can't create empty volume."));
322 create_volume(std::move(m_result), m_input.object_id, m_input.volume_type, m_input.trmat, *m_input.base, m_input.gizmo);
323}
void finalize(bool canceled, std::exception_ptr &eptr) override
Definition EmbossJob.cpp:317
TriangleMesh m_result
Definition EmbossJob.cpp:104
void create_volume(TriangleMesh &&mesh, const ObjectID &object_id, const ModelVolumeType type, const std::optional< Transform3d > &trmat, const DataBase &data, GLGizmosManager::EType gizmo)
Add new volume to object.
Definition EmbossJob.cpp:1092
void create_message(const std::string &message)
Definition EmbossJob.cpp:1613
#define _u8L(s)
Definition I18N.hpp:11

References _u8L, anonymous_namespace{EmbossJob.cpp}::create_message(), anonymous_namespace{EmbossJob.cpp}::create_volume(), finalize(), m_input, and m_result.

Referenced by finalize().

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

◆ process()

void CreateVolumeJob::process ( Ctl & ctl)
overridevirtual

Implements Slic3r::GUI::Job.

312 {
313 if (!check(m_input))
314 throw std::runtime_error("Bad input data for EmbossCreateVolumeJob.");
315 m_result = create_mesh(*m_input.base, was_canceled(ctl, *m_input.base), ctl);
316}
auto was_canceled(const Job::Ctl &ctl, const DataBase &base)
Definition EmbossJob.cpp:292
TriangleMesh create_mesh(DataBase &input, const Fnc &was_canceled, Job::Ctl &ctl)
Definition EmbossJob.cpp:984

References anonymous_namespace{EmbossJob.cpp}::check(), anonymous_namespace{EmbossJob.cpp}::create_mesh(), m_input, m_result, and anonymous_namespace{EmbossJob.cpp}::was_canceled().

Here is the call graph for this function:

Member Data Documentation

◆ m_input

DataCreateVolume anonymous_namespace{EmbossJob.cpp}::CreateVolumeJob::m_input
private

Referenced by CreateVolumeJob(), finalize(), and process().

◆ m_result

TriangleMesh anonymous_namespace{EmbossJob.cpp}::CreateVolumeJob::m_result
private

Referenced by finalize(), and process().


The documentation for this class was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Jobs/EmbossJob.cpp