mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 00:31:11 -06:00
Fix of "exponentional values generated as G1 F-1.95058e+006 causing problems"
https://github.com/prusa3d/Slic3r/issues/463
This commit is contained in:
parent
98408bbed0
commit
6b2b279889
3 changed files with 10 additions and 2 deletions
|
@ -131,9 +131,13 @@ float Flow::spacing(const Flow &other) const
|
|||
// This method returns extrusion volume per head move unit.
|
||||
double Flow::mm3_per_mm() const
|
||||
{
|
||||
return this->bridge ?
|
||||
double res = this->bridge ?
|
||||
// Area of a circle with dmr of this->width.
|
||||
(this->width * this->width) * 0.25 * PI :
|
||||
this->width * this->height + 0.25 * (this->height * this->height) / (PI - 4.0);
|
||||
// Rectangle with semicircles at the ends. ~ h (w - 0.215 h)
|
||||
this->height * (this->width - this->height * (1. - 0.25 * PI));
|
||||
assert(res > 0.);
|
||||
return res;
|
||||
}
|
||||
|
||||
Flow support_material_flow(const PrintObject *object, float layer_height)
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <assert.h>
|
||||
|
||||
#define FLAVOR_IS(val) this->config.gcode_flavor == val
|
||||
#define FLAVOR_IS_NOT(val) this->config.gcode_flavor != val
|
||||
|
@ -259,6 +260,8 @@ std::string GCodeWriter::toolchange(unsigned int extruder_id)
|
|||
|
||||
std::string GCodeWriter::set_speed(double F, const std::string &comment, const std::string &cooling_marker) const
|
||||
{
|
||||
assert(F > 0.);
|
||||
assert(F < 100000.);
|
||||
std::ostringstream gcode;
|
||||
gcode << "G1 F" << F;
|
||||
COMMENT(comment);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue