From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:STL" |
|---|
| claim | "A binary STL facet is 50 bytes: normal (3 x f32), 3 vertices (3 x 3 x f32), and a u16 attribute whose bit 15, when set, marks a 5-5-5 colour in bits 0-14." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "binary STL" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "StlFacet" |
|---|
| size | "0x32" |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 12 |
|---|
| type | "float[3]" |
|---|
| name | "normal" |
|---|
|
| offset | "0xC" |
|---|
| size | 36 |
|---|
| type | "float[9]" |
|---|
| name | "vertices" |
|---|
|
| offset | "0x30" |
|---|
| size | 2 |
|---|
| type | "uint16_t" |
|---|
| name | "attribute" |
|---|
| bits | |
| bit | "0-4" |
|---|
| name | "channel_a" |
|---|
| notes | "blue by default, red when the header contains COLOR= (Materialise path)" |
|---|
|
|
| bit | "10-14" |
|---|
| name | "channel_c" |
|---|
| notes | "red by default, blue on the Materialise path" |
|---|
|
|
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "vertex reads and the colour decode" |
|---|
| repo | "https://github.com/assimp/assimp" |
|---|
| commit | "f20e46b3fc1fdf9bc2675fd549d180dda06861f1" |
|---|
| path | "code/AssetLib/STL/STLLoader.cpp" |
|---|
| lines | "484-525" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Binary facet record" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T07:38:16.767Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T08:02:22.836Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read the binary reader in assimp STLLoader.cpp at the cited commit: 50 bytes per facet, normal and three vertices as floats, attribute memcpy'd and AI_SWAP2'd from little-endian, bit 15 gates colour, bIsMaterialise swaps red and blue channels." |
|---|
|
|
|---|