16 Commits

Author SHA1 Message Date
37f3700a18 Name SVG export after current MCM (e.g. MCM09_Detailed_View.svg)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:42:39 +04:00
bf0eced44c Fix SVG export labels: absolute coords, no transforms (Ignition compat)
Ignition strips SVG transforms from text elements, causing labels to
float to wrong positions. Now all text uses pre-computed absolute x/y
coordinates without any transform attributes. Also fixes positioning
for curved (at arc midpoint), spur (trapezoid center), and induction
(strip center) symbols.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:36:50 +04:00
6a38ecaa27 Fix SVG export label alignment for all conveyance types
- Curved: position at arc midpoint with rotation along curve
- Spur: center in trapezoid shape, not bounding box
- All: use dy offset instead of dominant-baseline for reliable centering

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:31:00 +04:00
07cee1c151 Add internal labels for conveyance symbols (canvas + SVG export)
Parse labels like UL17_22_VFD into stacked text: "UL" / "17-22".
Bold black Arial, targets 14px but auto-scales down to fit with
consistent padding. Strips _VFD suffix, splits prefix from numbers.
If full text doesn't fit, strips the letter prefix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 18:23:19 +04:00
271f646e1d Export overlay devices (PE, FIO/SIO, DPM, PDP, MCM) on top of conveyance
Split SVG export into two passes: base conveyance symbols first, then
overlay devices rendered last so they appear on top in the exported SVG.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 18:00:01 +04:00
94c57b4708 Export conveyors/extendos/photoeyes as programmatic SVG paths
Replaces embedded SVG export (which used non-uniform scale transforms
that stretched strokes) with programmatic path/rect elements matching
the canvas renderer. Consistent 0.5px stroke at any size.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 17:58:17 +04:00
775c6e2e99 Make conveyors/chutes/inductions/extendos/spurs white; fix PE stroke and size
- Change all conveyance SVGs from black fill to white fill with black stroke
- Update programmatic rendering (curves, induction, spur) to white fill
- Replace PE 3-slice rendering with programmatic canvas paths for
  consistent stroke width at any size
- Reduce PE default size from 56x20 to 30x14 to fit around conveyor devices
- Update SVG export to match new white fills

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 17:17:09 +04:00
20b9547578 Fix EPC export: match end box position and stroke width to canvas renderer
- Right box x offset: 0 → -rb.w (extend backward, matching canvas)
- Stroke width: hardcoded 0.3 → EPC_CONFIG.lineWidth (1.5, matching line)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 15:50:53 +04:00
a4884b4e9b Fix EPC SVG export: match stroke width and right box position; rotate end 90°
- Right box stroke now uses EPC_CONFIG.lineWidth (1.5) instead of 0.3
- Right box positioned at -rb.w (backward) matching canvas renderer
- End box rotated 90° (perpendicular to line) in canvas, export, and hit-testing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 15:38:07 +04:00
51794cb9ae Add device visibility controls: right-click hide and top bar type toggles
- Right-click context menu: "Hide" option to hide individual symbols
- "Show All Hidden" appears in context menu when anything is hidden
- Top visibility bar with toggle chips for each device group
- Hidden symbols are excluded from rendering, hit testing, and SVG export

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 18:36:01 +04:00
8336018042 Fix SVG export: preserve original structure, no stray elements
- Single-element SVGs: id/label/transform directly on the element (no <g>)
- SVGs with <g> group (dpm, diverter): keep the group, put id/label on it
- Multi-child SVGs without group (beacon): wrap in <g> with id/label
- Programmatic shapes (induction, curved, spur): single <path> with id

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 18:29:17 +04:00
8c29d9266c Shape-based collision, hit-testing, and export for all symbol types
- Add induction collision vertices (arrow+strip polygon instead of full OBB)
- Add getShapeVertices() dispatcher for unified shape-based collision
- Shape-following hit tests: curved (arc band), induction (arrow+strip), spur (trapezoid)
- Curved SVG export uses programmatic arc path matching renderer
- EPC: right-click adds waypoint, free polyline (no angle snap)
- Thinner selection/collision outlines, smaller resize handles with larger hit area

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 18:16:15 +04:00
93afd0a554 Add device dock search, IDs drag-to-assign tab, and label drop-target highlight
- Add search filter to Devices tab in right dock
- Add IDs tab: flat list of unassigned device IDs, drag onto placed symbol to assign label
- Highlight drop target symbol with cyan glow during label drag
- Add labelDropTarget state and dropTarget theme entry

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 17:40:08 +04:00
6f0ac836fb Refactor collision/distance modules, fix curved geometry, add mirror support
- Split collision.ts (707→549): extract distance.ts (pure math) and grid-snap.ts
- Fix curved conveyor/chute outline to match SVG viewBox geometry
- Draw curves programmatically with fixed 30px band width (no SVG stretching)
- Single resize handle for curves (was 2)
- Add .gitattributes for consistent line endings
- Make Vec2 type module-private
- Add mirror transform support in renderer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 17:21:04 +04:00
c5bb986a82 Refactor: extract render theme, hit-testing module, clean up legacy exports
- Extract 25+ hardcoded colors/sizes to render-theme.ts
- Extract pure hit-testing functions to hit-testing.ts (-104 lines from interactions.ts)
- Remove 11 legacy re-exports from symbols.ts, use config objects directly
- Fix preloadSymbolImages async/await anti-pattern
- Extract ensureEpcWaypoints() helper (3x dedup)
- Fix PDF not clearing on MCM switch
- Fix MCM persistence on reload
- Change defaults: grid off, grid size 2, min spacing 2

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:03:38 +04:00
eda97fc5bc real commit 2026-03-20 17:46:47 +04:00