chiark
/
gitweb
/
~ianmdlvl
/
cura.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
755df59
)
Scale down/up really small or really big meshes.
author
daid
<daid303@gmail.com>
Tue, 22 Oct 2013 07:30:15 +0000
(09:30 +0200)
committer
daid
<daid303@gmail.com>
Tue, 22 Oct 2013 07:30:15 +0000
(09:30 +0200)
Cura/util/mesh.py
patch
|
blob
|
history
diff --git
a/Cura/util/mesh.py
b/Cura/util/mesh.py
index c4594dbde12f69faa5fa575acb4fa91accfcba2e..bf560b4b50a3cf532bd88835530ffec38cc2b2ef 100644
(file)
--- 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