.ops
The .ops
file defines a 3D scene compatible with ARCHIMED-φ and AMAPStudio. The file is used to define a scene, and place 3D objects inside. The .ops
file used in ARCHIMED-φ is a subset of the .ops
file from AMAPStudio, meaning they don’t implement all the features (e.g. chaining).
Here is the content of an example file for a scene with two coffee trees:
# T xOrigin yOrigin zOrigin xSize ySize flat
T 0 0 0 2 2 flat
#[Archimed] coffee
#sceneId objectId FilePath x y z scale inclinationAzimut inclinationAngle rotation
1 1 opf/P6_Ru_ii_L2P02.opf 0 0 0 0 0 0 0
1 2 opf/P6_Ru_ii_L2P02.opf 1 1 0 0 0 0 0
You can download the example file here:
Here is a step-by-step description of the content of the .ops
file.
Comments can be added by starting a line with a hash sign: #
.
The first line defines the terrain properties, with its dimensions in X and Y, the lower value for Z, and the slope:
T 0 0 0 2 2 flat
The example .ops
file attached has a comment line before this line to remember the order of the values.
The values in the terrain line defines respectively:
- T
is used as an identifier for the terrain properties line. It is mandatory.
- The coordinates of the origin for X, Y and Z values. These values are typically set to 0.
- The coordinates of the boundaries in X and Y.
- The slope of the terrain. At the moment, only a flat
scene is allowed in ARCHIMED-φ. This is due to the toricity property of the scene, but future development will allow sloped terrains for non-toric scenes.
The terrain line is optional in AMAPStudio, but mandatory for ARCHIMED-φ.
Then comes a special comment read by ARCHIMED-φ but not AMAPStudio. It starts with a #
so it is not read by AMAPStudio, and a special sign [Archimed]
:
#[Archimed] coffee
This special line defines the functional group of the plant(s) defined afterward. Here we have two plants that both are from the same group: coffee. This group name is used by ARCHIMED-φ to link each plant to the group models (see the documentation about the models).
Then comes the information to place the plants in the scene:
#sceneId objectId FilePath x y z scale inclinationAzimut inclinationAngle rotation
1 1 opf/P6_Ru_ii_L2P02.opf 0 0 0 0 0 0 0
1 2 opf/P6_Ru_ii_L2P02.opf 1 1 0 0 0 0 0
The first line is a comment here. The second and third lines describe a new plant in the scene. Each line specifies ten values:
.opf
or .gwa
);The parameters that are not used in ARCHIMED-φ are still mandatory in the .ops
file so the scene can be opened and used in AMAPStudio before and after a simulation.
It is possible to add plants from different functional groups in the scene by chaining their functional group name and their positions such as:
#[Archimed] coffee
#sceneId objectId FilePath x y z scale inclinationAzimut inclinationAngle rotation
1 1 opf/coffee.opf 0 0 0 0 0 0 0
1 2 opf/coffee.opf 1 1 0 0 0 0 0
#[Archimed] elaeis
#sceneId objectId FilePath x y z scale inclinationAzimut inclinationAngle rotation
1 3 opf/elaeis.opf 0.5 0.5 0 0 0 0 0
1 4 opf/elaeis.opf 1.5 1.5 0 0 0 0 0
You can find the example .ops
file here:
One last row can be added to the .ops
file for scene chaining in AMAPStudio. This line is optional and is not used by ARCHIMED-φ anyway:
#motherId sceneId date
-1 1 1
The first value gives the id of the parent scene, -1 for the first scene (no parent), the second value gives the id of the scene, and the last value gives the date of the scene.
For more details, the AMAPStudio definition of the .ops
file is available here.