3S Script objects
[3S]
The 3S Lua implementation is accessible as the 3S "script" function and its API only contain the functions documented in this chapter. No other Netfabb API calls are available in this implementation. Vice versa, the 3S API functionality is only available in the 3S module and nowhere else.
LUAStructure
Commands for the Lua Structure class
Properties
| Property |
Read/write |
Type |
Description |
| cellcount |
read-only |
number |
cell.cellcount |
| simulateafterexecution |
read/write |
Boolean |
structure.simulateafterexecution=true; |
| surfacedatacount |
read-only |
number |
surface.surfacedatacount |
| volumedatacount |
read-only |
number |
volume.volumedatacount |
Methods
| Name |
Syntax |
Description |
| executescript |
structure:executescript(name: string); |
Executes script, no return value |
| findcell |
Cell:LUABaseCell = structure:findcell(name:string); |
|
| findvolumedata |
Volumedata:LUAVolumeData = structure:findvolumedata(name:string); |
|
| findsurfacedata |
Surface: LUASurfaceData = structure:findsurfacedata("surface"); |
|
| getcell |
Cell:LUABaseCell structure:getcell(index:number); |
|
| getsurfacedata |
Surfacedata: LUASurfaceData = structure:getsurfacedata(index:Number); |
|
| getvolumedata |
Volumedata: LUAVolumeData = structure:getvolumedata(index:Number); |
|
LUAVolume Data
Commands for the LUAVolume class
Properties
| Property |
Read/write |
Type |
Description |
| fragmentcount |
read-only |
number |
volume.fragment |
| groupcount |
read-only |
number |
volume.groupcount |
| name |
read-only |
string |
volume.name="volume"; |
| originx |
read-only |
number |
volume.originx |
| originy |
read-only |
number |
volume.originy |
| originz |
read-only |
number |
volume.originz |
| rastersizex |
read-only |
number |
volume.rastersizex |
| rastersizey |
read-only |
number |
volume.rastersizey |
| rastersizez |
read-only |
number |
volume.rastersizez |
| sizex |
read-only |
number |
volume.sizex |
| sizey |
read-only |
number |
volume.sizey |
| sizez |
read-only |
number |
volume.sizez |
| visible |
read/write |
Boolean |
volume.visible=true/false; |
Methods
| Name |
Syntax |
Description |
| addgroup |
Group: LUAVolumeDataGroup = volumedata:addgroup(name:String); |
|
| addmeshtoraster |
Part: LUAVolumeDataFragment = volumedata:addmeshtoraster(); |
|
| addsurfacedata |
Volume: LUAVolumeDataFragment = volumedata:addsurfacedata(surfacefragment: SurfaceFragment, [xyoffset:Number, zoffset:Number]); |
|
| cleanup |
volumedata:cleanup(); |
No return value |
| findfragment |
Part: LUAVolumeDataFragment = volumedata:findfragment(name:String); |
|
| findgroup |
Group: LUAVolumeDataGroup = volumedata:findgroup(name:String); |
|
| getfragment |
Part: LUAVolumeDataFragment = volumedata:getfragment(name:String); |
|
| getgroup |
Group: LUAVolumeDataGroup = volumedata:getgroup(index:Number); |
|
| merge |
Part: LUAVolumeDataFragment = volumedata:merge(part1: LUAVolumeDataGroup |
LUAVolumeDataFragment, [...]); |
| reset |
volumedata:reset(); |
No return value |
| resize |
Part: LUAVolumeDataFragment = volumedata:resize(plusx, plusy, plusz, minusx, minusy, minusz:all Number); |
|
LUAVolumeDataFragment
Commands for the LUAVolumeDataFragment class
Properties
| Property |
Read/write |
Type |
Description |
| cell |
read/write |
object |
part.cell; |
| color |
read/write |
number |
49906=part.color; part.color=49906; |
| name |
read/write |
string |
"part1"=part.name; part.name="part1"; |
| rastercount |
read-only |
number |
part.rastercount; |
Methods
| Name |
Syntax |
Description |
| createexpansion |
part1: LUAVolumeDataFragment = part2:createexpansion(minusx:number, minuxy:number, minuxz:number, plusx:number, plusy:number, plusz:number, celloverride:Boolean); |
|
| createhull |
Skin: LUAVolumeDataFragment = part:createhull(minusx:number, minuxy:number, minuxz:number, plusx:number, plusy:number, plusz:number); |
|
| createprojection |
part1: LUAVolumeDataFragment = part1:createprojection(type:number, celloverwrite:Boolean); |
projection(number). 1 = +x, 2 = -x, 3 = +y, 4 = -y, 5 = +z ,6 = -z |
| divideblocks |
Blocks: LUAVolumeDataFragment = part:divideblocks(blocksizex:Number, blocksizey:Number, blocksizez:Number, translationx: Number, translation: Number, translationz:Number, fillblocks:Boolean); |
|
| generatechessboard |
part1: LUAVolumeDataFragment = part2:generatechessboard(blocksizex:Number, blocksizey:Number, blocksizez:Number, translationx: Number, translation: Number, translationz:Number) |
|
| movetogroup |
Ret:Boolean = volume:movetogroup(group1:LUAVolumeDataGroup); |
|
| randomize |
part1: LUAVolumeDataFragment = part2:randomize(blocksizex:Number, blocksizey:Number, blocksizez:Number, translationx: Number, translation: Number, translationz:Number, probability:Number) |
|
| remove |
part:remove(); |
|
LUAVolumeDataGroup
Commands for the LUAVolumeDataGroup class.
Properties
| Property |
Read/write |
Type |
Description |
| fragmentcount |
read-only |
number |
volume.fragmentcount |
| name |
read/write |
string |
"volume1"=volume.name; volume.name="volume1"; |
| subgroupcount |
read-only |
number |
Volume.subgroupcount |
Methods
| Name |
Syntax |
Description |
| addgroup |
Group: LUAVolumeDataGroup = volumedata:addgroupname:String); |
|
| findfragment |
Fragment: LUAVolumeDataFragment = volumedata:findfragment(name:string); |
|
| findgroup |
Group: LUAVolumeDataGroup = volumedata:findgroup(name:string); |
|
| getfragment |
Fragment: LUAVolumeDataFragment = volumedata:getfragment(index:number); |
|
| getgroup |
Group: LUAVolumeDataGroup = volumedata:getgroup(number:index); |
|
| movetogroup |
Ret:Boolean = part:movetogroup(group1: LUAVolumeDataGroup); |
|
LUASurfaceData
Commands for the LUASurfaceData class.
Properties
| Property |
Read/write |
Type |
Description |
| fragmentcount |
read-only |
number |
surface.fragmentcount |
| groupcount |
read-only |
number |
surface.groupcount |
| name |
read-only |
string |
"surface"=surface.name; |
| visible |
read/write |
Boolean |
surface.visible=true/false |
Methods
| Name |
Syntax |
Description |
| addgroup |
Group: LUASurfaceDataGroup = surfacedata:addgroup(group1:String); |
|
| addmesh |
Surface: LUASurfaceDataFragment = surfacedata:addmesh(); |
|
| classifydownsides |
part=surfacedata:classifydownsides(angle:Number, minsizearea:Number, samplecomponents: Boolean); |
|
| classifyupsides |
part=surfacedata:classifyupsides(angle:Number, minsizearea:Number, samplecomponents: Boolean); |
|
| cleanup |
surfacedata:cleanup(); |
|
| findfragment |
Surface: LUASurfaceDataFragment = surfacedata:findfragment("surface1:String"); |
|
| findgroup |
Group: LUASurfaceDataGroup = surfacedata:findgroup("group1":String); |
|
| getfragment |
Surface: LUASurfaceDataFragment = surfacedata:getfragment(index:Number); |
|
| getgroup |
Group: LUASurfaceDataGroup = surfacedata:getgroup(index:Number); |
|
| reset |
surfacedata:reset(); |
|
LUASurfaceDataFragment
Commands for the LUASurfaceDataFragment class
Properties
| Property |
Read/write |
Type |
Description |
| color |
read/write |
number |
49906=surface.color; surface.color=49906; |
| name |
read/write |
string |
"Surface1"=surface.name; surface.name="Surface1"; |
Methods
| Name |
Syntax |
Description |
| movetogroup |
Ret:Boolean = surface:movetogroup(group1: LUASurfaceDataGroup); |
|
LUASurfaceDataGroup
Commands for the LUASurfaceDataGroup class
Properties
| Property |
Read/write |
Type |
Description |
| fragmentcount |
read-only |
number |
surface.fragmentcount |
| name |
read/write |
string |
"surface1"=surface.name; surface.name="surface1"; |
| subgroupcount |
read-only |
number |
surface.subgroupcount |
Methods
| Name |
Syntax |
Description |
| addgroup |
Group: LUASurfaceDataGroup = surfacedata:addgroup("group1":string); |
|
| findfragment |
Surface: LUASurfaceDataFragment = surfacedata:findfragment("fragment":String); |
|
| findgroup |
Group: LUASurfaceDataGroup = surfacedata:findgroup("group1":String); |
|
| getfragment |
Surface: LUASurfaceDataFragment = surfacedata:getfragment(index:Number); |
|
| getgroup |
Group: LUASurfaceDataGroup = surfacedata:getgroup(index:Number); |
|
| movetogroup |
Ret:Boolean = surface:movetogroup(group1: LUASurfaceDataGroup); |
|
LUABaseCell
Commands for the LUABaseCell class
Properties
| Property |
Read/write |
Type |
Description |
| name |
read-only |
string |
"cell"=cell.name; |
| sizex |
read-only |
number |
cell.sizex |
| sizey |
read-only |
number |
cell.sizey |
| sizez |
read-only |
number |
cell.sizez |
Methods
None.