#include <TopoDS_Shape.hxx>
#include <TopoDS.hxx>
#include <TopExp.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <GEOMImpl_Types.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS.hxx>
#include <TopExp.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <gp_Pnt.hxx>
#include <QTabWidget>
TopoDS_Shape aShape;
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull()) {
- TColStd_IndexedMapOfInteger aMap;
+ NCollection_IndexedMap<Standard_Integer> aMap;
aSelMgr->GetIndexes(anIO, aMap);
if (aMap.Extent() == 1) { // Local Selection
int anIndex = aMap(1);
#include <TopoDS.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopExp.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <GEOMImpl_Types.hxx>
#include <SalomeApp_Application.h>
#include <LightApp_SelectionMgr.h>
-#include <TColStd_IndexedMapOfInteger.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Edge.hxx>
#include <SalomeApp_Application.h>
#include <LightApp_SelectionMgr.h>
-#include <TColStd_IndexedMapOfInteger.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Edge.hxx>
#include <gp_Dir.hxx>
#include <TColStd_MapOfInteger.hxx>
#include <TopoDS_Shape.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
// QT Includes
if ( aRes && !aSelectedObject->_is_nil() ) {
TopoDS_Shape aShape;
if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
- TColStd_IndexedMapOfInteger aMap;
+ NCollection_IndexedMap<Standard_Integer> aMap;
aSelMgr->GetIndexes(aSelList.First(), aMap);
if ( aMap.Extent() == 1 ) {
int anIndex = aMap( 1 );
#include <OCCViewer_ViewModel.h>
// OCCT Includes
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
//=================================================================================
// class : BlocksGUI_TrsfDlg()
anObj = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
if ( GEOMBase::IsShape(anObj) ) {
aName = GEOMBase::GetName(anObj);
- TColStd_IndexedMapOfInteger anIndexes;
+ NCollection_IndexedMap<Standard_Integer> anIndexes;
aSelMgr->GetIndexes(aSelList.First(), anIndexes);
if (anIndexes.Extent() == 1) {
//OCCT includes
#include <TopoDS.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepBuilderAPI_MakePolygon.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
TopoDS_Shape aShape;
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE)) {
// Explore the shape if its a local selection
- TColStd_IndexedMapOfInteger aMap;
+ NCollection_IndexedMap<Standard_Integer> aMap;
aSelMgr->GetIndexes(aSelList.First(), aMap);
if (aMap.Extent() == 1) {
int anIndex = aMap(1);
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
#include <TColStd_MapOfInteger.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx>
myCurStepTable->blockSignals(true);
QList< int > rowsToSelect;
- TColStd_IndexedMapOfInteger aMapIndex;
+ NCollection_IndexedMap<Standard_Integer> aMapIndex;
if ( getSelectedSubshapes(aMapIndex ))
for (int ii = 1, nn = aMapIndex.Extent(); ii <= nn; ii++) {
const int shapeID = aMapIndex( ii );
// function : getSelectedSubshapes
// purpose :
//=================================================================================
-int EntityGUI_FieldDlg::getSelectedSubshapes (TColStd_IndexedMapOfInteger& theMapIndex)
+int EntityGUI_FieldDlg::getSelectedSubshapes (NCollection_IndexedMap<Standard_Integer>& theMapIndex)
{
theMapIndex.Clear();
#include <TopAbs_ShapeEnum.hxx>
#include <TColStd_DataMapOfIntegerInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <QMap>
int getNbComps() const;
void updateShapeIDs();
void updateDims(int curDim=-1);
- int getSelectedSubshapes (TColStd_IndexedMapOfInteger& map);
+ int getSelectedSubshapes (NCollection_IndexedMap<Standard_Integer>& map);
private:
bool myIsCreation;
#include <TopTools_MapOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
-
#include <QMessageBox>
#include <GEOMImpl_Types.hxx>
// function : getSelectedSubshapes
// purpose :
//=================================================================================
-int EntityGUI_SubShapeDlg::getSelectedSubshapes (TColStd_IndexedMapOfInteger& theMapIndex)
+int EntityGUI_SubShapeDlg::getSelectedSubshapes (NCollection_IndexedMap<Standard_Integer>& theMapIndex)
{
theMapIndex.Clear();
if (isAllSubShapes())
isOk = true;
else {
- TColStd_IndexedMapOfInteger aMapIndex;
+ NCollection_IndexedMap<Standard_Integer> aMapIndex;
int nbSel = getSelectedSubshapes(aMapIndex);
isOk = nbSel > 0;
if (!isAllSubShapes()) {
// manual selection
- TColStd_IndexedMapOfInteger aMapIndex;
+ NCollection_IndexedMap<Standard_Integer> aMapIndex;
int nbSel = getSelectedSubshapes(aMapIndex);
if (nbSel > 0) {
#include <GEOMBase_Skeleton.h>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
class DlgRef_1Sel1List1Check3Btn;
const int) const;
void activateSelection();
- int getSelectedSubshapes (TColStd_IndexedMapOfInteger& theMapIndex);
+ int getSelectedSubshapes (NCollection_IndexedMap<Standard_Integer>& theMapIndex);
void updateButtonState();
bool isAllSubShapes() const;
int shapeType() const;
#include <IntTools_Tools.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
+#include <NCollection_List.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopAbs_ShapeEnum.hxx>
//=======================================================================
Standard_Integer GEOMAlgo_AlgoTools::FindSDShapes
(const TopoDS_Shape& aE1,
- const TopTools_ListOfShape& aLE,
+ const NCollection_List<TopoDS_Shape>& aLE,
const Standard_Real aTol,
TopTools_ListOfShape& aLESD,
#if OCC_VERSION_LARGE > 0x06070100
Standard_Boolean bIsDone;
Standard_Real aTol2, aD2;
gp_Pnt aP1, aP2;
- TopTools_ListIteratorOfListOfShape aIt;
+ NCollection_List<TopoDS_Shape>::Iterator aIt;
//
aTol2=aTol*aTol;
GEOMAlgo_AlgoTools::PointOnShape(aE1, aP1);
//purpose :
//=======================================================================
Standard_Integer GEOMAlgo_AlgoTools::FindSDShapes
- (const TopTools_ListOfShape& aLE,
+ (const NCollection_List<TopoDS_Shape>& aLE,
const Standard_Real aTol,
TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
#if OCC_VERSION_LARGE > 0x06070100
{
Standard_Integer aNbE, aNbEProcessed, aNbESD, iErr;
TopTools_ListOfShape aLESD;
- TopTools_ListIteratorOfListOfShape aIt, aIt1;
+ NCollection_List<TopoDS_Shape>::Iterator aIt;
+ TopTools_ListIteratorOfListOfShape aIt1;
TopTools_IndexedMapOfShape aMProcessed;
TopAbs_ShapeEnum aType;
//
//
aNbE=aMPKLE.Extent();
for (i=1; i<=aNbE; ++i) {
- TopTools_ListOfShape& aLSDE=aMPKLE.ChangeFromIndex(i);
+ NCollection_List<TopoDS_Shape>& aLSDE=aMPKLE.ChangeFromIndex(i);
//
aMEE.Clear();
iErr=GEOMAlgo_AlgoTools::FindSDShapes(aLSDE, aTol, aMEE, aCtx);
}
//
for (j=1; j<=aNbEE; ++j) {
- TopTools_ListOfShape& aLEE=aMEE.ChangeFromIndex(j);
+ TopTools_ListOfShape& aTopToolsLEE = aMEE.ChangeFromIndex(j);
//
if (j==1) {
+ NCollection_List<TopoDS_Shape> aLEE;
+ ConvertTopToolsListOfShapeToNCollectionList( aTopToolsLEE, aLEE);
aLSDE.Clear();
aLSDE.Append(aLEE);
}
else {
- const TopoDS_Shape& aE1=aLEE.First();
- aMEToAdd.Add(aE1, aLEE);
+ const TopoDS_Shape& aE1=aTopToolsLEE.First();
+ aMEToAdd.Add(aE1, aTopToolsLEE);
}
}
}
GEOMAlgo_PassKeyShape aPKE1;
//
const TopoDS_Shape& aE1=aMEToAdd.FindKey(i);
- const TopTools_ListOfShape& aLE=aMEToAdd(i);
+ NCollection_List<TopoDS_Shape> aConvLE;
+ GEOMAlgo_AlgoTools::ConvertTopToolsListOfShapeToNCollectionList(aMEToAdd(i), aConvLE);
+ const NCollection_List<TopoDS_Shape>& aLE=aConvLE;
//
aPKE1.SetShapes(aE1);
aMPKLE.Add(aPKE1, aLE);
//
return iErr;
}
+
+void GEOMAlgo_AlgoTools::ConvertTopToolsListOfShapeToNCollectionList(const TopTools_ListOfShape& aLS,
+ NCollection_List<TopoDS_Shape>& aNLS)
+{
+ TopTools_ListIteratorOfListOfShape aIt;
+ aIt.Initialize(aLS);
+ for (; aIt.More(); aIt.Next())
+ aNLS.Append(aIt.Value());
+}
+
+
+void GEOMAlgo_AlgoTools::ConvertNCollectionListToTopToolsListOfShape(const NCollection_List<TopoDS_Shape>& aLS,
+ TopTools_ListOfShape& aNLS)
+{
+ NCollection_List<TopoDS_Shape>::Iterator aIt;
+ aIt.Initialize(aLS);
+ for (; aIt.More(); aIt.Next())
+ aNLS.Append(aIt.Value());
+}
#include <TopoDS_Shape.hxx>
#include <TopoDS_Edge.hxx>
+#include <NCollection_List.hxx>
#include <TopTools_ListOfShape.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
#include <GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx>
) ;
Standard_EXPORT
- static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,
+ static Standard_Integer FindSDShapes(const NCollection_List<TopoDS_Shape>& aLE,
const Standard_Real aTol,
TopTools_IndexedDataMapOfShapeListOfShape& aMEE,
#if OCC_VERSION_LARGE > 0x06070100
) ;
Standard_EXPORT
static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,
- const TopTools_ListOfShape& aLE,
+ const NCollection_List<TopoDS_Shape>& aLE,
const Standard_Real aTol,
TopTools_ListOfShape& aLESD,
#if OCC_VERSION_LARGE > 0x06070100
static void CopyShape(const TopoDS_Shape& aS,
TopoDS_Shape& aSC,
TopTools_IndexedDataMapOfShapeShape& aMSS) ;
+
+ Standard_EXPORT
+ static void ConvertTopToolsListOfShapeToNCollectionList(const TopTools_ListOfShape&,
+ NCollection_List<TopoDS_Shape>&) ;
+
+ Standard_EXPORT
+ static void ConvertNCollectionListToTopToolsListOfShape(const NCollection_List<TopoDS_Shape>&,
+ TopTools_ListOfShape&) ;
};
#endif
#include <TopTools_IndexedMapOfShape.hxx>
#include <GEOMAlgo_CoupleOfShapes.hxx>
#include <TopoDS_Shape.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
static
void ProcessBlock(const TopoDS_Shape& aF,
const GEOMAlgo_IndexedDataMapOfShapeIndexedMapOfShape& aMCV,
- TopTools_IndexedMapOfShape& aProcessed,
- TopTools_IndexedMapOfShape& aChain);
+ NCollection_IndexedMap<TopoDS_Shape>& aProcessed,
+ NCollection_IndexedMap<TopoDS_Shape>& aChain);
//=======================================================================
// function: FindChains
//
//
if (aMCV.Contains(aF1)) {
- TopTools_IndexedMapOfShape& aMV=aMCV.ChangeFromKey(aF1);
+ NCollection_IndexedMap<TopoDS_Shape>& aMV=aMCV.ChangeFromKey(aF1);
aMV.Add(aF1);
aMV.Add(aF2);
}
else {
- TopTools_IndexedMapOfShape aMV;
+ NCollection_IndexedMap<TopoDS_Shape> aMV;
aMV.Add(aF1);
aMV.Add(aF2);
aMCV.Add(aF1, aMV);
}
//
if (aMCV.Contains(aF2)) {
- TopTools_IndexedMapOfShape& aMV=aMCV.ChangeFromKey(aF2);
+ NCollection_IndexedMap<TopoDS_Shape>& aMV=aMCV.ChangeFromKey(aF2);
aMV.Add(aF1);
aMV.Add(aF2);
}
else {
- TopTools_IndexedMapOfShape aMV;
+ NCollection_IndexedMap<TopoDS_Shape> aMV;
aMV.Add(aF1);
aMV.Add(aF2);
aMCV.Add(aF2, aMV);
GEOMAlgo_IndexedDataMapOfShapeIndexedMapOfShape& aMapChains)
{
Standard_Integer i, j, aNbCV, aNbV;
- TopTools_IndexedMapOfShape aProcessed, aChain;
+ NCollection_IndexedMap<TopoDS_Shape> aProcessed, aChain;
//
aNbCV=aMCV.Extent();
for (i=1; i<=aNbCV; ++i) {
aProcessed.Add(aF);
aChain.Add(aF);
//
- const TopTools_IndexedMapOfShape& aMV=aMCV(i);
+ const NCollection_IndexedMap<TopoDS_Shape>& aMV=aMCV(i);
aNbV=aMV.Extent();
for (j=1; j<=aNbV; ++j) {
const TopoDS_Shape& aFx=aMV(j);
//=======================================================================
void ProcessBlock(const TopoDS_Shape& aF,
const GEOMAlgo_IndexedDataMapOfShapeIndexedMapOfShape& aMCV,
- TopTools_IndexedMapOfShape& aProcessed,
- TopTools_IndexedMapOfShape& aChain)
+ NCollection_IndexedMap<TopoDS_Shape>& aProcessed,
+ NCollection_IndexedMap<TopoDS_Shape>& aChain)
{
Standard_Integer j, aNbV;
//
aProcessed.Add(aF);
aChain.Add(aF);
//
- const TopTools_IndexedMapOfShape& aMV=aMCV.FindFromKey(aF);
+ const NCollection_IndexedMap<TopoDS_Shape>& aMV=aMCV.FindFromKey(aF);
aNbV=aMV.Extent();
for (j=1; j<=aNbV; ++j) {
const TopoDS_Shape& aFx=aMV(j);
#define _NCollection_MapHasher
#include <NCollection_DataMap.hxx>
+#include <NCollection_Map.hxx>
-typedef NCollection_DataMap<TopoDS_Shape, TopTools_MapOfShape, TopTools_ShapeMapHasher> GEOMAlgo_DataMapOfShapeMapOfShape;
+typedef NCollection_DataMap<TopoDS_Shape, NCollection_Map<TopoDS_Shape>, TopTools_ShapeMapHasher> GEOMAlgo_DataMapOfShapeMapOfShape;
typedef GEOMAlgo_DataMapOfShapeMapOfShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape;
#undef _NCollection_MapHasher
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
+#include <NCollection_Map.hxx>
#include <GEOMAlgo_BoxBndTree.hxx>
#include <GEOMAlgo_CoupleOfShapes.hxx>
Standard_Integer i, aNbE;
TopoDS_Iterator aIt;
TopTools_IndexedMapOfShape aME;
- TopTools_MapIteratorOfMapOfShape aItMS;
+ NCollection_Map<TopoDS_Shape>::Iterator aItMS;
//
TopExp::MapShapes(theShape, TopAbs_EDGE, aME);
aNbE=aME.Extent();
for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aV1=aIt.Value();
if (myShapesOn.IsBound(aV1)) {
- const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aV1);
+ const NCollection_Map<TopoDS_Shape>& aMSOn=myShapesOn.Find(aV1);
//aNbSOn=aMSOn.Extent();
aItMS.Initialize(aMSOn);
for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aV2=aCS.Shape2();
//
if (myShapesOn.IsBound(aE1)) {
- const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aE1);
+ const NCollection_Map<TopoDS_Shape>& aMSOn=myShapesOn.Find(aE1);
if (aMSOn.Contains(aV2)) {
continue;
}
{
Standard_Boolean bHasOn, bHasIn, bFound;
TopoDS_Iterator aIt;
- TopTools_MapOfShape aMSX;
+ NCollection_Map<TopoDS_Shape> aMSX;
//
bHasOn=myShapesOn.IsBound(theE1);
bHasIn=myShapesIn.IsBound(theE1);
- const TopTools_MapOfShape& aMSOn=(bHasOn) ? myShapesOn.Find(theE1) : aMSX;
- const TopTools_MapOfShape& aMSIn=(bHasIn) ? myShapesIn.Find(theE1) : aMSX;
+ const NCollection_Map<TopoDS_Shape>& aMSOn=(bHasOn) ? myShapesOn.Find(theE1) : aMSX;
+ const NCollection_Map<TopoDS_Shape>& aMSIn=(bHasIn) ? myShapesIn.Find(theE1) : aMSX;
//
bFound=Standard_True;
aIt.Initialize(theE2);
{
Standard_Boolean bHasOn, bHasIn, bFound;
Standard_Integer i, aNbE;
- TopTools_MapOfShape aMSX;
+ NCollection_Map<TopoDS_Shape> aMSX;
TopTools_IndexedMapOfShape aME;
//
myErrorStatus=0;
//
bHasOn=myShapesOn.IsBound(aE1);
bHasIn=myShapesIn.IsBound(aE1);
- const TopTools_MapOfShape& aMSOn=(bHasOn) ? myShapesOn.Find(aE1) : aMSX;
- const TopTools_MapOfShape& aMSIn=(bHasIn) ? myShapesIn.Find(aE1) : aMSX;
+ const NCollection_Map<TopoDS_Shape>& aMSOn=(bHasOn) ? myShapesOn.Find(aE1) : aMSX;
+ const NCollection_Map<TopoDS_Shape>& aMSIn=(bHasIn) ? myShapesIn.Find(aE1) : aMSX;
bFound= (aMSOn.Contains(aV2) || aMSIn.Contains(aV2));
if (bFound) {
break;
Standard_Integer i, j, aNbF, aNbE;
TopoDS_Iterator aIt;
TopTools_IndexedMapOfShape aMF, aME;
- TopTools_MapIteratorOfMapOfShape aItMS;
+ NCollection_Map<TopoDS_Shape>::Iterator aItMS;
//
TopExp::MapShapes(theShape, TopAbs_FACE, aMF);
aNbF=aMF.Extent();
}
//
if (myShapesOn.IsBound(aE1)) {
- const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aE1);
+ const NCollection_Map<TopoDS_Shape>& aMSOn=myShapesOn.Find(aE1);
aItMS.Initialize(aMSOn);
for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aS2=aItMS.Key();
}
//
if (myShapesIn.IsBound(aE1)) {
- const TopTools_MapOfShape& aMSIn=myShapesIn.Find(aE1);
+ const NCollection_Map<TopoDS_Shape>& aMSIn=myShapesIn.Find(aE1);
aItMS.Initialize(aMSIn);
for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aS2=aItMS.Key();
{
Standard_Boolean bFound, bHasOnF, bHasInF;
TopoDS_Iterator aIt;
- TopTools_MapOfShape aMSX;
+ NCollection_Map<TopoDS_Shape> aMSX;
//
myErrorStatus=0;
myWarningStatus=0;
//
// 1.
bHasOnF=myShapesOn.IsBound(aF1);
- const TopTools_MapOfShape& aMSOnF=(bHasOnF) ? myShapesOn.Find(aF1) : aMSX;
+ const NCollection_Map<TopoDS_Shape>& aMSOnF=(bHasOnF) ? myShapesOn.Find(aF1) : aMSX;
bFound=aMSOnF.Contains(aE2);
if (bFound) {
continue;
//
// 2.
bHasInF=myShapesIn.IsBound(aF1);
- const TopTools_MapOfShape& aMSInF=(bHasInF) ? myShapesIn.Find(aF1) : aMSX;
+ const NCollection_Map<TopoDS_Shape>& aMSInF=(bHasInF) ? myShapesIn.Find(aF1) : aMSX;
//
aIt.Initialize(aE2);
for (; aIt.More(); aIt.Next()) {
{
Standard_Boolean bFound, bHasOnF, bHasInF;
Standard_Integer i, aNbS2;
- TopTools_MapOfShape aMSX;
+ NCollection_Map<TopoDS_Shape> aMSX;
TopTools_IndexedMapOfShape aMS2;
//
bHasOnF=myShapesOn.IsBound(theF1);
- const TopTools_MapOfShape& aMSOnF=(bHasOnF) ? myShapesOn.Find(theF1) : aMSX;
+ const NCollection_Map<TopoDS_Shape>& aMSOnF=(bHasOnF) ? myShapesOn.Find(theF1) : aMSX;
//
bHasInF=myShapesIn.IsBound(theF1);
- const TopTools_MapOfShape& aMSInF=(bHasInF) ? myShapesIn.Find(theF1) : aMSX;
+ const NCollection_Map<TopoDS_Shape>& aMSInF=(bHasInF) ? myShapesIn.Find(theF1) : aMSX;
//
MapBRepShapes(theF2, aMS2);
//
{
Standard_Integer i, j, aNbS, aNbF;
TopTools_IndexedMapOfShape aMS, aMF;
- TopTools_MapIteratorOfMapOfShape aItMS;
+ NCollection_Map<TopoDS_Shape>::Iterator aItMS;
//
TopExp::MapShapes(theShape, TopAbs_SOLID, aMS);
//
const TopoDS_Shape& aF1=aMF(j);
//
if (myShapesOn.IsBound(aF1)) {
- const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aF1);
+ const NCollection_Map<TopoDS_Shape>& aMSOn=myShapesOn.Find(aF1);
aItMS.Initialize(aMSOn);
for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aS2=aItMS.Key();
}
//
if (myShapesIn.IsBound(aF1)) {
- const TopTools_MapOfShape& aMSIn=myShapesIn.Find(aF1);
+ const NCollection_Map<TopoDS_Shape>& aMSIn=myShapesIn.Find(aF1);
aItMS.Initialize(aMSIn);
for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aS2=aItMS.Key();
void GEOMAlgo_GetInPlace::PerformZF()
{
Standard_Boolean bFound, bHasOnF;
- TopTools_MapOfShape aMSX;
+ NCollection_Map<TopoDS_Shape> aMSX;
//
myErrorStatus=0;
myWarningStatus=0;
const TopoDS_Shape& aF2=aCS.Shape2();
//
bHasOnF=myShapesOn.IsBound(aSo1);
- const TopTools_MapOfShape& aMSOnF=(bHasOnF) ? myShapesOn.Find(aSo1) : aMSX;
+ const NCollection_Map<TopoDS_Shape>& aMSOnF=(bHasOnF) ? myShapesOn.Find(aSo1) : aMSX;
bFound=aMSOnF.Contains(aF2);
if (bFound) {
continue;
{
Standard_Boolean bFound, bHasOn, bHasIn;
Standard_Integer i, aNbS2, iCntOn, iCntIn, iCntOut;
- TopTools_MapOfShape aMSX;
+ NCollection_Map<TopoDS_Shape> aMSX;
TopTools_IndexedMapOfShape aMS2;
//
bHasOn=myShapesOn.IsBound(theSo1);
- const TopTools_MapOfShape& aMSOn=(bHasOn) ? myShapesOn.Find(theSo1) : aMSX;
+ const NCollection_Map<TopoDS_Shape>& aMSOn=(bHasOn) ? myShapesOn.Find(theSo1) : aMSX;
//
bHasIn=myShapesIn.IsBound(theSo1);
- const TopTools_MapOfShape& aMSIn=(bHasIn) ? myShapesIn.Find(theSo1) : aMSX;
+ const NCollection_Map<TopoDS_Shape>& aMSIn=(bHasIn) ? myShapesIn.Find(theSo1) : aMSX;
//
TopExp::MapShapes(theSo2, TopAbs_FACE, aMS2);
//
const TopoDS_Shape& aS = aMS(i);
if (aShapesInOn.IsBound(aS)) {
- const TopTools_MapOfShape& aMSx = aShapesInOn.Find(aS);
+ const NCollection_Map<TopoDS_Shape>& aMSx = aShapesInOn.Find(aS);
TopTools_ListOfShape aLSx;
- TopTools_MapIteratorOfMapOfShape aItMS(aMSx);
+ NCollection_Map<TopoDS_Shape>::Iterator aItMS(aMSx);
for (; aItMS.More(); aItMS.Next()) {
const TopoDS_Shape& aSx = aItMS.Key();
void GEOMAlgo_GetInPlace::FillImgComplex(const TopoDS_Shape &theShape,
const Standard_Boolean IsWhere)
{
- TopTools_MapOfShape aMapRemaining;
+ NCollection_Map<TopoDS_Shape> aMapRemaining;
TopoDS_Iterator aIt(theShape);
TopTools_ListOfShape aLSx;
- TopTools_MapOfShape aMSx;
+ NCollection_Map<TopoDS_Shape> aMSx;
for(; aIt.More(); aIt.Next()) {
const TopoDS_Shape &aSubS = aIt.Value();
if (!(IsWhere || aMapRemaining.IsEmpty())) {
// Find the whole from parts.
while (!aMapRemaining.IsEmpty()) {
- TopTools_MapIteratorOfMapOfShape anIter(aMapRemaining);
+ NCollection_Map<TopoDS_Shape>::Iterator anIter(aMapRemaining);
const TopoDS_Shape &aShape = anIter.Key();
if (myShapesInclusive.IsBound(aShape)) {
const TopoDS_Shape& aS2)
{
if (myShapesIn.IsBound(aS1)) {
- TopTools_MapOfShape& aMS=myShapesIn.ChangeFind(aS1);
+ NCollection_Map<TopoDS_Shape>& aMS=myShapesIn.ChangeFind(aS1);
aMS.Add(aS2);
}
else {
- TopTools_MapOfShape aMS;
+ NCollection_Map<TopoDS_Shape> aMS;
//
aMS.Add(aS2);
myShapesIn.Bind(aS1, aMS);
const TopoDS_Shape& aS2)
{
if (myShapesOn.IsBound(aS1)) {
- TopTools_MapOfShape& aMS=myShapesOn.ChangeFind(aS1);
+ NCollection_Map<TopoDS_Shape>& aMS=myShapesOn.ChangeFind(aS1);
aMS.Add(aS2);
}
else {
- TopTools_MapOfShape aMS;
+ NCollection_Map<TopoDS_Shape> aMS;
//
aMS.Add(aS2);
myShapesOn.Bind(aS1, aMS);
Standard_Integer i, aNbF, aNbSDF, iErr;
TopoDS_Shape aNewShape;
TopTools_IndexedMapOfShape aMF;
- TopTools_ListIteratorOfListOfShape aItS;
+ NCollection_List<TopoDS_Shape>::Iterator aItS;
GEOMAlgo_PassKeyShape aPKF;
GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF;
//
}
//
if (aMPKLF.Contains(aPKF)) {
- TopTools_ListOfShape& aLSDF=aMPKLF.ChangeFromKey(aPKF);
+ NCollection_List<TopoDS_Shape>& aLSDF=aMPKLF.ChangeFromKey(aPKF);
aLSDF.Append(aS);
}
else {
- TopTools_ListOfShape aLSDF;
+ NCollection_List<TopoDS_Shape> aLSDF;
//
aLSDF.Append(aS);
aMPKLF.Add(aPKF, aLSDF);
// Images/Origins
aNbF=aMPKLF.Extent();
for (i=1; i<=aNbF; ++i) {
- const TopTools_ListOfShape& aLSDF=aMPKLF(i);
+ const NCollection_List<TopoDS_Shape>& aLSDF=aMPKLF(i);
aNbSDF=aLSDF.Extent();
if (!aNbSDF) {
myErrorStatus=4; // it must not be
const TopoDS_Shape& aS1=aLSDF.First();
aNewShape=aS1;
//
- myImages.Bind(aNewShape, aLSDF);
+ TopTools_ListOfShape aConvLSDF;
+ GEOMAlgo_AlgoTools::ConvertNCollectionListToTopToolsListOfShape(aLSDF, aConvLSDF);
+ myImages.Bind(aNewShape, aConvLSDF);
// origins
aItS.Initialize(aLSDF);
for (; aItS.More(); aItS.Next()) {
//qt
//
if (!aMPKLS.Contains(aPKSx)) {
- TopTools_ListOfShape aLSx;
+ NCollection_List<TopoDS_Shape> aLSx;
//
aLSx.Append(aSx[0]);
aLSx.Append(aSx[1]);
}
//
for (i=1; i<=aNbC; ++i) {
- const TopTools_ListOfShape& aLSx=aMPKLS(i);
+ const NCollection_List<TopoDS_Shape>& aLSx=aMPKLS(i);
const TopoDS_Shape& aSx1=aLSx.First();
const TopoDS_Shape& aSx2=aLSx.Last();
aCS.SetShape1(aSx1);
#include <TopoDS_Compound.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
-#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
Standard_Boolean bDegenerated;
Standard_Integer i, aNbF, aNbSDF, iErr;
TopTools_IndexedMapOfShape aMF;
- TopTools_ListIteratorOfListOfShape aItLS;
+ NCollection_List<TopoDS_Shape>::Iterator aItLS;
GEOMAlgo_PassKeyShape aPKF;
GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF;
//
}
//
if (aMPKLF.Contains(aPKF)) {
- TopTools_ListOfShape& aLSDF=aMPKLF.ChangeFromKey(aPKF);
+ NCollection_List<TopoDS_Shape>& aLSDF=aMPKLF.ChangeFromKey(aPKF);
aLSDF.Append(aS);
}
else {
- TopTools_ListOfShape aLSDF;
+ NCollection_List<TopoDS_Shape> aLSDF;
//
aLSDF.Append(aS);
aMPKLF.Add(aPKF, aLSDF);
// Images/Origins
aNbF=aMPKLF.Extent();
for (i=1; i<=aNbF; ++i) {
- const TopTools_ListOfShape& aLSDF=aMPKLF(i);
+ const NCollection_List<TopoDS_Shape>& aLSDF=aMPKLF(i);
aNbSDF=aLSDF.Extent();
if (!aNbSDF) {
myErrorStatus=4; // it must not be
}
}
//
- myImages.Bind(aS1, aLSDF);
+ TopTools_ListOfShape aConvLSDF;
+ GEOMAlgo_AlgoTools::ConvertNCollectionListToTopToolsListOfShape(aLSDF, aConvLSDF);
+ myImages.Bind(aS1, aConvLSDF);
//
// origins
aItLS.Initialize(aLSDF);
{
Standard_Integer i, aNbE;
TopoDS_Shape aER;
- TopTools_ListOfShape aLE;
+ NCollection_List<TopoDS_Shape> aLE;
TopTools_IndexedMapOfShape aME;
//
TopExp::MapShapes(aF, TopAbs_EDGE, aME);
TopAbs_Orientation aOr;
TopoDS_Shape aVR;
TopoDS_Iterator aIt;
- TopTools_ListOfShape aLV;
+ NCollection_List<TopoDS_Shape> aLV;
//
aIt.Initialize(aE);
for (; aIt.More(); aIt.Next()) {
#include <Standard_Macro.hxx>
#include <TopAbs_ShapeEnum.hxx>
-
-#include <TopTools_ListOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <NCollection_List.hxx>
#include <GEOMAlgo_GluerAlgo.hxx>
#include <GEOMAlgo_Algo.hxx>
Standard_Integer i, aNbF, aNbSDF, iErr;
TopoDS_Shape aNewShape;
TopTools_IndexedMapOfShape aMF;
- TopTools_ListIteratorOfListOfShape aItS;
+ NCollection_List<TopoDS_Shape>::Iterator aItS;
GEOMAlgo_PassKeyShape aPKF;
GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF;
//
}
//
if (aMPKLF.Contains(aPKF)) {
- TopTools_ListOfShape& aLSDF=aMPKLF.ChangeFromKey(aPKF);
+ NCollection_List<TopoDS_Shape>& aLSDF=aMPKLF.ChangeFromKey(aPKF);
aLSDF.Append(aS);
}
else {
- TopTools_ListOfShape aLSDF;
+ NCollection_List<TopoDS_Shape> aLSDF;
//
aLSDF.Append(aS);
aMPKLF.Add(aPKF, aLSDF);
//
aNbF=aMPKLF.Extent();
for (i=1; i<=aNbF; ++i) {
- const TopTools_ListOfShape& aLSDF=aMPKLF(i);
+ const NCollection_List<TopoDS_Shape>& aLSDF=aMPKLF(i);
aNbSDF=aLSDF.Extent();
if (!aNbSDF) {
myErrorStatus=4; // it must not be
}
}
//
- myImages.Bind(aNewShape, aLSDF);
+ TopTools_ListOfShape aConvLSDF;
+ GEOMAlgo_AlgoTools::ConvertNCollectionListToTopToolsListOfShape(aLSDF, aConvLSDF);
+ myImages.Bind(aNewShape, aConvLSDF);
// origins
aItS.Initialize(aLSDF);
for (; aItS.More(); aItS.Next()) {
GEOMAlgo_PassKeyShape& aPK)
{
Standard_Integer i, aNbE;
- TopTools_ListOfShape aLE;
+ NCollection_List<TopoDS_Shape> aLE;
TopTools_IndexedMapOfShape aME;
//
TopExp::MapShapes(aF, TopAbs_EDGE, aME);
aNbC=aMC.Extent();
for (i=1; i<=aNbC; ++i) {
const TopoDS_Shape& aSkey=aMC.FindKey(i);
- const TopTools_IndexedMapOfShape& aM=aMC(i);
+ const NCollection_IndexedMap<TopoDS_Shape>& aM=aMC(i);
aLSX.Clear();
aNb=aM.Extent();
for (j=1; j<=aNb; ++j) {
#define GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile
#include <GEOMAlgo_PassKeyShape.hxx>
-#include <TopTools_ListOfShape.hxx>
#include <GEOMAlgo_PassKeyShapeMapHasher.hxx>
#define _NCollection_MapHasher
#include <NCollection_IndexedDataMap.hxx>
+#include <NCollection_List.hxx>
-typedef NCollection_IndexedDataMap<GEOMAlgo_PassKeyShape, TopTools_ListOfShape, GEOMAlgo_PassKeyShapeMapHasher> GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape;
+typedef NCollection_IndexedDataMap<GEOMAlgo_PassKeyShape, NCollection_List<TopoDS_Shape>, GEOMAlgo_PassKeyShapeMapHasher> GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape;
#undef _NCollection_MapHasher
#include <TopoDS_Shape.hxx>
#include <TopTools_ShapeMapHasher.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
#define _NCollection_MapHasher
#include <NCollection_IndexedDataMap.hxx>
+#include <NCollection_IndexedMap.hxx>
-typedef NCollection_IndexedDataMap <TopoDS_Shape, TopTools_IndexedMapOfShape, TopTools_ShapeMapHasher> GEOMAlgo_IndexedDataMapOfShapeIndexedMapOfShape;
+typedef NCollection_IndexedDataMap <TopoDS_Shape, NCollection_IndexedMap<TopoDS_Shape>,
+ TopTools_ShapeMapHasher> GEOMAlgo_IndexedDataMapOfShapeIndexedMapOfShape;
#undef _NCollection_MapHasher
#include <Standard_Boolean.hxx>
#include <TColStd_ListOfInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
//=======================================================================
//class : GEOMAlgo_PassKey
protected:
Standard_Integer myNbIds;
Standard_Integer mySum;
- TColStd_IndexedMapOfInteger myMap;
+ NCollection_IndexedMap<Standard_Integer> myMap;
};
#endif
//
#include <GEOMAlgo_PassKeyShape.hxx>
-#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1,
const TopoDS_Shape& aS2)
{
- TopTools_ListOfShape aLS;
+ NCollection_List<TopoDS_Shape> aLS;
//
aLS.Append(aS1);
aLS.Append(aS2);
const TopoDS_Shape& aS2,
const TopoDS_Shape& aS3)
{
- TopTools_ListOfShape aLS;
+ NCollection_List<TopoDS_Shape> aLS;
//
aLS.Append(aS1);
aLS.Append(aS2);
const TopoDS_Shape& aS3,
const TopoDS_Shape& aS4)
{
- TopTools_ListOfShape aLS;
+ NCollection_List<TopoDS_Shape> aLS;
//
aLS.Append(aS1);
aLS.Append(aS2);
//function :SetShapes
//purpose :
//=======================================================================
- void GEOMAlgo_PassKeyShape::SetShapes(const TopTools_ListOfShape& aLS)
+ void GEOMAlgo_PassKeyShape::SetShapes(const NCollection_List<TopoDS_Shape>& aLS)
{
Standard_Integer i, aId, aIdN;
- TopTools_ListIteratorOfListOfShape aIt;
+ NCollection_List<TopoDS_Shape>::Iterator aIt;
//
Clear();
aIt.Initialize(aLS);
#include <TopTools_IndexedMapOfShape.hxx>
#include <Standard_Boolean.hxx>
#include <TopoDS_Shape.hxx>
-#include <TopTools_ListOfShape.hxx>
+#include <NCollection_List.hxx>
//=======================================================================
const TopoDS_Shape& aS4) ;
Standard_EXPORT
- void SetShapes(const TopTools_ListOfShape& aLS) ;
+ void SetShapes(const NCollection_List<TopoDS_Shape>& aLS) ;
Standard_EXPORT
void Clear() ;
#include <Precision.hxx>
#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <gp_Lin.hxx>
#include <gp_XYZ.hxx>
gp_Pnt aPi, aPc;
gp_Dir aDir[3];
gp_XYZ aXYZc;
- TColStd_IndexedMapOfInteger aMp;
+ NCollection_IndexedMap<Standard_Integer> aMp;
TopTools_IndexedMapOfShape aMV, aMFi;
//
// barycenter aPc
#include <TColStd_MapOfInteger.hxx>
#include <TCollection_AsciiString.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
//To disable automatic genericobj management, the following line should be commented.
//Otherwise, it should be uncommented. Refer to KERNEL_SRC/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx
Handle(SALOME_InteractiveObject) IO = it.Value();
GEOM::GeomObjPtr object = GEOMBase::ConvertIOinGEOMObject( IO );
if ( object ) {
- TColStd_IndexedMapOfInteger subShapes;
+ NCollection_IndexedMap<Standard_Integer> subShapes;
selMgr->GetIndexes( IO, subShapes );
int nbSubShapes = subShapes.Extent();
if ( nbSubShapes == 0 ) {
#include <TopExp.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <NCollection_DataMap.hxx>
Handle(AIS_InteractiveContext) ic = vw->getAISContext();
// "entry - list_of_int" map for LOCAL selection
- NCollection_DataMap<TCollection_AsciiString, TColStd_IndexedMapOfInteger> indexesMap;
+ NCollection_DataMap<TCollection_AsciiString, NCollection_IndexedMap<Standard_Integer> > indexesMap;
QMap<QString,int> globalSelMap; // only Key=entry from this map is used. value(int) is NOT used at all.
SelectMgr_IndexedMapOfOwner ownersmap; // map of owners to be selected
QString entry = subOwner->entry();
if ( indexesMap.IsBound( TCollection_AsciiString(entry.toLatin1().data())))
{
- TColStd_IndexedMapOfInteger& subIndexes = indexesMap.ChangeFind(entry.toLatin1().data());
+ NCollection_IndexedMap<Standard_Integer>& subIndexes = indexesMap.ChangeFind(entry.toLatin1().data());
subIndexes.Add( subOwner->index() );
//indexesMap.replace( entry, subIndexes );
}
else
{
- TColStd_IndexedMapOfInteger subIndexes;
+ NCollection_IndexedMap<Standard_Integer> subIndexes;
subIndexes.Add( subOwner->index() );
indexesMap.Bind(entry.toLatin1().data(), subIndexes);
}
{
if (isLocal)
{
- const TColStd_IndexedMapOfInteger& subIndexes =
+ const NCollection_IndexedMap<Standard_Integer>& subIndexes =
indexesMap.ChangeFind(entryStr.toLatin1().data());
const TopoDS_Shape& aSubShape = anOwner->Shape();
SalomeApp_Study* appStudy =
dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
QString anEntry = appStudy->referencedToEntry( owner->entry() );
- if (globalSelMap[anEntry] == 1) mySelectedExternals.append(*itr2);
+ if (globalSelMap[anEntry] == 1) mySelectedExternals.append(*itr2) ;
}
}
}
#include <TopoDS_Shape.hxx>
#include <TopoDS.hxx>
#include <TopExp.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
#include <TColStd_MapOfInteger.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
#include <TColStd_MapOfInteger.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx>
myIdList->blockSignals(true);
myIdList->clearSelection();
- TColStd_IndexedMapOfInteger aMapIndex;
+ NCollection_IndexedMap<Standard_Integer> aMapIndex;
int nbSel = getSelectedSubshapes(aMapIndex);
if (nbSel) {
// function : getSelectedSubshapes
// purpose :
//=================================================================================
-int GroupGUI_GroupDlg::getSelectedSubshapes (TColStd_IndexedMapOfInteger& theMapIndex)
+int GroupGUI_GroupDlg::getSelectedSubshapes (NCollection_IndexedMap<Standard_Integer>& theMapIndex)
{
theMapIndex.Clear();
//=================================================================================
void GroupGUI_GroupDlg::add()
{
- TColStd_IndexedMapOfInteger aMapIndex;
+ NCollection_IndexedMap<Standard_Integer> aMapIndex;
int nbSel = getSelectedSubshapes(aMapIndex);
TColStd_MapOfInteger aMap;
#include <TopAbs_ShapeEnum.hxx>
#include <TColStd_DataMapOfIntegerInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
class QGroupBox;
class QLineEdit;
void highlightSubShapes();
void onGetInPlace();
void setInPlaceObj (GEOM::GEOM_Object_var, const bool isVisible=1);
- int getSelectedSubshapes (TColStd_IndexedMapOfInteger& theMapIndex);
+ int getSelectedSubshapes (NCollection_IndexedMap<Standard_Integer>& theMapIndex);
private:
Mode myMode;
#include <SalomeApp_Application.h>
#include <LightApp_SelectionMgr.h>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <TColStd_MapOfInteger.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopExp.hxx>
const bool isPublishAllErrors = (aNbErrsSelected < 1);
const bool isPublishAllShapes =
(aNbErrsSelected != 1 || myGrp->ListBox2->selectedItems().empty());
- TColStd_IndexedMapOfInteger aMapIndex;
+ NCollection_IndexedMap<Standard_Integer> aMapIndex;
const int aNbErrs = aErrs.length();
int i;
#include <TopoDS_Shape.hxx>
#include <TopoDS.hxx>
#include <TopExp.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <GEOMImpl_Types.hxx>
TopoDS_Shape aShape;
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull())
{
- TColStd_IndexedMapOfInteger aMap;
+ NCollection_IndexedMap<Standard_Integer> aMap;
aSelMgr->GetIndexes(aSelList.First(), aMap);
if (aMap.Extent() == 1) // Local Selection
{
TopoDS_Shape aShape;
if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE) && !aShape.IsNull())
{
- TColStd_IndexedMapOfInteger aMap;
+ NCollection_IndexedMap<Standard_Integer> aMap;
aSelMgr->GetIndexes(aSelList.First(), aMap);
if (aMap.Extent() == 1) // Local Selection
{
#include <BRep_Tool.hxx>
#include <TopExp.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <gp_Pnt.hxx>
//=================================================================================
myObj = aSelectedObject;
- TColStd_IndexedMapOfInteger anIndexes;
+ NCollection_IndexedMap<Standard_Integer> anIndexes;
aSelMgr->GetIndexes(aSelList.First(), anIndexes);
TopoDS_Shape aShape;
#include <StdPrs_ShadedShape.hxx>
#include <StdPrs_WFDeflectionShape.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TopExp.hxx>
}
}
-static void indicesToOwners( const TColStd_IndexedMapOfInteger& aIndexMap,
+static void indicesToOwners( const NCollection_IndexedMap<Standard_Integer>& aIndexMap,
const TopoDS_Shape& aMainShape,
const SelectMgr_IndexedMapOfOwner& anAllMap,
SelectMgr_IndexedMapOfOwner& aToHiliteMap )
myEdgesInShadingColor = aCol;
}
-void GEOM_AISShape::highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap,
+void GEOM_AISShape::highlightSubShapes(const NCollection_IndexedMap<Standard_Integer>& aIndexMap,
const Standard_Boolean aHighlight )
{
Handle(AIS_InteractiveObject) anObj = this;
TopTools_IndexedMapOfShape aShapeMap;
TopExp::MapShapes( myshape, aShapeMap );
- TColStd_IndexedMapOfInteger anIndexMap;
+ NCollection_IndexedMap<Standard_Integer> anIndexMap;
TopExp_Explorer anExp;
for( anExp.Init( myshape, aShapeType ); anExp.More(); anExp.Next() )
Standard_Boolean isTopLevel();
void setTopLevel(Standard_Boolean);
Handle_SALOME_InteractiveObject getIO() ;
- void highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap, const Standard_Boolean aHighlight );
+ void highlightSubShapes(const NCollection_IndexedMap<Standard_Integer>& aIndexMap, const Standard_Boolean aHighlight );
~GEOM_AISShape();
void SetShadingColor(const Quantity_Color &aCol);
}
-void GEOM_TopWireframeShape::highlightSubShapes(const TColStd_IndexedMapOfInteger& /*aIndexMap*/,
+void GEOM_TopWireframeShape::highlightSubShapes(const NCollection_IndexedMap<Standard_Integer>& /*aIndexMap*/,
const Standard_Boolean /*aHighlight*/ )
{
}
virtual void setTopLevel(Standard_Boolean);
virtual Standard_CString getName();
virtual void setName(const Standard_CString aName);
- virtual void highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap, const Standard_Boolean aHighlight );
+ virtual void highlightSubShapes(const NCollection_IndexedMap<Standard_Integer>& aIndexMap, const Standard_Boolean aHighlight );
~GEOM_TopWireframeShape();
// Type management
#ifndef OCC2VTK_INTERNAL_H
#define OCC2VTK_INTERNAL_H
-#include <NCollection_BaseCollection.hxx>
#include <NCollection_BaseList.hxx>
#include <NCollection_TListNode.hxx>
#include <NCollection_TListIterator.hxx>
-
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
-template <class TheItemType> class GEOM_Set
- : public NCollection_BaseCollection<TheItemType>,
- public NCollection_BaseList
+template <class TheItemType>
+class GEOM_Set : public NCollection_BaseList
{
public:
typedef NCollection_TListNode<TheItemType> SetNode;
public:
//! Constructor
GEOM_Set(const Handle(NCollection_BaseAllocator)& theAllocator=0L) :
- NCollection_BaseCollection<TheItemType>(theAllocator),
NCollection_BaseList() {}
//! Copy constructor
GEOM_Set (const GEOM_Set& theOther) :
- NCollection_BaseCollection<TheItemType>(theOther.myAllocator),
NCollection_BaseList()
{ *this = theOther; }
{ return Extent(); }
//! Replace this list by the items of theOther collection
- virtual void Assign (const NCollection_BaseCollection<TheItemType>& theOther)
+ GEOM_Set& Assign (const GEOM_Set& theOther)
{
if (this == &theOther)
- return;
- Clear();
- TYPENAME NCollection_BaseCollection<TheItemType>::Iterator& anIter =
- theOther.CreateIterator();
+ return *this;
+
+ Clear( theOther.myAllocator );
+ Iterator anIter( theOther );
for (; anIter.More(); anIter.Next())
{
SetNode* pNew = new (this->myAllocator) SetNode(anIter.Value());
PAppend (pNew);
}
+ return *this;
}
//! Replace this list by the items of theOther Set
//! Clear this set
void Clear (void)
- { PClear (SetNode::delNode, this->myAllocator); }
+ { PClear ( SetNode::delNode ); }
//! Add item
Standard_Boolean Add (const TheItemType& theItem)
~GEOM_Set (void)
{ Clear(); }
-private:
- //! Creates Iterator for use on BaseCollection
- virtual TYPENAME NCollection_BaseCollection<TheItemType>::Iterator&
- CreateIterator(void) const
- { return *(new (this->IterAllocator()) Iterator(*this)); }
-
};
typedef GEOM_Set<TopoDS_Vertex> TVertexSet;
GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
if ( !anObj->_is_nil() ) {
- TColStd_IndexedMapOfInteger anIndexes;
+ NCollection_IndexedMap<Standard_Integer> anIndexes;
aSelMgr->GetIndexes(aSelList.First(), anIndexes);
if (anIndexes.Extent() == 1) {
GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
if ( !anObj->_is_nil() ) {
- TColStd_IndexedMapOfInteger anIndexes;
+ NCollection_IndexedMap<Standard_Integer> anIndexes;
aSelMgr->GetIndexes(aSelList.First(), anIndexes);
if (anIndexes.Extent() > 0) {
#include <GEOMBase_Skeleton.h>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <QMap>
GEOM::GEOM_Object_var myShape;
QMap< int, int > myFace; // indexes of faces from second tab ( Face1,2 )
- TColStd_IndexedMapOfInteger myFaces; // indexes of faces from first tab ( Faces )
- TColStd_IndexedMapOfInteger myEdges; // indexes of edges from fourth tab (Edges)
+ NCollection_IndexedMap<Standard_Integer> myFaces; // indexes of faces from first tab ( Faces )
+ NCollection_IndexedMap<Standard_Integer> myEdges; // indexes of edges from fourth tab (Edges)
// to initialize the first selection field with a selected object on the dialog creation
- bool myInitial;
+ bool myInitial;
QGroupBox* myGrp1;
QGroupBox* myGrp2;
// OCCT Includes
#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
#include <GEOMImpl_Types.hxx>
QString aName = GEOMBase::GetName( anObj );
TopoDS_Shape aShape;
if ( GEOMBase::GetShape( anObj, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) {
- TColStd_IndexedMapOfInteger aMap;
+ NCollection_IndexedMap<Standard_Integer> aMap;
aSelMgr->GetIndexes(aSelList.First(), aMap);
if ( aMap.Extent() == 1 ) { // Local Selection
int anIndex = aMap( 1 );
GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
if ( !anObj->_is_nil() ) {
- TColStd_IndexedMapOfInteger anIndexes;
+ NCollection_IndexedMap<Standard_Integer> anIndexes;
aSelMgr->GetIndexes(aSelList.First(), anIndexes);
if (anIndexes.Extent() > 0) {
#include <GEOMBase_Skeleton.h>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
class DlgRef_2Sel1Spin2Check;
double getRadius() const;
private:
- bool myIs1D;
- GEOM::GEOM_Object_var myShape;
- TColStd_IndexedMapOfInteger myVertexes;
+ bool myIs1D;
+ GEOM::GEOM_Object_var myShape;
+ NCollection_IndexedMap<Standard_Integer> myVertexes;
- DlgRef_2Sel1Spin2Check* GroupVertexes;
+ DlgRef_2Sel1Spin2Check* GroupVertexes;
};
#endif // OPERATIONGUI_Fillet1d2dDLG_H
// OCCT Includes
#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
#include <GEOMImpl_Types.hxx>
GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
if ( !anObj->_is_nil() ) {
- TColStd_IndexedMapOfInteger anIndexes;
+ NCollection_IndexedMap<Standard_Integer> anIndexes;
aSelMgr->GetIndexes(aSelList.First(), anIndexes);
if (anIndexes.Extent() > 0) {
#include <GEOMBase_Skeleton.h>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
class DlgRef_1Sel1Spin;
class DlgRef_2Sel3Spin2Rb;
int myConstructorId;
GEOM::GEOM_Object_var myShape;
- TColStd_IndexedMapOfInteger myEdges;
- TColStd_IndexedMapOfInteger myFaces;
+ NCollection_IndexedMap<Standard_Integer> myEdges;
+ NCollection_IndexedMap<Standard_Integer> myFaces;
// to initialize the first selection field with a selected object on the dialog creation
bool myInitial;
// OCCT Includes
#include <TopAbs.hxx>
#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <GEOMImpl_Types.hxx>
myObject = GEOM::GEOM_Object::_nil();
}
else if (myEditCurrentArgument == GroupPoints->LineEdit2) {
- TColStd_IndexedMapOfInteger aMap;
+ NCollection_IndexedMap<Standard_Integer> aMap;
aSelMgr->GetIndexes(anIO, aMap);
const int n = aMap.Extent();
myWiresInd->length(n);
#include <BRep_Tool.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
//=================================================================================
// class : RepairGUI_DivideEdgeDlg()
{
GEOM::short_array anIndexes;
- TColStd_IndexedMapOfInteger aMap;
+ NCollection_IndexedMap<Standard_Integer> aMap;
SalomeApp_Application* anApp =
(SalomeApp_Application*)(SUIT_Session::session()->activeApplication());
anApp->selectionMgr()->GetIndexes( anIO, aMap );
// OCCT Includes
#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <GEOMImpl_Types.hxx>
QString aName = GEOMBase::GetName(anObj);
TopoDS_Shape aShape;
if (GEOMBase::GetShape(anObj, aShape, TopAbs_SHAPE) && !aShape.IsNull()) {
- TColStd_IndexedMapOfInteger aMap;
+ NCollection_IndexedMap<Standard_Integer> aMap;
aSelMgr->GetIndexes(aSelList.First(), aMap);
if (aMap.Extent() == 1) { // Local Selection
int anIndex = aMap(1);
// OCCT Includes
#include <TopAbs.hxx>
#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <GEOMImpl_Types.hxx>
}
else if (myEditCurrentArgument == GroupPoints->LineEdit2 &&
!GroupPoints->CheckButton1->isChecked()) {
- TColStd_IndexedMapOfInteger aMap;
+ NCollection_IndexedMap<Standard_Integer> aMap;
aSelMgr->GetIndexes(anIO, aMap);
const int n = aMap.Extent();
myWiresInd->length(n);
// OCCT Includes
#include <TopAbs.hxx>
#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <GEOMImpl_Types.hxx>
}
else if (myEditCurrentArgument == GroupPoints->LineEdit2 &&
!GroupPoints->CheckButton1->isChecked()) {
- TColStd_IndexedMapOfInteger aMap;
+ NCollection_IndexedMap<Standard_Integer> aMap;
aSelMgr->GetIndexes(anIO, aMap);
const int n = aMap.Extent();
myWiresInd->length(n);
#include <TopExp_Explorer.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_IndexedMapOfInteger.hxx>
+#include <NCollection_IndexedMap.hxx>
#include <GEOMImpl_Types.hxx>
}
}
else if (myEditCurrentArgument == GroupArgs->LineEdit2) {
- TColStd_IndexedMapOfInteger aMap;
+ NCollection_IndexedMap<Standard_Integer> aMap;
if (aSelList.Extent() == 1) {
Handle(SALOME_InteractiveObject) anIO = aSelList.First();