Skip to content

feat(graph): graph-select verb + convexity in graph-ml (closes #54, #55)#56

Merged
gsdali merged 2 commits into
mainfrom
feat/brepgraph-selection
Jun 18, 2026
Merged

feat(graph): graph-select verb + convexity in graph-ml (closes #54, #55)#56
gsdali merged 2 commits into
mainfrom
feat/brepgraph-selection

Conversation

@gsdali

@gsdali gsdali commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Implements the two self-contained BRepGraph coverage gaps from the audit — the selection / "pointer" primitives the generative-CAD literature (UV-Net, Pointer-CAD, AAGNet) relies on.

#54graph-select verb

Answers a local topology question without exporting + re-parsing the whole graph (graph-ml):

query returns
--query face-neighbors --face N faces adjacent to face N, each with convexity + shared-edge count, plus the face's planar/vertical/horizontal/normal attrs
--query edge-faces --edge M the edge's faces, start/end vertices, boundary + manifold flags
--query vertex-edges --vertex K edges incident to vertex K
--query face-adjacency the full attributed face-adjacency graph (gAAG)
--query edges-class --class boundary|non-manifold|seam|degenerate matching edge indices

Backed by the kernel AAG (face queries / convexity) and TopologyGraph (edge/vertex adjacency).

#55 — convexity-attributed face-adjacency in graph-ml

graph-ml now emits a faceAdjacency block — [{face1, face2, convexity, sharedEdgeCount}] from the AAG. Convexity is the top edge feature in B-rep GNNs (the gAAG attribute used by AAGNet/BRepGAT) and is exactly what concave/convex selectors resolve; it was previously absent from the export.

Index spaces

Face queries use AAG indices (= shape.faces() order = the face[N] scheme query-topology emits). Edge/vertex queries use TopologyGraph indices (edge[M]/vertex[K]). Convexity is a dihedral-between-two-faces property, so it's reported on face adjacencies, not lone edges — documented in the verb header.

Verification

swift build clean. Smoke-tested on recipes/01-mounting-bracket (a filleted L-bracket): 20 faces / 38 adjacencies; the filleted inner corner classifies concave and outer edges convex as expected; a watertight solid reports 0 boundary edges.

Also carries the earlier OKF knowledge-bundle docs commit (docs/knowledge/) that was sitting on local main.

The MCP-side mirror of these (graph_select / convexity passthrough on scene bodies) is OCCTMCP#38, which depends on this landing + a release.

🤖 Generated with Claude Code

gsdali and others added 2 commits June 19, 2026 08:13
OKF (Open Knowledge Format, from the Google Knowledge Catalog) bundle under docs/knowledge/ for durable cross-cutting knowledge: overview, OKF reference, open-source-boundary policy, and the relationship to the downstream commercial OCCTStudio app (which consumes the reconstruct feature-graph IR). CLAUDE.md remains the detailed per-verb reference; adds a pointer to the bundle.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…in graph-ml

Closes #54, #55.

#54 — new `graph-select` verb for local B-rep graph queries without dumping the whole graph: face-neighbors (+ convexity/shared-edge count via the kernel AAG), edge-faces (faces/vertices/boundary/manifold flags), vertex-edges, face-adjacency (full gAAG), and edges-class (boundary|non-manifold|seam|degenerate). The selection/pointer primitive for DSL selectors + GNN face-adjacency selection.

#55 — graph-ml now emits a faceAdjacency block [{face1,face2,convexity,sharedEdgeCount}] from the AAG (the gAAG edge attribute; convexity is the top edge feature in B-rep GNNs). Face indices follow shape.faces() order (the face[N] scheme query-topology emits).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gsdali gsdali force-pushed the feat/brepgraph-selection branch from cc2f703 to f7e4894 Compare June 18, 2026 22:13
@gsdali gsdali merged commit d95999b into main Jun 18, 2026
@gsdali gsdali deleted the feat/brepgraph-selection branch June 18, 2026 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant