Fix Path.Length calculation.

This commit is contained in:
Markus Lampert
2020-01-16 22:53:39 -08:00
parent 660335b1f3
commit d6c47715f3
4 changed files with 15 additions and 6 deletions

View File

@@ -129,7 +129,7 @@ double Toolpath::getLength()
Vector3d next;
for(std::vector<Command*>::const_iterator it = vpcCommands.begin();it!=vpcCommands.end();++it) {
std::string name = (*it)->Name;
next = (*it)->getPlacement().getPosition();
next = (*it)->getPlacement(last).getPosition();
if ( (name == "G0") || (name == "G00") || (name == "G1") || (name == "G01") ) {
// straight line
l += (next - last).Length();