mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Initial commit for passing mesh names to CuraEngine
This commit is contained in:
parent
6740c2bee9
commit
b66558f97a
3 changed files with 22 additions and 2 deletions
|
@ -29,6 +29,8 @@ message Object
|
|||
bytes normals = 3; //An array of 3 floats.
|
||||
bytes indices = 4; //An array of ints.
|
||||
repeated Setting settings = 5; // Setting override per object, overruling the global settings.
|
||||
//PJP
|
||||
string name = 6;
|
||||
}
|
||||
|
||||
message Progress
|
||||
|
|
|
@ -256,7 +256,7 @@ class StartSliceJob(Job):
|
|||
mesh_data = object.getMeshData()
|
||||
rot_scale = object.getWorldTransformation().getTransposed().getData()[0:3, 0:3]
|
||||
translate = object.getWorldTransformation().getData()[:3, 3]
|
||||
|
||||
|
||||
# This effectively performs a limited form of MeshData.getTransformed that ignores normals.
|
||||
verts = mesh_data.getVertices()
|
||||
verts = verts.dot(rot_scale)
|
||||
|
@ -268,7 +268,7 @@ class StartSliceJob(Job):
|
|||
|
||||
obj = group_message.addRepeatedMessage("objects")
|
||||
obj.id = id(object)
|
||||
|
||||
obj.name = object.getName()
|
||||
indices = mesh_data.getIndices()
|
||||
if indices is not None:
|
||||
flat_verts = numpy.take(verts, indices.flatten(), axis=0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue