-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: GEOMAlgo_GetInPlaceIterator.cxx
+// File: GEOMAlgo_GetInPlaceIterator.cxx
// Created:
-// Author: Peter KURNEV
+// Author: Peter KURNEV
#include <GEOMAlgo_GetInPlace.hxx>
-#include <NMTTools_CoupleOfShape.hxx>
+#include <GEOMAlgo_CoupleOfShapes.hxx>
static
Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2);
+ const TopAbs_ShapeEnum aType2);
//=======================================================================
//function :
//function : AppendPair
//purpose :
//=======================================================================
-void GEOMAlgo_GetInPlaceIterator::AppendPair(const NMTTools_CoupleOfShape& theCS)
+void GEOMAlgo_GetInPlaceIterator::AppendPair(const GEOMAlgo_CoupleOfShapes& theCS)
{
Standard_Integer iX;
TopAbs_ShapeEnum aType1, aType2;
iX=TypeToInteger(aType1, aType2);
if (iX>=0) {
myLists[iX].Append(theCS);
+ } else {
+ // Add inverted pair of shapes.
+ iX=TypeToInteger(aType2, aType1);
+
+ if (iX>=0) {
+ GEOMAlgo_CoupleOfShapes aCSInv;
+
+ aCSInv.SetShapes(aS2, aS1);
+ myLists[iX].Append(aCSInv);
+ }
}
}
//=======================================================================
//purpose :
//=======================================================================
void GEOMAlgo_GetInPlaceIterator::Initialize(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2)
+ const TopAbs_ShapeEnum aType2)
{
Standard_Integer iX;
//
// function: Value
// purpose:
//=======================================================================
-const NMTTools_CoupleOfShape& GEOMAlgo_GetInPlaceIterator::Value()const
+const GEOMAlgo_CoupleOfShapes& GEOMAlgo_GetInPlaceIterator::Value()const
{
return myIterator.Value();
}
//purpose :
//=======================================================================
Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1,
- const TopAbs_ShapeEnum aType2)
+ const TopAbs_ShapeEnum aType2)
{
Standard_Integer iRet;
//