mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Do not make center dependant on object position and correct for object position in ProcessSlicedObjectListJob
This commit is contained in:
parent
ad2f839dc1
commit
d85cc0f0bf
2 changed files with 27 additions and 19 deletions
|
@ -40,8 +40,15 @@ class ProcessSlicedObjectListJob(Job):
|
|||
points = numpy.asarray(points, dtype=numpy.float32)
|
||||
points /= 1000
|
||||
points = numpy.insert(points, 1, layer.id * layerHeight, axis = 1)
|
||||
|
||||
points[:,0] -= self._center.x
|
||||
points[:,2] -= self._center.z
|
||||
|
||||
points = numpy.pad(points, ((0,0), (0,1)), 'constant', constant_values=(0.0, 1.0))
|
||||
inverse = node.getGlobalTransformation().getInverse().getData()
|
||||
points = points.dot(inverse)
|
||||
points = points[:,0:3]
|
||||
|
||||
layerData.addPolygon(layer.id, polygon.type, points)
|
||||
|
||||
mesh.layerData = layerData
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue