Skip to content

EA parity: generated SVGs must be fully identical to EA's own SVG export (fonts, connectors, geometry) #54

Description

@ronaldtse

Goal

SVGs generated by ea svg / ea spa must be fully identical to what Enterprise Architect builds — same structure, geometry, connectors, and fonts — so that generated SPA output is visually indistinguishable from EA's own SVG export.

Ea::Svg::Parity::Suite (lib/ea/svg/parity/suite.rb) already exists to drive this: it renders every diagram and compares against per-diagram EA reference SVGs (<eaid>.svg in a reference directory). It currently measures element counts only (rect, polygon, path, text), and the repository ships zero EA reference exports.

Tracked defects blocking parity

What "done" means

  1. A representative set of EA-exported reference SVGs committed as parity fixtures (export from EA for a subset of the public PLATEAU models in metanorma/plateau-models — class diagrams, views with connectors, diagrams with notes/labels).
  2. Parity::Checker extended beyond element counts: per-element geometry deltas, font face/size/weight, connector endpoints docked at the stored ports, arrowhead placement.
  3. Parity::Suite runs in CI against the fixtures and fails on deltas.
  4. All of TextRenderer TypeError (nil into Float) skips SVG for ~8% of PLATEAU CG3 diagrams and crashes ea svg --all #51, SVG connector arrows originate from wrong port: renderer ignores source_edge/source_duid (and QEA builder never sets them) #52, SVG fonts are theme defaults, not the model's: QEA builder drops font_size, elements render Arial 9px/13px instead of EA fonts #53 resolved against that gate.

First step

Export reference SVGs from EA for a small fixed subset (e.g. 10 diagrams spanning the defect cases) and drop them into the parity reference directory — the suite can then produce a baseline delta report to size the remaining work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions