--- a/src/mathfunctions.cpp Sun Jan 29 15:49:36 2017 +0200 +++ b/src/mathfunctions.cpp Sun Jan 29 21:02:11 2017 +0200 @@ -95,9 +95,14 @@ for (LDObject* obj : objs) { if (obj->hasMatrix()) + { box << static_cast<LDMatrixObject*> (obj)->position(); + } else - box << obj; + { + for (int i = 0; i < obj->numVertices(); ++i) + box << obj->vertex(i); + } } return box.center();