- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi I am trying to use a script to automate slicing. inspired by the example script, I wanted to display the obtained slices in the GUI using :
system:setloggingtooglwindow(true);
if tray == nil then
system:log(' tray is nil!');
else
local root = tray.root;
for mesh_index = 0, root.meshcount - 1 do
local mesh = root:getmesh(mesh_index);
local luamesh = mesh.mesh;
local MeshName = mesh.name;
local matrix = mesh.matrix;
newMesh = luamesh:dupe();
local matrix = mesh.matrix;
newMesh:applymatrix(matrix);
local outbox = newMesh:calcoutbox();
local Layersize = 0.03;
local FromZ = outbox.minz;
local ToZ = outbox.maxz;
system:log('Upper BB limit is :' .. ToZ);
local CreateInMemory = true;
local filename = PATH .. MeshName .. tostring("_") .. tostring(mesh_index) .. '.sli';
slice = system:slicemesh(newMesh, Layersize, FromZ, ToZ, CreateInMemory);
system:addslicetotree(slice);
--(0: USF, 1: CLI, 2: SLI, 3: CLS, 4: SLC);
slice:savetofile(filename, 2, Layersize, FromZ, ToZ);
end;
end;
but I do not see anything, even though the slicing seem to work well when I open the file that I exported.
Thanks,
Quentin
Solved! Go to Solution.
