Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
4ba0539
Start scene viewer visualisation initiative
tomvanmele Nov 7, 2026
ac5d555
Accept scene viewer visualisation ADRs
tomvanmele Nov 7, 2026
b0b76f1
Revisit scene state architecture
tomvanmele Nov 7, 2026
79f4081
Decouple scene architecture from ModelViewer draft
tomvanmele Nov 7, 2026
1e25f10
Drop legacy scene loader proposal
tomvanmele Nov 7, 2026
441609e
Separate scene descriptions from session data
tomvanmele Nov 7, 2026
5c95c1a
Accept scene data reference boundary
tomvanmele Nov 7, 2026
ee8c4d8
Record scene phase zero checkpoint
tomvanmele Nov 7, 2026
666e98b
Record scene phase zero draft PRs
tomvanmele Nov 7, 2026
8c7b4a1
Add scene candidate integration gate
tomvanmele Nov 7, 2026
c8ba171
Install scene candidates without dependency re-resolution
tomvanmele Nov 7, 2026
245aab9
Resolve scene candidate dependencies in stages
tomvanmele Nov 7, 2026
e0e9891
Provision graphics runtime for scene integration
tomvanmele Nov 7, 2026
dbeabbe
Refresh scene candidate checkpoint
tomvanmele Nov 7, 2026
a3cf910
Gate indexed Viewer candidate
tomvanmele Nov 7, 2026
d9c72ff
Propose node-first scene architecture
tomvanmele Nov 7, 2026
d50d7b6
Propose stable scene objects and operation plugins
tomvanmele Nov 7, 2026
0093010
Accept stable scene architecture
tomvanmele Nov 7, 2026
0fe8f4a
Refresh stable scene integration gate
tomvanmele Nov 7, 2026
f2976d1
Record stable scene integration evidence
tomvanmele Nov 7, 2026
84b1a95
Record core patch coverage recovery
tomvanmele Nov 7, 2026
9d05138
Propose contextual scene form contributions
tomvanmele Nov 7, 2026
919964d
Accept contextual scene form ADRs
tomvanmele Nov 8, 2026
ed2527e
Amend contextual form architecture
tomvanmele Nov 8, 2026
c6c8352
Unify editable and durable scene state
tomvanmele Nov 8, 2026
fa47dbf
Verify contextual forms and propose viewer extensions
tomvanmele Nov 8, 2026
f67452e
Record contextual form verification
tomvanmele Nov 8, 2026
8bdb6d6
Accept viewer tables and configuration ADRs
tomvanmele Nov 8, 2026
33952e8
Verify viewer configuration and attribute tables
tomvanmele Nov 8, 2026
d3b0702
Refresh final viewer candidate
tomvanmele Nov 8, 2026
0e0de91
Pin documented scene candidates
tomvanmele Nov 8, 2026
667a281
Record final scene viewer verification
tomvanmele Nov 8, 2026
b29dc21
Pin refreshed viewer examples candidate
tomvanmele Nov 8, 2026
1196daa
Record refreshed viewer example verification
tomvanmele Nov 8, 2026
84d9102
Record exploratory viewer UI sketch
tomvanmele Nov 8, 2026
ef10a8c
Verify unified viewer selection
tomvanmele Nov 8, 2026
89cfcd6
Record selection integration evidence
tomvanmele Nov 8, 2026
16d017d
Verify reversible viewer transformations
tomvanmele Nov 8, 2026
f4370a4
Record transform integration evidence
tomvanmele Nov 8, 2026
2d817a2
Refine annotation and measurement architecture
tomvanmele Nov 8, 2026
ed1afc7
Accept annotation ownership and dimension units
tomvanmele Nov 8, 2026
0392dc2
Accept viewer measurement settings
tomvanmele Nov 8, 2026
d689448
Accept viewer overlay contracts
tomvanmele Nov 8, 2026
0347364
Accept measurement snapping contract
tomvanmele Nov 8, 2026
8b45ab5
Verify Phase 3 scene candidates
tomvanmele Nov 9, 2026
c4ae08f
Record Phase 3 scene verification
tomvanmele Nov 9, 2026
f849c26
Refresh measurement integration candidate
tomvanmele Nov 9, 2026
541b5a3
Record green scene integration gate
tomvanmele Nov 9, 2026
8fa3d05
Refine measurement snap contract
tomvanmele Nov 9, 2026
e8d02d0
Record green snap refinement gates
tomvanmele Nov 9, 2026
de3cb19
Refresh scene initiative measurement contracts
tomvanmele Nov 9, 2026
bd3062b
Record refreshed scene integration evidence
tomvanmele Nov 9, 2026
871a568
Integrate scene annotation collection candidates
tomvanmele Nov 9, 2026
3d2c9d1
Integrate viewer sidebar redesign
tomvanmele Nov 9, 2026
270e1d6
Record sidebar candidate revision
tomvanmele Nov 9, 2026
6648a94
Record verified sidebar redesign
tomvanmele Nov 9, 2026
21ff563
Pin viewer crash fixes
tomvanmele Nov 9, 2026
e09fd7e
Record and integrate viewer follow-up decisions
tomvanmele Nov 9, 2026
81c4b7d
Repin verified Viewer follow-up
tomvanmele Nov 9, 2026
f7ac4ce
Repin portable Viewer candidate
tomvanmele Nov 9, 2026
84846ea
Record verified viewer follow-ups
tomvanmele Nov 9, 2026
fd09874
Record scene viewer follow-up contracts
tomvanmele Nov 13, 2026
7575d30
Record verified scene viewer checkpoint
tomvanmele Nov 13, 2026
94f675b
Checkpoint scene and Viewer follow-ups through ADR 052
tomvanmele Nov 22, 2026
d21d4ac
Merge c3-upgrade into scene and Viewer initiative
tomvanmele Nov 22, 2026
76dd82a
Move Framework scene coordination to COMPAS Hub
tomvanmele Nov 24, 2026
25f0209
Reconcile Framework Scene with c3-upgrade
tomvanmele Nov 24, 2026
86435df
Verify the exact Core, Viewer, and Model Scene candidates
tomvanmele Nov 24, 2026
edc0b42
Install Pillow for the exact Viewer Scene candidate
tomvanmele Nov 24, 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
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ _Put an `x` in the boxes that apply. You can also fill these out after creating
- [ ] I ran the pure package tests locally (`uv run invoke test`).
- [ ] I ran lint locally and there are no errors (`uv run invoke lint`).
- [ ] I added new functions/classes and made them available on a second-level import, e.g. `compas.datastructures.Mesh`.
- [ ] I recorded any applicable cross-package verification evidence in this pull request.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] I have added necessary documentation (if appropriate)
1 change: 1 addition & 0 deletions .github/scene-candidates/core-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
compas @ git+https://github.com/compas-dev/compas.git@9f4db763d2de0dd9bcddabd29e63bb047ac20385
1 change: 1 addition & 0 deletions .github/scene-candidates/model-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
compas_model @ git+https://github.com/BlockResearchGroup/compas_model.git@f8842589c7d3ce3c87d5f042d00de3efdf3f281c
1,092 changes: 1,092 additions & 0 deletions .github/scene-candidates/test_scene_integration.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .github/scene-candidates/viewer-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
compas_viewer @ git+https://github.com/compas-dev/compas_viewer.git@ff9c36e6400ddc9cfcb541d55f4613c0479a8cd1
64 changes: 64 additions & 0 deletions .github/workflows/scene-candidate-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: scene-candidate-integration

on:
pull_request:
branches: [c3-upgrade]
paths:
- .github/scene-candidates/**
- .github/workflows/scene-candidate-integration.yml
workflow_dispatch:

permissions:
contents: read

concurrency:
group: scene-candidate-integration-${{ github.ref }}
cancel-in-progress: true

jobs:
source-installed-candidates:
runs-on: ubuntu-24.04
env:
PYTHONDONTWRITEBYTECODE: "1"
QT_QPA_PLATFORM: offscreen
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Linux EGL/OpenGL runtime
run: |
sudo apt-get update
sudo apt-get install --yes libegl1 python3-opengl
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0
with:
version: "0.12.7"
- name: Install test tools and exact source candidates
run: |
uv venv
uv pip install --python .venv/bin/python pytest==9.0.2 pyright==1.1.414
uv pip install --python .venv/bin/python compas_viewer==2.0.2 Pillow
uv pip install \
--python .venv/bin/python \
--reinstall \
--requirements .github/scene-candidates/core-requirements.txt
uv pip install \
--python .venv/bin/python \
--no-deps \
--reinstall \
--requirements .github/scene-candidates/viewer-requirements.txt \
--requirements .github/scene-candidates/model-requirements.txt
uv pip check --python .venv/bin/python
- name: Check installed scene typing boundary
run: >-
uv run --no-sync pyright
--pythonversion 3.12
.github/scene-candidates/test_scene_integration.py
- name: Exercise installed Scene, Viewer, and Model behavior
run: >-
uv run --no-sync pytest
--basetemp "${RUNNER_TEMP}/scene-candidate-pytest"
-o cache_dir="${RUNNER_TEMP}/scene-candidate-cache"
.github/scene-candidates/test_scene_integration.py
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

* Moved the Codex agent roles, standalone initiative plans, and handoffs to the
COMPAS Hub. The framework repository retains the technical decision records.
* Moved initiative coordination plans, handoffs, and Codex agent roles to
the COMPAS Hub. Framework retains the technical decision records.
* Removed the `rhino`, `blender`, and `hosts` extras from the COMPAS 3
metapackage until their owning packages declare compatible dependencies and
pass host-runtime verification. Existing COMPAS 2 releases are unchanged.
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ candidate manifest. `--only-group dev --no-install-project` installs only
repository tools; it does not install `compas_occ`, `compas_cgal`,
`compas_libigl`, or the other framework runtime packages.

The COMPAS Hub tracks cross-package initiative plans and handoffs. In the
local COMPAS workspace, start at `Hub/initiatives/README.md`.

## Documentation

For more information, see the [COMPAS Framework documentation](https://compas.dev/compas_framework).
Expand Down
11 changes: 11 additions & 0 deletions initiatives/scene-viewer-visualisation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Scene, Viewer, and Visualisation

This initiative aligns backend-neutral scene infrastructure with Viewer
rendering, interaction, state, and UI composition. The COMPAS Hub tracks
the active implementation plan and handoff.

- [Objective](objective.md)
- [Inventory](inventory.md)
- [Proposal](proposal.md)
- [Architecture decisions](decisions/README.md)
- [UI design](ui.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# ADR 001: Ownership and State Boundaries

## Status

Accepted.

## Context

Core scene objects currently combine durable content with context-adapter
state, while Viewer selection, GPU identity, configuration, tool state, and UI
refresh paths are distributed across objects, renderer, commands, and widgets.
Moving everything into core would make Qt/rendering concerns framework
dependencies; leaving ownership implicit perpetuates coupling.

## Options

1. Keep core responsible for durable scene content and place renderer and
interaction state in Viewer.
2. Add rendering, selection, and reactive application state to core Scene.
3. Keep all current ownership and coordinate behavior through conventions.
4. Move durable scene content into Viewer and reduce core Scene to adapters.

## Recommendation

Choose option 1.

- Core owns scene items, hierarchy, scene-object GUIDs, local transformations,
visibility, durable appearance, and serialization.
- Viewer configuration owns persistent application preferences.
- Viewer session state owns selection, hover, tools, gestures, and transient
results.
- Viewer rendering owns indexed buffers, pick IDs, GPU resources, and refresh.
- Domain packages own authoritative domain hierarchies and caches and project
them into core scenes through public Viewer operations.

GUIDs connect durable scene objects to Viewer state. Pick IDs and transient
state are never serialized. Do not add Qt signals or GPU contracts to core.

## Consequences

- Core remains usable by notebook and host adapters without Viewer.
- Selection and tools stop leaking into serialized scene-object settings.
- Viewer must provide explicit public state and synchronization operations.
- Domain packages retain their own data authority rather than duplicating it
in a generic application store.
- Existing Viewer code that reaches its singleton, renderer, or widgets must
migrate gradually after the public boundary exists.

## Compatibility

ADR 008 proposes replacing the current incomplete scene serialization without
a compatibility loader. Removing transient Viewer fields and introducing the
new scene-node schema therefore form a deliberate C3 serialization break.

## Verification

- Round-trip core scenes without Viewer installed.
- Prove Viewer selection, hover, tools, and pick IDs are absent from scene
serialization.
- Verify domain objects resolve through stable scene-object GUIDs after UI
rebuilds.

## Affected packages

Initial implementation: `compas`, `compas_viewer`, and `compas_framework`.

Later redesign/regression consumer: `compas_model`.

## Dependencies

- Geometry-tessellation ADRs 022 and 024
- Plugin-implementations ADR 002

## Pending amendments

Verified round-trip failures showed that this decision did not distinguish the
durable scene node/state from the context-specific runtime `SceneObject`
adapter precisely enough. Accepted [ADR 008](008-scene-nodes-and-runtime-adapters.md)
and [ADR 009](009-scene-state-fields.md) amend that boundary. Accepted
[ADR 010](010-scene-description-and-item-bundling.md) defines item ownership
and the later Session aggregation boundary.

The generic principle that domain packages retain their own data authority
does not preserve the current draft `ModelViewer` controller, projections,
selection behavior, or cache shape. Explicit user correction moves that draft
to a later redesign phase.
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# ADR 002: Indexed Viewer Buffer Geometry

## Status

Accepted.

## Context

Viewer can batch geometry efficiently but its general `BufferGeometry`
requires expanded line and triangle vertices. This duplicates arrays and makes
callers manually expand vertices plus edges or triangles. Core numerical APIs
already accept structural Python and NumPy buffers, and Viewer-specific GPU
layout should not become a compulsory core geometry representation.

## Options

1. Add one Viewer-owned shared-vertex indexed `BufferGeometry` contract and
convenience constructors.
2. Put a GPU-oriented buffer type in core.
3. Require `Tessellation`, `PolygonalSurface`, or `Mesh` for every input.
4. Preserve expanded arrays and add only helper functions that duplicate them.

## Recommendation

Choose option 1. Use shared `vertices` plus optional point, edge, and triangle
index channels. Provide:

```python
BufferGeometry.from_points(vertices)
BufferGeometry.from_vertices_and_edges(vertices, edges)
BufferGeometry.from_vertices_and_triangles(vertices, triangles)
```

Accept structural Python sequences and NumPy arrays. Normalize once to Viewer
dtypes and check rank, column count, and index bounds. Preserve indices through
the buffer manager and do not create one scene object per primitive.

Keep styling on scene objects. Do not add a universal render geometry to core
or make this contract an input to geometry algorithms.

## Consequences

- Large edge and triangle datasets avoid Python-object and vertex-expansion
overhead.
- Viewer adapters gain one common path for indexed geometry.
- Geometry with independent point/line/triangle vertex pools must combine
them into one vertex table with offset indices at the Viewer boundary.
- Per-channel or per-primitive color arrays beyond current behavior require
evidence and a separate refinement rather than speculative fields.

## Compatibility

The existing expanded `points`, `lines`, and `faces` constructor is replaced
in a coordinated Viewer change. Examples and adapters migrate together; no
parallel deprecated constructor is proposed.

## Verification

- Test list and NumPy inputs, exact shapes/dtypes, bounds, empty channels, and
input non-mutation.
- Assert indices remain indexed in CPU/GPU assembly.
- Exercise large input without per-edge or per-triangle scene objects.
- Compare rendering semantics with current points, lines, and faces.

## Affected packages

Initial implementation: `compas_viewer` and `compas_framework`.

Later redesign consumer: `compas_model`; its current render-cache shape is not
preserved by this decision.

## Dependencies

- [ADR 001](001-ownership-boundaries.md)
- Accepted structural numerical-input decisions from typing alignment
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# ADR 003: Viewer State and Object Selection

## Status

Accepted.

## Context

Selection currently lives in mutable `ViewerSceneObject.is_selected` flags.
Viewport commands, tree widgets, shaders, and programmatic consumers mutate or
poll those flags and then trigger imperative refreshes. `ViewerState` observes
persistent configuration but not selection or tool state.

## Options

1. Add one Viewer-owned observable object-selection model and separate
persistent configuration from transient state.
2. Keep scene-object flags and add selection-change signals around them.
3. Put selection into core Scene and serialize it.
4. Adopt a generic third-party reactive state store for all Viewer data.

## Recommendation

Choose option 1.

`Viewer.state.selection` stores ordered scene-object GUIDs and provides
replace, add, remove, toggle, clear, membership, and ordered-resolution
operations. It emits one batched change notification per operation. Viewport,
rectangle selection, scene tree, commands, shaders, and programmatic consumers use
this model exclusively.

Keep `Viewer.config` for persistent preferences. Keep hover, active tool,
gesture, and temporary tool values in small explicit Viewer state fields. Use a
Qt-neutral Python model with a Qt bridge. Remove `is_selected` rather than
retaining a second writable authority.

Initial selection is scene-object-level only. Do not invent a generic vertex,
edge, face, or domain-component token until an approved editing workflow
requires it.

## Consequences

- Tree, viewport, code, and renderer observe one mutation
path.
- Selection no longer participates in scene serialization.
- Batch changes avoid repeated renderer/UI updates.
- Existing selection APIs and tests require a coordinated breaking migration.
- Sub-object selection remains explicitly unsupported in the initial wave.

## Compatibility

Remove Viewer `is_selected` constructor/settings behavior. Later integrations
may consume the selection model but do not define its contract.

## Verification

- Exercise replace/add/remove/toggle/clear from viewport, rectangle, tree, and
programmatic paths.
- Assert one notification and one render/UI synchronization per batch.
- Verify stable ordering, removed-object cleanup, and serialization exclusion.

## Affected packages

`compas_viewer` and `compas_framework`. `compas_model` is a later redesign
consumer.

## Dependencies

- [ADR 001](001-ownership-boundaries.md)

## Refinement after acceptance

The current `compas_model.ModelViewer` is a draft and does not promise a
model-order selection contract that this ADR must preserve. The accepted
decision remains one Viewer-owned selection model; model-specific preservation
language has been removed by explicit user correction.
Loading
Loading