Share

Slicing

[Desktop Automation]

Properties

Property Read/write Type Description
slicetypecount Read Integer Number of available SliceInput object types. A SliceInput object is a Slice object that was created through a processing filter, such as offsetting or filling.

Back to top

Methods

Name Syntax Description
addslicetotree system:addslicetotree(slice:SliceObject) Adds a slice stack to the current platform's Slices tree section. Important: Scope separation applies. Only scripts launched from within Slicing can do this.
createemptylayer slicelayer = system:createemptylayer() Returns an empty Slicelayer object
createsliceexporter SliceExporter = system:createsliceexporter(type:String) Creates a SliceExporter object. Currently the only implemented type is cls.
createslicelist SliceListObject = system:createslicelist() Creates a new empty Slicelist object. This is equivalent to a selection of multiple slice stacks and the various applications of such a multi-selection.
creategroupedslice Slice = system:creategroupedslice(Slice or Slicelist object, …) Takes a variable list of either Slice or SliceList objects and returns a combined Slice object
createslicebuilder SliceBuilder = system:createslicebuilder(layercount:Integer, layersize:Number, minz: Number) Creates a Slicebuilder object. layercount and layersize must be positive and non-zero.
createsliceintersection Slice = system:createsliceintersection(Slice or Slicelist object, …) Creates an intersection of Slice or SliceList objects and returns a slice object
intersectslices Slice = system:intersectslices(Slice or Slicelist object, …) Intersects Slice or SliceList objects and returns a single object
loadslice Slice = system:loadslice(filename:String; type:integer) Loads a slice from file. Types are: 0 = USF, 1 = CLI, 2 = SLI, 3 = CLS, 4 = SLC
slicemesh system:slicemesh(mesh, layersize, fromZ, toZ, createInMemory:Boolean) Slices a mesh with the given parameters. Function returns a Slice object (a slice stack). Important: Scope separation applies. Scripts launched from within Slicing does not have access to 3D geometry already loaded in Netfabb.
unifyslices Slice = system:unifyslices(Slice or Slicelist object, …) Unifies Slice or SliceList objects and returns a slice object
createsliceinputbyindex sliceInput = system:createsliceinputbyindex(index:integer) Returns new SliceInput of given index. Index must be lower than system.slicetypecount.
createsliceinput sliceInput = system:createsliceinput(type: String) Returns new SliceInput object of the given type

Back to top

Examples

List available SliceInput object types

message = "Available SliceInput object types with index, type, and caption\n"
for i = 0, system.slicetypecount-1, 1 do
    sliceInput = system:createsliceinputbyindex(i)
    message = message .. i .. " - " .. sliceInput.slice_type .. " (" .. sliceInput.slice_caption .. ")\n"
end
system:messagedlg(message)

Result:

0 - SLICECOMMANDER_POINTREDUCTION_TITLE (Reduce points)
1 - SLICEFILETYPE_OFFSET (Offset)
2 - NTC_OPT_DOWNSKIN (Downskin)
3 - SLICEFILETYPE_MULTILASERSPLIT (Multilaser split)
4 - SLICEFILETYPE_MULTILASERREGIONSPLIT (Multilaser region split)
5 - SLICEFILETYPE_MULTILASERQUADRANTSPLIT (Multilaser quadrant split)
6 - SLICEFILETYPE_LASEREXTRACTION (Laser extraction)
7 - SLICEFILETYPE_FILLING_QUADISLANDS (Quad islands)
8 - SLICEFILETYPE_SIMPLEHATCHES (Simple hatching)
9 - SLICEFILETYPE_FILLING_STRIPES (Stripe filling)
10 - SLICEFILETYPE_FILLING_RADIALHATCHING (Radial hatching)
11 - SLICEFILETYPE_HATCHCONVERSION (Hatch conversion)
12 - SLICEFILETYPE_CONTOURSEGMENTATION (Contour segmentation)
13 - SLICEFILETYPE_FLOWSEGMENTATION (Flow segmentation)
14 - SLICEFILETYPE_HATCHEXTENSION (Hatch extension)
15 - SLICEFILETYPE_FILLING_CHECKERBOARD (Checkerboard hatching)
16 - SLICEFILETYPE_SORTED (Sort contours)
17 - SLICEFILETYPE_LAYERDUPLICATION (Layer duplication)
18 - SLICEFILETYPE_THINWALLS (Thin wall detection)
19 - SLICEFILETYPE_THINWALLS_MEDIAL (Thin wall detection)
20 - SLICEFILETYPE_MIRROREDXY (Mirrored slice)
21 - SLICEFILETYPE_TOOLPATHOPT (Toolpath optimization)

Back to top

Was this information helpful?