mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-21 15:51:10 -06:00
Removed the GCodePreviewData from the Print class, it does not belong here,
as the GCode is generated outside of the Print class. Exported the GCodePreviewData as GCode::PreviewData to Perl. When exporting the G-code with a command line Slic3r, the GCodeAnalyzer is now supressed for performance reasons. Removed obsolete Perl module Slic3r::GUI::Plater::3DToolpaths.
This commit is contained in:
parent
3a6436f6f0
commit
b1f5e7e8fa
20 changed files with 166 additions and 401 deletions
|
@ -348,7 +348,7 @@ std::vector<std::pair<coordf_t, std::vector<GCode::LayerToPrint>>> GCode::collec
|
|||
return layers_to_print;
|
||||
}
|
||||
|
||||
void GCode::do_export(Print *print, const char *path)
|
||||
void GCode::do_export(Print *print, const char *path, GCodePreviewData *preview_data)
|
||||
{
|
||||
PROFILE_CLEAR();
|
||||
|
||||
|
@ -363,7 +363,7 @@ void GCode::do_export(Print *print, const char *path)
|
|||
throw std::runtime_error(std::string("G-code export to ") + path + " failed.\nCannot open the file for writing.\n");
|
||||
|
||||
this->m_placeholder_parser_failed_templates.clear();
|
||||
this->_do_export(*print, file);
|
||||
this->_do_export(*print, file, preview_data);
|
||||
fflush(file);
|
||||
if (ferror(file)) {
|
||||
fclose(file);
|
||||
|
@ -394,7 +394,7 @@ void GCode::do_export(Print *print, const char *path)
|
|||
PROFILE_OUTPUT(debug_out_path("gcode-export-profile.txt").c_str());
|
||||
}
|
||||
|
||||
void GCode::_do_export(Print &print, FILE *file)
|
||||
void GCode::_do_export(Print &print, FILE *file, GCodePreviewData *preview_data)
|
||||
{
|
||||
PROFILE_FUNC();
|
||||
|
||||
|
@ -404,6 +404,7 @@ void GCode::_do_export(Print &print, FILE *file)
|
|||
|
||||
// resets analyzer
|
||||
m_analyzer.reset();
|
||||
m_enable_analyzer = preview_data != nullptr;
|
||||
|
||||
// resets analyzer's tracking data
|
||||
m_last_mm3_per_mm = GCodeAnalyzer::Default_mm3_per_mm;
|
||||
|
@ -820,7 +821,8 @@ void GCode::_do_export(Print &print, FILE *file)
|
|||
}
|
||||
|
||||
// starts analizer calculations
|
||||
m_analyzer.calc_gcode_preview_data(print);
|
||||
if (preview_data != nullptr)
|
||||
m_analyzer.calc_gcode_preview_data(*preview_data);
|
||||
}
|
||||
|
||||
std::string GCode::placeholder_parser_process(const std::string &name, const std::string &templ, unsigned int current_extruder_id, const DynamicConfig *config_override)
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace Slic3r {
|
|||
|
||||
// Forward declarations.
|
||||
class GCode;
|
||||
class GCodePreviewData;
|
||||
|
||||
class AvoidCrossingPerimeters {
|
||||
public:
|
||||
|
@ -119,7 +120,7 @@ public:
|
|||
m_enable_loop_clipping(true),
|
||||
m_enable_cooling_markers(false),
|
||||
m_enable_extrusion_role_markers(false),
|
||||
m_enable_analyzer(true),
|
||||
m_enable_analyzer(false),
|
||||
m_layer_count(0),
|
||||
m_layer_index(-1),
|
||||
m_layer(nullptr),
|
||||
|
@ -136,7 +137,7 @@ public:
|
|||
~GCode() {}
|
||||
|
||||
// throws std::runtime_exception
|
||||
void do_export(Print *print, const char *path);
|
||||
void do_export(Print *print, const char *path, GCodePreviewData *preview_data = nullptr);
|
||||
|
||||
// Exported for the helper classes (OozePrevention, Wipe) and for the Perl binding for unit tests.
|
||||
const Pointf& origin() const { return m_origin; }
|
||||
|
@ -153,8 +154,6 @@ public:
|
|||
// inside the generated string and after the G-code export finishes.
|
||||
std::string placeholder_parser_process(const std::string &name, const std::string &templ, unsigned int current_extruder_id, const DynamicConfig *config_override = nullptr);
|
||||
bool enable_cooling_markers() const { return m_enable_cooling_markers; }
|
||||
bool enable_analyzer() const { return m_enable_analyzer; }
|
||||
void enable_analyzer(bool enable) { m_enable_analyzer = enable; }
|
||||
|
||||
// For Perl bindings, to be used exclusively by unit tests.
|
||||
unsigned int layer_count() const { return m_layer_count; }
|
||||
|
@ -162,7 +161,7 @@ public:
|
|||
void apply_print_config(const PrintConfig &print_config);
|
||||
|
||||
protected:
|
||||
void _do_export(Print &print, FILE *file);
|
||||
void _do_export(Print &print, FILE *file, GCodePreviewData *preview_data);
|
||||
|
||||
// Object and support extrusions of the same PrintObject at the same print_z.
|
||||
struct LayerToPrint
|
||||
|
|
|
@ -123,22 +123,22 @@ const std::string& GCodeAnalyzer::process_gcode(const std::string& gcode)
|
|||
return m_process_output;
|
||||
}
|
||||
|
||||
void GCodeAnalyzer::calc_gcode_preview_data(Print& print)
|
||||
void GCodeAnalyzer::calc_gcode_preview_data(GCodePreviewData& preview_data)
|
||||
{
|
||||
// resets preview data
|
||||
print.gcode_preview.reset();
|
||||
preview_data.reset();
|
||||
|
||||
// calculates extrusion layers
|
||||
_calc_gcode_preview_extrusion_layers(print);
|
||||
_calc_gcode_preview_extrusion_layers(preview_data);
|
||||
|
||||
// calculates travel
|
||||
_calc_gcode_preview_travel(print);
|
||||
_calc_gcode_preview_travel(preview_data);
|
||||
|
||||
// calculates retractions
|
||||
_calc_gcode_preview_retractions(print);
|
||||
_calc_gcode_preview_retractions(preview_data);
|
||||
|
||||
// calculates unretractions
|
||||
_calc_gcode_preview_unretractions(print);
|
||||
_calc_gcode_preview_unretractions(preview_data);
|
||||
}
|
||||
|
||||
bool GCodeAnalyzer::is_valid_extrusion_role(ExtrusionRole role)
|
||||
|
@ -601,7 +601,7 @@ bool GCodeAnalyzer::_is_valid_extrusion_role(int value) const
|
|||
return ((int)erNone <= value) && (value <= (int)erMixed);
|
||||
}
|
||||
|
||||
void GCodeAnalyzer::_calc_gcode_preview_extrusion_layers(Print& print)
|
||||
void GCodeAnalyzer::_calc_gcode_preview_extrusion_layers(GCodePreviewData& preview_data)
|
||||
{
|
||||
struct Helper
|
||||
{
|
||||
|
@ -619,7 +619,7 @@ void GCodeAnalyzer::_calc_gcode_preview_extrusion_layers(Print& print)
|
|||
return layers.back();
|
||||
}
|
||||
|
||||
static void store_polyline(const Polyline& polyline, const Metadata& data, float z, Print& print)
|
||||
static void store_polyline(const Polyline& polyline, const Metadata& data, float z, GCodePreviewData& preview_data)
|
||||
{
|
||||
// if the polyline is valid, create the extrusion path from it and store it
|
||||
if (polyline.is_valid())
|
||||
|
@ -629,7 +629,7 @@ void GCodeAnalyzer::_calc_gcode_preview_extrusion_layers(Print& print)
|
|||
path.feedrate = data.feedrate;
|
||||
path.extruder_id = data.extruder_id;
|
||||
|
||||
get_layer_at_z(print.gcode_preview.extrusion.layers, z).paths.push_back(path);
|
||||
get_layer_at_z(preview_data.extrusion.layers, z).paths.push_back(path);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -653,7 +653,7 @@ void GCodeAnalyzer::_calc_gcode_preview_extrusion_layers(Print& print)
|
|||
{
|
||||
// store current polyline
|
||||
polyline.remove_duplicate_points();
|
||||
Helper::store_polyline(polyline, data, z, print);
|
||||
Helper::store_polyline(polyline, data, z, preview_data);
|
||||
|
||||
// reset current polyline
|
||||
polyline = Polyline();
|
||||
|
@ -679,23 +679,24 @@ void GCodeAnalyzer::_calc_gcode_preview_extrusion_layers(Print& print)
|
|||
|
||||
// store last polyline
|
||||
polyline.remove_duplicate_points();
|
||||
Helper::store_polyline(polyline, data, z, print);
|
||||
Helper::store_polyline(polyline, data, z, preview_data);
|
||||
|
||||
// updates preview ranges data
|
||||
print.gcode_preview.extrusion.ranges.height.set_from(height_range);
|
||||
print.gcode_preview.extrusion.ranges.width.set_from(width_range);
|
||||
print.gcode_preview.extrusion.ranges.feedrate.set_from(feedrate_range);
|
||||
preview_data.extrusion.ranges.height.set_from(height_range);
|
||||
preview_data.extrusion.ranges.width.set_from(width_range);
|
||||
preview_data.extrusion.ranges.feedrate.set_from(feedrate_range);
|
||||
}
|
||||
|
||||
void GCodeAnalyzer::_calc_gcode_preview_travel(Print& print)
|
||||
void GCodeAnalyzer::_calc_gcode_preview_travel(GCodePreviewData& preview_data)
|
||||
{
|
||||
struct Helper
|
||||
{
|
||||
static void store_polyline(const Polyline3& polyline, GCodePreviewData::Travel::EType type, GCodePreviewData::Travel::Polyline::EDirection direction, float feedrate, unsigned int extruder_id, Print& print)
|
||||
static void store_polyline(const Polyline3& polyline, GCodePreviewData::Travel::EType type, GCodePreviewData::Travel::Polyline::EDirection direction,
|
||||
float feedrate, unsigned int extruder_id, GCodePreviewData& preview_data)
|
||||
{
|
||||
// if the polyline is valid, store it
|
||||
if (polyline.is_valid())
|
||||
print.gcode_preview.travel.polylines.emplace_back(type, direction, feedrate, extruder_id, polyline);
|
||||
preview_data.travel.polylines.emplace_back(type, direction, feedrate, extruder_id, polyline);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -720,7 +721,7 @@ void GCodeAnalyzer::_calc_gcode_preview_travel(Print& print)
|
|||
{
|
||||
// store current polyline
|
||||
polyline.remove_duplicate_points();
|
||||
Helper::store_polyline(polyline, type, direction, feedrate, extruder_id, print);
|
||||
Helper::store_polyline(polyline, type, direction, feedrate, extruder_id, preview_data);
|
||||
|
||||
// reset current polyline
|
||||
polyline = Polyline3();
|
||||
|
@ -742,10 +743,10 @@ void GCodeAnalyzer::_calc_gcode_preview_travel(Print& print)
|
|||
|
||||
// store last polyline
|
||||
polyline.remove_duplicate_points();
|
||||
Helper::store_polyline(polyline, type, direction, feedrate, extruder_id, print);
|
||||
Helper::store_polyline(polyline, type, direction, feedrate, extruder_id, preview_data);
|
||||
}
|
||||
|
||||
void GCodeAnalyzer::_calc_gcode_preview_retractions(Print& print)
|
||||
void GCodeAnalyzer::_calc_gcode_preview_retractions(GCodePreviewData& preview_data)
|
||||
{
|
||||
TypeToMovesMap::iterator retraction_moves = m_moves_map.find(GCodeMove::Retract);
|
||||
if (retraction_moves == m_moves_map.end())
|
||||
|
@ -755,11 +756,11 @@ void GCodeAnalyzer::_calc_gcode_preview_retractions(Print& print)
|
|||
{
|
||||
// store position
|
||||
Point3 position(scale_(move.start_position.x), scale_(move.start_position.y), scale_(move.start_position.z));
|
||||
print.gcode_preview.retraction.positions.emplace_back(position, move.data.width, move.data.height);
|
||||
preview_data.retraction.positions.emplace_back(position, move.data.width, move.data.height);
|
||||
}
|
||||
}
|
||||
|
||||
void GCodeAnalyzer::_calc_gcode_preview_unretractions(Print& print)
|
||||
void GCodeAnalyzer::_calc_gcode_preview_unretractions(GCodePreviewData& preview_data)
|
||||
{
|
||||
TypeToMovesMap::iterator unretraction_moves = m_moves_map.find(GCodeMove::Unretract);
|
||||
if (unretraction_moves == m_moves_map.end())
|
||||
|
@ -769,7 +770,7 @@ void GCodeAnalyzer::_calc_gcode_preview_unretractions(Print& print)
|
|||
{
|
||||
// store position
|
||||
Point3 position(scale_(move.start_position.x), scale_(move.start_position.y), scale_(move.start_position.z));
|
||||
print.gcode_preview.unretraction.positions.emplace_back(position, move.data.width, move.data.height);
|
||||
preview_data.unretraction.positions.emplace_back(position, move.data.width, move.data.height);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
namespace Slic3r {
|
||||
|
||||
class Print;
|
||||
class GCodePreviewData;
|
||||
|
||||
class GCodeAnalyzer
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ public:
|
|||
const std::string& process_gcode(const std::string& gcode);
|
||||
|
||||
// Calculates all data needed for gcode visualization
|
||||
void calc_gcode_preview_data(Print& print);
|
||||
void calc_gcode_preview_data(GCodePreviewData& preview_data);
|
||||
|
||||
static bool is_valid_extrusion_role(ExtrusionRole role);
|
||||
|
||||
|
@ -216,10 +216,10 @@ private:
|
|||
// Checks if the given int is a valid extrusion role (contained into enum ExtrusionRole)
|
||||
bool _is_valid_extrusion_role(int value) const;
|
||||
|
||||
void _calc_gcode_preview_extrusion_layers(Print& print);
|
||||
void _calc_gcode_preview_travel(Print& print);
|
||||
void _calc_gcode_preview_retractions(Print& print);
|
||||
void _calc_gcode_preview_unretractions(Print& print);
|
||||
void _calc_gcode_preview_extrusion_layers(GCodePreviewData& preview_data);
|
||||
void _calc_gcode_preview_travel(GCodePreviewData& preview_data);
|
||||
void _calc_gcode_preview_retractions(GCodePreviewData& preview_data);
|
||||
void _calc_gcode_preview_unretractions(GCodePreviewData& preview_data);
|
||||
};
|
||||
|
||||
} // namespace Slic3r
|
||||
|
|
|
@ -66,89 +66,6 @@ bool Print::reload_model_instances()
|
|||
return invalidated;
|
||||
}
|
||||
|
||||
void Print::clear_gcode_preview_data()
|
||||
{
|
||||
gcode_preview.reset();
|
||||
}
|
||||
|
||||
void Print::set_gcode_preview_type(unsigned char type)
|
||||
{
|
||||
if ((0 <= type) && (type < GCodePreviewData::Extrusion::Num_View_Types))
|
||||
gcode_preview.extrusion.view_type = (GCodePreviewData::Extrusion::EViewType)type;
|
||||
}
|
||||
|
||||
void Print::set_gcode_preview_extrusion_flags(unsigned int flags)
|
||||
{
|
||||
gcode_preview.extrusion.role_flags = flags;
|
||||
}
|
||||
|
||||
bool Print::is_gcode_preview_extrusion_role_enabled(ExtrusionRole role)
|
||||
{
|
||||
return gcode_preview.extrusion.is_role_flag_set(role);
|
||||
}
|
||||
|
||||
void Print::set_gcode_preview_travel_visible(bool visible)
|
||||
{
|
||||
gcode_preview.travel.is_visible = visible;
|
||||
}
|
||||
|
||||
void Print::set_gcode_preview_retractions_visible(bool visible)
|
||||
{
|
||||
gcode_preview.retraction.is_visible = visible;
|
||||
}
|
||||
|
||||
void Print::set_gcode_preview_unretractions_visible(bool visible)
|
||||
{
|
||||
gcode_preview.unretraction.is_visible = visible;
|
||||
}
|
||||
|
||||
void Print::set_gcode_preview_shells_visible(bool visible)
|
||||
{
|
||||
gcode_preview.shell.is_visible = visible;
|
||||
}
|
||||
|
||||
void Print::set_gcode_extrusion_paths_colors(const std::vector<std::string>& colors)
|
||||
{
|
||||
unsigned int size = (unsigned int)colors.size();
|
||||
|
||||
if (size % 2 != 0)
|
||||
return;
|
||||
|
||||
for (unsigned int i = 0; i < size; i += 2)
|
||||
{
|
||||
const std::string& color_str = colors[i + 1];
|
||||
|
||||
if (color_str.size() == 6)
|
||||
{
|
||||
bool valid = true;
|
||||
for (int c = 0; c < 6; ++c)
|
||||
{
|
||||
if (::isxdigit(color_str[c]) == 0)
|
||||
{
|
||||
valid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (valid)
|
||||
{
|
||||
unsigned int color;
|
||||
std::stringstream ss;
|
||||
ss << std::hex << color_str;
|
||||
ss >> color;
|
||||
|
||||
float den = 1.0f / 255.0f;
|
||||
|
||||
float r = (float)((color & 0xFF0000) >> 16) * den;
|
||||
float g = (float)((color & 0x00FF00) >> 8) * den;
|
||||
float b = (float)(color & 0x0000FF) * den;
|
||||
|
||||
gcode_preview.set_extrusion_role_color(colors[i], r, g, b, 1.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PrintRegion* Print::add_region()
|
||||
{
|
||||
regions.push_back(new PrintRegion(this));
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "Slicing.hpp"
|
||||
#include "GCode/ToolOrdering.hpp"
|
||||
#include "GCode/WipeTower.hpp"
|
||||
#include "GCode/PreviewData.hpp"
|
||||
|
||||
#include "tbb/atomic.h"
|
||||
|
||||
|
@ -241,7 +240,6 @@ public:
|
|||
|
||||
// ordered collections of extrusion paths to build skirt loops and brim
|
||||
ExtrusionEntityCollection skirt, brim;
|
||||
GCodePreviewData gcode_preview;
|
||||
|
||||
Print() : total_used_filament(0), total_extruded_volume(0) { restart(); }
|
||||
~Print() { clear_objects(); }
|
||||
|
@ -255,27 +253,6 @@ public:
|
|||
void reload_object(size_t idx);
|
||||
bool reload_model_instances();
|
||||
|
||||
void clear_gcode_preview_data();
|
||||
void set_gcode_preview_type(unsigned char type);
|
||||
void set_gcode_preview_extrusion_flags(unsigned int flags);
|
||||
bool is_gcode_preview_extrusion_role_enabled(ExtrusionRole role);
|
||||
void set_gcode_preview_travel_visible(bool visible);
|
||||
void set_gcode_preview_retractions_visible(bool visible);
|
||||
void set_gcode_preview_unretractions_visible(bool visible);
|
||||
void set_gcode_preview_shells_visible(bool visible);
|
||||
|
||||
// Sets the extrusion path colors from the given strings vector.
|
||||
// Data in the vector should be formatted as follows:
|
||||
// std::vector<std::string> role_colors =
|
||||
// { <role_1>, <color_1>,
|
||||
// <role_2>, <color_2>,
|
||||
// <role_3>, <color_3>,
|
||||
// ...
|
||||
// <role_N>, <color_N> };
|
||||
// where <role_X> should be a string from GCodePreviewData::Extrusion::Default_Extrusion_Role_Names[]
|
||||
// and <color_X> an RGB color in hex format (i.e. red = FF0000)
|
||||
void set_gcode_extrusion_paths_colors(const std::vector<std::string>& colors);
|
||||
|
||||
// methods for handling regions
|
||||
PrintRegion* get_region(size_t idx) { return regions.at(idx); }
|
||||
const PrintRegion* get_region(size_t idx) const { return regions.at(idx); }
|
||||
|
|
|
@ -15,6 +15,7 @@ REGISTER_CLASS(Filler, "Filler");
|
|||
REGISTER_CLASS(Flow, "Flow");
|
||||
REGISTER_CLASS(CoolingBuffer, "GCode::CoolingBuffer");
|
||||
REGISTER_CLASS(GCode, "GCode");
|
||||
REGISTER_CLASS(GCodePreviewData, "GCode::PreviewData");
|
||||
REGISTER_CLASS(GCodeSender, "GCode::Sender");
|
||||
REGISTER_CLASS(Layer, "Layer");
|
||||
REGISTER_CLASS(SupportLayer, "Layer::Support");
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "../../libslic3r/ExtrusionEntity.hpp"
|
||||
#include "../../libslic3r/ExtrusionEntityCollection.hpp"
|
||||
#include "../../libslic3r/Geometry.hpp"
|
||||
#include "../../libslic3r/GCode/PreviewData.hpp"
|
||||
#include "../../libslic3r/Print.hpp"
|
||||
#include "../../libslic3r/Slicing.hpp"
|
||||
#include "GCode/Analyzer.hpp"
|
||||
|
@ -1128,13 +1129,13 @@ _3DScene::LegendTexture::~LegendTexture()
|
|||
_destroy_texture();
|
||||
}
|
||||
|
||||
bool _3DScene::LegendTexture::generate_texture(const Print& print, const std::vector<float>& tool_colors)
|
||||
bool _3DScene::LegendTexture::generate_texture(const GCodePreviewData& preview_data, const std::vector<float>& tool_colors)
|
||||
{
|
||||
_destroy_texture();
|
||||
|
||||
// collects items to render
|
||||
const std::string& title = print.gcode_preview.get_legend_title();
|
||||
const GCodePreviewData::LegendItemsList& items = print.gcode_preview.get_legend_items(tool_colors);
|
||||
const std::string& title = preview_data.get_legend_title();
|
||||
const GCodePreviewData::LegendItemsList& items = preview_data.get_legend_items(tool_colors);
|
||||
|
||||
unsigned int items_count = (unsigned int)items.size();
|
||||
if (items_count == 0)
|
||||
|
@ -1240,7 +1241,7 @@ bool _3DScene::LegendTexture::generate_texture(const Print& print, const std::ve
|
|||
|
||||
memDC.SelectObject(wxNullBitmap);
|
||||
|
||||
return _create_texture(print, bitmap);
|
||||
return _create_texture(preview_data, bitmap);
|
||||
}
|
||||
|
||||
unsigned int _3DScene::LegendTexture::get_texture_id() const
|
||||
|
@ -1263,7 +1264,7 @@ void _3DScene::LegendTexture::reset_texture()
|
|||
_destroy_texture();
|
||||
}
|
||||
|
||||
bool _3DScene::LegendTexture::_create_texture(const Print& print, const wxBitmap& bitmap)
|
||||
bool _3DScene::LegendTexture::_create_texture(const GCodePreviewData& preview_data, const wxBitmap& bitmap)
|
||||
{
|
||||
if ((m_tex_width == 0) || (m_tex_height == 0))
|
||||
return false;
|
||||
|
@ -1341,9 +1342,9 @@ static inline std::vector<float> parse_colors(const std::vector<std::string> &sc
|
|||
return output;
|
||||
}
|
||||
|
||||
void _3DScene::load_gcode_preview(const Print* print, GLVolumeCollection* volumes, const std::vector<std::string>& str_tool_colors, bool use_VBOs)
|
||||
void _3DScene::load_gcode_preview(const Print* print, const GCodePreviewData* preview_data, GLVolumeCollection* volumes, const std::vector<std::string>& str_tool_colors, bool use_VBOs)
|
||||
{
|
||||
if ((print == nullptr) || (volumes == nullptr))
|
||||
if ((preview_data == nullptr) || (volumes == nullptr))
|
||||
return;
|
||||
|
||||
if (volumes->empty())
|
||||
|
@ -1352,10 +1353,10 @@ void _3DScene::load_gcode_preview(const Print* print, GLVolumeCollection* volume
|
|||
|
||||
s_gcode_preview_volume_index.reset();
|
||||
|
||||
_load_gcode_extrusion_paths(*print, *volumes, tool_colors, use_VBOs);
|
||||
_load_gcode_travel_paths(*print, *volumes, tool_colors, use_VBOs);
|
||||
_load_gcode_retractions(*print, *volumes, use_VBOs);
|
||||
_load_gcode_unretractions(*print, *volumes, use_VBOs);
|
||||
_load_gcode_extrusion_paths(*preview_data, *volumes, tool_colors, use_VBOs);
|
||||
_load_gcode_travel_paths(*preview_data, *volumes, tool_colors, use_VBOs);
|
||||
_load_gcode_retractions(*preview_data, *volumes, use_VBOs);
|
||||
_load_gcode_unretractions(*preview_data, *volumes, use_VBOs);
|
||||
|
||||
if (volumes->empty())
|
||||
{
|
||||
|
@ -1364,14 +1365,14 @@ void _3DScene::load_gcode_preview(const Print* print, GLVolumeCollection* volume
|
|||
}
|
||||
else
|
||||
{
|
||||
_generate_legend_texture(*print, tool_colors);
|
||||
_generate_legend_texture(*preview_data, tool_colors);
|
||||
|
||||
_load_shells(*print, *volumes, use_VBOs);
|
||||
volumes->set_render_interleaved_only_volumes(GLVolumeCollection::RenderInterleavedOnlyVolumes(true, 0.25f));
|
||||
}
|
||||
}
|
||||
|
||||
_update_gcode_volumes_visibility(*print, *volumes);
|
||||
_update_gcode_volumes_visibility(*preview_data, *volumes);
|
||||
}
|
||||
|
||||
unsigned int _3DScene::get_legend_texture_id()
|
||||
|
@ -1751,7 +1752,7 @@ void _3DScene::_load_wipe_tower_toolpaths(
|
|||
BOOST_LOG_TRIVIAL(debug) << "Loading wipe tower toolpaths in parallel - end";
|
||||
}
|
||||
|
||||
void _3DScene::_load_gcode_extrusion_paths(const Print& print, GLVolumeCollection& volumes, const std::vector<float>& tool_colors, bool use_VBOs)
|
||||
void _3DScene::_load_gcode_extrusion_paths(const GCodePreviewData& preview_data, GLVolumeCollection& volumes, const std::vector<float>& tool_colors, bool use_VBOs)
|
||||
{
|
||||
// helper functions to select data in dependence of the extrusion view type
|
||||
struct Helper
|
||||
|
@ -1831,12 +1832,12 @@ void _3DScene::_load_gcode_extrusion_paths(const Print& print, GLVolumeCollectio
|
|||
|
||||
// detects filters
|
||||
FiltersList filters;
|
||||
for (const GCodePreviewData::Extrusion::Layer& layer : print.gcode_preview.extrusion.layers)
|
||||
for (const GCodePreviewData::Extrusion::Layer& layer : preview_data.extrusion.layers)
|
||||
{
|
||||
for (const ExtrusionPath& path : layer.paths)
|
||||
{
|
||||
ExtrusionRole role = path.role();
|
||||
float path_filter = Helper::path_filter(print.gcode_preview.extrusion.view_type, path);
|
||||
float path_filter = Helper::path_filter(preview_data.extrusion.view_type, path);
|
||||
if (std::find(filters.begin(), filters.end(), Filter(path_filter, role)) == filters.end())
|
||||
filters.emplace_back(path_filter, role);
|
||||
}
|
||||
|
@ -1851,7 +1852,7 @@ void _3DScene::_load_gcode_extrusion_paths(const Print& print, GLVolumeCollectio
|
|||
{
|
||||
s_gcode_preview_volume_index.first_volumes.emplace_back(GCodePreviewVolumeIndex::Extrusion, (unsigned int)filter.role, (unsigned int)volumes.volumes.size());
|
||||
|
||||
GLVolume* volume = new GLVolume(Helper::path_color(print.gcode_preview, tool_colors, filter.value).rgba);
|
||||
GLVolume* volume = new GLVolume(Helper::path_color(preview_data, tool_colors, filter.value).rgba);
|
||||
if (volume != nullptr)
|
||||
{
|
||||
filter.volume = volume;
|
||||
|
@ -1877,11 +1878,11 @@ void _3DScene::_load_gcode_extrusion_paths(const Print& print, GLVolumeCollectio
|
|||
}
|
||||
|
||||
// populates volumes
|
||||
for (const GCodePreviewData::Extrusion::Layer& layer : print.gcode_preview.extrusion.layers)
|
||||
for (const GCodePreviewData::Extrusion::Layer& layer : preview_data.extrusion.layers)
|
||||
{
|
||||
for (const ExtrusionPath& path : layer.paths)
|
||||
{
|
||||
float path_filter = Helper::path_filter(print.gcode_preview.extrusion.view_type, path);
|
||||
float path_filter = Helper::path_filter(preview_data.extrusion.view_type, path);
|
||||
FiltersList::iterator filter = std::find(filters.begin(), filters.end(), Filter(path_filter, path.role()));
|
||||
if (filter != filters.end())
|
||||
{
|
||||
|
@ -1906,27 +1907,27 @@ void _3DScene::_load_gcode_extrusion_paths(const Print& print, GLVolumeCollectio
|
|||
}
|
||||
}
|
||||
|
||||
void _3DScene::_load_gcode_travel_paths(const Print& print, GLVolumeCollection& volumes, const std::vector<float>& tool_colors, bool use_VBOs)
|
||||
void _3DScene::_load_gcode_travel_paths(const GCodePreviewData& preview_data, GLVolumeCollection& volumes, const std::vector<float>& tool_colors, bool use_VBOs)
|
||||
{
|
||||
size_t initial_volumes_count = volumes.volumes.size();
|
||||
s_gcode_preview_volume_index.first_volumes.emplace_back(GCodePreviewVolumeIndex::Travel, 0, (unsigned int)initial_volumes_count);
|
||||
|
||||
bool res = true;
|
||||
switch (print.gcode_preview.extrusion.view_type)
|
||||
switch (preview_data.extrusion.view_type)
|
||||
{
|
||||
case GCodePreviewData::Extrusion::Feedrate:
|
||||
{
|
||||
res = _travel_paths_by_feedrate(print, volumes);
|
||||
res = _travel_paths_by_feedrate(preview_data, volumes);
|
||||
break;
|
||||
}
|
||||
case GCodePreviewData::Extrusion::Tool:
|
||||
{
|
||||
res = _travel_paths_by_tool(print, volumes, tool_colors);
|
||||
res = _travel_paths_by_tool(preview_data, volumes, tool_colors);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
res = _travel_paths_by_type(print, volumes);
|
||||
res = _travel_paths_by_type(preview_data, volumes);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1961,7 +1962,7 @@ void _3DScene::_load_gcode_travel_paths(const Print& print, GLVolumeCollection&
|
|||
}
|
||||
}
|
||||
|
||||
bool _3DScene::_travel_paths_by_type(const Print& print, GLVolumeCollection& volumes)
|
||||
bool _3DScene::_travel_paths_by_type(const GCodePreviewData& preview_data, GLVolumeCollection& volumes)
|
||||
{
|
||||
// Helper structure for types
|
||||
struct Type
|
||||
|
@ -1987,7 +1988,7 @@ bool _3DScene::_travel_paths_by_type(const Print& print, GLVolumeCollection& vol
|
|||
|
||||
// detects types
|
||||
TypesList types;
|
||||
for (const GCodePreviewData::Travel::Polyline& polyline : print.gcode_preview.travel.polylines)
|
||||
for (const GCodePreviewData::Travel::Polyline& polyline : preview_data.travel.polylines)
|
||||
{
|
||||
if (std::find(types.begin(), types.end(), Type(polyline.type)) == types.end())
|
||||
types.emplace_back(polyline.type);
|
||||
|
@ -2000,7 +2001,7 @@ bool _3DScene::_travel_paths_by_type(const Print& print, GLVolumeCollection& vol
|
|||
// creates a new volume for each type
|
||||
for (Type& type : types)
|
||||
{
|
||||
GLVolume* volume = new GLVolume(print.gcode_preview.travel.type_colors[type.value].rgba);
|
||||
GLVolume* volume = new GLVolume(preview_data.travel.type_colors[type.value].rgba);
|
||||
if (volume == nullptr)
|
||||
return false;
|
||||
else
|
||||
|
@ -2011,7 +2012,7 @@ bool _3DScene::_travel_paths_by_type(const Print& print, GLVolumeCollection& vol
|
|||
}
|
||||
|
||||
// populates volumes
|
||||
for (const GCodePreviewData::Travel::Polyline& polyline : print.gcode_preview.travel.polylines)
|
||||
for (const GCodePreviewData::Travel::Polyline& polyline : preview_data.travel.polylines)
|
||||
{
|
||||
TypesList::iterator type = std::find(types.begin(), types.end(), Type(polyline.type));
|
||||
if (type != types.end())
|
||||
|
@ -2020,14 +2021,14 @@ bool _3DScene::_travel_paths_by_type(const Print& print, GLVolumeCollection& vol
|
|||
type->volume->offsets.push_back(type->volume->indexed_vertex_array.quad_indices.size());
|
||||
type->volume->offsets.push_back(type->volume->indexed_vertex_array.triangle_indices.size());
|
||||
|
||||
polyline3_to_verts(polyline.polyline, print.gcode_preview.travel.width, print.gcode_preview.travel.height, *type->volume);
|
||||
polyline3_to_verts(polyline.polyline, preview_data.travel.width, preview_data.travel.height, *type->volume);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool _3DScene::_travel_paths_by_feedrate(const Print& print, GLVolumeCollection& volumes)
|
||||
bool _3DScene::_travel_paths_by_feedrate(const GCodePreviewData& preview_data, GLVolumeCollection& volumes)
|
||||
{
|
||||
// Helper structure for feedrate
|
||||
struct Feedrate
|
||||
|
@ -2053,7 +2054,7 @@ bool _3DScene::_travel_paths_by_feedrate(const Print& print, GLVolumeCollection&
|
|||
|
||||
// detects feedrates
|
||||
FeedratesList feedrates;
|
||||
for (const GCodePreviewData::Travel::Polyline& polyline : print.gcode_preview.travel.polylines)
|
||||
for (const GCodePreviewData::Travel::Polyline& polyline : preview_data.travel.polylines)
|
||||
{
|
||||
if (std::find(feedrates.begin(), feedrates.end(), Feedrate(polyline.feedrate)) == feedrates.end())
|
||||
feedrates.emplace_back(polyline.feedrate);
|
||||
|
@ -2066,7 +2067,7 @@ bool _3DScene::_travel_paths_by_feedrate(const Print& print, GLVolumeCollection&
|
|||
// creates a new volume for each feedrate
|
||||
for (Feedrate& feedrate : feedrates)
|
||||
{
|
||||
GLVolume* volume = new GLVolume(print.gcode_preview.get_extrusion_feedrate_color(feedrate.value).rgba);
|
||||
GLVolume* volume = new GLVolume(preview_data.get_extrusion_feedrate_color(feedrate.value).rgba);
|
||||
if (volume == nullptr)
|
||||
return false;
|
||||
else
|
||||
|
@ -2077,7 +2078,7 @@ bool _3DScene::_travel_paths_by_feedrate(const Print& print, GLVolumeCollection&
|
|||
}
|
||||
|
||||
// populates volumes
|
||||
for (const GCodePreviewData::Travel::Polyline& polyline : print.gcode_preview.travel.polylines)
|
||||
for (const GCodePreviewData::Travel::Polyline& polyline : preview_data.travel.polylines)
|
||||
{
|
||||
FeedratesList::iterator feedrate = std::find(feedrates.begin(), feedrates.end(), Feedrate(polyline.feedrate));
|
||||
if (feedrate != feedrates.end())
|
||||
|
@ -2086,14 +2087,14 @@ bool _3DScene::_travel_paths_by_feedrate(const Print& print, GLVolumeCollection&
|
|||
feedrate->volume->offsets.push_back(feedrate->volume->indexed_vertex_array.quad_indices.size());
|
||||
feedrate->volume->offsets.push_back(feedrate->volume->indexed_vertex_array.triangle_indices.size());
|
||||
|
||||
polyline3_to_verts(polyline.polyline, print.gcode_preview.travel.width, print.gcode_preview.travel.height, *feedrate->volume);
|
||||
polyline3_to_verts(polyline.polyline, preview_data.travel.width, preview_data.travel.height, *feedrate->volume);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool _3DScene::_travel_paths_by_tool(const Print& print, GLVolumeCollection& volumes, const std::vector<float>& tool_colors)
|
||||
bool _3DScene::_travel_paths_by_tool(const GCodePreviewData& preview_data, GLVolumeCollection& volumes, const std::vector<float>& tool_colors)
|
||||
{
|
||||
// Helper structure for tool
|
||||
struct Tool
|
||||
|
@ -2119,7 +2120,7 @@ bool _3DScene::_travel_paths_by_tool(const Print& print, GLVolumeCollection& vol
|
|||
|
||||
// detects tools
|
||||
ToolsList tools;
|
||||
for (const GCodePreviewData::Travel::Polyline& polyline : print.gcode_preview.travel.polylines)
|
||||
for (const GCodePreviewData::Travel::Polyline& polyline : preview_data.travel.polylines)
|
||||
{
|
||||
if (std::find(tools.begin(), tools.end(), Tool(polyline.extruder_id)) == tools.end())
|
||||
tools.emplace_back(polyline.extruder_id);
|
||||
|
@ -2143,7 +2144,7 @@ bool _3DScene::_travel_paths_by_tool(const Print& print, GLVolumeCollection& vol
|
|||
}
|
||||
|
||||
// populates volumes
|
||||
for (const GCodePreviewData::Travel::Polyline& polyline : print.gcode_preview.travel.polylines)
|
||||
for (const GCodePreviewData::Travel::Polyline& polyline : preview_data.travel.polylines)
|
||||
{
|
||||
ToolsList::iterator tool = std::find(tools.begin(), tools.end(), Tool(polyline.extruder_id));
|
||||
if (tool != tools.end())
|
||||
|
@ -2152,27 +2153,27 @@ bool _3DScene::_travel_paths_by_tool(const Print& print, GLVolumeCollection& vol
|
|||
tool->volume->offsets.push_back(tool->volume->indexed_vertex_array.quad_indices.size());
|
||||
tool->volume->offsets.push_back(tool->volume->indexed_vertex_array.triangle_indices.size());
|
||||
|
||||
polyline3_to_verts(polyline.polyline, print.gcode_preview.travel.width, print.gcode_preview.travel.height, *tool->volume);
|
||||
polyline3_to_verts(polyline.polyline, preview_data.travel.width, preview_data.travel.height, *tool->volume);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void _3DScene::_load_gcode_retractions(const Print& print, GLVolumeCollection& volumes, bool use_VBOs)
|
||||
void _3DScene::_load_gcode_retractions(const GCodePreviewData& preview_data, GLVolumeCollection& volumes, bool use_VBOs)
|
||||
{
|
||||
s_gcode_preview_volume_index.first_volumes.emplace_back(GCodePreviewVolumeIndex::Retraction, 0, (unsigned int)volumes.volumes.size());
|
||||
|
||||
// nothing to render, return
|
||||
if (print.gcode_preview.retraction.positions.empty())
|
||||
if (preview_data.retraction.positions.empty())
|
||||
return;
|
||||
|
||||
GLVolume* volume = new GLVolume(print.gcode_preview.retraction.color.rgba);
|
||||
GLVolume* volume = new GLVolume(preview_data.retraction.color.rgba);
|
||||
if (volume != nullptr)
|
||||
{
|
||||
volumes.volumes.emplace_back(volume);
|
||||
|
||||
for (const GCodePreviewData::Retraction::Position& position : print.gcode_preview.retraction.positions)
|
||||
for (const GCodePreviewData::Retraction::Position& position : preview_data.retraction.positions)
|
||||
{
|
||||
volume->print_zs.push_back(unscale(position.position.z));
|
||||
volume->offsets.push_back(volume->indexed_vertex_array.quad_indices.size());
|
||||
|
@ -2187,20 +2188,20 @@ void _3DScene::_load_gcode_retractions(const Print& print, GLVolumeCollection& v
|
|||
}
|
||||
}
|
||||
|
||||
void _3DScene::_load_gcode_unretractions(const Print& print, GLVolumeCollection& volumes, bool use_VBOs)
|
||||
void _3DScene::_load_gcode_unretractions(const GCodePreviewData& preview_data, GLVolumeCollection& volumes, bool use_VBOs)
|
||||
{
|
||||
s_gcode_preview_volume_index.first_volumes.emplace_back(GCodePreviewVolumeIndex::Unretraction, 0, (unsigned int)volumes.volumes.size());
|
||||
|
||||
// nothing to render, return
|
||||
if (print.gcode_preview.unretraction.positions.empty())
|
||||
if (preview_data.unretraction.positions.empty())
|
||||
return;
|
||||
|
||||
GLVolume* volume = new GLVolume(print.gcode_preview.unretraction.color.rgba);
|
||||
GLVolume* volume = new GLVolume(preview_data.unretraction.color.rgba);
|
||||
if (volume != nullptr)
|
||||
{
|
||||
volumes.volumes.emplace_back(volume);
|
||||
|
||||
for (const GCodePreviewData::Retraction::Position& position : print.gcode_preview.unretraction.positions)
|
||||
for (const GCodePreviewData::Retraction::Position& position : preview_data.unretraction.positions)
|
||||
{
|
||||
volume->print_zs.push_back(unscale(position.position.z));
|
||||
volume->offsets.push_back(volume->indexed_vertex_array.quad_indices.size());
|
||||
|
@ -2215,7 +2216,7 @@ void _3DScene::_load_gcode_unretractions(const Print& print, GLVolumeCollection&
|
|||
}
|
||||
}
|
||||
|
||||
void _3DScene::_update_gcode_volumes_visibility(const Print& print, GLVolumeCollection& volumes)
|
||||
void _3DScene::_update_gcode_volumes_visibility(const GCodePreviewData& preview_data, GLVolumeCollection& volumes)
|
||||
{
|
||||
unsigned int size = (unsigned int)s_gcode_preview_volume_index.first_volumes.size();
|
||||
for (unsigned int i = 0; i < size; ++i)
|
||||
|
@ -2231,27 +2232,27 @@ void _3DScene::_update_gcode_volumes_visibility(const Print& print, GLVolumeColl
|
|||
{
|
||||
case GCodePreviewVolumeIndex::Extrusion:
|
||||
{
|
||||
volume->is_active = print.gcode_preview.extrusion.is_role_flag_set((ExtrusionRole)s_gcode_preview_volume_index.first_volumes[i].flag);
|
||||
volume->is_active = preview_data.extrusion.is_role_flag_set((ExtrusionRole)s_gcode_preview_volume_index.first_volumes[i].flag);
|
||||
break;
|
||||
}
|
||||
case GCodePreviewVolumeIndex::Travel:
|
||||
{
|
||||
volume->is_active = print.gcode_preview.travel.is_visible;
|
||||
volume->is_active = preview_data.travel.is_visible;
|
||||
break;
|
||||
}
|
||||
case GCodePreviewVolumeIndex::Retraction:
|
||||
{
|
||||
volume->is_active = print.gcode_preview.retraction.is_visible;
|
||||
volume->is_active = preview_data.retraction.is_visible;
|
||||
break;
|
||||
}
|
||||
case GCodePreviewVolumeIndex::Unretraction:
|
||||
{
|
||||
volume->is_active = print.gcode_preview.unretraction.is_visible;
|
||||
volume->is_active = preview_data.unretraction.is_visible;
|
||||
break;
|
||||
}
|
||||
case GCodePreviewVolumeIndex::Shell:
|
||||
{
|
||||
volume->is_active = print.gcode_preview.shell.is_visible;
|
||||
volume->is_active = preview_data.shell.is_visible;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -2264,9 +2265,9 @@ void _3DScene::_update_gcode_volumes_visibility(const Print& print, GLVolumeColl
|
|||
}
|
||||
}
|
||||
|
||||
void _3DScene::_generate_legend_texture(const Print& print, const std::vector<float>& tool_colors)
|
||||
void _3DScene::_generate_legend_texture(const GCodePreviewData& preview_data, const std::vector<float>& tool_colors)
|
||||
{
|
||||
s_legend_texture.generate_texture(print, tool_colors);
|
||||
s_legend_texture.generate_texture(preview_data, tool_colors);
|
||||
}
|
||||
|
||||
void _3DScene::_load_shells(const Print& print, GLVolumeCollection& volumes, bool use_VBOs)
|
||||
|
|
|
@ -15,6 +15,7 @@ class Print;
|
|||
class PrintObject;
|
||||
class Model;
|
||||
class ModelObject;
|
||||
class GCodePreviewData;
|
||||
|
||||
// A container for interleaved arrays of 3D vertices and normals,
|
||||
// possibly indexed by triangles and / or quads.
|
||||
|
@ -423,7 +424,7 @@ class _3DScene
|
|||
LegendTexture();
|
||||
~LegendTexture();
|
||||
|
||||
bool generate_texture(const Print& print, const std::vector<float>& tool_colors);
|
||||
bool generate_texture(const GCodePreviewData& preview_data, const std::vector<float>& tool_colors);
|
||||
|
||||
unsigned int get_texture_id() const;
|
||||
unsigned int get_texture_width() const;
|
||||
|
@ -432,7 +433,7 @@ class _3DScene
|
|||
void reset_texture();
|
||||
|
||||
private:
|
||||
bool _create_texture(const Print& print, const wxBitmap& bitmap);
|
||||
bool _create_texture(const GCodePreviewData& preview_data, const wxBitmap& bitmap);
|
||||
void _destroy_texture();
|
||||
};
|
||||
|
||||
|
@ -441,7 +442,7 @@ class _3DScene
|
|||
public:
|
||||
static void _glew_init();
|
||||
|
||||
static void load_gcode_preview(const Print* print, GLVolumeCollection* volumes, const std::vector<std::string>& str_tool_colors, bool use_VBOs);
|
||||
static void load_gcode_preview(const Print* print, const GCodePreviewData* preview_data, GLVolumeCollection* volumes, const std::vector<std::string>& str_tool_colors, bool use_VBOs);
|
||||
|
||||
static unsigned int get_legend_texture_id();
|
||||
static unsigned int get_legend_texture_width();
|
||||
|
@ -469,20 +470,20 @@ public:
|
|||
|
||||
private:
|
||||
// generates gcode extrusion paths geometry
|
||||
static void _load_gcode_extrusion_paths(const Print& print, GLVolumeCollection& volumes, const std::vector<float>& tool_colors, bool use_VBOs);
|
||||
static void _load_gcode_extrusion_paths(const GCodePreviewData& preview_data, GLVolumeCollection& volumes, const std::vector<float>& tool_colors, bool use_VBOs);
|
||||
// generates gcode travel paths geometry
|
||||
static void _load_gcode_travel_paths(const Print& print, GLVolumeCollection& volumes, const std::vector<float>& tool_colors, bool use_VBOs);
|
||||
static bool _travel_paths_by_type(const Print& print, GLVolumeCollection& volumes);
|
||||
static bool _travel_paths_by_feedrate(const Print& print, GLVolumeCollection& volumes);
|
||||
static bool _travel_paths_by_tool(const Print& print, GLVolumeCollection& volumes, const std::vector<float>& tool_colors);
|
||||
static void _load_gcode_travel_paths(const GCodePreviewData& preview_data, GLVolumeCollection& volumes, const std::vector<float>& tool_colors, bool use_VBOs);
|
||||
static bool _travel_paths_by_type(const GCodePreviewData& preview_data, GLVolumeCollection& volumes);
|
||||
static bool _travel_paths_by_feedrate(const GCodePreviewData& preview_data, GLVolumeCollection& volumes);
|
||||
static bool _travel_paths_by_tool(const GCodePreviewData& preview_data, GLVolumeCollection& volumes, const std::vector<float>& tool_colors);
|
||||
// generates gcode retractions geometry
|
||||
static void _load_gcode_retractions(const Print& print, GLVolumeCollection& volumes, bool use_VBOs);
|
||||
static void _load_gcode_retractions(const GCodePreviewData& preview_data, GLVolumeCollection& volumes, bool use_VBOs);
|
||||
// generates gcode unretractions geometry
|
||||
static void _load_gcode_unretractions(const Print& print, GLVolumeCollection& volumes, bool use_VBOs);
|
||||
static void _load_gcode_unretractions(const GCodePreviewData& preview_data, GLVolumeCollection& volumes, bool use_VBOs);
|
||||
// sets gcode geometry visibility according to user selection
|
||||
static void _update_gcode_volumes_visibility(const Print& print, GLVolumeCollection& volumes);
|
||||
static void _update_gcode_volumes_visibility(const GCodePreviewData& preview_data, GLVolumeCollection& volumes);
|
||||
// generates the legend texture in dependence of the current shown view type
|
||||
static void _generate_legend_texture(const Print& print, const std::vector<float>& tool_colors);
|
||||
static void _generate_legend_texture(const GCodePreviewData& preview_data, const std::vector<float>& tool_colors);
|
||||
// generates objects and wipe tower geometry
|
||||
static void _load_shells(const Print& print, GLVolumeCollection& volumes, bool use_VBOs);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue