Example 7

volumedata = structure:getvolumedata (0);   -- Gives the first volumedata a name
volumedata:reset ();                        -- All fragments will be cleared for next steps (Reset)
part=volumedata:addmeshtoraster();          -- Rasterize mesh and get a fragment named part

-- Create a skin

skin=part:createhull(3,0,3,3,0,3);          -- here the part gets a skin of 3 grids in +-x and +-z
                                            -- ( "createhull([-x],[-y],[-z],[x],[y],[z])" )
                                            -- the rest of the part is the core

-- Assign grid with defined cells

skin.cell=structure:findcell("Cube 1");     -- the grid "skin" gets the defined cell "cube 1"
part.cell=structure:findcell("Cube 2");     -- the grid "part" gets the defined cell "cube 2"

-- Message for the log window

structure.log("Skin & Core");               -- a message appears when the script is running

-- Names for the list in Netfabb

skin.name="Skin";                           -- skin gets the name "Skin" for the Netfabb list
part.name="Core";                           -- part gets the name "Core" for the Netfabb list

-- Message for the log window

structure:log("Script finished");           -- a message appears when the script is complete