GRID Package

A GRID package contains user interface files and all related resources.

A grid package contains a Graphical User Interface. A GRID Package will be deployed to the controller and made available through a Web-server, so you can access the GUI directly from your browser.

Below is an example of the contents of a GRID Package:

├── gui_operator.grid         # gui for the operator
├── gui_maintenance.grid      # gui for maintenance crew
├── img
│   └── mylogo.svg            # some image
├── 3d
│   ├── 3dfile.glb            # 3d model in a GLTF file
│   └── model.json            # configuration of the 3d model and linking
└── ...

.grid files can be created and edited using Motorcortex-GRID.

3dfile.glb

Upload your GLTF file(s) in either .gltf or .glb format to your project. You can place your models in a subfolder if that is preferred.

model.json

Create a new JSON configuration file, specifying some additional properties of the objects and linking object properties to MOTORCORTEX parameters. See below for an example. You can download the JSON schema here v-3d-schema.json. In the JSON you can add references to your model files that should be loaded by the 3D widget.


{
  "files": [
    {
      "file": "cube.glb"
    }
  ],
  "objects": [
    {
      "name": "Cube",
      "links": [
        {
          "link": "root/Control/dummyDouble",
          "axis": "rz"
        }
      ]
    }
  ]
}

{
  "files": [
    {
      "file": "scenery.glb",
      "name": "scenery"
    },
    {
      "file": "robot.glb",
      "name": "robot"
    }
  ],
  "camera": "Camera",
  "cameraLookAt": {
    "x": 0.0,
    "y": 0.0,
    "z": 0.5
  }
  "hemisphereLight": {
    "intensity": 0.8
  },
  "spotLight": {
    "x": 1,
    "y": 1,
    "z": 5.8,
    "castShadow": true,
    "angle": 0.5,
    "intensity": 0.2,
    "penumbra": 1.5
  },
  "traceLine": [
    {
      "link": "root/Control/actualToolCoordinates",
      "channel": 0,
      "axis": "x"
    },
    {
      "link": "root/Control/actualToolCoordinates",
      "channel": 1,
      "axis": "y"
    },
    {
      "link": "root/Control/actualToolCoordinates",
      "channel": 2,
      "axis": "z"
    }
  ],
  "objects": [
    {
      "name": "Floor",
      "receiveShadow": true,
      "castShadow": false
    },
    {
      "name": "Base",
      "receiveShadow": false,
      "castShadow": true
    },
    {
      "name": "Link1",
      "castShadow": true,
      "links": [
        {
          "link": "root/Control/dummyDoubleArray6",
          "channel": 0,
          "axis": "rz"
        },
        {
          "link": "root/Control/dummyDoubleArray6",
          "channel": 4,
          "axis": "opacity",
          "gain": 1,
          "value": 1
        },
        {
          "link": "root/Control/dummyBool",
          "axis": "visible"
        }
      ]
    },
    {
      "name": "Link2",
      "links": [
        {
          "link": "root/Control/dummyDoubleArray6",
          "channel": 1,
          "axis": "rz"
        }
      ],
      "castShadow": true
    }
  ]
}