mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-27 06:01:06 -04:00
feat(cad): exclude entities and set cut/etch/display-only roles
Select entities in the CAD converter (click, or drag a window/crossing box) and right-click to exclude/include them or set them to cut, etch or display only, regardless of their DXF layer. Delete excludes the selection. Roles are stored per source entity on the drawing and persisted in the entity set as an optional `roles` map. Display-only geometry is kept out of the program, so posts, nesting and verification never see it; placed parts draw it as a dashed overlay. Load-time scribe repair skips etch-layer entities set to cut. Per-entity exclusions now survive filter changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
27a03b9caf
commit
d87302a189
16 files changed
+928
-20
No files matched your search
@@ -165,7 +165,7 @@ fixed archive timestamps and dates, and no best-fit entries, so equal content ha
|
||||
equal bytes and SHA-256. The server stores each distinct package once by that hash.
|
||||
|
||||
A package holds geometry and geometry-bound data only: program, source entities and
|
||||
offset, suppressed entity IDs, bends, cut pins, breakoffs, tabbed cutouts and material
|
||||
offset, suppressed entity IDs, entity roles, bends, cut pins, breakoffs, tabbed cutouts and material
|
||||
density. Fields
|
||||
the server's library record owns are written as their defaults, so editing them never
|
||||
changes the hash:
|
||||
@@ -231,6 +231,22 @@ warning; the drawing and its program load unchanged, only the cutout stops being
|
||||
Tab spans are saved as motions tagged `:TAB`. They bound material but are never cut;
|
||||
versions without tabbed cutout support read them as ordinary cut motions.
|
||||
|
||||
## Drawing entity roles
|
||||
|
||||
`entities/entities-N` holds drawing N's source entities, the IDs of suppressed
|
||||
(excluded) ones in `suppressed`, and an optional `roles` object, omitted when empty,
|
||||
mapping source entity IDs to `"cut"`, `"etch"` or `"display"`. An entity without an
|
||||
entry keeps the role its layer implies: `ETCH`, `SCRIBE` and `ENGRAVE` etch, every
|
||||
other layer cuts. The stored program already has the roles applied: etched entities
|
||||
are `:SCRIBE` motions and display-only entities are not in the program at all, so
|
||||
posts, nesting, area and verification never see them; the desktop draws them with
|
||||
each placed part. Roles are geometry-bound data, so drawing packages carry them and
|
||||
they change the package hash. Unknown role names and malformed IDs are skipped (that
|
||||
entity keeps its layer role). Load-time etch repair only uses entities whose role is
|
||||
etch, so an etch-layer entity set to cut stays cut. Split pieces get no roles.
|
||||
Versions without role support ignore `roles`; they keep the program as saved but
|
||||
lose the overrides, and display-only geometry, on the next converter edit.
|
||||
|
||||
## Verification and limits
|
||||
|
||||
The automated tests cover save/reopen/re-save, rotated/manual/locked parts,
|
||||
|
||||
Reference in new issue
Block a user