Data model of the .meb standard
Status:
[x]ready — version 3.0.0
This document describes the hierarchy of objects in a .meb file, the relations between them and the general assumptions of the structure. The detailed field specification is in 03-specification.md.
Object tree
MebFile
├── meta ← file metadata (standard version, date, generator)
├── project ← project data
│ └── designer ← designer data
├── scene[] ← scene graph — the node tree, an array of root nodes (3.0.0)
│ └── node (recursion)
│ ├── id ← unique within the whole file
│ ├── name ← free-form label
│ ├── type: group | panel | hardware | solid
│ ├── position {x, y, z} ← relative to the parent, mm (without them: a hardware item without a position, a file with has_3d: false)
│ ├── rotation {x, y, z} ← Euler XYZ, degrees, range (−180°, 180°]
│ ├── production_id ← optional, e.g. "01.02"
│ ├── comment_refs[] ← references to comments[].id
│ │
│ ├── [when type: group]
│ │ ├── role: cabinet ← optional; "cabinet" = cabinet, none = drawer, subassembly, set
│ │ ├── front: "-Y" | "+Y" | "-X" | "+X" ← front of the group in its coordinate system, default "-Y", editable
│ │ └── children[] ← children: groups, panels, hardware and solids
│ │
│ ├── [when type: solid] ← 2.3.0: any geometry with a material; does not go to production
│ │ ├── material_ref ───────────────────► materials_catalog[].id
│ │ └── geometry
│ │ ├── type: extrusion | mesh | polyhedron
│ │ ├── [extrusion] outline (path, closed), holes[] (path, closed), thickness
│ │ ├── [mesh] mesh_ref ─────────────► meshes_catalog[].id
│ │ └── [polyhedron] vertices[] {id, x, y, z}, edges[] {id, start, end, fold}, faces[] {id, loops[][]} ← 2.4.0
│ │
│ ├── [when type: panel] ← 3.0.0: a panel is a tree node, a leaf in any group or at the root
│ │ ├── id, name
│ │ ├── dimensions {length, width, thickness}
│ │ ├── position {x, y, z}
│ │ ├── rotation {x, y, z}
│ │ ├── production_id
│ │ ├── material_ref ──────────────────► materials_catalog[].id
│ │ ├── grain: along_length | along_width | none
│ │ ├── grain_group_ref ─────────────────► grain_groups[].id ← optional
│ │ ├── bend ← optional, only for bent panels
│ │ │ ├── axis: width | length ← bend axis
│ │ │ ├── radius ← mm
│ │ │ ├── radius_type: inner | outer
│ │ │ └── angle ← arc degrees
│ │ ├── composite ← optional, a panel glued from layers
│ │ │ └── layers[] ← min. 2 layers; sum(thickness) = dimensions.thickness
│ │ │ ├── order ← 1 = bottom/back, n = top/front
│ │ │ ├── material_ref ───────────► materials_catalog[].id
│ │ │ └── thickness ← layer thickness, mm
│ │ ├── edging
│ │ │ ├── xL: { ref } | null ← x=L (top)
│ │ │ ├── x0: { ref } | null ← x=0 (bottom)
│ │ │ ├── yW: { ref } | null ← y=W (left)
│ │ │ ├── y0: { ref } | null ← y=0 (right)
│ │ │ ├── sequence: "width_first" | "length_first" ← pair banded first
│ │ │ └── {xL,x0,yW,y0}.ref ─► edging_catalog[].id
│ │ ├── edge_finish ← optional (2.2.0), edge without edge banding: sanding + chamfer
│ │ │ ├── xL, x0, yW, y0: { sanded, chamfer } | null ← chamfer = 45° chamfer at the face and the back, mm
│ │ │ └── no field = the file says nothing; null = edge without a finish; excludes edging on that edge
│ │ ├── finishes[] ← optional, surface finishes
│ │ │ └── finish
│ │ │ ├── surface: face_top | face_bottom |
│ │ │ │ edge_xL | edge_x0 | edge_y0 | edge_yW
│ │ │ ├── type: veneer | laminate | paint
│ │ │ ├── material_ref ───────────► materials_catalog[].id
│ │ │ ├── order ← order of application (1 = first)
│ │ │ └── comment_refs[]
│ │ ├── comment_refs[] ← references to comments[].id
│ │ └── operations
│ │ ├── bevels[]
│ │ │ └── bevel
│ │ │ ├── edge_side: xL | x0 | yW | y0 ← base side
│ │ │ │ OR on_segment ──► outline/hole segments[].id (line only)
│ │ │ ├── from_face: top | bottom ← plane it is measured from
│ │ │ ├── angle ← degrees (0=straight, 45=bevel)
│ │ │ ├── leave ← mm of material left straight
│ │ │ ├── depth ← mm of bevel depth, optional
│ │ │ │ (omitted = through the rest of the thickness)
│ │ │ ├── edging ← optional, edge banding on the bevel
│ │ │ │ └── ref ────────────────► edging_catalog[].id
│ │ │ └── comment_refs[] ← references to comments[].id
│ │ ├── drillings[]
│ │ │ └── drilling
│ │ │ ├── drilling_ref ───────► drilling_catalog[].id
│ │ │ ├── type: face | edge
│ │ │ ├── [face] face: top | bottom
│ │ │ ├── [edge/side] edge_side: xL | x0 | yW | y0
│ │ │ ├── [edge/outline] on_segment ──► outline/hole path segments[].id
│ │ │ ├── x ← face; edge_side y0/yW (along the length)
│ │ │ ├── y ← face; edge_side xL/x0 (along the width)
│ │ │ ├── s ← edge/outline (along the segment)
│ │ │ ├── z ← edge: position in the thickness from the face (default thickness/2)
│ │ │ ├── hardware_instance_ref ──► id of a hardware node ← optional (2.3.0), hardware machining operation
│ │ │ └── comment_refs[] ← references to comments[].id
│ │ └── routings[]
│ │ └── routing
│ │ ├── type: slot | outline | hole | pocket | biscuit
│ │ ├── [slot] section: simple | profiled ← explicit section discriminator
│ │ ├── [slot] face: top | bottom ← surface: machined face; edge: reference corner
│ │ ├── [slot/surface] path ← trajectory of the slot axis
│ │ ├── [slot/edge] edge_side: xL | x0 | yW | y0
│ │ │ OR on_segment ──► outline/hole segments[].id
│ │ ├── [slot/edge] start, end ← optional (along the edge/segment)
│ │ ├── [slot/simple] width, depth, offset ← rectangle; tangential offset, default 0
│ │ ├── [slot/profiled] profile_ref ─────────► profiles[].id (full geometry, no offset)
│ │ ├── [outline] path ← closed outline of the finished shape; cut segments marked machined (difference vs rectangle)
│ │ │ straight wall; wall profile/bevel = slot/bevel on_segment
│ │ ├── [outline] edging ← optional { ref, walls, pre_trim } OR an array of entries (2.1.0: different materials)
│ │ │ walls: "all" | [base sides and/or segments[].id]
│ │ ├── [outline] edge_finish ← optional { walls, sanded, chamfer } (2.2.0): sanding + chamfer of walls without edge banding
│ │ ├── [hole] path ← closed outline inside the panel
│ │ ├── [hole] edging ← optional { ref, walls } OR an array (2.1.0); pre_trim not allowed
│ │ ├── [hole] edge_finish ← optional { walls, sanded, chamfer } (2.2.0)
│ │ ├── [pocket] face: top | bottom
│ │ ├── [pocket] depth ← mm below the face (flat bottom, straight walls; wall profile = separate slot)
│ │ ├── [pocket] path ← closed outline
│ │ │ ├── start {x, y} ← absolute, from the bottom-right corner
│ │ │ ├── closed: bool ← true = closed outline, false = open
│ │ │ └── segments[]
│ │ │ └── segment
│ │ │ ├── type: line | arc | bezier
│ │ │ ├── id ← optional (required when targeted by on_segment)
│ │ │ ├── [line] end {x, y}
│ │ │ ├── [arc] center {x, y}, radius,
│ │ │ │ angle_start, angle_end,
│ │ │ │ clockwise: bool
│ │ │ └── [bezier] cp1 {x, y}, cp2 {x, y},
│ │ │ end {x, y}
│ │ ├── [biscuit] face (on the face) OR edge_side (side)
│ │ │ OR on_segment (outline)
│ │ ├── [biscuit] x, y / s ← biscuit axis (§9.2.1/§9.2.2)
│ │ ├── [biscuit] z ← axis depth from the face (edge; default thickness/2)
│ │ ├── [biscuit] angle ← optional
│ │ ├── [biscuit] size_ref ─────────────────► biscuit_catalog[].id
│ │ ├── finishes[] ← optional, finish of the milled surface
│ │ │ └── { material_ref ──► materials_catalog[].id, order }
│ │ ├── hardware_instance_ref ──► id of a hardware node ← optional (2.3.0), hardware machining operation
│ │ └── comment_refs[] ← references to comments[].id
│ │
│ └── [when type: hardware] ← 3.0.0: a hardware item is a tree node, a leaf in any group or at the root
│ ├── hardware_ref ───────────────────► hardware_catalog[].id
│ ├── quantity ← 1 when the hardware item has a position
│ ├── position, rotation ← optional; without them, a list entry with a quantity in its group
│ ├── material_ref ───────────────────► materials_catalog[].id ← when position
│ └── geometry ← when position; like a solid
│
├── drilling_catalog[]
│ └── drilling_item
│ ├── id, code, name
│ ├── diameter ← mm
│ ├── depth ← mm, optional when through: true
│ └── through: true | false
│
├── materials_catalog[]
│ └── material
│ ├── id, code, name
│ ├── manufacturer
│ ├── category: board | veneer | laminate | paint | surface
│ ├── furniture: true | false ← 2.3.0, furniture material; default true
│ │
│ ├── [board / veneer / laminate]
│ │ ├── thickness ← nominal thickness, mm
│ │ └── grain: along_length | along_width | none
│ │
│ ├── [board]
│ │ └── sheet ← required
│ │ ├── length ← sheet length, mm
│ │ ├── width ← sheet width, mm
│ │ └── trim ← trim per edge, mm
│ │
│ ├── [paint]
│ │ ├── color_system ← e.g. "RAL", "NCS"
│ │ ├── color_code ← e.g. "9016", "S 0500-N"
│ │ └── description ← any string, e.g. "biały połysk 90%"
│ │
│ └── [surface] ← 2.3.0, appearance only: plaster, steel, glass; furniture: false
│ └── color ← #RRGGBB
│
├── edging_catalog[]
│ └── edging_item
│ ├── id, code, name
│ ├── texture: true | false
│ ├── thickness ← edge band thickness, mm
│ ├── height ← edge band height, mm
│ └── material_ref ──────────────► materials_catalog[].id
│
├── hardware_catalog[]
│ └── hardware_item
│ ├── id, code, name
│ └── manufacturer
│
├── meshes_catalog[] ← 2.3.0, meshes of solids and hardware, always embedded in the file
│ └── mesh
│ ├── id, name
│ ├── positions[] ← x, y, z in sequence, mm, in the solid's coordinate system
│ └── triangles[] ← indices in threes, from 0
│
├── comments[]
│ └── comment
│ ├── id
│ ├── author ← optional
│ ├── date ← optional, ISO 8601
│ └── text
│
├── grain_groups[] ← grain continuity groups — blocks of rows
│ └── grain_group
│ ├── id, name
│ ├── material_ref ───────────────────────────────► materials_catalog[].id
│ ├── orientation ← grain relative to the front: vertical (default) | horizontal ← 2.5.0
│ ├── kerf ← kerf between panels, mm
│ ├── members[] ← panels of the block: row along the grain and position in the row
│ │ └── { panel_ref ───────────► id of a panel node (type: panel), row, order }
│ │ ← row: rows 1…n (2.5.0; none = row equal to order, position 1)
│ │ ← order: position in the row 1…m from the starting edge
│ └── rows[] ← row alignment ← 2.6.0
│ └── { row, align } ← align: start (default) | center | end
│
└── profiles[] ← catalog of geometric edge profiles
└── profile
├── id, code, name
└── path ← resulting cut geometry (line/arc/bezier segments)
← (0,0) = corner (face ∩ edge_side or face ∩ outline wall)
← X+ = along the face into the material, Y+ = into the thickness
← the material before cutting occupies the quadrant X≥0, Y≥0Relations and references
| Field | Reference to | Type |
|---|---|---|
drilling.drilling_ref | drilling_catalog[].id | required |
on_segment (drilling / biscuit / slot / bevel) | id of an outline/hole segment — unique within the panel | required for an outline edge |
panel.material_ref | materials_catalog[].id | required |
panel.edging.{side}.ref | edging_catalog[].id | required when side != null |
edging_catalog[].material_ref | materials_catalog[].id | required |
routing.profile_ref | profiles[].id | required for slot section: profiled |
routing.size_ref | biscuit_catalog[].id | required for type: biscuit |
routing.edging.ref | edging_catalog[].id | required when the routing has edging |
hardware.hardware_ref (hardware node) | hardware_catalog[].id | required |
hardware.material_ref | materials_catalog[].id | required when the hardware item has position |
solid.material_ref (solid node) | materials_catalog[].id | required |
geometry.mesh_ref | meshes_catalog[].id | required when type: mesh |
geometry.edges[].start, end, geometry.faces[].loops[][] | vertices[].id of the same polyhedron | required when type: polyhedron |
{drilling/routing}.hardware_instance_ref | id of a hardware node with a position — also in another group or cabinet | optional |
panel.grain_group_ref | grain_groups[].id | optional |
panel.composite.layers[].material_ref | materials_catalog[].id | required when the layer exists |
grain_group.members[].panel_ref | id of a panel node in the tree | required |
grain_group.material_ref | materials_catalog[].id | required |
{node/drilling/routing}.comment_refs[] | comments[].id | optional |
All ids must be unique within their list. Cross-references between lists are one-way. The exception is grain_groups[], which refers through members[].panel_ref to panels in the scene graph — it is the only catalog list with a back-reference to scene[].
Coordinate system
Cascade principle
Every object defines its position and rotation relative to its parent. The global position is determined by composing the transformations of all ancestors in the tree:
global_position = T(group_1)
× T(group_2) ← e.g. a set of cabinets
× T(group_3) ← a cabinet (a group with the cabinet role)
× T(group_4) ← a drawer
× T(panel)This is the standard scene graph model, directly compatible with Three.js (Object3D), Babylon.js and other 3D engines.
Rotation
Euler angles in XYZ order, in degrees. For typical furniture elements only multiples of 90° are used, which eliminates the practical problem of gimbal lock.
Canonical panel orientation — the L / W / T convention
A panel is always described as it lies in the cutting plan view / on the machine table: face up, length vertical, width horizontal, regardless of its actual position in the assembled cabinet. This is the only, common convention for the whole standard — the .meb file, 2D previews, 3D previews and cutting software. The system is right-handed, consistent with the 3D scene (three.js): the 2D face view is not a mirror image of the 3D view. There is no transposition or mirroring between layers.
Dimensions and coordinates:
length(L) — length, vertical (increases upward); the default grain direction (along_length). The operation coordinatexruns along the length,x ∈ [0, L].width(W) — width, horizontal (increases to the left). The operation coordinateyruns along the width,y ∈ [0, W].thickness(T) — thickness, the Z axis (Z+= top face /face: top,Z−= bottom face /face: bottom).- origin
(0,0)= the bottom-right corner of the face (x=0at the bottom,y=0on the right).
Note: the
xcoordinate is vertical (because the length is vertical) andyhorizontal — deliberately, in line with the data (xalways measures the length,ythe width). This is not the classic “x=horizontal”. The origin in the bottom-right corner (yincreases to the left) ensures that, looking at the face (Z+), the system is right-handed — identical to the 3D scene, without mirroring.
x = length (L) ▲ (vertical; grain “along_length”)
│
┌────────────── xL ─────────────┐ ── x = L (top)
│ │
yW │ FACE │ y0
│ face: top (Z+) │
│ │
└────────────── x0 ─────────────┘ ── x = 0 (origin, bottom-right)
y = W ◄─────────────────────────────── y = 0
(horizontal; width increases to the left)
SIDE EDGES (edge_side):
y0 = y=0 (on the right), yW = y=W (on the left) → LENGTH edges (vertical sides, run along length)
xL = x=L (at the top), x0 = x=0 (at the bottom) → WIDTH edges (horizontal sides, run along width)
OPERATION COORDINATES (drillings / millings / biscuits on the face):
x ∈ [0, L] — along the length (vertical, from the bottom)
y ∈ [0, W] — along the width (horizontal, from the right)
z ∈ [0, T] — depth from the face (edge; measured into the thickness, opposite to Z+)Rules:
- Dimensions:
dimensions.length(L) ×dimensions.width(W) ×dimensions.thickness(T). - Grain:
along_length= along the length (vertical,xaxis);along_width= along the width (horizontal,yaxis);none= no grain. - Edges
edge_side:y0/yWare the length edges;xL/x0are the width edges. The names are anchored in the coordinate (y0=y=0,yW=y=W,xL=x=L,x0=x=0) — independent of the view orientation. - All operation coordinates (
face,edge_side,on_segment,x,y,z,s) refer to this canonical system — they are independent of the panel'srotationin the tree. A milling operation onface: topalways concerns the top face, even when the panel stands vertically in the assembled cabinet. The edge depthzis always measured from the face.
Mapping to the 3D scene axes (for implementations)
The local 3D frame of the panel (for position/rotation in the scene): length → X axis, width → Y axis, thickness → Z axis. The “vertical” length applies only to the 2D view (cutting plan/diagram) — in the 3D scene rotation maps this frame onto the parent's coordinate system (see “Group coordinate system and front”). Mapping of the edges to the local faces:
edge_side | kind | local face |
|---|---|---|
y0 | length edge | Y− (y = 0) |
yW | length edge | Y+ (y = W) |
xL | width edge | X+ (x = L) |
x0 | width edge | X− (x = 0) |
Group coordinate system and front
Every group — a cabinet, a drawer, a set — has its own local coordinate system in which the positions of its children are described:
Z+ (top)
│
│ Y+ (rear)
│ /
│ /
│ /
└────── X+ (right)
front = side Y- (doors / drawer fronts) — default
cabinet origin = bottom-left-front corner of the outline (outer)The group's front field states on which side of its coordinate system the front lies — default "-Y", like the front of a block in a design program; it is editable for programs whose coordinate system has the front on a different side, and for corner cabinets. The orientation of the group in the scene is carried by its rotation.
Panel positions (e.g. position: {x: 18, y: 0, z: 360}) are given in the parent's coordinate system — a shelf at a height of 360 mm has z: 360 regardless of where the cabinet stands in the room.
The production drawing of a cabinet (a group with the cabinet role) is always generated from its own coordinate system — the cabinet's rotation in the tree is ignored by production software.
Solid coordinate system
A solid and a hardware item with a position have their own right-handed coordinate system, placed by position and rotation relative to the parent — a group or the root. An extrusion outline lies in the XY plane of the solid and is extruded from Z = 0 to Z = thickness; the vertices of a mesh and of a polyhedron are given in the same coordinate system.
Scene graph hierarchy — example
scene
└── group "Mieszkanie Kowalskich" production_id: "01"
├── group "Kuchnia" production_id: "01.01"
│ ├── solid "Ściana północna" ← solid: no production_id
│ ├── group "Szafki wiszące" production_id: "01.01.01"
│ │ ├── group "W60" role: cabinet production_id: "01.01.01.01"
│ │ │ position: {x:0, y:0, z:0}
│ │ ├── group "W60" role: cabinet production_id: "01.01.01.01" ← identical
│ │ │ position: {x:600, y:0, z:0}
│ │ └── group "W80" role: cabinet production_id: "01.01.01.02"
│ │ position: {x:1200, y:0, z:0}
│ ├── group "Szafki stojące" production_id: "01.01.02"
│ │ └── group "S60" role: cabinet production_id: "01.01.02.01"
│ │ ├── panel "Bok lewy" production_id: "01.01.02.01.01"
│ │ ├── group "Szuflada górna" production_id: "01.01.02.01.02"
│ │ │ └── panel "Front" production_id: "01.01.02.01.02.01"
│ │ └── hardware "Zawias" ← hardware: no production_id
│ └── panel "Blat" production_id: "01.01.03" ← panel above the set, without a cabinet
└── group "Łazienka" production_id: "01.02"
└── group "L-umywalka" role: cabinet production_id: "01.02.01"The two W60 cabinets have the same production_id (01.01.01.01) because they are structurally identical — they differ only in position. There is no cabinet inside a cabinet at any depth — a drawer is a group without a role.
Structural identity rules
Two nodes are structurally identical (they receive the same number at their level) if they have equal:
For panels (panel):
dimensionsmaterial_refgraingrain_group_ref+rowandorderin the group ← two panels in different groups or in different places (row, position) in the same group are structurally differentedging(all edges +sequence)edge_finish(all edges)operations(all drillings and millings)
For groups (group, also with the cabinet role):
- role
- set of children (by their
production_id) — solids do not count - set of hardware (by
hardware_refand total quantity — the position and geometry of hardware do not count)
Ignored in the comparison: position, rotation, name, id, comment_refs.
Quantities
Quantities are not stored directly on a panel or a node. The multiplicity of cabinets and groups is expressed through multiple nodes in the tree, each with its own position.
There is no quantity field at the group or panel level — only hardware has it.
Panel size validation
The maximum usable sheet size after trimming:
max_length = sheet.length - (2 × trim)
max_width = sheet.width - (2 × trim)A panel is valid if it fits in the sheet — directly or after rotation by 90° (when grain allows it):
panel.dimensions.length ≤ max_length AND panel.dimensions.width ≤ max_widthor after rotation (only when material.grain = "none" or panel.grain = "none"):
panel.dimensions.width ≤ max_length AND panel.dimensions.length ≤ max_widthIf both directions have a defined grain, rotation is not allowed — the panel must fit without rotation.
Grain group validation
A panel can belong to at most one grain group. An attempt to add the same panel to two groups is a validation error.
All panels in a group must use the same material as grain_group.material_ref.
A group is a block: rows one after another along the grain, and within a row, panels side by side across the grain. A member without row is a separate row with a number equal to order, with position 1 — this is how groups from files 2.4.0 and older are read.
The block is described in the view of the panels' faces, and the face of a group's panel is the side visible from outside the furniture — machining operations from the inside lie on the back (specification §13.1). Each row has its own alignment (rows[], 2.6.0): to the start, to the center or to the end; a row without an entry is aligned to the start, and positions are always counted from the starting edge (§13.2). The position of a panel is written as the text #B.RA.P, e.g. #1.2S.1 (§13.3).
Row numbers (row) must form a continuous sequence (1, 2, …, n), and the positions (order) in each row — a continuous sequence without repetitions (1, 2, …, m).
All panels of a row have the same dimension along the grain, and the block must fit in the usable sheet in both directions:
D = panel.dimensions.length if panel.grain = "along_length" ← along the grain
D = panel.dimensions.width if panel.grain = "along_width"
C = the other panel dimension ← across the grain
Σ D(row) + (n − 1) × kerf ≤ max_along_grain n — number of rows
max ( Σ C(i in row) + (m − 1) × kerf ) ≤ max_across_grain m — number of panels in the rowwhere max_along_grain and max_across_grain are the usable dimensions of the sheet along and across the material grain (sheet.length - 2×trim and sheet.width - 2×trim when material.grain = "along_length", the other way round when along_width). Details: specification §13.1 and §15.4.
Dimensions and edge banding
The panel dimension is always the final dimension after edge banding — it already includes the edge banding.
The standard does not describe the raw dimension (before edge banding). Reducing the dimension by the thickness of the edge banding is the task of the edge banding technology on the machine and depends on its parameters — the viewer and cutting software operate only on the final dimensions from the dimensions field.