cad-editor/src/scene
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven f720e40ba1 feat(render): draw a proxy entity's cached preview instead of nothing
An entity from an application we have no reader for — e.g. an Autodesk Raster
Design embedded raster image — now arrives as `Unknown` (acadrust 769741d) and
rendered as nothing at all, so the drawing silently lost it with no hint that
anything was there.

Such entities almost always ship proxy graphics: the vector preview their author
cached for precisely this case, and what AutoCAD itself falls back to when the
object enabler is absent. Decode it and draw it, so the entity holds its real
place and size.

The record grammar has no reference implementation to copy — LibreDWG keeps the
blob raw ("see par 29") and ACadSharp stores the bytes without parsing them — so
rather than infer a general decoder from one sample, `proxy_graphics` accepts a
single polyline record and only when the blob matches it byte-for-byte: sizes
must agree, the points must consume every remaining byte, and coordinates must
be finite. Anything else returns None and draws nothing, exactly as before, so
a file this does not model cannot regress or sprout invented geometry.

Verified on a Raster Design drawing: its 140-byte preview decodes with 0 bytes
left over to the image frame (1192.149 x 877.824, closed), matching what ODA
reports for the same entity. Unit-tested against that real blob.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 12:53:42 +03:00
..
cache feat(mline): GPU-dash multiline elements with shared A-type alignment 2026-07-17 02:59:11 +03:00
convert feat(render): draw a proxy entity's cached preview instead of nothing 2026-07-17 12:53:42 +03:00
model feat(mline): GPU-dash multiline elements with shared A-type alignment 2026-07-17 02:59:11 +03:00
pick fix(stretch): free crossing-window corners from Ortho, draw filled marquee (#291) 2026-07-10 13:32:32 +03:00
pipeline fix(render): install the GPU error handler once per device, throttled 2026-07-17 10:38:53 +03:00
text feat(mline): GPU-dash multiline elements with shared A-type alignment 2026-07-17 02:59:11 +03:00
view chore(glam): use camera-module projection API for deprecated Mat4 rh ctors 2026-07-17 01:49:26 +03:00
annotative.rs feat(annotative): synthesize per-object contexts + editable UI 2026-07-13 22:38:29 +03:00
camera_ops.rs fix(view): show geometry far off the drawing plane 2026-07-15 22:21:38 +03:00
entity.rs fix(solid): keep SOLID fills placed on UTM-scale drawings 2026-07-15 22:55:51 +03:00
group_layer.rs feat(ui): bulk layer on/off, lock, freeze, transparency + Ctrl+A (#236) 2026-07-03 16:06:10 +03:00
layout.rs feat(layout): reopen a drawing in the space it was saved in 2026-07-12 01:01:40 +03:00
mod.rs fix(export): project viewport text into paper space 2026-07-16 10:06:15 +03:00
modify.rs perf(undo): record entity deltas instead of cloning the whole document 2026-07-15 11:11:17 +03:00
mspace.rs feat(nav): turntable orbit, selection/cursor pivot, Shift+MMB rotate (#229) 2026-07-01 21:58:04 +03:00
page_setup.rs fix(io): resolve root named-objects dict robustly on foreign DWGs 2026-07-13 16:28:21 +03:00
paper.rs perf(render): unify model/paper/block spaces on one resident wire path 2026-07-14 20:50:37 +03:00
preview.rs fix(stretch): free crossing-window corners from Ortho, draw filled marquee (#291) 2026-07-10 13:32:32 +03:00
project.rs fix(export): project viewport text into paper space 2026-07-16 10:06:15 +03:00
selection.rs perf(undo): record entity deltas instead of cloning the whole document 2026-07-15 11:11:17 +03:00