From 66a9c6304853fb59939901041ca1472505270bf5 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 3 Mar 2016 11:52:56 +0100 Subject: [PATCH] Add not using numpy.insert explanation to ProcessSlicedObjectJob Contributes to CURA-708 --- plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py b/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py index 25530c52c2..df2e5966e9 100644 --- a/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py +++ b/plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py @@ -95,6 +95,8 @@ class ProcessSlicedObjectListJob(Job): points = points.reshape((-1,2)) # We get a linear list of pairs that make up the points, so make numpy interpret them correctly. # Create a new 3D-array, copy the 2D points over and insert the right height. + # This uses manual array creation + copy rather than numpy.insert since this is + # faster. new_points = numpy.empty((len(points), 3), numpy.float32) new_points[:,0] = points[:,0] new_points[:,1] = layer.height