mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 03:12:04 +08:00
Removal of tech ENABLE_BINARIZED_GCODE_DEBUG
This commit is contained in:
parent
d6ca8134ed
commit
317326bf9c
@ -1213,30 +1213,6 @@ void GCodeProcessor::process_binary_file(const std::string& filename, std::funct
|
|||||||
res = thumbnail_block.read_data(*file.f, file_header, block_header);
|
res = thumbnail_block.read_data(*file.f, file_header, block_header);
|
||||||
if (res != EResult::Success)
|
if (res != EResult::Success)
|
||||||
throw Slic3r::RuntimeError("Error while reading file '" + filename + "': " + std::string(translate_result(res)) + "\n");
|
throw Slic3r::RuntimeError("Error while reading file '" + filename + "': " + std::string(translate_result(res)) + "\n");
|
||||||
#if ENABLE_BINARIZED_GCODE_DEBUG
|
|
||||||
if (thumbnail_block.data.size() > 0) {
|
|
||||||
auto format_filename = [](const std::string& stem, const ThumbnailBlock& block) {
|
|
||||||
std::string ret = stem + "_" + std::to_string(block.params.width) + "x" + std::to_string(block.params.height);
|
|
||||||
switch ((EThumbnailFormat)block.params.format)
|
|
||||||
{
|
|
||||||
case EThumbnailFormat::PNG: { ret += ".png"; break; }
|
|
||||||
case EThumbnailFormat::JPG: { ret += ".jpg"; break; }
|
|
||||||
case EThumbnailFormat::QOI: { ret += ".qoi"; break; }
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
};
|
|
||||||
|
|
||||||
const boost::filesystem::path path(filename);
|
|
||||||
const std::string out_path = path.parent_path().string();
|
|
||||||
const std::string out_filename = out_path + "\\" + format_filename(path.stem().string(), thumbnail_block);
|
|
||||||
FILE* outfile = boost::nowide::fopen(out_filename.c_str(), "wb");
|
|
||||||
if (outfile != nullptr) {
|
|
||||||
fwrite((const void*)thumbnail_block.data.data(), 1, thumbnail_block.data.size(), outfile);
|
|
||||||
fclose(outfile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif // ENABLE_BINARIZED_GCODE_DEBUG
|
|
||||||
|
|
||||||
res = read_next_block_header(*file.f, file_header, block_header, cs_buffer.data(), cs_buffer.size());
|
res = read_next_block_header(*file.f, file_header, block_header, cs_buffer.data(), cs_buffer.size());
|
||||||
if (res != EResult::Success)
|
if (res != EResult::Success)
|
||||||
throw Slic3r::RuntimeError("Error while reading file '" + filename + "': " + std::string(translate_result(res)) + "\n");
|
throw Slic3r::RuntimeError("Error while reading file '" + filename + "': " + std::string(translate_result(res)) + "\n");
|
||||||
|
@ -65,7 +65,6 @@
|
|||||||
|
|
||||||
// Enable export of binarized gcode
|
// Enable export of binarized gcode
|
||||||
#define ENABLE_BINARIZED_GCODE (1 && ENABLE_2_6_2_ALPHA1)
|
#define ENABLE_BINARIZED_GCODE (1 && ENABLE_2_6_2_ALPHA1)
|
||||||
#define ENABLE_BINARIZED_GCODE_DEBUG (0 && ENABLE_BINARIZED_GCODE)
|
|
||||||
#define ENABLE_BINARIZED_GCODE_DEBUG_WINDOW (1 && ENABLE_BINARIZED_GCODE)
|
#define ENABLE_BINARIZED_GCODE_DEBUG_WINDOW (1 && ENABLE_BINARIZED_GCODE)
|
||||||
|
|
||||||
#endif // _prusaslicer_technologies_h_
|
#endif // _prusaslicer_technologies_h_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user