return aRes;
}
- // 3. Fill shapes to glue aMSG
- TopTools_DataMapOfShapeListOfShape aMSG;
- const TopTools_DataMapOfShapeListOfShape& aMSD = aGA.ShapesDetected();
- TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItMSD;
- aItMSD.Initialize(aMSD);
- for (; aItMSD.More(); aItMSD.Next()) {
- const TopoDS_Shape& aSx = aItMSD.Key();
- const TopTools_ListOfShape& aLSD = aItMSD.Value();
- if (aSx.ShapeType() == theShapeType) {
- aMSG.Bind(aSx, aLSD);
+ if (theShapeType != TopAbs_FACE) {
+ // 3. Fill shapes to glue aMSG
+ TopTools_DataMapOfShapeListOfShape aMSG;
+ const TopTools_DataMapOfShapeListOfShape& aMSD = aGA.ShapesDetected();
+ TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItMSD;
+ aItMSD.Initialize(aMSD);
+ for (; aItMSD.More(); aItMSD.Next()) {
+ const TopoDS_Shape& aSx = aItMSD.Key();
+ const TopTools_ListOfShape& aLSD = aItMSD.Value();
+ if (aSx.ShapeType() == theShapeType) {
+ aMSG.Bind(aSx, aLSD);
+ }
}
- }
- // 4. Set shapes to glue. If the operator is absent, the whole gluing will be done
- aGA.SetShapesToGlue(aMSG);
+ // 4. Set shapes to glue. If the operator is absent, the whole gluing will be done
+ aGA.SetShapesToGlue(aMSG);
+ }
// 5. Gluing
aGA.Perform();
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_IBasicOperations interface
- if (CORBA::is_nil(myBasicOp) || isNewStudy(myLastStudyID,myStudyID))
+ if (CORBA::is_nil(myBasicOp) || isNewStudy(myLastStudyID,myStudyID)) {
+ //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+ // Try to get id of the study from the SALOME Session
+ if(myStudyID < 0 ) SetStudyID(-1);
myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID);
+ }
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_I3DPrimOperations interface
- if (CORBA::is_nil(my3DPrimOp) || isNewStudy(myLastStudyID,myStudyID))
+ if (CORBA::is_nil(my3DPrimOp) || isNewStudy(myLastStudyID,myStudyID)) {
+ //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+ // Try to get id of the study from the SALOME Session
+ if(myStudyID < 0 ) SetStudyID(-1);
my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID);
+ }
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_IBooleanOperations interface
- if (CORBA::is_nil(myBoolOp) || isNewStudy(myLastStudyID,myStudyID))
+ if (CORBA::is_nil(myBoolOp) || isNewStudy(myLastStudyID,myStudyID)) {
+ //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+ // Try to get id of the study from the SALOME Session
+ if(myStudyID < 0 ) SetStudyID(-1);
myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID);
+ }
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_IInsertOperations interface
- if (CORBA::is_nil(myInsOp) || isNewStudy(myLastStudyID,myStudyID))
+ if (CORBA::is_nil(myInsOp) || isNewStudy(myLastStudyID,myStudyID)) {
+ //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+ // Try to get id of the study from the SALOME Session
+ if(myStudyID < 0 ) SetStudyID(-1);
myInsOp = myGeomEngine->GetIInsertOperations(myStudyID);
+ }
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_ITransformOperations interface
- if (CORBA::is_nil(myTransfOp) || isNewStudy(myLastStudyID,myStudyID))
+ if (CORBA::is_nil(myTransfOp) || isNewStudy(myLastStudyID,myStudyID)) {
+ //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+ // Try to get id of the study from the SALOME Session
+ if(myStudyID < 0 ) SetStudyID(-1);
myTransfOp = myGeomEngine->GetITransformOperations(myStudyID);
+ }
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_IShapesOperations interface
- if (CORBA::is_nil(myShapesOp) || isNewStudy(myLastStudyID,myStudyID))
+ if (CORBA::is_nil(myShapesOp) || isNewStudy(myLastStudyID,myStudyID)) {
+ //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+ // Try to get id of the study from the SALOME Session
+ if(myStudyID < 0 ) SetStudyID(-1);
myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID);
+ }
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_IBlocksOperations interface
- if (CORBA::is_nil(myBlocksOp) || isNewStudy(myLastStudyID,myStudyID))
+ if (CORBA::is_nil(myBlocksOp) || isNewStudy(myLastStudyID,myStudyID)) {
+ //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+ // Try to get id of the study from the SALOME Session
+ if(myStudyID < 0 ) SetStudyID(-1);
myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID);
+ }
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_ICurvesOperations interface
- if (CORBA::is_nil(myCurvesOp) || isNewStudy(myLastStudyID,myStudyID))
+ if (CORBA::is_nil(myCurvesOp) || isNewStudy(myLastStudyID,myStudyID)) {
+ //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+ // Try to get id of the study from the SALOME Session
+ if(myStudyID < 0 ) SetStudyID(-1);
myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID);
+ }
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_ILocalOperations interface
- if (CORBA::is_nil(myLocalOp) || isNewStudy(myLastStudyID,myStudyID))
+ if (CORBA::is_nil(myLocalOp) || isNewStudy(myLastStudyID,myStudyID)) {
+ //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+ // Try to get id of the study from the SALOME Session
+ if(myStudyID < 0 ) SetStudyID(-1);
myLocalOp = myGeomEngine->GetILocalOperations(myStudyID);
+ }
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_IGroupOperations interface
- if (CORBA::is_nil(myGroupOp) || isNewStudy(myLastStudyID,myStudyID))
+ if (CORBA::is_nil(myGroupOp) || isNewStudy(myLastStudyID,myStudyID)) {
+ //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+ // Try to get id of the study from the SALOME Session
+ if(myStudyID < 0 ) SetStudyID(-1);
myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID);
+ }
}
//=============================================================================
if (CORBA::is_nil(myGeomEngine))
setGeomEngine();
// get GEOM_IAdvancedOperations interface
- if (CORBA::is_nil(myAdvancedOp) || isNewStudy(myLastStudyID,myStudyID))
+ if (CORBA::is_nil(myAdvancedOp) || isNewStudy(myLastStudyID,myStudyID)) {
+ //rnv: to fix bug "IPAL22461 6.3.0: Incorrect study storage if study contains shape modified with YACS"
+ // Try to get id of the study from the SALOME Session
+ if(myStudyID < 0 ) SetStudyID(-1);
myAdvancedOp = myGeomEngine->GetIAdvancedOperations(myStudyID);
+ }
}
//=============================================================================
GEOM::ListOfGO_var aSubObjects = aShapesOp->MakeExplode(myInPlaceObj, getShapeType(), false);
for (int i = 0; i < aSubObjects->length(); i++)
{
- CORBA::Long aMainIndex = aLocOp->GetSubShapeIndex(myMainObj, aSubObjects[i]);
- CORBA::Long aPlaceIndex = aLocOp->GetSubShapeIndex(myInPlaceObj, aSubObjects[i]);
- if (aMainIndex >= 0 && aPlaceIndex > 0)
- myMain2InPlaceIndices.Bind(aMainIndex, aPlaceIndex);
+ GEOM::GEOM_Object_var aSS = aShapesOp->GetSame(myMainObj, aSubObjects[i]);
+ if (!CORBA::is_nil(aSS)) {
+ CORBA::Long aMainIndex = aLocOp->GetSubShapeIndex(myMainObj, aSS);
+ CORBA::Long aPlaceIndex = aLocOp->GetSubShapeIndex(myInPlaceObj, aSubObjects[i]);
+ if (aMainIndex >= 0 && aPlaceIndex > 0)
+ myMain2InPlaceIndices.Bind(aMainIndex, aPlaceIndex);
+ }
}
}
myInPlaceObjSelectState = subSelectionWay();
TopoDS_Shape aMainShape = GEOM_Client::get_client().GetShape(GeometryGUI::GetGeomGen(), myMainObj);
TopoDS_Shape aRestrictionShape;
- if (subSelectionWay() == ALL_SUBSHAPES)
+
+ if (subSelectionWay() == ALL_SUBSHAPES) {
aRestrictionShape = aMainShape;
- else if (!myInPlaceObj->_is_nil())
- aRestrictionShape = GEOM_Client::get_client().GetShape(GeometryGUI::GetGeomGen(), myInPlaceObj);
- else ;
- TopTools_IndexedMapOfShape aSubShapesMap;
- TopExp::MapShapes(aMainShape, aSubShapesMap);
- CORBA::String_var aMainEntry = myMainObj->GetStudyEntry();
- QString anEntryBase = aMainEntry.in();
+ TopTools_IndexedMapOfShape aSubShapesMap;
+ TopExp::MapShapes(aMainShape, aSubShapesMap);
+ CORBA::String_var aMainEntry = myMainObj->GetStudyEntry();
+ QString anEntryBase = aMainEntry.in();
- TopExp_Explorer anExp (aRestrictionShape, getShapeType());
- for (; anExp.More(); anExp.Next())
- {
- TopoDS_Shape aSubShape = anExp.Current();
- int index = aSubShapesMap.FindIndex(aSubShape);
- QString anEntry = anEntryBase + QString("_%1").arg(index);
+ TopExp_Explorer anExp (aRestrictionShape, getShapeType());
+ for (; anExp.More(); anExp.Next()) {
+ TopoDS_Shape aSubShape = anExp.Current();
+ int index = aSubShapesMap.FindIndex(aSubShape);
+ QString anEntry = anEntryBase + QString("_%1").arg(index);
- SALOME_Prs* aPrs = aDisplayer->buildSubshapePresentation(aSubShape, anEntry, aView);
- if (aPrs) {
- displayPreview(aPrs, true, false); // append, do not update
+ SALOME_Prs* aPrs = aDisplayer->buildSubshapePresentation(aSubShape, anEntry, aView);
+ if (aPrs) {
+ displayPreview(aPrs, true, false); // append, do not update
+ }
+ }
+ }
+ else if (!myInPlaceObj->_is_nil()) {
+ TopTools_IndexedMapOfShape aSubShapesMap;
+ TopExp::MapShapes(aMainShape, aSubShapesMap);
+ CORBA::String_var aMainEntry = myMainObj->GetStudyEntry();
+ QString anEntryBase = aMainEntry.in();
+
+ TColStd_DataMapIteratorOfDataMapOfIntegerInteger aM2IPit (myMain2InPlaceIndices);
+ for (; aM2IPit.More(); aM2IPit.Next()) {
+ int index = aM2IPit.Key();
+ TopoDS_Shape aSubShape = aSubShapesMap.FindKey(index);
+ QString anEntry = anEntryBase + QString("_%1").arg(index);
+
+ SALOME_Prs* aPrs = aDisplayer->buildSubshapePresentation(aSubShape, anEntry, aView);
+ if (aPrs) {
+ displayPreview(aPrs, true, false); // append, do not update
+ }
}
}
+ else ;
+
aDisplayer->UpdateViewer();
aDisplayer->SetDisplayMode(prevDisplayMode);
}