CONTROLLING THE PROJECT


The project file controls the outlook and the behavior of the model. The file structure is as follows:

This is the so-called magic number. These 4 characters identify this file as a project file, so they will be read first and if it is not S2HB, then the rest will be discarded and the process stops there. Therefore the first line must be like this. Attention: case sensitive!

Current version number is 2. The following lines are an excerpt from a project file:

Version 2

Each line in this section is a volume set definition. In each line there are 4, or 5 entries. The 5th entry is optional. The entries are separated by one, or more TABs. They are:

Table 1: One line in the [COLORS] section

Volume set name Red color component Green color component Blue color component component Alpha channel (optional)
Regular string indicating the name of the given volume set. This must be a unique name and can't appear elsewhere in this section. Can contain any characters, except TAB (ASCII 9). Integer. This is the intensity of the red channel. Possible values: 0..255. Integer. This is the intensity of the green channel. Possible values: 0..255. Integer. This is the intensity of the blue channel. Possible values: 0..255. Float. This is the intensity of the alpha channel. Possible values: 0..1. 0: fully transparent, 1: opaque. If this entry is missing, then 1 (opaque) will be used. Currently a simple alpha blending is implemented, meaning the given volume is either opaque, or fully transparent.
The following lines are an excerpt from a project file:

COLORS

Balcony
192
192
192
Beam
87
148
67
Door
128
0
0
EPS
220
220
220
Foundation
164
164
164
Glass bricks
180
255
255
0
Ground
70
135
19

Each line in this section is a volume definition. In each line there are 6, or 7 entries. The 7th entry is optional. The entries are separated by one, or more TABs. The volume definition ends, where the [SCRIPTS] section begins, or the file ends (whicever comes first). They are:

Table 1: One line in the [VOLUMES] section

Volume ID Displacement in X direction Displacement in y direction Displacement in Z direction Geometry file name Volume name Volume description
Integer. Can be any integer number, it will not be taken into account during the presentation generation process. However this numbering can help, when the project file is opened in a text editor. So the user can easily identify the volumes by their numbers. Float. This is the displacement in X direction of the given volume in the exploded view. Interpreted in the global cartesian coordinate system. Float. This is the displacement in Y direction of the given volume in the exploded view. Interpreted in the global cartesian coordinate system. Float. This is the displacement in Z direction of the given volume in the exploded view. Interpreted in the global cartesian coordinate system. String. This is the name of the geometry file. Just the file name without folder path. Can be any valid file name. String. This is the name of the belonging volume set. This is one of the names defined in the [COLORS] section. Multiple volumes can belong to the same volume set. In that case they will be managed together interactively. However with scripting we can still access the volumes individually. String. The volume description appears when the user clicks on the given volume with the right mouse button.As long as the button is pressed, the description window is shown. This information can also be revealed with the help of the Markers and Labels. This works in both the desktop and mobile environment.
The following lines are an excerpt from a project file:

VOLUMES

1
0
-2000
0
body1out.stl
Foundation
Material: Concrete C30
2
0
-2000
0
body1out.stl
Foundation
Material: Concrete C30
3
0
-2000
0
body1out.stl
Foundation
Material: Concrete C30
4
0
-2000
0
body1out.stl
Foundation
Material: Concrete C30
5
0
-2000
0
body1out.stl
Foundation
Material: Concrete C30
6
0
-2000
0
body1out.stl
Foundation
Material: Concrete C30
6
0
-2000
0
body1out.stl
Foundation
Material: Concrete C30

This whole section is optional. Without scripts we can also make a presentation, but it will include only the base level functionalities. Scripts begin with a header, which looks like this: The script ends, where the next header begins, or the file ends. For more details, read the scripting guideline. The following lines are an excerpt from a project file:

The following lines are an excerpt from a project file:

SCRIPTS

1: Initialize
pr
sa
dh
va,0,0,0,0,0,0
2: Make foundation
sfv,564,564,1
cs,0,127,0
ds
sfv,2,2,1
cs,255,127,255
ds
sfv,1,1,1
sfv,1,1,1
mt,0,-1000,0
ds
am,0,1000,0
at

This is an example project file with some explanations included:

This is an example project file with some explanations included:

Remarks


The project file is a necessary item. It takes probably the most time to prepare (apart from the model of course). It is recommended to do the preparation in a spreadsheet software (e.g.: Excel, LibreOffice Calc) and when it is completed, just copy+paste it into a text file. Therefore the columns will be separated by TABULATOR instead of SPACE. The file must have .dat extension and this file must be the only one with such extension. If you upload multiple .dat files, then one of them will be randomly chosen as the project file.

Click here to open the documentation of project file version 1.