Thank you very much for your suggestion!I can get all names about Solid.
Although I can get the name of the corresponding Solid now, I don't quite understand it.
Before I traversed the entities of the OCCT model in this way
TopExp_Explorer ex;
for (ex.Init(aShape, TopAbs_SOLID); ex.More(); ex.Next()){
const TopoDS_Solid& aSolid = TopoDS::Solid(ex.Current());
};
Method 1: Solid(A1,A2,A3...) obtained by traversing TopoDS_Shape.
But now I read the Solid name in this way:
Interface_EntityIterator entIt = Model->Entities();
for (; entIt.More(); entIt.Next()) {
const Handle(Standard_Transient)& ent = entIt.Value();
if (ent->IsKind(STANDARD_TYPE(StepShape_ManifoldSolidBrep))) {
Handle(StepShape_ManifoldSolidBrep) msb = Handle(StepShape_ManifoldSolidBrep)::DownCast(ent);
std::cout << "Found Manifold Solid BREP with name '" << msb->Name()->ToCString() << "'" << std::endl;
}
}
Method 2: Solid of Name(B1,B2,B3...) obtained by traversing Entities;
Because through the first traversal, I can obtain information such as the faces contained in the Solid, and I need to correspond to the entity name traversed by the second method.
What I'm not sure about is: whether the Solids traversed by these two methods correspond to each other(A1.name === B1, A2.name === B2,A3.name=== B3....);
thanks agin.
Sunlin.