Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::GUI::Emboss Namespace Reference

Classes

class  CreateFontStyleImagesJob
 Create texture with name of styles written by its style NOTE: Access to glyph cache is possible only from job. More...
 
class  CreateObjectJob
 Create new TextObject on the platter Should not be stopped. More...
 
struct  CreateSurfaceVolumeData
 Hold neccessary data to create(cut) volume from surface object in job. More...
 
class  CreateSurfaceVolumeJob
 Cut surface from object and create cutted volume Should not be stopped. More...
 
class  CreateVolumeJob
 Create new TextVolume on the surface of ModelObject Should not be stopped NOTE: EmbossDataBase::font_file doesn't have to be valid !!! More...
 
struct  DataBase
 Base data holder for embossing. More...
 
struct  DataCreateObject
 Hold neccessary data to create ModelObject in job Object is placed on bed under screen coor OR to center of scene when it is out of bed shape. More...
 
struct  DataCreateVolume
 Hold neccessary data to create ModelVolume in job Volume is created on the surface of existing volume in object. NOTE: EmbossDataBase::font_file doesn't have to be valid !!! More...
 
struct  DataUpdate
 Hold neccessary data to update embossed text object in job. More...
 
class  StyleManager
 Manage Emboss text styles Cache actual state of style. More...
 
struct  SurfaceVolumeData
 
class  UpdateJob
 Update text shape in existing text volume Predict that there is only one runnig(not canceled) instance of it. More...
 
struct  UpdateSurfaceVolumeData
 Hold neccessary data to update embossed text object in job. More...
 
class  UpdateSurfaceVolumeJob
 Update text volume to use surface from object. More...
 

Functions

SurfaceVolumeData::ModelSources create_sources (const ModelVolumePtrs &volumes, std::optional< size_t > text_volume_id={})
 Copied triangles from object to be able create mesh for cut surface from.
 
SurfaceVolumeData::ModelSources create_volume_sources (const ModelVolume *text_volume)
 Copied triangles from object to be able create mesh for cut surface from.
 

Function Documentation

◆ create_sources()

SurfaceVolumeData::ModelSources Slic3r::GUI::Emboss::create_sources ( const ModelVolumePtrs volumes,
std::optional< size_t >  text_volume_id = {} 
)

Copied triangles from object to be able create mesh for cut surface from.

Parameters
volumesSource object volumes for cut surface from
text_volume_idSource volume id
Returns
Source data for cut surface from
264{
266 result.reserve(volumes.size() - 1);
267 for (const ModelVolume *v : volumes) {
268 if (text_volume_id.has_value() && v->id().id == *text_volume_id) continue;
269 // skip modifiers and negative volumes, ...
270 if (!v->is_model_part()) continue;
271 const TriangleMesh &tm = v->mesh();
272 if (tm.empty()) continue;
273 if (tm.its.empty()) continue;
274 result.push_back({v->get_mesh_shared_ptr(), v->get_matrix()});
275 }
276 return result;
277}
Definition Model.hpp:753
Definition TriangleMesh.hpp:88
bool empty() const
Definition TriangleMesh.hpp:139
indexed_triangle_set its
Definition TriangleMesh.hpp:155
std::vector< ModelSource > ModelSources
Definition EmbossJob.hpp:168
bool empty() const
Definition stl.h:167

References indexed_triangle_set::empty(), Slic3r::TriangleMesh::empty(), and Slic3r::TriangleMesh::its.

Referenced by create_volume_sources(), and priv::start_create_volume_job().

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

◆ create_volume_sources()

SurfaceVolumeData::ModelSources Slic3r::GUI::Emboss::create_volume_sources ( const ModelVolume text_volume)

Copied triangles from object to be able create mesh for cut surface from.

Parameters
text_volumeDefine text in object
Returns
Source data for cut surface from
280{
281 if (text_volume == nullptr) return {};
282 if (!text_volume->text_configuration.has_value()) return {};
283 const ModelVolumePtrs &volumes = text_volume->get_object()->volumes;
284 // no other volume in object
285 if (volumes.size() <= 1) return {};
286 return create_sources(volumes, text_volume->id().id);
287}
ModelVolumePtrs volumes
Definition Model.hpp:337
ModelObject * get_object() const
Definition Model.hpp:836
std::optional< TextConfiguration > text_configuration
Definition Model.hpp:833
ObjectID id() const
Definition ObjectID.hpp:55
size_t id
Definition ObjectID.hpp:37
SurfaceVolumeData::ModelSources create_sources(const ModelVolumePtrs &volumes, std::optional< size_t > text_volume_id)
Copied triangles from object to be able create mesh for cut surface from.
Definition EmbossJob.cpp:263
std::vector< ModelVolume * > ModelVolumePtrs
Definition Model.hpp:106

References create_sources(), Slic3r::ModelVolume::get_object(), Slic3r::ObjectID::id, Slic3r::ObjectBase::id(), Slic3r::ModelVolume::text_configuration, and Slic3r::ModelObject::volumes.

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

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