private namespace implementation More...
Classes | |
| 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... | |
| 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 | 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... | |
| 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 | JobException |
Functions | |
| bool | check (const DataBase &input, bool check_fontfile=true, bool use_surface=false) |
| Assert check of inputs data. | |
| bool | check (GLGizmosManager::EType gizmo) |
| bool | check (const CreateVolumeParams &input) |
| bool | check (const DataCreateVolume &input, bool is_main_thread=false) |
| bool | check (const DataCreateObject &input) |
| bool | check (const DataUpdate &input, bool is_main_thread=false, bool use_surface=false) |
| bool | check (const CreateSurfaceVolumeData &input, bool is_main_thread=false) |
| bool | check (const UpdateSurfaceVolumeData &input, bool is_main_thread=false) |
| template<typename Fnc> | |
| static ExPolygons | create_shape (DataBase &input, Fnc was_canceled) |
| template<typename Fnc> | |
| TriangleMesh | try_create_mesh (DataBase &input, const Fnc &was_canceled) |
| Try to create mesh from text. | |
| template<typename Fnc> | |
| TriangleMesh | create_mesh (DataBase &input, const Fnc &was_canceled, Job::Ctl &ctl) |
| TriangleMesh | create_default_mesh () |
| Create default mesh for embossed text. | |
| void | update_volume (TriangleMesh &&mesh, const DataUpdate &data, const Transform3d *tr=nullptr) |
| Must be called on main thread. | |
| void | update_name_in_list (const ObjectList &object_list, const ModelVolume &volume) |
| Update name in right panel. | |
| 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. | |
| OrthoProject | create_projection_for_cut (Transform3d tr, double shape_scale, const std::pair< float, float > &z_range) |
| Create projection for cut surface from mesh. | |
| OrthoProject3d | create_emboss_projection (bool is_outside, float emboss, Transform3d tr, SurfaceCut &cut) |
| Create tranformation for emboss Cutted surface. | |
| template<typename Fnc> | |
| TriangleMesh | cut_surface (DataBase &input1, const SurfaceVolumeData &input2, const Fnc &was_canceled) |
| Cut surface into triangle mesh. | |
| 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. | |
| void | create_message (const std::string &message) |
| bool | process (std::exception_ptr &eptr) |
| bool | finalize (bool canceled, std::exception_ptr &eptr, const DataBase &input) |
| auto | was_canceled (const Job::Ctl &ctl, const DataBase &base) |
| bool | is_valid (ModelVolumeType volume_type) |
| Check if volume type is possible use for new text volume. | |
| bool | start_create_volume_job (Worker &worker, const ModelObject &object, const std::optional< Transform3d > &volume_tr, DataBasePtr data, ModelVolumeType volume_type, GLGizmosManager::EType gizmo) |
| Start job for add new volume to object with given transformation. | |
| const GLVolume * | find_closest (const Selection &selection, const Vec2d &screen_center, const Camera &camera, const ModelObjectPtrs &objects, Vec2d *closest_center) |
| Find volume in selected objects with closest convex hull to screen center. | |
| bool | start_create_object_job (const CreateVolumeParams &input, DataBasePtr emboss_data, const Vec2d &coor) |
| Start job for add object with text into scene. | |
| bool | start_create_volume_on_surface_job (CreateVolumeParams &input, DataBasePtr data, const Vec2d &screen_coor, bool try_no_coor) |
| Start job to create volume on the surface of object. | |
| template<typename Fnc> | |
| ExPolygons | create_shape (DataBase &input, Fnc was_canceled) |
| std::vector< BoundingBoxes > | create_line_bounds (const ExPolygonsWithIds &shapes, size_t count_lines=0) |
| template<typename Fnc> | |
| TriangleMesh | create_mesh_per_glyph (DataBase &input, Fnc was_canceled) |
| indexed_triangle_set | cut_surface_to_its (const ExPolygons &shapes, const Transform3d &tr, const SurfaceVolumeData::ModelSources &sources, DataBase &input, std::function< bool()> was_canceled) |
| TriangleMesh | cut_per_glyph_surface (DataBase &input1, const SurfaceVolumeData &input2, std::function< bool()> was_canceled) |
Variables | |
| constexpr float | SAFE_SURFACE_OFFSET = 0.015f |
| constexpr float | safe_extension = 1.0f |
private namespace implementation
| struct anonymous_namespace{EmbossJob.cpp}::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 !!!
| Class Members | ||
|---|---|---|
| DataBasePtr | base | |
| EType | gizmo | |
| ObjectID | object_id | |
| optional< Transform3d > | trmat | |
| ModelVolumeType | volume_type | |
| struct anonymous_namespace{EmbossJob.cpp}::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.
| Class Members | ||
|---|---|---|
| optional< float > | angle = {} | |
| DataBasePtr | base | |
| vector< Vec2d > | bed_shape | |
| Camera | camera | |
| EType | gizmo | |
| Vec2d | screen_coor | |
| bool anonymous_namespace{EmbossJob.cpp}::check | ( | const CreateSurfaceVolumeData & | input, |
| bool | is_main_thread = false ) |
References anonymous_namespace{EmbossJob.cpp}::CreateSurfaceVolumeData::base, check(), anonymous_namespace{EmbossJob.cpp}::CreateSurfaceVolumeData::gizmo, Slic3r::EmbossShape::projection, Slic3r::GUI::Emboss::DataBase::shape, Slic3r::GUI::Emboss::SurfaceVolumeData::sources, and Slic3r::EmbossProjection::use_surface.
| bool anonymous_namespace{EmbossJob.cpp}::check | ( | const CreateVolumeParams & | input | ) |
References check(), Slic3r::GUI::Emboss::CreateVolumeParams::gizmo, is_valid(), and Slic3r::GUI::Emboss::CreateVolumeParams::volume_type.
| bool anonymous_namespace{EmbossJob.cpp}::check | ( | const DataBase & | input, |
| bool | check_fontfile = true, | ||
| bool | use_surface = false ) |
Assert check of inputs data.
References check(), and Slic3r::GUI::Emboss::DataBase::volume_name.
Referenced by anonymous_namespace{EmbossJob.cpp}::CreateObjectJob::CreateObjectJob(), anonymous_namespace{EmbossJob.cpp}::CreateSurfaceVolumeJob::CreateSurfaceVolumeJob(), anonymous_namespace{EmbossJob.cpp}::CreateVolumeJob::CreateVolumeJob(), check(), check(), check(), check(), check(), check(), check(), check(), anonymous_namespace{EmbossJob.cpp}::CreateObjectJob::process(), anonymous_namespace{EmbossJob.cpp}::CreateSurfaceVolumeJob::process(), and anonymous_namespace{EmbossJob.cpp}::CreateVolumeJob::process().
| bool anonymous_namespace{EmbossJob.cpp}::check | ( | const DataCreateObject & | input | ) |
References anonymous_namespace{EmbossJob.cpp}::DataCreateObject::base, anonymous_namespace{EmbossJob.cpp}::DataCreateObject::bed_shape, check(), anonymous_namespace{EmbossJob.cpp}::DataCreateObject::gizmo, Slic3r::EmbossShape::projection, anonymous_namespace{EmbossJob.cpp}::DataCreateObject::screen_coor, Slic3r::GUI::Emboss::DataBase::shape, and Slic3r::EmbossProjection::use_surface.
| bool anonymous_namespace{EmbossJob.cpp}::check | ( | const DataCreateVolume & | input, |
| bool | is_main_thread = false ) |
References anonymous_namespace{EmbossJob.cpp}::DataCreateVolume::base, check(), anonymous_namespace{EmbossJob.cpp}::DataCreateVolume::gizmo, is_valid(), Slic3r::EmbossShape::projection, Slic3r::GUI::Emboss::DataBase::shape, Slic3r::EmbossProjection::use_surface, and anonymous_namespace{EmbossJob.cpp}::DataCreateVolume::volume_type.
| bool anonymous_namespace{EmbossJob.cpp}::check | ( | const DataUpdate & | input, |
| bool | is_main_thread = false, | ||
| bool | use_surface = false ) |
References Slic3r::GUI::Emboss::DataUpdate::base, Slic3r::GUI::Emboss::DataBase::cancel, check(), Slic3r::GUI::get_model_volume(), Slic3r::EmbossShape::projection, Slic3r::GUI::Emboss::DataBase::shape, Slic3r::EmbossProjection::use_surface, and Slic3r::GUI::Emboss::DataUpdate::volume_id.
| bool anonymous_namespace{EmbossJob.cpp}::check | ( | const UpdateSurfaceVolumeData & | input, |
| bool | is_main_thread = false ) |
References Slic3r::GUI::Emboss::DataUpdate::base, check(), Slic3r::EmbossShape::projection, Slic3r::GUI::Emboss::DataBase::shape, Slic3r::GUI::Emboss::SurfaceVolumeData::sources, and Slic3r::EmbossProjection::use_surface.
| bool anonymous_namespace{EmbossJob.cpp}::check | ( | GLGizmosManager::EType | gizmo | ) |
References check(), Slic3r::GUI::GLGizmosManager::Emboss, and Slic3r::GUI::GLGizmosManager::Svg.
| TriangleMesh anonymous_namespace{EmbossJob.cpp}::create_default_mesh | ( | ) |
Create default mesh for embossed text.
References create_default_mesh(), Slic3r::its_make_cube(), Slic3r::load_obj(), and Slic3r::resources_dir().
Referenced by create_default_mesh(), and create_mesh().
| OrthoProject3d anonymous_namespace{EmbossJob.cpp}::create_emboss_projection | ( | bool | is_outside, |
| float | emboss, | ||
| Transform3d | tr, | ||
| SurfaceCut & | cut ) |
Create tranformation for emboss Cutted surface.
| is_outside | True .. raise, False .. engrave |
| emboss | Depth of embossing |
| tr | Text voliume transformation inside object |
| cut | Cutted surface from model |
References create_emboss_projection(), and SAFE_SURFACE_OFFSET.
Referenced by create_emboss_projection(), and cut_surface_to_its().
| std::vector< BoundingBoxes > anonymous_namespace{EmbossJob.cpp}::create_line_bounds | ( | const ExPolygonsWithIds & | shapes, |
| size_t | count_lines = 0 ) |
References create_line_bounds(), Slic3r::Emboss::ENTER_UNICODE, Slic3r::Emboss::get_count_lines(), and Slic3r::get_extents().
Referenced by create_line_bounds(), create_mesh_per_glyph(), and cut_per_glyph_surface().
| TriangleMesh anonymous_namespace{EmbossJob.cpp}::create_mesh | ( | DataBase & | input, |
| const Fnc & | was_canceled, | ||
| Job::Ctl & | ctl ) |
References _u8L, Slic3r::GUI::Job::Ctl::call_on_main_thread(), create_default_mesh(), create_message(), Slic3r::TriangleMesh::its, try_create_mesh(), and was_canceled().
Referenced by anonymous_namespace{EmbossJob.cpp}::CreateObjectJob::process(), and anonymous_namespace{EmbossJob.cpp}::CreateVolumeJob::process().
| TriangleMesh anonymous_namespace{EmbossJob.cpp}::create_mesh_per_glyph | ( | DataBase & | input, |
| Fnc | was_canceled ) |
References Slic3r::angle(), Slic3r::Emboss::calculate_angles(), Slic3r::BoundingBoxBase< PointType, APointsType >::center(), create_line_bounds(), create_mesh_per_glyph(), Slic3r::GUI::Emboss::DataBase::create_shape(), Slic3r::BoundingBoxBase< PointType, APointsType >::defined, Slic3r::EmbossProjection::depth, Slic3r::SVG::draw(), Slic3r::SVG::draw_text(), Slic3r::GUI::Emboss::DataBase::from_surface, Slic3r::Emboss::get_count_lines(), Slic3r::get_extents(), Slic3r::GUI::Emboss::DataBase::is_outside, Slic3r::its_merge(), Slic3r::length(), Slic3r::PolygonPoint::point, Slic3r::Emboss::TextLine::polygon, Slic3r::Emboss::polygons2model(), Slic3r::EmbossShape::projection, SAFE_SURFACE_OFFSET, Slic3r::Emboss::sample_slice(), Slic3r::EmbossShape::scale, scale_, Slic3r::EmbossShape::shapes_with_ids, Slic3r::BoundingBoxBase< PointType, APointsType >::size(), Slic3r::GUI::Emboss::DataBase::text_lines, Slic3r::unscale(), and was_canceled().
Referenced by create_mesh_per_glyph(), and try_create_mesh().
| void anonymous_namespace{EmbossJob.cpp}::create_message | ( | const std::string & | message | ) |
References create_message(), and Slic3r::GUI::show_error().
Referenced by create_mesh(), create_message(), create_volume(), anonymous_namespace{EmbossJob.cpp}::CreateObjectJob::finalize(), anonymous_namespace{EmbossJob.cpp}::CreateVolumeJob::finalize(), process(), and update_volume().
| OrthoProject anonymous_namespace{EmbossJob.cpp}::create_projection_for_cut | ( | Transform3d | tr, |
| double | shape_scale, | ||
| const std::pair< float, float > & | z_range ) |
Create projection for cut surface from mesh.
| tr | Volume transformation in object |
| shape_scale | Convert shape to millimeters |
| z_range | Bounding box 3d of model volume for projection ranges |
References create_projection_for_cut(), and safe_extension.
Referenced by create_projection_for_cut(), and cut_surface_to_its().
| ExPolygons anonymous_namespace{EmbossJob.cpp}::create_shape | ( | DataBase & | input, |
| Fnc | was_canceled ) |
References create_shape(), Slic3r::GUI::Emboss::DataBase::create_shape(), Slic3r::Emboss::UNION_DELTA, Slic3r::Emboss::UNION_MAX_ITERATIN, Slic3r::union_with_delta(), and was_canceled().
Referenced by create_shape(), cut_surface(), and try_create_mesh().
|
static |
References create_shape(), Slic3r::GUI::Emboss::DataBase::create_shape(), Slic3r::Emboss::UNION_DELTA, Slic3r::Emboss::UNION_MAX_ITERATIN, Slic3r::union_with_delta(), and was_canceled().
Referenced by create_shape(), cut_surface(), and try_create_mesh().
| SurfaceVolumeData::ModelSources anonymous_namespace{EmbossJob.cpp}::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.
| volumes | Source object volumes for cut surface from |
| text_volume_id | Source volume id |
References create_sources(), Slic3r::TriangleMesh::empty(), and Slic3r::TriangleMesh::its.
Referenced by create_sources(), and start_create_volume_job().
| void anonymous_namespace{EmbossJob.cpp}::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.
| mesh | triangles of new volume |
| object_id | Object where to add volume |
| type | Type of new volume |
| trmat | Transformation of volume inside of object |
| data | Text configuration and New VolumeName |
| gizmo | Gizmo to open |
References _u8L, Slic3r::ModelObject::add_volume(), Slic3r::TriangleMesh::bounding_box(), Slic3r::ModelVolume::calculate_convex_hull(), Slic3r::ModelVolume::config, create_message(), create_volume(), Slic3r::ModelObject::ensure_on_bed(), Slic3r::GUI::GLGizmosManager::get_current_type(), Slic3r::GUI::GLCanvas3D::get_gizmos_manager(), Slic3r::ModelVolume::get_object(), Slic3r::ObjectBase::id(), Slic3r::ModelObject::instance_bounding_box(), Slic3r::ModelObject::instances, Slic3r::ModelVolume::Source::is_from_builtin_objects, Slic3r::make_cube(), Slic3r::ModelVolume::mesh(), Slic3r::MODEL_PART, Slic3r::ModelVolume::name, Slic3r::GUI::GUI_App::obj_list(), Slic3r::GUI::obj_list(), Slic3r::GUI::GLGizmosManager::open_gizmo(), Slic3r::GUI::GUI_App::plater(), Slic3r::GUI::plater(), Slic3r::EmbossShape::projection, Slic3r::ModelConfig::set_key_value(), Slic3r::ModelVolume::set_mesh(), Slic3r::ModelVolume::set_transformation(), Slic3r::GUI::Emboss::DataBase::shape, Slic3r::BoundingBox3Base< PointType >::size(), Slic3r::ModelVolume::source, Slic3r::GUI::GLCanvas3D::update_instance_printable_state_for_object(), Slic3r::EmbossProjection::use_surface, Slic3r::GUI::Emboss::DataBase::volume_name, and Slic3r::GUI::Emboss::DataBase::write().
Referenced by create_volume(), anonymous_namespace{EmbossJob.cpp}::CreateSurfaceVolumeJob::finalize(), and anonymous_namespace{EmbossJob.cpp}::CreateVolumeJob::finalize().
| TriangleMesh anonymous_namespace{EmbossJob.cpp}::cut_per_glyph_surface | ( | DataBase & | input1, |
| const SurfaceVolumeData & | input2, | ||
| std::function< bool()> | was_canceled ) |
References _u8L, Slic3r::angle(), Slic3r::Emboss::calculate_angles(), Slic3r::BoundingBoxBase< PointType, APointsType >::center(), create_line_bounds(), Slic3r::GUI::Emboss::DataBase::create_shape(), cut_per_glyph_surface(), cut_surface_to_its(), Slic3r::BoundingBoxBase< PointType, APointsType >::defined, Slic3r::Emboss::get_count_lines(), Slic3r::get_extents(), Slic3r::its_merge(), Slic3r::offset(), Slic3r::PolygonPoint::point, Slic3r::Emboss::TextLine::polygon, Slic3r::Emboss::sample_slice(), Slic3r::EmbossShape::scale, scale_, Slic3r::EmbossShape::shapes_with_ids, Slic3r::GUI::Emboss::SurfaceVolumeData::sources, Slic3r::GUI::Emboss::DataBase::text_lines, Slic3r::GUI::Emboss::SurfaceVolumeData::transform, Slic3r::unscale(), and was_canceled().
Referenced by cut_per_glyph_surface(), and cut_surface().
| TriangleMesh anonymous_namespace{EmbossJob.cpp}::cut_surface | ( | DataBase & | input1, |
| const SurfaceVolumeData & | input2, | ||
| const Fnc & | was_canceled ) |
Cut surface into triangle mesh.
| base | (can't be const - cache of font) |
| input2 | SurfaceVolume data |
| was_canceled | Check to interupt execution |
References _u8L, create_shape(), cut_per_glyph_surface(), cut_surface_to_its(), Slic3r::GUI::Emboss::SurfaceVolumeData::sources, Slic3r::GUI::Emboss::DataBase::text_lines, Slic3r::GUI::Emboss::SurfaceVolumeData::transform, and was_canceled().
Referenced by anonymous_namespace{EmbossJob.cpp}::CreateSurfaceVolumeJob::process().
| indexed_triangle_set anonymous_namespace{EmbossJob.cpp}::cut_surface_to_its | ( | const ExPolygons & | shapes, |
| const Transform3d & | tr, | ||
| const SurfaceVolumeData::ModelSources & | sources, | ||
| DataBase & | input, | ||
| std::function< bool()> | was_canceled ) |
References Slic3r::bounding_box(), Slic3r::SurfaceCut::contours, create_emboss_projection(), create_projection_for_cut(), Slic3r::cut2model(), Slic3r::cut_surface(), cut_surface_to_its(), Slic3r::EmbossProjection::depth, Slic3r::get_extents(), Slic3r::has_reflection(), Slic3r::GUI::Emboss::DataBase::is_outside, Slic3r::its_cut_AoI(), Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::max, Slic3r::BoundingBox3Base< PointType >::merge(), Slic3r::BoundingBoxBase< PointType, std::vector< PointType > >::min, Slic3r::EmbossShape::projection, Slic3r::MultiPoint::reverse(), safe_extension, Slic3r::EmbossShape::scale, Slic3r::GUI::Emboss::DataBase::shape, Slic3r::GUI::Emboss::SurfaceVolumeData::ModelSource::tr, Slic3r::BoundingBoxf3::transformed(), and was_canceled().
Referenced by cut_per_glyph_surface(), cut_surface(), and cut_surface_to_its().
| bool anonymous_namespace{EmbossJob.cpp}::finalize | ( | bool | canceled, |
| std::exception_ptr & | eptr, | ||
| const DataBase & | input ) |
References Slic3r::GUI::Emboss::DataBase::cancel, finalize(), and process().
Referenced by finalize().
| const GLVolume * anonymous_namespace{EmbossJob.cpp}::find_closest | ( | const Selection & | selection, |
| const Vec2d & | screen_center, | ||
| const Camera & | camera, | ||
| const ModelObjectPtrs & | objects, | ||
| Vec2d * | closest_center ) |
Find volume in selected objects with closest convex hull to screen center.
| selection | Define where to search for closest |
| screen_center | Canvas center(dependent on camera settings) |
| objects | Actual objects |
| closest_center | OUT: coordinate of controid of closest volume |
References Slic3r::Polygon::centroid(), Slic3r::GUI::CameraUtils::create_hull2d(), find_closest(), Slic3r::GUI::get_model_volume(), Slic3r::GUI::Selection::get_volume(), Slic3r::GUI::Selection::get_volume_idxs(), and Slic3r::ModelVolume::is_model_part().
Referenced by find_closest().
| bool anonymous_namespace{EmbossJob.cpp}::is_valid | ( | ModelVolumeType | volume_type | ) |
Check if volume type is possible use for new text volume.
| volume_type | Type |
References Slic3r::INVALID, is_valid(), Slic3r::MODEL_PART, Slic3r::NEGATIVE_VOLUME, and Slic3r::PARAMETER_MODIFIER.
Referenced by check(), check(), and is_valid().
| bool anonymous_namespace{EmbossJob.cpp}::process | ( | std::exception_ptr & | eptr | ) |
References create_message(), and process().
Referenced by finalize(), and process().
| bool anonymous_namespace{EmbossJob.cpp}::start_create_object_job | ( | const CreateVolumeParams & | input, |
| DataBasePtr | emboss_data, | ||
| const Vec2d & | coor ) |
Start job for add object with text into scene.
| input | Contain worker, build shape, gizmo |
| emboss_data | Define params for create volume |
| coor | Screen coordinat, where to create new object laying on bed |
References Slic3r::GUI::Emboss::CreateVolumeParams::angle, anonymous_namespace{EmbossJob.cpp}::DataCreateObject::base, Slic3r::GUI::Emboss::CreateVolumeParams::build_volume, Slic3r::GUI::Emboss::CreateVolumeParams::camera, Slic3r::GUI::Emboss::CreateVolumeParams::gizmo, Slic3r::BuildVolume::printable_area(), Slic3r::EmbossShape::projection, Slic3r::GUI::queue_job(), Slic3r::GUI::Emboss::DataBase::shape, start_create_object_job(), Slic3r::EmbossProjection::use_surface, and Slic3r::GUI::Emboss::CreateVolumeParams::worker.
Referenced by start_create_object_job().
| bool anonymous_namespace{EmbossJob.cpp}::start_create_volume_job | ( | Worker & | worker, |
| const ModelObject & | object, | ||
| const std::optional< Transform3d > & | volume_tr, | ||
| DataBasePtr | data, | ||
| ModelVolumeType | volume_type, | ||
| GLGizmosManager::EType | gizmo ) |
Start job for add new volume to object with given transformation.
| worker | Define where to queue the job. e.g. wxGetApp().plater()->get_ui_job_worker() |
| object | Define where to add |
| volume_tr | Wanted volume transformation, when not set will be calculated after creation to be near the object |
| data | Define what to emboss - shape |
| volume_type | Type of volume: Part, negative, modifier |
| gizmo | Define which gizmo open on the success |
References create_sources(), Slic3r::EmbossShape::projection, Slic3r::GUI::queue_job(), Slic3r::GUI::Emboss::DataBase::shape, start_create_volume_job(), and Slic3r::EmbossProjection::use_surface.
Referenced by start_create_volume_job(), and start_create_volume_on_surface_job().
| bool anonymous_namespace{EmbossJob.cpp}::start_create_volume_on_surface_job | ( | CreateVolumeParams & | input, |
| DataBasePtr | data, | ||
| const Vec2d & | screen_coor, | ||
| bool | try_no_coor ) |
Start job to create volume on the surface of object.
| input | Variabless needed to create volume |
| data | Describe what to emboss - shape |
| screen_coor | Where to add |
| try_no_coor | True .. try to create volume without screen_coor, False .. |
References Slic3r::GUI::RaycastManager::actualize(), Slic3r::GUI::Emboss::CreateVolumeParams::angle, Slic3r::Emboss::apply_transformation(), Slic3r::GUI::Emboss::CreateVolumeParams::camera, Slic3r::GUI::Emboss::CreateVolumeParams::canvas, Slic3r::GUI::create_meshes(), Slic3r::Emboss::create_transformation_onto_surface(), Slic3r::GUI::Emboss::CreateVolumeParams::distance, Slic3r::ModelInstance::get_matrix(), Slic3r::GUI::GLCanvas3D::get_model(), Slic3r::GUI::get_model_instance(), Slic3r::GUI::get_model_volume(), Slic3r::ModelVolume::get_object(), Slic3r::GUI::Emboss::CreateVolumeParams::gizmo, Slic3r::GUI::Emboss::CreateVolumeParams::gl_volume, Slic3r::ObjectBase::id(), Slic3r::ObjectID::id, Slic3r::Model::objects, Slic3r::GUI::ray_from_camera(), Slic3r::GUI::Emboss::CreateVolumeParams::raycaster, start_create_volume_job(), start_create_volume_on_surface_job(), Slic3r::GUI::Emboss::start_create_volume_without_position(), Slic3r::transform(), Slic3r::GUI::UP_LIMIT, Slic3r::GUI::Emboss::CreateVolumeParams::volume_type, and Slic3r::GUI::Emboss::CreateVolumeParams::worker.
Referenced by start_create_volume_on_surface_job().
| TriangleMesh anonymous_namespace{EmbossJob.cpp}::try_create_mesh | ( | DataBase & | input, |
| const Fnc & | was_canceled ) |
Try to create mesh from text.
| input | Text to convert on mesh
|
| font | Font file with cache NOTE: Cache glyphs is changed |
| was_canceled | To check if process was canceled |
References create_mesh_per_glyph(), create_shape(), Slic3r::EmbossProjection::depth, Slic3r::TriangleMesh::empty(), Slic3r::GUI::Emboss::DataBase::from_surface, Slic3r::GUI::Emboss::DataBase::is_outside, Slic3r::offset(), Slic3r::Emboss::polygons2model(), Slic3r::EmbossShape::projection, SAFE_SURFACE_OFFSET, scale(), Slic3r::EmbossShape::scale, Slic3r::GUI::Emboss::DataBase::shape, Slic3r::GUI::Emboss::DataBase::text_lines, try_create_mesh(), and was_canceled().
Referenced by create_mesh(), and try_create_mesh().
| void anonymous_namespace{EmbossJob.cpp}::update_name_in_list | ( | const ObjectList & | object_list, |
| const ModelVolume & | volume ) |
Update name in right panel.
| obj_list | Right panel data |
| volume | Volume with just changed name |
References Slic3r::ModelVolume::get_object(), Slic3r::ObjectBase::id(), Slic3r::ObjectID::id, Slic3r::GUI::ObjectList::objects(), update_name_in_list(), and Slic3r::GUI::ObjectList::update_name_in_list().
Referenced by update_name_in_list().
| void anonymous_namespace{EmbossJob.cpp}::update_volume | ( | TriangleMesh && | mesh, |
| const DataUpdate & | data, | ||
| const Transform3d * | tr = nullptr ) |
Must be called on main thread.
| mesh | New mesh data |
| data | Text configuration, ... |
| mesh | Transformation of volume |
References _u8L, Slic3r::GUI::Emboss::DataUpdate::base, create_message(), Slic3r::GUI::GLGizmosManager::Emboss, Slic3r::ModelVolume::emboss_shape, Slic3r::ModelVolume::get_matrix(), Slic3r::GUI::get_model_volume(), Slic3r::UndoRedo::GizmoAction, Slic3r::GUI::Emboss::DataUpdate::make_snapshot, Slic3r::GUI::plater(), Slic3r::ModelVolume::set_transformation(), Slic3r::GUI::GLGizmosManager::Svg, update_volume(), Slic3r::GUI::Emboss::UpdateJob::update_volume(), and Slic3r::GUI::Emboss::DataUpdate::volume_id.
Referenced by update_volume().
| auto anonymous_namespace{EmbossJob.cpp}::was_canceled | ( | const Job::Ctl & | ctl, |
| const DataBase & | base ) |
References Slic3r::GUI::Emboss::DataBase::cancel, was_canceled(), and Slic3r::GUI::Job::Ctl::was_canceled().
Referenced by create_mesh(), create_mesh_per_glyph(), create_shape(), cut_per_glyph_surface(), cut_surface(), cut_surface_to_its(), anonymous_namespace{EmbossJob.cpp}::CreateObjectJob::process(), anonymous_namespace{EmbossJob.cpp}::CreateSurfaceVolumeJob::process(), anonymous_namespace{EmbossJob.cpp}::CreateVolumeJob::process(), try_create_mesh(), and was_canceled().
|
constexpr |
Referenced by create_projection_for_cut(), and cut_surface_to_its().
|
constexpr |
Referenced by create_emboss_projection(), create_mesh_per_glyph(), and try_create_mesh().