#include "GLGizmoSVG.hpp"#include "slic3r/GUI/GLCanvas3D.hpp"#include "slic3r/GUI/GUI_App.hpp"#include "slic3r/GUI/GUI_ObjectList.hpp"#include "slic3r/GUI/Gizmos/GizmoObjectManipulation.hpp"#include "slic3r/GUI/MainFrame.hpp"#include "slic3r/GUI/NotificationManager.hpp"#include "slic3r/GUI/Plater.hpp"#include "slic3r/GUI/MsgDialog.hpp"#include "slic3r/GUI/format.hpp"#include "slic3r/GUI/CameraUtils.hpp"#include "slic3r/GUI/Jobs/EmbossJob.hpp"#include "slic3r/Utils/UndoRedo.hpp"#include "libslic3r/Point.hpp"#include "libslic3r/SVG.hpp"#include "libslic3r/Geometry.hpp"#include "libslic3r/Timer.hpp"#include "libslic3r/Emboss.hpp"#include "libslic3r/NSVGUtils.hpp"#include "libslic3r/Model.hpp"#include "libslic3r/ClipperUtils.hpp"#include "imgui/imgui_stdlib.h"#include "slic3r/GUI/Gizmos/GLGizmoBase.hpp"#include <string>#include <wx/string.h>#include "libslic3r/libslic3r.h"#include "libslic3r/EmbossShape.hpp"#include <string_view>#include <memory>#include <atomic>#include "slic3r/GUI/IconManager.hpp"#include <utility>#include "slic3r/GUI/SurfaceDrag.hpp"#include <optional>#include <cassert>#include "libslic3r/Color.hpp"#include "slic3r/GUI/3DScene.hpp"#include <imgui.h>#include <vector>#include "libslic3r/Utils.hpp"#include <algorithm>#include "libslic3r/Line.hpp"#include <functional>#include <cmath>#include <cstdlib>#include "libslic3r/ExPolygon.hpp"#include <cstddef>#include "slic3r/GUI/Selection.hpp"#include <cstdint>#include <boost/filesystem/operations.hpp>#include "slic3r/GUI/GUI.hpp"#include <wx/filedlg.h>#include <wx/intl.h>#include <iomanip>#include <ios>#include <math.h>#include "libslic3r/Config.hpp"#include <wx/dataview.h>#include <wx/arrstr.h>#include <boost/algorithm/string/predicate.hpp>#include <imgui/imgui_internal.h>#include "nanosvg/nanosvg.h"#include <wx/display.h>#include <boost/log/trivial.hpp>#include <glad/gl.h>#include <chrono>#include <sstream>#include <array>#include <fstream>#include "slic3r/GUI/BitmapCache.hpp"#include "nanosvg/nanosvgrast.h"#include "libslic3r/AABBTreeLines.hpp"Go to the source code of this file.
Namespaces | |
| namespace | anonymous_namespace{GLGizmoSVG.cpp} |
Macros | |
| #define | IMGUI_DEFINE_MATH_OPERATORS |
Functions | |
| std::string | anonymous_namespace{GLGizmoSVG.cpp}::choose_svg_file () |
| Open file dialog with svg files. | |
| double | anonymous_namespace{GLGizmoSVG.cpp}::get_tesselation_tolerance (double scale) |
| EmbossShape | anonymous_namespace{GLGizmoSVG.cpp}::select_shape (std::string_view filepath="", double tesselation_tolerance_in_mm=get_tesselation_tolerance(1.)) |
| Let user to choose file with (S)calable (V)ector (G)raphics - SVG. Than let select contour. | |
| DataBasePtr | anonymous_namespace{GLGizmoSVG.cpp}::create_emboss_data_base (std::shared_ptr< std::atomic< bool > > &cancel, ModelVolumeType volume_type, std::string_view filepath="") |
| Create new embos data. | |
| std::string | anonymous_namespace{GLGizmoSVG.cpp}::get_file_name (const std::string &file_path) |
| Separate file name from file path. String after last delimiter and before last point. | |
| std::string | anonymous_namespace{GLGizmoSVG.cpp}::volume_name (const EmbossShape &shape) |
| Create volume name from shape information. | |
| CreateVolumeParams | anonymous_namespace{GLGizmoSVG.cpp}::create_input (GLCanvas3D &canvas, RaycastManager &raycaster, ModelVolumeType volume_type) |
| Create input for volume creation. | |
| const IconManager::Icon & | anonymous_namespace{GLGizmoSVG.cpp}::get_icon (const IconManager::VIcons &icons, IconType type, IconState state) |
| GuiCfg | anonymous_namespace{GLGizmoSVG.cpp}::create_gui_configuration () |
| IconManager::VIcons | anonymous_namespace{GLGizmoSVG.cpp}::init_icons (IconManager &mng, const GuiCfg &cfg) |
| bool | anonymous_namespace{GLGizmoSVG.cpp}::draw_clickable (const IconManager::VIcons &icons, IconType type) |
| bool | anonymous_namespace{GLGizmoSVG.cpp}::reset_button (const IconManager::VIcons &icons) |
| void | anonymous_namespace{GLGizmoSVG.cpp}::wu_draw_line_side (Linef line, const std::function< void(int x, int y, float brightess)> &plot) |
| template<unsigned int N> | |
| void | anonymous_namespace{GLGizmoSVG.cpp}::draw_side_outline (const ExPolygons &shape, const std::array< unsigned char, N > &color, std::vector< unsigned char > &data, size_t data_width, double scale) |
| template<unsigned int N> | |
| void | anonymous_namespace{GLGizmoSVG.cpp}::draw_filled (const ExPolygons &shape, const std::array< unsigned char, N > &color, std::vector< unsigned char > &data, size_t data_width, double scale) |
| Draw filled ExPolygon into data line by line inspired by: http://alienryderflex.com/polygon_fill/. | |
| ExPolygons | anonymous_namespace{GLGizmoSVG.cpp}::union_ex (const ExPolygonsWithIds &shapes) |
| Union shape defined by glyphs. | |
| bool | anonymous_namespace{GLGizmoSVG.cpp}::init_texture (Texture &texture, const ExPolygonsWithIds &shapes_with_ids, unsigned max_size_px, const std::vector< std::string > &shape_warnings) |
| bool | anonymous_namespace{GLGizmoSVG.cpp}::is_closed (NSVGpath *path) |
| void | anonymous_namespace{GLGizmoSVG.cpp}::add_comma_separated (std::string &result, const std::string &add) |
| std::string | anonymous_namespace{GLGizmoSVG.cpp}::create_fill_warning (const NSVGshape &shape) |
| std::string | anonymous_namespace{GLGizmoSVG.cpp}::create_stroke_warning (const NSVGshape &shape) |
| std::vector< std::string > | anonymous_namespace{GLGizmoSVG.cpp}::create_shape_warnings (const EmbossShape &shape, float scale) |
| Create warnings about shape. | |
| void | anonymous_namespace{GLGizmoSVG.cpp}::delete_texture (Texture &texture) |
Variables | |
| const std::string | anonymous_namespace{GLGizmoSVG.cpp}::rotation_snapshot_name = L("SVG rotate") |
| const std::string | anonymous_namespace{GLGizmoSVG.cpp}::move_snapshot_name = L("SVG move") |
| const struct anonymous_namespace{GLGizmoSVG.cpp}::Limits | anonymous_namespace{GLGizmoSVG.cpp}::limits |
| wxString | anonymous_namespace{GLGizmoSVG.cpp}::last_used_directory = wxEmptyString |
| const float | anonymous_namespace{GLGizmoSVG.cpp}::warning_preccission = 1e-4f |
| struct anonymous_namespace{GLGizmoSVG.cpp}::Limits |
| Class Members | ||
|---|---|---|
| MinMax< float > | angle {-180.f, 180.f} | |
| MinMax< double > | depth {0.01, 1e4} | |
| MinMax< double > | relative_scale_ratio {1e-5, 1e4} | |
| MinMax< float > | size {0.01f, 1e4f} | |
| MinMax< float > | ui_size {5.f, 100.f} | |
| MinMax< float > | ui_size_in {.1f, 4.f} | |
| struct anonymous_namespace{GLGizmoSVG.cpp}::GuiCfg |
| Class Members | ||
|---|---|---|
| bool | dark_mode = false | |
| float | icon_width = 0.f | |
| float | input_offset = 0.f | |
| float | input_width = 0.f | |
| float | lock_offset = 0.f | |
| float | max_tooltip_width = 0.f | |
| double | screen_scale = -1. | |
| unsigned | texture_max_size_px = 256 | |
| Translations | translations | |
| struct anonymous_namespace{GLGizmoSVG.cpp}::GuiCfg::Translations |
| #define IMGUI_DEFINE_MATH_OPERATORS |