The base behind the "Netproject" file format is the internal Netfabb project file format called "fabbproject". The current Netproject version is Netproject 2.0. The fabbproject file is a container of entries which are streams together with a type and attached metadata. These entries include low-frequency data elements of a project (meshes, slice data, voxels data, etc.) as well as high frequency parts (trays, part instances, model positions, etc.).
When a project is saved, the low-frequency elements are updated if any change was made, while all high-frequency data elements are saved into one XML file that is finally appended to the container.
This approach leads to certain advantages and disadvantages of the project format:
- All low-frequency, high-memory elements (meshes, slices) are reused and do not impact the project size when saving often
- All high-frequency data elements are stored centrally in one XML (mesh position, mesh names, instances) and can be resaved without shaping the size much
- A full project history is always preserved
- The cleanup of the project history is not part of the file format description but can be easily done by either saving a project as another file or by performing a cleanup filter
- Project streams can be changed by incremental adding of new entry streams, allowing an easy abstraction of the read/write interface
In particular, the latter property allows to abstract the data handling interface in order to move away from using a file stream towards handling all data read/write operations via a RESTful interface on a server.
This enables:
- Flexible project handling from assembled data directly out of a database
- The saving-back of the results directly to a server
- Detecting changes and edits of the parts and handling corresponding events
- Tracking of meshes/trays/elements with flags and meta tags
A netProject file itself only contains a link to a REST endpoint, as well as a session key for authorization. Netfabb itself sends some GET/POST requests in order to retrieve the rest of the data.
The netProject right is available in all three tiers and professional. With this, the user can use the following: Load, Save, and Save As.
Netproject structure
Field | Description |
<netproject url> |
The URL to load the netproject |
<netproject protocol> |
200 = currently used protocol version |
<key> |
The UUID for downloading the netproject; used as key in the URL |
Loading the XML project data
Loading projects from a netproject file is performed via a simple HTTP GET method. The information needed is saved in the netproject file.
An example URL to be used with GET:
http://www.netfabb.com/netproject/project.php?proc=list&key=9eb93ac6919511
The result of such GET request would be an XML with the following information:
<netfabb> <readonly>0</readonly> <request>list</request> <success>1</success> <entity> <datatype>11</datatype> <size>657584</size> <uuid>60496a8e666b11e4b1b3406186bece7e</uuid> <info> <uuid>60496669666B11E4B1B3406186BECE7E</uuid> <usecount>1</usecount> </info> </entity> <entity> <datatype>1</datatype> <size>676</size> <uuid>60495502666b11e4b1b3406186bece7e</uuid> </entity> </netfabb> |
XML Information description:
Field | Description |
<readonly> |
0 = not blocked, can be saved 1 = project is blocked by other user, read only |
<request> |
Not used |
<success> |
0 = processing canceled 1 = list successfully created |
<entity> <datatype> |
File data type (see chapter 5.4) |
<entity> <size> |
Download file size |
<entity> <md5> |
Not used |
<entity><uuid> |
UUID for the download URL |
<entity><info> |
Additional information depending on the file type |
Loading the XML project entity
Each file has its own entity block within the project XML. All files that are downloaded from the server are cached in the application's cache folder: (Windows: C:\Users\USER_NAME\AppData\Roaming\netfabb\NetCache).
Netfabb uses the cached files for reloading the project.
Loading order for project files:
- Texture files
- Mesh files
- Slice files
Data type description
Field | Description |
<entity><datatype> |
0 = FABBPROJECTFILE_UNKNOWN 1 = FABBPROJECTFILE_XMLDATA 2 = FABBPROJECTFILE_MESH 3 = FABBPROJECTFILE_CUSTOMFILE 4 = FABBPROJECTFILE_STRUCTURES 5 = FABBPROJECTFILE_RASTERDATA 8 = FABBPROJECTFILE_MESHSURFACE 9 = FABBPROJECTFILE_NGS_SLICE 10 = FABBPROJECTFILE_NGMMESH 11 = FABBPROJECTFILE_STLMESH 12 = FABBPROJECTFILE_X3DMESH 13 = FABBPROJECTFILE_X3DBMESH 14 = FABBPROJECTFILE_TEXTURE |
<entity><size> |
File size |
<entity><uuid> |
UUID for the download URL |
<entity><info> |
Additional information depending on the file type |
The netfabb:// IPC Protocol
The user can use an IPC Protocol to remotely control the software. This is also called URI (Uniform Resource Identifier) scheme. For example, it is used to invoke Netfabb from a browser or inside an engine .
Usage: netfabb://cmd/COMMAND_NAME/PARAMETER
The URI scheme can handle the following COMMAND_NAME values:
COMMAND_NAME | PARAMETER | Description |
front |
- |
Brings Netfabb to front |
new |
- |
Creates a new netproject |
minimize |
- |
Minimizes Netfabb |
maximize |
- |
Maximizes Netfabb |
quit |
- |
Quits Netfabb |
loadengine: |
engine_UUID |
Loads a Netfabb engine |
callengine: |
engine_UUID |
Opens a Netfabb engine |
saveasfile/ |
file name |
Saves the netproject as the specified filename in the specified temp folder |
saveas |
- |
Opens "Save as" dialog |
save |
- |
Saves netproject in the temp folder |
screenshot |
- |
Saves a screenshot of the opened netproject to the clipboard |
savescreenshot/ |
file name |
Saves a screenshot of the opened netproject to a file |
load/ |
file name |
Loads a specified netproject file into Netfabb |
settemppath/ |
folder path |
Sets the temp path to the specified folder path |
netproject/ |
URL |
Loads a netproject from the specified URL |
addtoscene/ |
URL |
Adds a netproject from the specified URL to the Netfabb scene |
Netfabb Protocol Handler
The Netfabb Protocol Handler is a project and an executable available upon request in conjunction with a licensed add-on privilege. The protocol must be registered manually by making modifications to the Windows Registry:
- In HKEY_CLASSES_ROOT, create a new key named
netfabb. Add to this key:
- New String Value:
- Name: URL Protocol
- Data: (leave empty)
- New Key:
shell
- New Key:
open
- New Key: command
- Existing Value:
(Default)
- Data: "path/to/netfabbProtocolHandler.exe" "%1"
- New Key:
open
- New String Value:

Furthermore, remote control needs to be allowed in the Settings .
Netfabb must be running for the URL calls to work.
Using Netprojects without the Protocol Handler
While the protocol handler has been designed with netprojects in mind, it is not necessary to run this handler to load netprojects into Netfabb.
Netfabb loads netproject files, and connects to the server for retrieval of project data. When saving a project loaded through a netproject file, Netfabb connects to the server and saves the new state.
Examples
Example Webpage
Real netproject examples can be found here: http://www.netfabb.com/netproject
- Create a new netproject in the above webpage or choose an existing one and click the Load button.
- The selected project will be locked.
- Some of the explained commands from chapter 5.5 can be tested through the website mentioned above.
Netproject assembly examples
Basic Setup
A very simple project containing two different meshes would contain three different entries:
Index | Description | TypeID |
0 |
The Box as NCM Mesh |
10 (NCM_Mesh) |
1 |
The Sphere as NCM Mesh |
10 (NCM_Mesh) |
2 |
An XML containing the scene description and referring to the box and the sphere mesh |
1 (XMLData) |
Editing the scene
When the scene is edited and saved (for example, after rotating the box by a certain angle), the scene description is updated and the corresponding XML is saved in the project package.
Index | Description | TypeID |
0 |
The Box as NCM Mesh |
10 (NCM_Mesh) |
1 |
The Sphere as NCM Mesh |
10 (NCM_Mesh) |
2 |
A XML containing the first scene description and referring to the box and the sphere mesh |
1 (XMLData) |
3 |
A XML containing the second scene description and referring to the box and the sphere mesh |
1 (XMLData) |
Editing meshes
When a mesh is edited and saved (for example, after repairing the box and adding a text label) the scene description is updated with the corresponding XML, as well as the changed mesh geometry.
Index | Description | TypeID |
0 |
The Box as NCM Mesh |
10 (NCM_Mesh) |
1 |
The Sphere as NCM Mesh |
10 (NCM_Mesh) |
2 |
A XML containing the first scene description and referring to the box and the sphere mesh |
1 (XMLData) |
3 |
A XML containing the second scene description and referring to the box and the sphere mesh |
1 (XMLData) |
4 |
The edited box as NCM Mesh |
10 (NCM_Mesh) |
5 |
An XML containing the second scene description and referring to the box and sphere mesh |
1 (XMLData) |
Client-Server communication example
- Server creates a netProject file
<?xml version="1.0"?> <netproject url="http://server" protocol="200"> <key>999abc</key> </netproject>
- Server opens the file with netfabb://cmd/netproject/http://server/project.php?key=999abc&protocol=200.
- Netfabb starts and sends a HTTP GET to http://server?proc=list&key=999abc.
- Server answers with an XML
<?xml version="1.0"?> <netfabb request="list" success="1" readonly="0"> <entity datatype="10" size="12453"> <uuid>11111111111111</uuid> <info> <uuid>222222222222</uuid> <usecount>1</usecount> </info> </entity> <entity datatype="1" size="800"> <uuid>333333333333333</uuid> <info> <xmlversion>1</xmlversion> <timestamp>41127.73</timestamp> </info> </entity> </netfabb>
- Netfabb sends again an HTTP GET request to http://server?proc=download&key=999abc&uuid=333333333333333. Netfabb starts with a GET for the XML because it has the datatype 1.
- Server responds with:
<netproject> <engines> <lua> <type>slm</type> <uuid>121212121212</uuid> <engine_uuid>xxxxxx</engine_uuid <workspace_uuid>yyyyyyyyyyy</workspace_uuid> </lua> </engines> <meshtrees> <tree> <associateduuid>121212121212</associateduuid> <viewportmatrix>1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</viewportmatrix> <viewportsize>530.000000</viewportsize> <viewportcenterpoint> <X>110.0</X> <Y>100.0</Y> <Z>100.0</Z> </viewportcenterpoint> <root> <mesh> <matrix>1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</matrix> <meshentry>222222222222222</meshentry> <uuid>0645DF80953A11E68E015254A20161BA</uuid> <name>Test-Part</name> <color>8421631</color> <visible>1</visible> <selected>0</selected> <showtrianglemesh>0</showtrianglemesh> </mesh> </root> </tree> </meshtrees> </netproject>
- Netfabb sends again a GET request http://server?proc=download&key=999abc&uuid=222222222222222 because it detected in 6) that the mesh with UUID 222222222222222 is needed as well.
- Server answers with an NCM file in binary format, possibly separated into multiple parts.
- Netfabb has now opened every part from the netproject.