mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-07 20:47:27 +05:00
CCAR: remove clash between main shape and sub shapes
This commit is contained in:
parent
3b461374c9
commit
f48c416836
@ -252,25 +252,25 @@ TopoDS_Shape GEOM_Client::GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_p
|
|||||||
START_TIMING;
|
START_TIMING;
|
||||||
|
|
||||||
TopTools_IndexedMapOfShape anIndices;
|
TopTools_IndexedMapOfShape anIndices;
|
||||||
anIOR = geom->GetStringFromIOR(aShape->GetMainShape());
|
CORBA::String_var aMainIOR = geom->GetStringFromIOR(aShape->GetMainShape());
|
||||||
IOR = (char*)anIOR.in();
|
TCollection_AsciiString mainIOR = (char*)aMainIOR.in();
|
||||||
|
|
||||||
//find subshapes only one time
|
//find subshapes only one time
|
||||||
if(_mySubShapes.count(IOR)==0)
|
if(_mySubShapes.count(mainIOR)==0)
|
||||||
{
|
{
|
||||||
std::cerr << "find sub shapes " << std::endl;
|
std::cerr << "find sub shapes " << std::endl;
|
||||||
TopExp::MapShapes(aMainShape, anIndices);
|
TopExp::MapShapes(aMainShape, anIndices);
|
||||||
Standard_Integer ii = 1, nbSubSh = anIndices.Extent();
|
Standard_Integer ii = 1, nbSubSh = anIndices.Extent();
|
||||||
for (; ii <= nbSubSh; ii++)
|
for (; ii <= nbSubSh; ii++)
|
||||||
{
|
{
|
||||||
_mySubShapes[IOR].push_back(anIndices.FindKey(ii));
|
_mySubShapes[mainIOR].push_back(anIndices.FindKey(ii));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Case of only one subshape */
|
/* Case of only one subshape */
|
||||||
if (list->length() == 1 && list[0] > 0) {
|
if (list->length() == 1 && list[0] > 0) {
|
||||||
//S = anIndices.FindKey(list[0]);
|
//S = anIndices.FindKey(list[0]);
|
||||||
S = _mySubShapes[IOR][list[0]-1];
|
S = _mySubShapes[mainIOR][list[0]-1];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BRep_Builder B;
|
BRep_Builder B;
|
||||||
@ -278,7 +278,7 @@ TopoDS_Shape GEOM_Client::GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_p
|
|||||||
B.MakeCompound(aCompound);
|
B.MakeCompound(aCompound);
|
||||||
for (int i = 0; i < list->length(); i++) {
|
for (int i = 0; i < list->length(); i++) {
|
||||||
if (0 < list[i] && list[i] <= anIndices.Extent()) {
|
if (0 < list[i] && list[i] <= anIndices.Extent()) {
|
||||||
TopoDS_Shape aSubShape = _mySubShapes[IOR][list[i]-1];
|
TopoDS_Shape aSubShape = _mySubShapes[mainIOR][list[i]-1];
|
||||||
//TopoDS_Shape aSubShape = anIndices.FindKey(list[i]);
|
//TopoDS_Shape aSubShape = anIndices.FindKey(list[i]);
|
||||||
B.Add(aCompound, aSubShape);
|
B.Add(aCompound, aSubShape);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user