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