- // Find a sub-shape of theNewO in place of anOldSubO
- GEOM::GEOM_Object_var aNewSubO;
- switch (theFindMethod) {
- case GEOM::FSM_GetInPlace:
- {
- // Use GetInPlace
- aNewSubO = aShapesOp->GetInPlace(theNewO, anOldSubO);
- }
- break;
- case GEOM::FSM_Transformed:
- {
- // transformation, cannot use GetInPlace, operate with indices
- GEOM::ListOfLong_var anIDs = anOldSubO->GetSubShapeIndices();
- if (anIDs->length() > 1) {
- // group
- aNewSubO = aGroupOp->CreateGroup(theNewO, aGroupOp->GetType(anOldSubO));
- if (!CORBA::is_nil(aNewSubO))
- aGroupOp->UnionIDs(aNewSubO, anIDs);
- }
- else {
- // single sub-shape
- aNewSubO = aShapesOp->GetSubShape(theNewO, anIDs[0]);
- }
- }
- break;
- case GEOM::FSM_GetSame:
- {
- // Use GetSame
- aNewSubO = aShapesOp->GetSame(theNewO, anOldSubO);
- }
- break;
- case GEOM::FSM_GetShapesOnShape:
- {
- // Use GetShapesOnShape. Can work only on solids, so it has sense to search only solids
- aNewSubO = aShapesOp->GetShapesOnShapeAsCompound(anOldSubO, theNewO,
- (short)GEOM::SOLID, GEOM::ST_ONIN);
- }
- break;
- case GEOM::FSM_GetInPlaceByHistory:
- {
- // Use GetInPlaceByHistory
- aNewSubO = aShapesOp->GetInPlaceByHistory(theNewO, anOldSubO);
- }
- break;
- default:
- {}
- }
-
- if (!CORBA::is_nil(aNewSubO)) {
- // add the part to the list
- aParts[i] = aNewSubO;
- i++;
+ // Find a sub-shape of theNewO in place of anOldSubO
+ GEOM::GEOM_Object_var aNewSubO;
+ switch (theFindMethod) {
+ case GEOM::FSM_GetInPlace:
+ {
+ // Use GetInPlace
+ aNewSubO = aShapesOp->GetInPlace(theNewO, anOldSubO);
+ }
+ break;
+ case GEOM::FSM_Transformed:
+ {
+ // transformation, cannot use GetInPlace, operate with indices
+ GEOM::ListOfLong_var anIDs = anOldSubO->GetSubShapeIndices();
+ if (anIDs->length() > 1) {
+ // group
+ aNewSubO = aGroupOp->CreateGroup(theNewO, aGroupOp->GetType(anOldSubO));
+ if (!CORBA::is_nil(aNewSubO))
+ aGroupOp->UnionIDs(aNewSubO, anIDs);
+ }
+ else {
+ // single sub-shape
+ aNewSubO = aShapesOp->GetSubShape(theNewO, anIDs[0]);
+ }
+ }
+ break;
+ case GEOM::FSM_GetSame:
+ {
+ // Use GetSame
+ aNewSubO = aShapesOp->GetSame(theNewO, anOldSubO);
+ }
+ break;
+ case GEOM::FSM_GetShapesOnShape:
+ {
+ // Use GetShapesOnShape. Can work only on solids, so it has sense to search only solids
+ aNewSubO = aShapesOp->GetShapesOnShapeAsCompound(anOldSubO, theNewO,
+ (short)GEOM::SOLID, GEOM::ST_ONIN);
+ }
+ break;
+ case GEOM::FSM_GetInPlaceByHistory:
+ {
+ // Use GetInPlaceByHistory
+ aNewSubO = aShapesOp->GetInPlaceByHistory(theNewO, anOldSubO);
+ }
+ break;
+ default:
+ {}
+ }
+
+ if (!CORBA::is_nil(aNewSubO)) {
+ // add the part to the list
+ aParts[i] = aNewSubO;
+ i++;