Version: 6.3.1
Public Member Functions | Protected Attributes

SMESH.Controls.BareBorderFace Class Reference

#include <SMESH_ControlsDef.hxx>

Inheritance diagram for SMESH.Controls.BareBorderFace:
Inheritance graph
[legend]

Public Member Functions

 BareBorderFace ()
virtual void SetMesh (const SMDS_Mesh *theMesh)
virtual SMDSAbs_ElementType GetType () const
virtual bool IsSatisfy (long theElementId)

Protected Attributes

const SMDS_MeshmyMesh
std::vector< const
SMDS_MeshNode * > 
myLinkNodes

Detailed Description

Definition at line 404 of file SMESH_ControlsDef.hxx.


Constructor & Destructor Documentation

SMESH.Controls.BareBorderFace.BareBorderFace ( )

Definition at line 407 of file SMESH_ControlsDef.hxx.

:myMesh(0) {}

Member Function Documentation

virtual SMDSAbs_ElementType SMESH.Controls.BareBorderFace.GetType ( ) const [virtual]

Implements SMESH.Controls.Predicate.

Definition at line 409 of file SMESH_ControlsDef.hxx.

References SMDSAbs_Face.

{ return SMDSAbs_Face; }
bool BareBorderFace::IsSatisfy ( long  theElementId) [virtual]

Implements SMESH.Controls.Predicate.

Definition at line 1982 of file SMESH_Controls.cxx.

References PAL_MESH_043_3D.face, SMDS_Mesh.FindElement(), SMDS_MeshNode.GetInverseElementIterator(), SMDS_MeshElement.GetNodeIndex(), SMESH.Controls.NumericalFunctor.myMesh, SMESH_AdvancedEditor.n1, SMESH_AdvancedEditor.n2, SMDSAbs_Edge, and SMDSAbs_Face.

{
  bool ok = false;
  if ( const SMDS_MeshElement* face = myMesh->FindElement(theElementId))
  {
    if ( face->GetType() == SMDSAbs_Face )
    {
      int nbN = face->NbCornerNodes();
      for ( int i = 0; i < nbN && !ok; ++i )
      {
        // check if a link is shared by another face
        const SMDS_MeshNode* n1 = face->GetNode( i );
        const SMDS_MeshNode* n2 = face->GetNode( (i+1)%nbN );
        SMDS_ElemIteratorPtr fIt = n1->GetInverseElementIterator( SMDSAbs_Face );
        bool isShared = false;
        while ( !isShared && fIt->more() )
        {
          const SMDS_MeshElement* f = fIt->next();
          isShared = ( f != face && f->GetNodeIndex(n2) != -1 );
        }
        if ( !isShared )
        {
          myLinkNodes.resize( 2 + face->IsQuadratic());
          myLinkNodes[0] = n1;
          myLinkNodes[1] = n2;
          if ( face->IsQuadratic() )
            myLinkNodes[2] = face->GetNode( i+nbN );
          ok = !myMesh->FindElement( myLinkNodes, SMDSAbs_Edge, /*noMedium=*/false);
        }
      }
    }
  }
  return ok;
}
virtual void SMESH.Controls.BareBorderFace.SetMesh ( const SMDS_Mesh theMesh) [virtual]

Implements SMESH.Controls.Functor.

Definition at line 408 of file SMESH_ControlsDef.hxx.

{ myMesh = theMesh; }

Field Documentation

std::vector< const SMDS_MeshNode* > SMESH.Controls.BareBorderFace.myLinkNodes [protected]

Definition at line 413 of file SMESH_ControlsDef.hxx.

Definition at line 412 of file SMESH_ControlsDef.hxx.

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS