cad-editor/src/modules
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven 36e328f7d7 feat(layers): add LAYTRANS to translate layers onto a standard
Drawings arrive from elsewhere carrying someone else's layer names, and
folding them into a set of house layers meant renaming and merging by
hand, one layer at a time.

LAYTRANS reads a layer set out of another drawing and moves this one onto
it. Given a file it maps every name the two already share and translates
at once, which is all most incoming drawings need. Bare, it opens a
translator: the drawing's layers on one side, the loaded set on the
other, mappings built up between them and applied only on Translate, so a
mapping can be reconsidered and the whole translation is a single undo
step. Mappings can be saved and read back, objects can be forced to
ByLayer so the target layer's properties are what actually shows, and the
result can be written out as a log.

The move itself is the one LAYMRG already made for a single pair, so
LAYMRG now goes through it too rather than keeping its own copy.

Three things fell out for free or nearly so. A standards file is a
drawing, so .dws and .dwt need nothing but a place in the file filter.
The entity list is flat and holds block definitions, so objects inside
blocks travel with everything else instead of being stranded on a layer
that no longer exists. And a target layer that this drawing already has
is left alone: the drawing has an opinion about it, and restyling it
would reach past what was asked for -- only newly created targets take
the standard's properties.

Mappings are saved beside the drawing rather than inside a DWS. That is
where AutoCAD keeps them, but putting them there would mean inventing a
place in the drawing that nothing else reads back.

Closes #624

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-07 16:51:15 +03:00
..
annotate feat(ucs): integrate coordinate systems 2026-08-04 23:17:54 +03:00
draw feat(layers): add LAYTRANS to translate layers onto a standard 2026-08-07 16:51:15 +03:00
insert feat(insert): add docked block palette 2026-08-06 11:02:52 +03:00
layout feat(plot): add Print All workflow 2026-08-04 11:29:11 +03:00
manage chore: remove orphaned manage/mview.rs dead code 2026-07-12 00:37:49 +03:00
model feat(ucs): integrate coordinate systems 2026-08-04 23:17:54 +03:00
view feat(view): one list of visual styles behind every way of choosing one 2026-08-07 14:15:59 +03:00
mod.rs refactor: replace build.rs module codegen with a static registry 2026-06-26 23:19:20 +03:00
registry.rs refactor: replace build.rs module codegen with a static registry 2026-06-26 23:19:20 +03:00