Actually, what I wrote earlier is partly wrong. Netfabb does indeed have the ability to run through multiple stacks present in the same script. Use the slicelist object for that. Netfabb sets one up (under the same name) at the start of a script from the slice stacks present and, optionally, selected in the project tree.
So, yes, you could indeed run through multiple slice stacks batch-style in a single script. I have corrected my earlier posts where necessary.
Your workflow would then look something like this:
- Get slice stacks into Slicing, either by slicing 3D geometry or by importing slice files.
- Optional: Select stacks to process. (If none are selected, the automatically created
slicelist object simply holds them all.)
- Run script. (Must include
addslicetotree() method, otherwise the next steps will be rather pointless.)
- Optional: Select stacks to export.
- Manually perform the export.
Note that slicing 3D geometry is in fact supported inside a script run while Slicing is active: For this, the script must load the geometry to slice from the file system:
mymesh = system:load3mf("path\\to\\file.3mf")
myslice = system:slicemesh(mymesh, 1, 0, 100, true) -- 0, 100: arbitrary Z range for demo purposes
system:addslicetotree(myslice)
After all, the script isn't required to actually make use of slice or slicelist objects set up at script launch. The only requirement here is that there is already a (dummy) slice stack present, otherwise the command to run a Lua script is disabled.