mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Code cleanup
This commit is contained in:
parent
e78e3ad80b
commit
0688a76c73
6 changed files with 6 additions and 180 deletions
|
@ -272,7 +272,6 @@ class GCodeViewer
|
|||
void reset_ranges() { ranges.reset(); }
|
||||
};
|
||||
|
||||
#if ENABLE_SEQUENTIAL_VSLIDER
|
||||
class Layers
|
||||
{
|
||||
public:
|
||||
|
@ -307,7 +306,6 @@ class GCodeViewer
|
|||
double get_z_at(unsigned int id) const { return (id < m_zs.size()) ? m_zs[id] : 0.0; }
|
||||
Endpoints get_endpoints_at(unsigned int id) const { return (id < m_endpoints.size()) ? m_endpoints[id] : Endpoints(); }
|
||||
};
|
||||
#endif // ENABLE_SEQUENTIAL_VSLIDER
|
||||
|
||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||
struct Statistics
|
||||
|
@ -434,13 +432,8 @@ private:
|
|||
// bounding box of toolpaths + marker tools
|
||||
BoundingBoxf3 m_max_bounding_box;
|
||||
std::vector<Color> m_tool_colors;
|
||||
#if ENABLE_SEQUENTIAL_VSLIDER
|
||||
Layers m_layers;
|
||||
std::array<unsigned int, 2> m_layers_z_range;
|
||||
#else
|
||||
std::vector<double> m_layers_zs;
|
||||
std::array<double, 2> m_layers_z_range;
|
||||
#endif // ENABLE_SEQUENTIAL_VSLIDER
|
||||
std::vector<ExtrusionRole> m_roles;
|
||||
size_t m_extruders_count;
|
||||
std::vector<unsigned char> m_extruder_ids;
|
||||
|
@ -473,11 +466,7 @@ public:
|
|||
|
||||
const BoundingBoxf3& get_paths_bounding_box() const { return m_paths_bounding_box; }
|
||||
const BoundingBoxf3& get_max_bounding_box() const { return m_max_bounding_box; }
|
||||
#if ENABLE_SEQUENTIAL_VSLIDER
|
||||
const std::vector<double>& get_layers_zs() const { return m_layers.get_zs(); };
|
||||
#else
|
||||
const std::vector<double>& get_layers_zs() const { return m_layers_zs; };
|
||||
#endif // ENABLE_SEQUENTIAL_VSLIDER
|
||||
|
||||
const SequentialView& get_sequential_view() const { return m_sequential_view; }
|
||||
void update_sequential_view_current(unsigned int first, unsigned int last);
|
||||
|
@ -496,11 +485,7 @@ public:
|
|||
void set_toolpath_role_visibility_flags(unsigned int flags) { m_extrusions.role_visibility_flags = flags; }
|
||||
unsigned int get_options_visibility_flags() const;
|
||||
void set_options_visibility_from_flags(unsigned int flags);
|
||||
#if ENABLE_SEQUENTIAL_VSLIDER
|
||||
void set_layers_z_range(const std::array<unsigned int, 2>& layers_z_range);
|
||||
#else
|
||||
void set_layers_z_range(const std::array<double, 2>& layers_z_range);
|
||||
#endif // ENABLE_SEQUENTIAL_VSLIDER
|
||||
|
||||
bool is_legend_enabled() const { return m_legend_enabled; }
|
||||
void enable_legend(bool enable) { m_legend_enabled = enable; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue