mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-27 02:31:10 -06:00
Higher resolution G-code and volumetric rate legend, disabled.
This commit is contained in:
parent
58c93196d5
commit
0420f63540
3 changed files with 43 additions and 1 deletions
|
|
@ -536,7 +536,7 @@ std::string GCodeWriter::set_fan(unsigned int speed) const
|
|||
|
||||
void GCodeFormatter::emit_axis(const char axis, const double v, size_t digits) {
|
||||
assert(digits <= 6);
|
||||
static constexpr const std::array<int, 7> pow_10{1, 10, 100, 1000, 10000, 100000, 1000000};
|
||||
static constexpr const std::array<int, 10> pow_10{1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000};
|
||||
*ptr_err.ptr++ = ' '; *ptr_err.ptr++ = axis;
|
||||
|
||||
char *base_ptr = this->ptr_err.ptr;
|
||||
|
|
|
|||
|
|
@ -104,8 +104,22 @@ public:
|
|||
GCodeFormatter(const GCodeFormatter&) = delete;
|
||||
GCodeFormatter& operator=(const GCodeFormatter&) = delete;
|
||||
|
||||
// At layer height 0.15mm, extrusion width 0.2mm and filament diameter 1.75mm,
|
||||
// the crossection of extrusion is 0.4 * 0.15 = 0.06mm2
|
||||
// and the filament crossection is 1.75^2 = 3.063mm2
|
||||
// thus the filament moves 3.063 / 0.6 = 51x slower than the XY axes
|
||||
// and we need roughly two decimal digits more on extruder than on XY.
|
||||
#if 0
|
||||
static constexpr const int XYZF_EXPORT_DIGITS = 3;
|
||||
static constexpr const int E_EXPORT_DIGITS = 5;
|
||||
#else
|
||||
// order of magnitude smaller extrusion rate erros
|
||||
static constexpr const int XYZF_EXPORT_DIGITS = 4;
|
||||
static constexpr const int E_EXPORT_DIGITS = 6;
|
||||
// excessive accuracy
|
||||
// static constexpr const int XYZF_EXPORT_DIGITS = 6;
|
||||
// static constexpr const int E_EXPORT_DIGITS = 9;
|
||||
#endif
|
||||
|
||||
void emit_axis(const char axis, const double v, size_t digits);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue