Skip to content

Grafik (ODB)

/api/odb.dll/odb

ODB umfasst alle Informationen zur 3D-Grafik eines Artikels: Gerenderte Bilder, Bauteillisten und Texturen.


/btg — Bauteilliste

GET

Holt die Bauteilliste (Bauanleitung) eines Artikels.

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

Parameter

ParameterPflichtBeschreibung
tokenPflichtAuthentifizierung
profileOptionalServer-Profil
manufacturerPflichtHersteller-ID
programPflichtSerien-ID
basearticlenumberPflichtGrundartikelnummer
finalarticlenumberPflichtEndartikelnummer
reinitstringOptionalReinitstring
metareinitstringOptionalMeta-Reinitstring

Antwort

JSON-Objekt mit drei Eigenschaften:

FeldBeschreibung
btgHierarchische Bauanleitung (Knoten-Baum)
blocksListe aller benötigten Bauteile (Blocknamen)
matsArray aller verwendeten Materialien

btg — Knoten

Jeder Knoten ist ein Objekt mit:

FeldBeschreibung
typeKnotentyp: top (Struktur), imp (Import), clsref (beweglich), block (Würfel), frame (Rahmen), cyl (Zylinder)
propEigenschaften des Knotens
btgnameQualifizierter Blockname (nur bei imp)
offsPosition [x, y, z] in Metern (OFML-Koordinaten)
rotRotation [x, y, z] in Grad
scaleSkalierung [x, y, z] (nur bei imp)
matMaterial-Name
layEbenenbezeichner
paramsZusätzliche Parameter je nach Typ
childsArray untergeordneter Knoten (erben Position/Rotation)

mats — Materialien

FeldOMATS-KeyBeschreibung
mnamemnameMaterial-Bezeichner
pictex imageTextur-Pfad (entfällt bei Farb-Materialien)
bumpbumpsNormal-Map Textur
roughness_imageroughness imageRoughness-Textur
metallic_imagemetallic imageMetallic-Textur
roughnessroughnessRauheitswert
metallicmetallicMetallwert
scaleuscaleUV-Skalierung U
scalevscaleUV-Skalierung V
offsetxoffsetTexturverschiebung U (Positionierung des Materialbildes)
offsetyoffsetTexturverschiebung V (Positionierung des Materialbildes)
bump_scaleunscaleNormal-Map UV-Skalierung U (Darstellungshäufigkeit pro Meter)
bump_scalevnscaleNormal-Map UV-Skalierung V (Darstellungshäufigkeit pro Meter)
bump_offsetxnoffsetNormal-Map Texturverschiebung U
bump_offsetynoffsetNormal-Map Texturverschiebung V
bump_rotnrotationNormal-Map Textur-Rotation
ambambAmbienter Farbwert (RGB, z.B. 0x303030)
difdifDiffuser Farbwert
spespeSpekularer Farbwert
mapmapMapping: auto, rauto, env
shishiGlanzwert
tratraTransparenzwert
luminanceluminanceLuminanzwert
refrrefractionBrechungswert
rotrotationTextur-Rotation
phophong_levelPhongwert
mirrormirrorSpiegeleffekt
reflreflectionReflektionswert

Beispiel

Auszug einer Bauteilliste
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"
    }
  ]
}

Hinweis

Die Bauanleitung ist hierarchisch. Ein Bauteil unterhalb eines Knotens erbt dessen Position und Rotation. Der blocks-Array enthält alle benötigten Einzelblöcke.


/block — Einzelnes Bauteil

GET

Gibt ein einzelnes Bauteil mit Geometriedaten zurück.

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

Antwort

FeldBeschreibung
NBlockname
PPosition [x, y, z] in Metern
RRotation [x, y, z] in Grad
VVertex-Punkte (3 Float-Werte je Punkt)
TTexturkoordinaten
AArray von Einzelflächen
A[].FFaces (Indizes in V, je 3 Punkte)
A[].TITexturkoordinaten-Indizes
A[].CGeschlossen? (false = mögliche Darstellungsprobleme)

Beispiel

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 — Texturen

GET

Gibt eine Textur für die 3D-Darstellung zurück.

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

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

Antwort: Stream der Textur (JPEG).


/logout — Abmelden

POST

POST /api/odb.dll/odb/logout/{TOKEN}

3D office WebKatalog 2.5 — ub.unitel GmbH