Back to index

salome-geom  6.5.0
Functions
GEOMAlgo_GetInPlace_3.cxx File Reference
#include <GEOMAlgo_GetInPlace.hxx>
#include <NMTTools_CoupleOfShape.hxx>

Go to the source code of this file.

Functions

static Standard_Integer TypeToInteger (const TopAbs_ShapeEnum aType1, const TopAbs_ShapeEnum aType2)

Function Documentation

Standard_Integer TypeToInteger ( const TopAbs_ShapeEnum  aType1,
const TopAbs_ShapeEnum  aType2 
) [static]

Definition at line 125 of file GEOMAlgo_GetInPlace_3.cxx.

{
  Standard_Integer iRet, iT1, iT2, iX;
  //
  iRet=-1;
  //
  if (aType1==TopAbs_VERTEX) {
    if (aType2==TopAbs_VERTEX) {
      iRet=0;
    }
  }
  else if (aType1==TopAbs_EDGE) {
    if (aType2==TopAbs_VERTEX) {
      iRet=1;
    }
    else if (aType2==TopAbs_EDGE) {
      iRet=2;
    }
  }
  else if (aType1==TopAbs_FACE) {
    if (aType2==TopAbs_VERTEX) {
      iRet=3;
    }
    else if (aType2==TopAbs_EDGE) {
      iRet=4;
    }
    else if (aType2==TopAbs_FACE) {
      iRet=5;
    }
  }
  // So_1,*_2
  else if (aType1==TopAbs_SOLID) {
    if (aType2==TopAbs_VERTEX) {
      iRet=6;
    }
    else if (aType2==TopAbs_EDGE) {
      iRet=7;
    }
    else if (aType2==TopAbs_FACE) {
      iRet=8;
    }
    else if (aType2==TopAbs_SOLID) {
      iRet=9;
    }
  }
  return iRet;
}

Here is the caller graph for this function: