Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ea24c2f
Add solver-backed Sketch drag API
GideonBa Jul 15, 2026
4f0f06d
Implement solver-backed Sketch drag controller
GideonBa Jul 15, 2026
7a53c3a
Add semantic Sketch handle hit primitives
GideonBa Jul 15, 2026
0f1b50a
Keep Block 107 interaction primitives separate from drag handles
GideonBa Jul 15, 2026
a35be6b
Expose Sketch drag pointer phases and handle overlay
GideonBa Jul 15, 2026
f501dfa
Separate Sketch drag pointer callback from Block 107 pointer status
GideonBa Jul 15, 2026
6621ba3
Add Sketch drag binder boundary
GideonBa Jul 15, 2026
33ba68e
Integrate live Sketch drag with viewport and solver
GideonBa Jul 15, 2026
3c9ed90
Apply Block 110 viewport and binder integration patches
GideonBa Jul 15, 2026
3ec6ada
Integrate Block 110 live Sketch dragging
github-actions[bot] Jul 15, 2026
dc3a276
Add solver-backed Sketch drag focused proof
GideonBa Jul 15, 2026
f38a97d
Register Block 110 focused GUI proof
GideonBa Jul 15, 2026
5917b03
Register Block 110 Sketch drag tests
github-actions[bot] Jul 15, 2026
93c30eb
Document Block 110 solver-backed Sketch dragging
GideonBa Jul 15, 2026
d86eef7
Fix Block 110 undo label assertions
GideonBa Jul 15, 2026
fe44506
Fix Sketch drag undo label assertions
github-actions[bot] Jul 15, 2026
ac8efd3
Advance Block 110 documentation
GideonBa Jul 15, 2026
c66f5fb
Document Block 110 solver-backed Sketch dragging
github-actions[bot] Jul 15, 2026
4c09a9d
Fix Sketch drag iterator assertion
GideonBa Jul 15, 2026
387fc20
Fix Sketch drag test assertions
github-actions[bot] Jul 15, 2026
5cbd71c
Restore Sketch selection after drag lifecycle
GideonBa Jul 15, 2026
4380746
Restore Sketch selection after drag lifecycle
github-actions[bot] Jul 15, 2026
b0ae0ee
Document Block 110 solver-backed Sketch dragging
github-actions[bot] Jul 15, 2026
c19b4d4
Accept idle-equivalent post-drag hover state
GideonBa Jul 15, 2026
d54cd9c
Fix Sketch drag test lifecycle assertions
github-actions[bot] Jul 15, 2026
785497a
Remove temporary Block 110 source patch workflow
GideonBa Jul 15, 2026
706ae6d
Document Block 110 solver-backed Sketch dragging
github-actions[bot] Jul 15, 2026
1a3c87e
Remove temporary Block 110 test registration workflow
GideonBa Jul 15, 2026
7b47a34
Document Block 110 solver-backed Sketch dragging
github-actions[bot] Jul 15, 2026
7b01edf
Remove temporary Block 110 test fix workflow
GideonBa Jul 15, 2026
d154de7
Document Block 110 solver-backed Sketch dragging
github-actions[bot] Jul 15, 2026
32047a0
Remove temporary Block 110 documentation patch workflow
GideonBa Jul 15, 2026
89c4579
Remove temporary Block 110 lifecycle fix workflow
GideonBa Jul 15, 2026
f4b3fcb
Fix Sketch toolbar workspace visibility
GideonBa Jul 15, 2026
5c16136
Synchronize Sketch toolbar action visibility
github-actions[bot] Jul 15, 2026
3fc4339
Remove temporary Block 110 toolbar visibility workflow
GideonBa Jul 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ if(BLCAD_BUILD_GUI)
src/gui/gui_selection_model.cpp
src/gui/gui_sketch_interaction.cpp
src/gui/gui_sketch_interaction_binder.cpp
src/gui/gui_sketch_drag.cpp
src/gui/gui_sketch_drag_binder.cpp
src/gui/gui_sketch_workbench.cpp
src/gui/gui_spatial_surface_workbench.cpp
src/gui/gui_task_state.cpp
Expand Down Expand Up @@ -554,6 +556,7 @@ if(BLCAD_BUILD_TESTS)
tests/gui/gui_part_foundation_workbench_tests.cpp
tests/gui/gui_part_operations_workbench_tests.cpp
tests/gui/gui_sketch_interaction_tests.cpp
tests/gui/gui_sketch_drag_tests.cpp
tests/gui/gui_sketch_workbench_tests.cpp
tests/gui/gui_spatial_surface_workbench_tests.cpp
tests/gui/gui_feature_coverage_acceptance_tests.cpp
Expand Down
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ page.

The assembly sequence is implemented through Block 47, Part Construction MVP-6 is complete through
Block 94, and GUI Feature Validation MVP-7 is accepted through Block 105. Interactive Sketcher MVP-8
is in progress: Blocks 106–109 implement the contextual Sketch workspace, device-independent plane
interaction, deterministic hit/selection/grid/snap/inference behavior, shared planar point/entity
topology with stable `SketchPointId`, dependency-safe topology editing and migration, and a
deterministic headless general planar constraint solver with normalized residuals, Jacobian-rank DOF,
stable redundancy/conflict attribution, and explicit convergence/reference diagnostics. The canonical
contracts are [`docs/gui-interactive-sketch-workspace-mvp8.md`](docs/gui-interactive-sketch-workspace-mvp8.md),
is in progress: Blocks 106–110 implement the contextual Sketch workspace, device-independent plane
interaction, stable shared `SketchPointId` topology, deterministic general planar solving with exact
local DOF/conflict diagnostics, and solver-backed semantic-handle mouse dragging with latest-pointer
coalescing, exact final release solve, live non-mutating preview, rollback, and one atomic undoable
release commit. Canonical contracts are [`docs/gui-interactive-sketch-workspace-mvp8.md`](docs/gui-interactive-sketch-workspace-mvp8.md),
[`docs/gui-sketch-plane-interaction-mvp8.md`](docs/gui-sketch-plane-interaction-mvp8.md),
[`docs/sketch-shared-topology-mvp8.md`](docs/sketch-shared-topology-mvp8.md), and
[`docs/sketch-planar-constraint-solver-mvp8.md`](docs/sketch-planar-constraint-solver-mvp8.md). Block
110, solver-backed Sketch mouse dragging, is next in
[`docs/interactive-sketcher-sequence-mvp8.md`](docs/interactive-sketcher-sequence-mvp8.md).
[`docs/sketch-shared-topology-mvp8.md`](docs/sketch-shared-topology-mvp8.md),
[`docs/sketch-planar-constraint-solver-mvp8.md`](docs/sketch-planar-constraint-solver-mvp8.md), and
[`docs/gui-sketch-solver-drag-mvp8.md`](docs/gui-sketch-solver-drag-mvp8.md). Block 111, basic Sketch
creation tools, is next in [`docs/interactive-sketcher-sequence-mvp8.md`](docs/interactive-sketcher-sequence-mvp8.md).

The optional Qt desktop covers document, Sketch, Part, Surface, Assembly, motion, analysis, and
STEP-export validation workflows without moving authority out of Core/Geometry. Blocks 122–131 plan
Expand All @@ -46,6 +45,11 @@ Start here:
- [`docs/file-format.md`](docs/file-format.md) — save-format authority
- [`docs/sketch-shared-topology-mvp8.md`](docs/sketch-shared-topology-mvp8.md) — shared planar topology/migration
- [`docs/sketch-planar-constraint-solver-mvp8.md`](docs/sketch-planar-constraint-solver-mvp8.md) — planar solver/DOF/diagnostics
- [`docs/gui-sketch-solver-drag-mvp8.md`](docs/gui-sketch-solver-drag-mvp8.md) — semantic handles/live solver drag/atomic release
- [`docs/gui-sketch-solver-drag-mvp8.md`](docs/gui-sketch-solver-drag-mvp8.md) — semantic handles/live solver drag/atomic release
- [`docs/gui-sketch-solver-drag-mvp8.md`](docs/gui-sketch-solver-drag-mvp8.md) — semantic handles/live solver drag/atomic release
- [`docs/gui-sketch-solver-drag-mvp8.md`](docs/gui-sketch-solver-drag-mvp8.md) — semantic handles/live solver drag/atomic release
- [`docs/gui-sketch-solver-drag-mvp8.md`](docs/gui-sketch-solver-drag-mvp8.md) — semantic handles/live solver drag/atomic release

