# Dimensioning

Roomle Configurator is capable of showing overall dimensions of the configurator, as well as axis aligned dimensions that can be defined for individual components. To enable the dimensions, allow the dimensions display in the left menu bar of the configurator - see the red marked icon in the screenshot:

dimensions

# Measurement Box

The overall dimensions of a configuration are given by an envelope of the individual components' bounding boxes. Those individual bounding boxes come from components' geometry, which can be overriden using the setBoxForMeasurement function. This function can solve errors where the actual geometry is slighly smaller or bigger, which often happens with soft upholstered furniture or cushions. Be aware, that if you have three or more components docked next to each other, the connection distance must be correctly modelled in the geometry, there is no simple way to compensate overall dimensions of imperfect geometry.

# Example: Overriding Bounding Box

See example of the setBoxForMeasurement function.

{
    "id": "catalogId:box",
    "onUpdate": "setBoxForMeasurement(Vector3f{600, 800, 1000}, Vector3f{300, 500, 700});",
    "geometry": "AddCube(Vector3f{1000, 1000, 1000});"
}

The setBoxForMeasurement function is used in the onUpdate script, and takes two vectors as arguments. First one is the dimension, the second is the offset. If you use the first vector as the argument for the AddCube function and then MoveMatrixBy with the second vector, you can visualize the bounding box.

If you load this component and activate the dimensions, they will look like this:

setbox

# Custom Dimensions

If you need to show to the end-user of the configurator distinctive dimensions of the product's parts, you can do so using the dimensionings feature. This will draw a dimensioning line which is parallel with one of the coordinate axes. You define two points on selected axis, where the configurator then shows the dimensions.

dimensionings

In this chair, the dimensionings have been used to display the seat width and the seat height. In order for the configurator to allow this, you use dimensionings attribute of the Component:

{
    "id": "catalog_id:chair_dimensions",
    ...
    "dimensionings": [
        {
            "level": 2,
            "type": "z",
            "from": "0",
            "to": "465",
            "visible": true
        },
        {
            "level": 1,
            "type": "z",
            "from": "0",
            "to": "830",
            "visible": "elementType == 'chair'"
        }
    ]
}

Attributes of the Dimensioning class:

  • level You can display the dimensionings in several layers. The higher the number, the closer to the component and smaller the dimensioning is.
  • type Can be x, y or z. Specifies on which axis the dimensioning should be displayed.
  • from Starting coordinate on the selected axis.
  • to Ending coordinate on the selected axis.
  • visible Expression defining if the dimensioning should be shown.
  • labels Works as any other labels, allowing you to override the dimensioning number in different languages. Note, that it is currently not possible to display the actual dimension computed from the from and to attributes.