Modeling - BRep Graph Builder and Editor clean up (#1237)

- Replace `BRepGraph_Builder::Perform()` with `BRepGraph_Builder::Add()` and introduce `BRepGraph::Clear()` as the rebuild boundary.
- Refactor product/occurrence editing APIs (e.g., `AddAssembly` → `CreateEmptyProduct`, `AddOccurrence` → `LinkProducts`, occurrence mutation via `Editor().Occurrences()`).
- Update a large set of GTests and inline docs to use the new lifecycle and API names.
This commit is contained in:
Pasukhin Dmitry
2026-04-26 15:02:00 +01:00
committed by GitHub
parent 0804c2b3f9
commit 048a2927fb
59 changed files with 2483 additions and 1224 deletions
@@ -179,7 +179,9 @@ TEST_P(BRepGraph_FuzzSeedTest, BoxSeed_RandomMutations_RemainValid)
const uint32_t aSeed = GetParam();
BRepGraph aGraph;
BRepGraph_Builder::Perform(aGraph, BRepPrimAPI_MakeBox(10.0, 20.0, 30.0).Shape());
aGraph.Clear();
[[maybe_unused]] const BRepGraph_Builder::Result aBuildRes1 =
BRepGraph_Builder::Add(aGraph, BRepPrimAPI_MakeBox(10.0, 20.0, 30.0).Shape());
ASSERT_TRUE(aGraph.IsDone());
ASSERT_TRUE(BRepGraph_Validate::Perform(aGraph, BRepGraph_Validate::Options::Audit()).IsValid())
<< "Seed graph must be clean before fuzzing";
@@ -194,7 +196,9 @@ TEST_P(BRepGraph_FuzzSeedTest, CylinderSeed_RandomMutations_RemainValid)
const uint32_t aSeed = GetParam();
BRepGraph aGraph;
BRepGraph_Builder::Perform(aGraph, BRepPrimAPI_MakeCylinder(5.0, 15.0).Shape());
aGraph.Clear();
[[maybe_unused]] const BRepGraph_Builder::Result aBuildRes2 =
BRepGraph_Builder::Add(aGraph, BRepPrimAPI_MakeCylinder(5.0, 15.0).Shape());
ASSERT_TRUE(aGraph.IsDone());
ASSERT_TRUE(BRepGraph_Validate::Perform(aGraph, BRepGraph_Validate::Options::Audit()).IsValid());