+ if (!setFace( faceIndex ))
+ return !isFree;
+
+ const SMDS_MeshNode** nodes = GetFaceNodes( faceIndex );
+
+ const int di = myVolume->IsQuadratic() ? 2 : 1;
+ const SMDS_MeshNode* n1 = nodes[di*0];
+ const SMDS_MeshNode* n2 = nodes[di*1];
+ const SMDS_MeshNode* n3 = nodes[di*2];
+
+ SMDS_ElemIteratorPtr eIt = n1->GetInverseElementIterator( SMDSAbs_Volume );
+ SMDS_ElemIteratorPtr nIt;
+ while ( eIt->more() ) {
+ const SMDS_MeshElement* vol = eIt->next();
+ if ( vol != myVolume &&
+ vol->GetNodeIndex( n2 ) >= 0 &&
+ vol->GetNodeIndex( n3 ) >= 0 )
+ {
+ if ( otherVol ) *otherVol = vol;
+ return !isFree;
+ }
+ }
+ if ( otherVol ) *otherVol = 0;
+ return isFree;
+}
+
+//================================================================================
+/*!
+ * \brief Thorough check that only one volume is build on the face nodes
+ */
+//================================================================================
+
+bool SMDS_VolumeTool::IsFreeFaceAdv( int faceIndex, const SMDS_MeshElement** otherVol/*=0*/ ) const
+{
+ const bool isFree = true;
+