forked from 1b-agent/opencadstudio-upstream
The preview stream sets a current colour (record type 14, an ACI) before its geometry; track it and tag each decoded primitive. The Unknown-entity path groups primitives by colour and draws one wire per colour, resolving a real index (1..=255) to its RGB and letting ByLayer/ByBlock inherit the entity colour. So a custom entity's preview now renders in its own colours (e.g. an ACA door's blue swing) instead of a single flat colour. Co-Authored-By: Claude Opus 4.8 <[email protected]>