Skip to content

Graphics (ODB) ​

/api/odb.dll/odb

ODB covers all information about an article's 3D graphics: rendered images, component lists and textures.


/btg — Component list ​

GET

Gets the component list (assembly instructions) of an article.

GET /api/odb.dll/odb/btg?token={TOKEN}&manufacturer={MANU}&program={PROG}&basearticlenumber={ARTNR}&finalarticlenumber={FINNR}&reinitstring={REINIT}

Parameters ​

ParameterRequiredDescription
tokenRequiredAuthentication
profileOptionalServer profile
manufacturerRequiredManufacturer ID
programRequiredSeries ID
basearticlenumberRequiredBase article number
finalarticlenumberRequiredFinal article number
reinitstringOptionalReinit string
metareinitstringOptionalMeta reinit string

Response ​

JSON object with three properties:

FieldDescription
btgHierarchical assembly instructions (node tree)
blocksList of all required components (block names)
matsArray of all materials used

btg — Nodes ​

Each node is an object with:

FieldDescription
typeNode type: top (structure), imp (import), clsref (movable), block (cube), frame (frame), cyl (cylinder), hole (hole), diff csg / union csg (boolean difference/union), stretch (stretch)
propProperties of the node (see below)
childsArray of child nodes (inherit position/rotation)

prop — Properties ​

FieldDescription
offsPosition [x, y, z] in meters (OFML coordinates)
rotRotation [x, y, z] in degrees
btgnameQualified block name (only for imp)
scaleScaling [x, y, z] (for imp, diff csg, union csg, stretch)
matMaterial name
mmapMaterial mapping
mrotMaterial rotation
layLayer identifier
paramsAdditional parameters depending on the type
gotypeMovable part (e.g. door, drawer)

mats — Materials ​

FieldOMATS keyDescription
mnamemnameMaterial identifier
pictex imageTexture path (omitted for color materials)
bumpbumpsNormal map texture
roughness_imageroughness imageRoughness texture
metallic_imagemetallic imageMetallic texture
roughnessroughnessRoughness value
metallicmetallicMetallic value
scaleuscaleUV scaling U
scalevscaleUV scaling V
offsetoffsetTexture offset [x, y] (positioning of the material image)
bump_scaleunscaleNormal map UV scaling U (repetitions per meter)
bump_scalevnscaleNormal map UV scaling V (repetitions per meter)
noffsetnoffsetNormal map texture offset [x, y]; if missing, offset applies
bump_rotnrotationNormal map texture rotation
ambambAmbient color value (RGB, e.g. 0x303030)
difdifDiffuse color value
spespeSpecular color value
mapmapMapping: auto, rauto, env
shishiShininess value
tratraTransparency value
luminanceluminanceLuminance value
refrrefractionRefraction value
rotrotationTexture rotation
phophong_levelPhong value
mirrormirrorMirror effect
reflreflectionReflection value

Example ​

Excerpt of a component list
json
{
  "btg": [
    {
      "type": "top",
      "prop": { "offs": [0, 0, 0], "rot": [0, 0, 0] },
      "childs": [
        {
          "type": "imp",
          "prop": {
            "btgname": "_DX::WEBTI::DE_TI_D3_TI_FUSSECK_HV_GL",
            "offs": [0, 0, 0],
            "rot": [0, 0, 0],
            "scale": [1, 1, 1],
            "mat": "AZ",
            "lay": "L_KUNSTSTOFF"
          }
        }
      ]
    }
  ],
  "blocks": [
    "_DX::WEBTI::DE_TI_D3_TI_FUSSECK_HV_GL",
    "_DX::WEBTI::DE_TI_D3_TI_FUSSECK_HV_KAPPE",
    "_DX::WEBTI::DE_TI_D3_TI_FUSSECK_HV_SA1"
  ],
  "mats": [
    {
      "mname": "S_ANT",
      "pic": "materials/_DX/S_ANT.JPG",
      "scaleu": 20,
      "scalev": 20,
      "amb": "0x52575c",
      "dif": "0x52575c",
      "spe": "0x313131",
      "map": "auto"
    },
    {
      "mname": "HOLZ_BUCHE",
      "pic": "materials/_DX/HOLZ_BUCHE.JPG",
      "scaleu": 10,
      "scalev": 10,
      "amb": "0xbd926b",
      "dif": "0xbd926b",
      "spe": "0x303030",
      "map": "auto"
    }
  ]
}

Note

The assembly instructions are hierarchical. A component below a node inherits that node's position and rotation. The blocks array contains all required individual blocks.


/block — Single component ​

GET

Returns a single component with its geometry data.

GET /api/odb.dll/odb/block/{BLOCKNAME}?token={TOKEN}

With the extension .obj, .dae or .3ds, the call returns the component in that format.

Response ​

FieldDescription
NBlock name
PPosition [x, y, z] in meters
RRotation [x, y, z] in degrees
VVertex points (3 float values per point)
TTexture coordinates
AArray of individual surfaces
A[].FFaces (indices into V, 3 points each)
A[].TITexture coordinate indices
A[].CClosed? (false = possible display problems)

Example ​

json
{
  "N": "_DX::WEBTI::DE_TI_D3_TI_FUSSECK_HV_GL",
  "P": [0.0334, -0.0334, 0.0025],
  "R": [0, 0, 0],
  "V": [[-0.025, -0.02, 0.0025], [-0.025, 0.02, 0.0025]],
  "T": [[-0.4464, -0.495, 1], [-0.4464, -0.5, 1]],
  "A": [
    {
      "C": true,
      "F": [[68, 132, 133], [68, 133, 66]],
      "TI": [[0, 1, 2], [0, 2, 3]]
    }
  ]
}

/materials — Textures ​

GET

Returns a texture for the 3D display.

GET /api/odb.dll/odb/materials/{MANUID}/{MATERIALNAME}.JPG?token={TOKEN}

Example: .../materials/_DX/HOLZ_BUCHE.JPG?token={TOKEN}

Response: Stream of the texture (JPEG).

3D office WebKatalog 2.5 — ub.unitel GmbH