v1.0.1 — TopologyGraph.rootNodes fix
v1.0.1 — TopologyGraph.rootNodes fix + test repair
Bug fix
TopologyGraph.NodeKind was missing the product = 10 and occurrence = 11 raw values from OCCT's BRepGraph_NodeId::Kind enum, so TopologyGraph.rootNodes silently returned [] even when products were present:
return (0..<count).compactMap { i in
guard let kind = NodeKind(rawValue: kinds[i]) else { return nil } // returns nil for raw 10/11
return RootNode(kind: kind, index: Int(indices[i]))
}After OCCT 8.0.0 beta1 reshaped root iteration to "Products only" (Kind = 10), every rootNodes consumer hit this and silently lost data. Fixed by extending NodeKind to cover the full BRepGraph_NodeId::Kind range:
| Case | Raw | OCCT enum |
|---|---|---|
solid |
0 | topology |
shell |
1 | topology |
face |
2 | topology |
wire |
3 | topology |
edge |
4 | topology |
vertex |
5 | topology |
compound |
6 | container |
compSolid |
7 | container |
coedge |
8 | face-context |
product |
10 (new) | assembly |
occurrence |
11 (new) | assembly |
Slot 9 is reserved upstream for future topology extension.
Tests repaired alongside the fix
The four pre-existing failures shipped with v1.0.0 are now passing:
hasRoots/childExplorerwrap the box's solid in a Product vialinkProductToTopology(shapeRootKind: 0, shapeRootIndex: 0)before queryingrootNodes(matches OCCT 8.0 GA assembly semantics; a plainShape.box()has no Product, soRootProductIds()is empty by design).edgeVertexDistanceswitched from low-levelBRepExtrema_DistanceSS(which deliberately skips edge-vertex pairs whose closest point falls at an edge's endpoint-vertex — it expects the caller to pair vertices-with-vertices separately) to the high-levelShape.distance(to:)API backed byBRepExtrema_DistShapeShape, which orchestrates all subshape combinations including endpoint cases.edgeSelectorFeatureUnsupporteddeleted — it assertedFillet.onFeaturewas unsupported, contradicting the newerfilletOnFeaturetest that asserts the opposite..onFeatureis wired up inFeatureReconstructorsince v0.143.
Binary
xcframework binary is unchanged from v1.0.0. SPM consumers using the remote URL continue resolving against the v1.0.0 asset (Package.swift URL/checksum unchanged). No need to re-download anything; SPM picks up the Swift-side fix directly from this tag.
🤖 Generated with Claude Code