## License

Expand Down
31 changes: 20 additions & 11 deletions docs/architecture-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ that derived posed state.
Flattened and structured assembly exchange derive stable product/occurrence identity; raw XDE/STEP
entity identity is never model authority.

## Qt GUI architecture through Block 109
## Qt GUI architecture through Block 110

`GuiDocumentSession` owns the current Project candidate/committed document view, recompute state,
semantic selection bridge, and exact GUI undo/redo snapshots. Generic command/task state remains
Expand All @@ -363,10 +363,19 @@ Block 108 adds Core shared point/entity identity and editable topology. The curr
builder still projects historical Sketch compatibility intent; a sampled interaction point is not
silently promoted to `SketchPointId`.

Block 109 adds a real Core producer for remaining DOF and solve state. The current Sketch status row
already has DOF/Solve presentation slots, but direct publication into continuous GUI drag belongs to
Block 110. Widgets must call the Core solver and render its derived result rather than duplicate
constraint mathematics.
Block 109 adds the Core producer for remaining DOF and solve state.

Block 110 adds the first continuous GUI solver consumer. `GuiSketchDragController` derives stable
semantic handles from Block-108 point/entity identity and translates drag intent to transient Block-109
Coincident, Midpoint, Concentric, or Radial equations. The temporary pointer/center ids are removed from
the solved topology before publication. Preview topology must losslessly materialize and re-migrate.

`GuiSketchDragBinder` coalesces pointer moves to the latest pending sample and synchronously flushes the
exact release sample. Live preview rebuilds transient interaction presentation and publishes exact DOF/
solve state without document mutation. Successful release rechecks topology and constraint-system
freshness and commits one `GuiDocumentSession` transaction. Cancellation, lost capture, solve refusal,
or stale commit restores the pre-drag document/presentation state. Widgets still do not own constraint
mathematics.

## Persistence and regeneration split

Expand All @@ -391,7 +400,7 @@ Sketch legacy migration equivalence groups and reports
solver variables / residual vectors / Jacobians / rank / DOF
SketchSolveResult and solver diagnostics
Block-107 interaction samples / screen mapping / hit stacks / grid / snap candidates
future Block-110 drag equations and live preview candidates
Block-110 semantic drag handles / pointer samples / augmented drag equations / live preview candidates
Assembly solve/motion proposals and freshness snapshots
posed occurrence shapes
contact / interference / sweep analysis
Expand All @@ -401,9 +410,9 @@ GUI hover / preview / rubber-band / HUD staging

## Current boundary

Blocks 106–109 are implemented. Block 110 is the current next technical step.
Blocks 106–110 are implemented. Block 111 is the current next technical step.

Block 110 connects semantic Sketch handles and Block-107 pointer mapping to disposable Block-108
topology candidates and Block-109 solving. Drag preview remains transient; release commits one
validated document transaction, while `Esc`, lost capture, fixed geometry, or failed solve restores the
pre-drag snapshot.
Block 111 adds basic point/line/polyline/rectangle/parallelogram/polygon/centerline/construction
creation over the existing workspace, plane mapping, shared topology, solver, and document transaction
authorities. Creation commands must not turn Block-107 snap candidates or Block-110 handle positions
into implicit persistent identity.
115 changes: 106 additions & 9 deletions docs/development-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ QT_QPA_PLATFORM=offscreen ctest --test-dir build/dev-gui -R '^gui\.' --output-on

## Interactive Sketcher focused proof

Blocks 106–109 are implemented.
Blocks 106–110 are implemented.

Block 106 workspace and command lifecycle:

Expand Down Expand Up @@ -162,11 +162,23 @@ The Block-109 proof covers:
- deterministic non-convergence classification;
- adaptation of current persisted geometric constraints and parameter-backed dimensions.

The current implementation handoff is Block 110. Its focused tags are:
Block 110 solver-backed semantic-handle drag and live solve:

```bash
QT_QPA_PLATFORM=offscreen ./build/dev-gui/blcad_gui_tests "[gui][sketch-drag]"
QT_QPA_PLATFORM=offscreen ./build/dev-gui/blcad_gui_tests "[integration][sketch-live-solve]"
```

The proof covers stable handle order and shared-junction deduplication, latest-pointer coalescing, exact
release flush, source-document immutability during preview, cancel/refusal rollback, Arc center/radius
solver targets, one `Drag sketch handle` session history entry, exact undo/redo, and an offscreen Qt
Press/Move/Release path through the installed binder.

The current implementation handoff is Block 111. Its focused tags are:

```text
[gui][sketch-drag]
[integration][sketch-live-solve]
[gui][sketch-create-basic]
[integration][sketch-basic-profile]
```

## Existing GUI validation tags
Expand Down Expand Up @@ -318,6 +330,81 @@ Block-109 public Core boundary:
include/blcad/core/sketch_constraint_solver.hpp
```

Block-110 public GUI boundaries:

```text
include/blcad/gui/gui_sketch_drag.hpp
include/blcad/gui/gui_sketch_drag_binder.hpp
```

Registered Block-110 implementation/proof:

```text
src/gui/gui_sketch_drag.cpp
src/gui/gui_sketch_drag_binder.cpp
tests/gui/gui_sketch_drag_tests.cpp
```

Block-110 public GUI boundaries:

```text
include/blcad/gui/gui_sketch_drag.hpp
include/blcad/gui/gui_sketch_drag_binder.hpp
```

Registered Block-110 implementation/proof:

```text
src/gui/gui_sketch_drag.cpp
src/gui/gui_sketch_drag_binder.cpp
tests/gui/gui_sketch_drag_tests.cpp
```

Block-110 public GUI boundaries:

```text
include/blcad/gui/gui_sketch_drag.hpp
include/blcad/gui/gui_sketch_drag_binder.hpp
```

Registered Block-110 implementation/proof:

```text
src/gui/gui_sketch_drag.cpp
src/gui/gui_sketch_drag_binder.cpp
tests/gui/gui_sketch_drag_tests.cpp
```

Block-110 public GUI boundaries:

```text
include/blcad/gui/gui_sketch_drag.hpp
include/blcad/gui/gui_sketch_drag_binder.hpp
```

Registered Block-110 implementation/proof:

```text
src/gui/gui_sketch_drag.cpp
src/gui/gui_sketch_drag_binder.cpp
tests/gui/gui_sketch_drag_tests.cpp
```

Block-110 public GUI boundaries:

```text
include/blcad/gui/gui_sketch_drag.hpp
include/blcad/gui/gui_sketch_drag_binder.hpp
```

Registered Block-110 implementation/proof:

```text
src/gui/gui_sketch_drag.cpp
src/gui/gui_sketch_drag_binder.cpp
tests/gui/gui_sketch_drag_tests.cpp
```

`SketchTopology`/`SketchPointId` are persistent Core topology identity. `SketchConstraintSystem` is a
canonical solve request. `SketchSolveResult`, variable order, residual summary, Jacobian rank, remaining
DOF, and solver diagnostics are derived.
Expand All @@ -341,8 +428,13 @@ clang-format -i \
include/blcad/core/sketch_constraint_solver.hpp \
src/core/sketch_constraint_solver.cpp \
src/core/sketch_solver_legacy_adapter.cpp \
include/blcad/gui/gui_sketch_drag.hpp \
include/blcad/gui/gui_sketch_drag_binder.hpp \
src/gui/gui_sketch_drag.cpp \
src/gui/gui_sketch_drag_binder.cpp \
tests/core/sketch_tests.cpp \
tests/core/sketch_constraint_solver_tests.cpp
tests/core/sketch_constraint_solver_tests.cpp \
tests/gui/gui_sketch_drag_tests.cpp
```

