mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 10:17:55 -06:00
clean up
This commit is contained in:
parent
a4c632026f
commit
37c54aa4f6
128 changed files with 692 additions and 2478 deletions
|
@ -849,10 +849,10 @@ void GCodeProcessorResult::reset() {
|
|||
const std::vector<std::pair<GCodeProcessor::EProducer, std::string>> GCodeProcessor::Producers = {
|
||||
//BBS: OrcaSlicer is also "bambu". Otherwise the time estimation didn't work.
|
||||
//FIXME: Workaround and should be handled when do removing-bambu
|
||||
{ EProducer::BambuStudio, SLIC3R_APP_NAME },
|
||||
{ EProducer::BambuStudio, "generated by OrcaSlicer" },
|
||||
{ EProducer::BambuStudio, "generated by BambuStudio" },
|
||||
{ EProducer::BambuStudio, "BambuStudio" }
|
||||
{ EProducer::OrcaSlicer, SLIC3R_APP_NAME },
|
||||
{ EProducer::OrcaSlicer, "generated by OrcaSlicer" },
|
||||
{ EProducer::OrcaSlicer, "generated by BambuStudio" },
|
||||
{ EProducer::OrcaSlicer, "BambuStudio" }
|
||||
//{ EProducer::Slic3rPE, "generated by Slic3r Bambu Edition" },
|
||||
//{ EProducer::Slic3r, "generated by Slic3r" },
|
||||
//{ EProducer::SuperSlicer, "generated by SuperSlicer" },
|
||||
|
@ -1393,12 +1393,12 @@ void GCodeProcessor::process_file(const std::string& filename, std::function<voi
|
|||
});
|
||||
m_parser.reset();
|
||||
|
||||
// if the gcode was produced by BambuStudio,
|
||||
// if the gcode was produced by OrcaSlicer,
|
||||
// extract the config from it
|
||||
if (m_producer == EProducer::BambuStudio || m_producer == EProducer::Slic3rPE || m_producer == EProducer::Slic3r) {
|
||||
if (m_producer == EProducer::OrcaSlicer || m_producer == EProducer::Slic3rPE || m_producer == EProducer::Slic3r) {
|
||||
DynamicPrintConfig config;
|
||||
config.apply(FullPrintConfig::defaults());
|
||||
// Silently substitute unknown values by new ones for loading configurations from BambuStudio's own G-code.
|
||||
// Silently substitute unknown values by new ones for loading configurations from OrcaSlicer's own G-code.
|
||||
// Showing substitution log or errors may make sense, but we are not really reading many values from the G-code config,
|
||||
// thus a probability of incorrect substitution is low and the G-code viewer is a consumer-only anyways.
|
||||
config.load_from_gcode_file(filename, ForwardCompatibilitySubstitutionRule::EnableSilent);
|
||||
|
@ -2080,7 +2080,7 @@ void GCodeProcessor::process_tags(const std::string_view comment, bool producers
|
|||
return;
|
||||
}
|
||||
|
||||
if (!producers_enabled || m_producer == EProducer::BambuStudio) {
|
||||
if (!producers_enabled || m_producer == EProducer::OrcaSlicer) {
|
||||
// height tag
|
||||
if (boost::starts_with(comment, reserved_tag(ETags::Height))) {
|
||||
if (!parse_number(comment.substr(reserved_tag(ETags::Height).size()), m_forced_height))
|
||||
|
@ -2220,7 +2220,7 @@ bool GCodeProcessor::process_producers_tags(const std::string_view comment)
|
|||
case EProducer::Slic3rPE:
|
||||
case EProducer::Slic3r:
|
||||
case EProducer::SuperSlicer:
|
||||
case EProducer::BambuStudio: { return process_bambuslicer_tags(comment); }
|
||||
case EProducer::OrcaSlicer: { return process_bambuslicer_tags(comment); }
|
||||
case EProducer::Cura: { return process_cura_tags(comment); }
|
||||
case EProducer::Simplify3D: { return process_simplify3d_tags(comment); }
|
||||
case EProducer::CraftWare: { return process_craftware_tags(comment); }
|
||||
|
|
|
@ -673,7 +673,7 @@ namespace Slic3r {
|
|||
enum class EProducer
|
||||
{
|
||||
Unknown,
|
||||
BambuStudio,
|
||||
OrcaSlicer,
|
||||
Slic3rPE,
|
||||
Slic3r,
|
||||
SuperSlicer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue