mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-03 01:58:01 +08:00
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:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user