Current flow #
PDF, SVG and DXF extraction remains isolated in the existing parser worker. Closed normalized source contours are retained in parts.geometry; source file, scale, original source origin, fill/stroke color and object/layer reference remain associated with each contour. SVG compound subpaths stay together as a source object, so the common compound letter-with-counter form remains one polygon with an interior ring. Separate SVG elements and PDF drawing objects are preserved separately instead of being merged solely because one is inside another.
ProductionElement and ElementGeometry are the interpretation layer. A production element is one physical manufactured item; mappings assign preserved source contours as BODY_OUTER, CUTOUT, GRAPHIC, SEPARATE_PART or IGNORE. The stable role table supports future layer names through material_layer. Every manually-created part and every uncomplicated imported contour is wrapped as one confirmed BODY element for backward compatibility.
The topology pass records containment parent, depth, intersection and distance metadata. Containment and color are hints only. Contained or intersecting separate objects are marked for review and cannot be nested or quoted until confirmed. The operator can select contours in the vector review view, group them as one BODY plus graphics, set roles, assign a graphic/material layer, separate one contour, ungroup, or ignore contours. Original contour geometry and coordinates are not rewritten during grouping.
Manufacturing geometry #
Nesting and Channel Letters estimates use derived production geometry. For each confirmed element the BODY contours are aligned using their preserved source origins, unioned, and CUTOUT contours are subtracted. GRAPHIC, IGNORE and inactive contours are excluded. The result is polygonal contour geometry with holes, and the original Part records remain untouched. Back, face, return and LED metrics therefore derive from the one physical element, not from graphic overlays as independent sheet pieces. Graphic areas and layer assignments remain available for future vinyl/print operations; graphic costing is not implemented yet.
Geometry keys include canonical contour geometry and the element quantity, so a body/counter edit invalidates affected nesting. A role-only graphic edit leaves the nesting key unchanged. Source coordinates remain unchanged; nesting receives its own derived/transformed geometry.
Revisions and migration #
Migration c91b7a4d2e60 creates production-element and contour-role tables and backfills every existing Part as a confirmed one-contour BODY element. New revision snapshots retain elements and role mappings. Historical snapshots from before this migration are displayed as one BODY element per saved Part; continuing/restoring such a revision creates equivalent default mappings. Editing interpretation affects only the working calculation state and is captured when a new revision is saved.
Limitations #
The import pipeline currently normalizes closed production contours. It does not yet retain a first-class editable model for open engraving/stroke paths, PDF clipping paths, SVG CSS classes/use references, or DXF block-instance semantics. SVG fill-rule is preserved as source metadata while current compound-contour conversion uses containment parity. Uncertain arrangements are intentionally sent to Geometry Review rather than guessed. Automatic graphic-layer area costing and material-specific nesting are future work.