mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-10 17:21:10 +00:00
* Remove Unused Project Includes and Forward-Declare Where a Type Is Only Referenced Generated with include-what-you-use and applied conservatively. Only OrcaSlicer's own headers, the ones under src/ and tests/, are removed or forward-declared; standard-library and third-party includes are left alone. An include is removed only when both the Release and the Debug configuration leave it unused, never from inside a conditional block, and never from a file with platform-specific blocks, which only gain includes. Files whose only use of a header sits behind a feature or debug macro (libvgcode's OpenGL ES and marker code, the ARACHNE/TESTS_EXPORT_SVGS debug output) keep their includes. clonable_ptr.hpp gains #pragma once; it had no include guard and was only safe while Config.hpp was its sole includer. * Remove Unused Project Includes From Files With Platform-Specific Code A Linux include-what-you-use run cannot see the code inside _WIN32, __APPLE__ or __linux__ blocks, so its verdict is only taken where nothing the removed header declares, directly or through what it includes, is named inside those blocks. Removals also have to hold in both the Release and Debug configuration and never touch a line inside a conditional block. * Restore the libslic3r Precompiled Header and Direct Includes Lost in the Platform Pass The platform-file pass treated pchheader.hpp as an ordinary header and emptied it, and left GUI_Preview.hpp and 14 other files relying on headers they no longer reached directly. * Restore MainFrame.hpp in ParamsDialog.cpp for the Windows-Only Reparent Call * Include Headers That Files Reached Through Ones the Cleanup Removed * Drop Includes Duplicated by the Cleanup or by Main's Own Additions * Leave PreciseSeam.cpp as Main Has It After the Precise Seam Rework
83 lines
3.0 KiB
C++
83 lines
3.0 KiB
C++
///|/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966
|
|
///|/
|
|
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
|
|
///|/
|
|
#ifndef slic3r_LibVGCodeWrapper_hpp_
|
|
#define slic3r_LibVGCodeWrapper_hpp_
|
|
|
|
#include <../../src/libvgcode/include/Viewer.hpp>
|
|
#include <../../src/libvgcode/include/PathVertex.hpp>
|
|
#include <../../src/libvgcode/include/GCodeInputData.hpp>
|
|
#include <../../src/libvgcode/include/ColorRange.hpp>
|
|
#include <stddef.h>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <cstddef>
|
|
|
|
#include "../../src/libvgcode/include/Types.hpp"
|
|
#include "libslic3r/Color.hpp"
|
|
#include "libslic3r/GCode/GCodeProcessor.hpp"
|
|
#include "libslic3r/ExtrusionEntity.hpp"
|
|
#include "libslic3r/Point.hpp"
|
|
|
|
|
|
namespace Slic3r {
|
|
class Print;
|
|
|
|
namespace CustomGCode {
|
|
struct Item;
|
|
} // namespace CustomGCode
|
|
} // namespace Slic3r
|
|
|
|
namespace libvgcode {
|
|
class Viewer;
|
|
|
|
// mapping from Slic3r::Vec3f to libvgcode::Vec3
|
|
extern Vec3 convert(const Slic3r::Vec3f& v);
|
|
|
|
// mapping from libvgcode::Vec3 to Slic3r::Vec3f
|
|
extern Slic3r::Vec3f convert(const Vec3& v);
|
|
|
|
// mapping from Slic3r::Matrix4f to libvgcode::Mat4x4
|
|
extern Mat4x4 convert(const Slic3r::Matrix4f& m);
|
|
|
|
// mapping from libvgcode::Color to Slic3r::ColorRGBA
|
|
extern Slic3r::ColorRGBA convert(const Color& c);
|
|
|
|
// mapping from Slic3r::ColorRGBA to libvgcode::Color
|
|
extern Color convert(const Slic3r::ColorRGBA& c);
|
|
|
|
// mapping from encoded color to libvgcode::Color
|
|
extern Color convert(const std::string& color_str);
|
|
|
|
// mapping from libvgcode::EGCodeExtrusionRole to Slic3r::ExtrusionRole
|
|
extern Slic3r::ExtrusionRole convert(EGCodeExtrusionRole role);
|
|
|
|
// mapping from Slic3r::ExtrusionRole to libvgcode::EGCodeExtrusionRole
|
|
extern EGCodeExtrusionRole convert(Slic3r::ExtrusionRole role);
|
|
|
|
// mapping from Slic3r::EMoveType to libvgcode::EMoveType
|
|
extern EMoveType convert(Slic3r::EMoveType type);
|
|
|
|
// mapping from Slic3r::GUI::Preview::OptionType to libvgcode::EOptionType
|
|
// extern EOptionType convert(const Slic3r::GUI::Preview::OptionType& type);
|
|
|
|
// mapping from Slic3r::PrintEstimatedStatistics::ETimeMode to libvgcode::ETimeMode
|
|
extern ETimeMode convert(const Slic3r::PrintEstimatedStatistics::ETimeMode& mode);
|
|
|
|
// mapping from libvgcode::ETimeMode to Slic3r::PrintEstimatedStatistics::ETimeMode
|
|
extern Slic3r::PrintEstimatedStatistics::ETimeMode convert(const ETimeMode& mode);
|
|
|
|
// mapping from Slic3r::GCodeProcessorResult to libvgcode::GCodeInputData
|
|
extern GCodeInputData convert(const Slic3r::GCodeProcessorResult& result, const std::vector<std::string>& str_tool_colors,
|
|
const std::vector<std::string>& str_color_print_colors, const Viewer& viewer);
|
|
|
|
// mapping from Slic3r::Print to libvgcode::GCodeInputData
|
|
extern GCodeInputData convert(const Slic3r::Print& print, const std::vector<std::string>& str_tool_colors,
|
|
const std::vector<std::string>& str_color_print_colors, const std::vector<Slic3r::CustomGCode::Item>& color_print_values,
|
|
size_t extruders_count);
|
|
|
|
} // namespace libvgcode
|
|
|
|
#endif // slic3r_LibVGCodeWrapper_hpp_
|