When adding a block, register new translation units/tests in `CMakeLists.txt` and document exact scope
Expand All @@ -363,11 +455,16 @@ rm -rf build/
- `docs/interactive-sketcher-sequence-mvp8.md`: Blocks 106–121 phase authority
- `docs/sketch-shared-topology-mvp8.md`: Block-108 topology/migration/edit/persistence contract
- `docs/sketch-planar-constraint-solver-mvp8.md`: Block-109 solver/DOF/diagnostics contract
- `docs/gui-sketch-solver-drag-mvp8.md`: Block-110 semantic handles/live solve/atomic drag contract
- `docs/gui-sketch-solver-drag-mvp8.md`: Block-110 semantic handles/live solve/atomic drag contract
- `docs/gui-sketch-solver-drag-mvp8.md`: Block-110 semantic handles/live solve/atomic drag contract
- `docs/gui-sketch-solver-drag-mvp8.md`: Block-110 semantic handles/live solve/atomic drag contract
- `docs/gui-sketch-solver-drag-mvp8.md`: Block-110 semantic handles/live solve/atomic drag contract

## Current development boundary

Blocks 106–109 are implemented. Block 110 is next.
Blocks 106–110 are implemented. Block 111 is next.

Block 110 exposes semantic Sketch handles and uses Block-107 mapping, Block-108 topology snapshots, and
Block-109 solving for live drag preview. Release commits one validated transaction; cancellation, lost
capture, fixed geometry, or failed solve restores the exact pre-drag snapshot.
Block 111 adds basic point/line/polyline/rectangle/parallelogram/polygon/centerline/construction
creation. It reuses current Sketch workspace staging, Block-107 snap/inference, Block-108 topology
identity/edit commands, and Block-109 solver authority.
2 changes: 1 addition & 1 deletion docs/file-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Status: implemented save-format seeds exist for single-part model intent including persistent Solid/Surface Body records, Feature Body-result operations, Body Booleans, BodyTransform stacks, and SketchOwnership records; assembly parameters, embedded Project JSON, part component occurrences, rigid child assembly occurrences, local Mate/Concentric/Distance/Insert/Angle intent, Project-level cross-hierarchy geometric intent, local and occurrence-qualified Revolute joint intent with typed `coordinates[]` plus historical scalar compatibility, semantic generated feature/axis/seat targets, `ref:` reference-geometry targets, canonical `topo:` generated-topology semantic targets, and authored transform/state records.

The save format stores parametric and semantic model intent. OCCT shapes, hierarchy traversal state, occurrence graphs, transform authorities, generated-topology producer classification/recovery results, resolved geometry, residuals, Jacobians, solve/motion results, freshness snapshots, proposals, diagnostics, and exchange products are derived.
The save format stores parametric and semantic model intent. OCCT shapes, hierarchy traversal state, occurrence graphs, transform authorities, generated-topology producer classification/recovery results, resolved geometry, residuals, Jacobians, solve/motion results, freshness snapshots, proposals, diagnostics, Block-110 semantic drag handles, pointer samples, temporary drag targets/augmented topology, live previews, and exchange products are derived. Block 110 adds no JSON schema field.

## Project structure

Expand Down
32 changes: 17 additions & 15 deletions docs/gui-interactive-sketch-workspace-mvp8.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Interactive Sketch Workspace MVP-8

Status: implemented in Block 106. Block 107 supplies plane-interaction producers, Block 108 supplies
persistent shared point/entity topology, and Block 109 supplies the deterministic headless solver/DOF
authority consumed by later GUI interaction.
Status: implemented in Block 106. Blocks 107–109 supply plane interaction, shared topology, and the
headless solver/DOF authority. Block 110 now implements the `SelectedHandle -> DragCandidate` live-solve
consumer and one-transaction release commit.

This document is the canonical GUI contract for the contextual planar Sketch workspace introduced by
Block 106. It extends the Block-95/96 command/transaction rules and Block-99 Sketch workbench. It does
Expand Down Expand Up @@ -118,7 +118,7 @@ Preview / DragCandidate -> Preview
There is no second GUI transaction or undo authority. Block-108 `SketchTopologyUndoStack` is a headless
Core snapshot utility. Document-level GUI commits still use session transaction/history authority.

Block 110 fills the `SelectedHandle -> DragCandidate` path with Block-109 solving.
Block 110 fills `SelectedHandle -> DragCandidate` with semantic handle selection, live Block-109 solving, and exact rollback/commit behavior.

## Escape and focus rules

Expand All @@ -131,8 +131,9 @@ CollectingPicks -> cancel command -> Idle
Hover -> Idle
```

A selected-handle/drag-candidate command cancels atomically to Idle. Block 110 owns exact pre-drag
snapshot restoration and solver-preview cleanup.
A selected-handle/drag-candidate command cancels atomically to Idle. Block 110 restores the pre-drag
interaction scene, clears its pending/processed pointer and solver preview, and leaves the persistent
document/history unchanged. Lost mouse capture and window deactivation use the same rollback policy.

Numeric input owns keyboard focus in `NumericInput`; `Enter` accepts the current field for candidate
validation. Canvas owns ordinary selection/placement focus. `MainWindow` routes unconsumed `Esc` to the
Expand Down Expand Up @@ -209,9 +210,10 @@ Block 109 -> headless solve state, exact local remaining DOF, solver diagnostics
Block 110 -> live drag solve invocation and status publication into GUI
```

Block 109 means DOF/Solve now have a real Core producer. The existing GUI does not yet continuously
invoke that producer, so it may still display `DOF: —` / `Solve: Not evaluated` outside a later
solver-aware command. Block 110 owns the first live publication during drag.
Block 109 provides the Core producer and Block 110 is the first continuous GUI consumer. Entering an
editable Sketch builds a baseline solve request; baseline and live drag publication update the existing
remaining-DOF and solve-status labels. The UI renders `SketchSolveResult` and never estimates DOF from
endpoint or glyph counts.

The UI must render `SketchSolveResult` status/remaining DOF; it must not infer them from endpoint counts,
constraint glyph counts, or topology migration.
Expand Down Expand Up @@ -243,8 +245,9 @@ Block-108 topology commands provide exact Core before/after snapshots. The histo
compatibility bridge requires lossless re-migration before atomic `PartDocument::update_sketch(...)`.
Block 109 returns a disposable solved topology; it does not choose a document commit boundary.

Block 110 must solve disposable candidates and commit exactly one validated document transaction on
successful release.
Block 110 solves disposable candidates, strips transient drag identities, requires lossless preview
materialization/re-migration, flushes the exact release pointer, and commits exactly one validated
`Drag sketch handle` document transaction on successful release.

## Failure policy

Expand Down Expand Up @@ -296,7 +299,6 @@ Block 109:

## Next boundary

Block 110 uses Block-107 pointer mapping, Block-108 semantic topology handles, and Block-109 solving for
live direct manipulation. It freezes handle identity, transient drag target semantics, throttled live
preview without dropping the final pointer position, fixed-geometry refusal, cancellation/lost-capture
rollback, and one atomic document commit on release.
Block 111 adds basic point, line, continuous polyline, rectangle families, parallelogram, regular
polygon, centerline, and construction-geometry creation. It reuses Block-107 snap/inference, Block-108
topology commands, Block-109 solving, and the existing command/task lifecycle.
Loading
Loading