Appearance
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
| Parameter | Pflicht | Beschreibung |
|---|---|---|
token | Pflicht | Authentifizierung |
profile | Optional | Server-Profil |
manufacturer | Pflicht | Hersteller-ID |
program | Pflicht | Serien-ID |
basearticlenumber | Pflicht | Grundartikelnummer |
finalarticlenumber | Pflicht | Endartikelnummer |
reinitstring | Optional | Reinitstring |
metareinitstring | Optional | Meta-Reinitstring |
Antwort
JSON-Objekt mit drei Eigenschaften:
| Feld | Beschreibung |
|---|---|
btg | Hierarchische Bauanleitung (Knoten-Baum) |
blocks | Liste aller benötigten Bauteile (Blocknamen) |
mats | Array aller verwendeten Materialien |
btg — Knoten
Jeder Knoten ist ein Objekt mit:
| Feld | Beschreibung |
|---|---|
type | Knotentyp: top (Struktur), imp (Import), clsref (beweglich), block (Würfel), frame (Rahmen), cyl (Zylinder) |
prop | Eigenschaften des Knotens |
btgname | Qualifizierter Blockname (nur bei imp) |
offs | Position [x, y, z] in Metern (OFML-Koordinaten) |
rot | Rotation [x, y, z] in Grad |
scale | Skalierung [x, y, z] (nur bei imp) |
mat | Material-Name |
lay | Ebenenbezeichner |
params | Zusätzliche Parameter je nach Typ |
childs | Array untergeordneter Knoten (erben Position/Rotation) |
mats — Materialien
| Feld | OMATS-Key | Beschreibung |
|---|---|---|
mname | mname | Material-Bezeichner |
pic | tex image | Textur-Pfad (entfällt bei Farb-Materialien) |
bump | bumps | Normal-Map Textur |
roughness_image | roughness image | Roughness-Textur |
metallic_image | metallic image | Metallic-Textur |
roughness | roughness | Rauheitswert |
metallic | metallic | Metallwert |
scaleu | scale | UV-Skalierung U |
scalev | scale | UV-Skalierung V |
offsetx | offset | Texturverschiebung U (Positionierung des Materialbildes) |
offsety | offset | Texturverschiebung V (Positionierung des Materialbildes) |
bump_scaleu | nscale | Normal-Map UV-Skalierung U (Darstellungshäufigkeit pro Meter) |
bump_scalev | nscale | Normal-Map UV-Skalierung V (Darstellungshäufigkeit pro Meter) |
bump_offsetx | noffset | Normal-Map Texturverschiebung U |
bump_offsety | noffset | Normal-Map Texturverschiebung V |
bump_rot | nrotation | Normal-Map Textur-Rotation |
amb | amb | Ambienter Farbwert (RGB, z.B. 0x303030) |
dif | dif | Diffuser Farbwert |
spe | spe | Spekularer Farbwert |
map | map | Mapping: auto, rauto, env |
shi | shi | Glanzwert |
tra | tra | Transparenzwert |
luminance | luminance | Luminanzwert |
refr | refraction | Brechungswert |
rot | rotation | Textur-Rotation |
pho | phong_level | Phongwert |
mirror | mirror | Spiegeleffekt |
refl | reflection | Reflektionswert |
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
| Feld | Beschreibung |
|---|---|
N | Blockname |
P | Position [x, y, z] in Metern |
R | Rotation [x, y, z] in Grad |
V | Vertex-Punkte (3 Float-Werte je Punkt) |
T | Texturkoordinaten |
A | Array von Einzelflächen |
A[].F | Faces (Indizes in V, je 3 Punkte) |
A[].TI | Texturkoordinaten-Indizes |
A[].C | Geschlossen? (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}