From: daid Date: Tue, 22 Oct 2013 07:30:15 +0000 (+0200) Subject: Scale down/up really small or really big meshes. X-Git-Tag: 13.11.2~42 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;ds=sidebyside;h=b7cb8f9023fe441fcb4aa500620a605e43b7b690;p=cura.git Scale down/up really small or really big meshes. --- diff --git a/Cura/util/mesh.py b/Cura/util/mesh.py index c4594dbd..bf560b4b 100644 --- a/Cura/util/mesh.py +++ b/Cura/util/mesh.py @@ -52,6 +52,14 @@ class printableObject(object): for m in self._meshList: m._calculateNormals() self.processMatrix() + if numpy.max(self.getSize()) > 10000.0: + for m in self._meshList: + m.vertexes /= 1000.0 + self.processMatrix() + if numpy.max(self.getSize()) < 1.0: + for m in self._meshList: + m.vertexes *= 1000.0 + self.processMatrix() def applyMatrix(self, m): self._matrix *= m