Modeling - Refactor BRepGraph for uint32_t ids (#1229)

- Migrated node/ref/rep ID types and many count-returning APIs from `int` to `uint32_t`/`size_t` (history indices), updating iterators and bounds checks accordingly.
- Reworked numerous loops from raw integer indexing to typed-id iteration (`Start()`, `IsValid()`, range-for) across core code and tests.
- Expanded compaction test coverage (incl. bounding-box preservation assertion), plus clearer assertions/messages.
This commit is contained in:
Pasukhin Dmitry
2026-04-23 22:09:31 +01:00
committed by GitHub
parent 48e84c53a9
commit 7eb211cc2e
55 changed files with 1934 additions and 1878 deletions
@@ -1347,11 +1347,13 @@ TEST(BRepGraphIncTest, ReverseIndex_CompSolid_ReverseMaintained_AfterBuild)
ASSERT_GE(aStorage.NbSolids(), 2);
// Both solids must appear in myCompSolidsOfSolid.
for (int i = 0; i < aStorage.NbSolids(); ++i)
for (BRepGraph_SolidId aSolidId = BRepGraph_SolidId::Start();
aSolidId.IsValid(aStorage.NbSolids());
++aSolidId)
{
const NCollection_Vector<BRepGraph_CompSolidId>* aCSVec =
aStorage.ReverseIndex().CompSolidsOfSolid(BRepGraph_SolidId(i));
EXPECT_NE(aCSVec, nullptr) << "Solid " << i << " not in any CompSolid";
aStorage.ReverseIndex().CompSolidsOfSolid(aSolidId);
EXPECT_NE(aCSVec, nullptr) << "Solid " << aSolidId.Index << " not in any CompSolid";
if (aCSVec != nullptr)
{
EXPECT_EQ(aCSVec->Length(), 1);