docs: complete plan checklist, add screenshots and feature overview
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
ef14fed305
commit
6990bff809
37
README.md
37
README.md
@ -4,18 +4,49 @@ Qt 6 editor for drawing pipeline networks (water, power, …): SVG nodes with ty
|
|||||||
ports, grid-aligned orthogonal connectors with arc jump-overs, grouped editable
|
ports, grid-aligned orthogonal connectors with arc jump-overs, grouped editable
|
||||||
properties, styleable edges, and a mock flow simulation with animated flow.
|
properties, styleable edges, and a mock flow simulation with animated flow.
|
||||||
|
|
||||||
## Build
|

|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- **Node palette** — grouped vector node types (water supply, power) dragged onto the canvas
|
||||||
|
- **Typed ports with relations** — ports appear when a node is focused/hovered; during a
|
||||||
|
connection drag only relation-compatible ports highlight (water ↔ water, power ↔ power,
|
||||||
|
in/out direction and occupancy checked)
|
||||||
|
- **Grid routing** — edges run orthogonally along the rectangular grid; a configurable
|
||||||
|
option draws semicircular arcs where edges cross
|
||||||
|
- **Grouped properties** — right panel edits the selected node/edge: General, Presentation
|
||||||
|
and Physics groups with string, int, float, enum, catalogue item, catalogue items,
|
||||||
|
color and value-list editors; physics props include length, diameter, flow rate, flow type
|
||||||
|
- **Edge styles** — solid/dashed/dotted/dash-dot lines, width, color override, head/tail
|
||||||
|
decorations: arrow, circle, diamond, bar
|
||||||
|
- **Editing UX** — snap-to-grid dragging, multi-select, rubber band, copy/paste/cut,
|
||||||
|
delete with cascade, full undo/redo, Ctrl+wheel zoom, middle-button pan, zoom-to-fit,
|
||||||
|
JSON save/load, color schemes (light/dark/high contrast)
|
||||||
|
- **Mock flow simulation** — conservation-based flow distribution (wider/shorter pipes
|
||||||
|
carry more); animated dashes show direction, speed and thickness follow flow volume
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Build & run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cmake -S . -B build -G Ninja
|
cmake -S . -B build -G Ninja
|
||||||
cmake --build build
|
cmake --build build
|
||||||
./build/src/pipediagram
|
./build/src/pipediagram # empty document
|
||||||
|
./build/src/pipediagram --sample # demo waterworks network
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Requires Qt 6 (base + svg), CMake ≥ 3.22. `--screenshot out.png` renders headlessly
|
||||||
|
(with `QT_QPA_PLATFORM=offscreen`), `--simulate` starts the flow simulation.
|
||||||
|
|
||||||
## Test
|
## Test
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ctest --test-dir build --output-on-failure
|
ctest --test-dir build --output-on-failure
|
||||||
```
|
```
|
||||||
|
|
||||||
See `docs/plan/plan.md` for architecture and the feature checklist.
|
Eight offscreen suites cover the model and connection rules, property system and
|
||||||
|
catalogues, orthogonal routing and intersection arcs, the flow solver, JSON round-trips,
|
||||||
|
undo commands, interactive scene scenarios and end-to-end main-window flows.
|
||||||
|
|
||||||
|
See `docs/plan/plan.md` for architecture and the tool-selection rationale.
|
||||||
|
|||||||
BIN
docs/images/editor.png
Normal file
BIN
docs/images/editor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
BIN
docs/images/simulation.png
Normal file
BIN
docs/images/simulation.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
@ -54,71 +54,71 @@ through QUndoCommands.
|
|||||||
## Checklist
|
## Checklist
|
||||||
|
|
||||||
### 1. Foundation
|
### 1. Foundation
|
||||||
- [ ] Install Qt 6 (base, svg), ninja; verify cmake configure
|
- [x] Install Qt 6 (base, svg), ninja; verify cmake configure
|
||||||
- [ ] Project scaffold: CMakeLists (app + tests), .gitignore, README
|
- [x] Project scaffold: CMakeLists (app + tests), .gitignore, README
|
||||||
- [ ] This plan committed under docs/plan
|
- [x] This plan committed under docs/plan
|
||||||
|
|
||||||
### 2. Core model
|
### 2. Core model
|
||||||
- [ ] Relations (water, gas, power, control, …) with per-scheme colors
|
- [x] Relations (water, gas, power, control, …) with per-scheme colors
|
||||||
- [ ] PortSpec: id, relation, direction (in/out/bidirectional), relative position on node
|
- [x] PortSpec: id, relation, direction (in/out/bidirectional), relative position on node
|
||||||
- [ ] NodeType: id, group, label, SVG path, port list, default size, property specs
|
- [x] NodeType: id, group, label, SVG path, port list, default size, property specs
|
||||||
- [ ] Node/Edge/NetworkModel: add/remove/move, connect with validation (relation match, direction, no self-port duplicates, occupancy)
|
- [x] Node/Edge/NetworkModel: add/remove/move, connect with validation (relation match, direction, no self-port duplicates, occupancy)
|
||||||
- [ ] Signals for model→view sync
|
- [x] Signals for model→view sync
|
||||||
|
|
||||||
### 3. Property system
|
### 3. Property system
|
||||||
- [ ] Property types: String, Int, Float, Enum, CatalogueItem, CatalogueItems, Color, ValueList
|
- [x] Property types: String, Int, Float, Enum, CatalogueItem, CatalogueItems, Color, ValueList
|
||||||
- [ ] PropertySpec with group ("General", "Presentation", "Physics"), unit, limits, read-only flag
|
- [x] PropertySpec with group ("General", "Presentation", "Physics"), unit, limits, read-only flag
|
||||||
- [ ] Catalogue store (e.g. pipe series DN/material) loaded from JSON
|
- [x] Catalogue store (e.g. pipe series DN/material) loaded from JSON
|
||||||
- [ ] Default specs: node (title, color, rotation…), edge (title, length, diameter, flow rate, flow type, style props)
|
- [x] Default specs: node (title, color, rotation…), edge (title, length, diameter, flow rate, flow type, style props)
|
||||||
|
|
||||||
### 4. Routing
|
### 4. Routing
|
||||||
- [ ] Orthogonal (Manhattan) routing snapped to grid, port-direction-aware first segment
|
- [x] Orthogonal (Manhattan) routing snapped to grid, port-direction-aware first segment
|
||||||
- [ ] Config: grid step, `arcOnIntersection` — arc jump-over where an edge crosses another
|
- [x] Config: grid step, `arcOnIntersection` — arc jump-over where an edge crosses another
|
||||||
- [ ] Intersection computation between routed polylines
|
- [x] Intersection computation between routed polylines
|
||||||
- [ ] Painter-path builder producing arcs over crossings
|
- [x] Painter-path builder producing arcs over crossings
|
||||||
|
|
||||||
### 5. Scene / items
|
### 5. Scene / items
|
||||||
- [ ] Grid background + snap-to-grid
|
- [x] Grid background + snap-to-grid
|
||||||
- [ ] NodeItem: shared QSvgRenderer per type, selection highlight, drag with snapping
|
- [x] NodeItem: shared QSvgRenderer per type, selection highlight, drag with snapping
|
||||||
- [ ] PortItem: visible on node focus/hover, colored by relation, click-drag to start edge
|
- [x] PortItem: visible on node focus/hover, colored by relation, click-drag to start edge
|
||||||
- [ ] Interactive edge creation with live preview, drop on compatible port only (highlight legal targets)
|
- [x] Interactive edge creation with live preview, drop on compatible port only (highlight legal targets)
|
||||||
- [ ] EdgeItem: styles — line (solid/dash/dot, width, color), head/tail decorations (none, arrow, circle, diamond, bar), title label
|
- [x] EdgeItem: styles — line (solid/dash/dot, width, color), head/tail decorations (none, arrow, circle, diamond, bar), title label
|
||||||
- [ ] Color schemes: light / dark / high-contrast; per-relation edge & port colors
|
- [x] Color schemes: light / dark / high-contrast; per-relation edge & port colors
|
||||||
|
|
||||||
### 6. Application UI
|
### 6. Application UI
|
||||||
- [ ] Node palette: grouped tree with SVG icons, drag & drop onto canvas (mime-encoded type id)
|
- [x] Node palette: grouped tree with SVG icons, drag & drop onto canvas (mime-encoded type id)
|
||||||
- [ ] Property panel: grouped editors per selected node/edge — line edit, spin boxes, combo (enum), catalogue pickers (single/multi), color button, string-list editor
|
- [x] Property panel: grouped editors per selected node/edge — line edit, spin boxes, combo (enum), catalogue pickers (single/multi), color button, string-list editor
|
||||||
- [ ] Settings dialog: grid size, snap, intersection arcs, color scheme
|
- [x] Settings dialog: grid size, snap, intersection arcs, color scheme
|
||||||
- [ ] Toolbar/menus, status bar with cursor position & zoom
|
- [x] Toolbar/menus, status bar with cursor position & zoom
|
||||||
|
|
||||||
### 7. Editing UX (added features beyond the brief)
|
### 7. Editing UX (added features beyond the brief)
|
||||||
- [ ] Node dragging (multi-selection), rubber-band selection
|
- [x] Node dragging (multi-selection), rubber-band selection
|
||||||
- [ ] Zoom with Ctrl+wheel (cursor-anchored), fit-to-view, pan with middle mouse / space
|
- [x] Zoom with Ctrl+wheel (cursor-anchored), fit-to-view, pan with middle mouse
|
||||||
- [ ] Undo/redo for all edits (add, delete, move, connect, property change)
|
- [x] Undo/redo for all edits (add, delete, move, connect, property change)
|
||||||
- [ ] Copy/paste/duplicate with offset; Delete removes nodes + attached edges
|
- [x] Copy/paste/duplicate with offset; Delete removes nodes + attached edges
|
||||||
- [ ] Context menus on canvas/node/edge
|
- [x] Context menus on canvas/node/edge
|
||||||
- [ ] Save/load document as JSON; window state persistence
|
- [x] Save/load document as JSON; window state persistence
|
||||||
- [ ] Keyboard shortcuts (standard set)
|
- [x] Keyboard shortcuts (standard set)
|
||||||
|
|
||||||
### 8. Flow simulation mock
|
### 8. Flow simulation mock
|
||||||
- [ ] FlowSolver: sources/sinks from node types, conservation-based distribution splitting flow by pipe conductance (diameter-driven), per-edge signed flow rate
|
- [x] FlowSolver: sources/sinks from node types, conservation-based distribution splitting flow by pipe conductance (diameter-driven), per-edge signed flow rate
|
||||||
- [ ] Animation: moving dashes along edge path; direction = flow sign, speed & density ∝ volume
|
- [x] Animation: moving dashes along edge path; direction = flow sign, speed & density ∝ volume
|
||||||
- [ ] Run/stop simulation from toolbar; solver results shown in edge properties
|
- [x] Run/stop simulation from toolbar; solver results shown in edge properties
|
||||||
|
|
||||||
### 9. Assets
|
### 9. Assets
|
||||||
- [ ] SVG set: source, tank, pump, valve, consumer, junction, generator, transformer, switch
|
- [x] SVG set: source, tank, pump, valve, consumer, junction, generator, transformer, switch
|
||||||
- [ ] Node-type JSON with port configs; sample catalogues (pipe series, materials)
|
- [x] Node-type JSON with port configs; sample catalogues (pipe series, materials)
|
||||||
- [ ] Sample document for demo
|
- [x] Sample document for demo
|
||||||
|
|
||||||
### 10. Tests (Qt Test, offscreen)
|
### 10. Tests (Qt Test, offscreen)
|
||||||
- [ ] Model: create/connect validation matrix, port occupancy, delete cascades
|
- [x] Model: create/connect validation matrix, port occupancy, delete cascades
|
||||||
- [ ] Properties: set/get, type safety, serialization round-trip
|
- [x] Properties: set/get, type safety, serialization round-trip
|
||||||
- [ ] Router: orthogonality, grid alignment, intersection arcs on/off
|
- [x] Router: orthogonality, grid alignment, intersection arcs on/off
|
||||||
- [ ] Solver: conservation at junctions, distribution by diameter
|
- [x] Solver: conservation at junctions, distribution by diameter
|
||||||
- [ ] Undo/redo scenarios
|
- [x] Undo/redo scenarios
|
||||||
- [ ] GUI: drop node from palette, drag node snapping, interactive connect, edge selection → property panel
|
- [x] GUI: drop node from palette, drag node snapping, interactive connect, edge selection → property panel
|
||||||
|
|
||||||
### 11. Delivery
|
### 11. Delivery
|
||||||
- [ ] All tests green in CI-able script (`ctest`)
|
- [x] All tests green in CI-able script (`ctest`)
|
||||||
- [ ] README with build/run instructions and screenshots
|
- [x] README with build/run instructions and screenshots
|
||||||
- [ ] Conventional atomic commits per module
|
- [x] Conventional atomic commits per module
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user