Fixed contour naming;
only touch dependent TC objects if the tool number changed; changed formatting of intermediate path representation to be valid g-code and not use exponents.
This commit is contained in:
@@ -131,9 +131,12 @@ std::string Command::toGCode (void) const
|
||||
std::stringstream str;
|
||||
str.precision(5);
|
||||
str << Name;
|
||||
char v[60];
|
||||
for(std::map<std::string,double>::const_iterator i = Parameters.begin(); i != Parameters.end(); ++i) {
|
||||
std::string k = i->first;
|
||||
std::string v = boost::lexical_cast<std::string>(i->second);
|
||||
//std::string v = std::to_string(i->second); // only 6 digits
|
||||
snprintf(v, sizeof(v), "%.9f", i->second);
|
||||
v[sizeof(v)-1] = '\0';
|
||||
str << " " << k << v;
|
||||
}
|
||||
return str.str();
|
||||
|
||||
Reference in New Issue
Block a user