#include <SMESH_ControlsDef.hxx>

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_Mesh * | myMesh |
| std::vector< const SMDS_MeshNode * > | myLinkNodes |
Definition at line 404 of file SMESH_ControlsDef.hxx.
| SMESH.Controls.BareBorderFace.BareBorderFace | ( | ) |
Definition at line 407 of file SMESH_ControlsDef.hxx.
:myMesh(0) {}
| 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; }
std::vector< const SMDS_MeshNode* > SMESH.Controls.BareBorderFace.myLinkNodes [protected] |
Definition at line 413 of file SMESH_ControlsDef.hxx.
const SMDS_Mesh* SMESH.Controls.BareBorderFace.myMesh [protected] |
Definition at line 412 of file SMESH_ControlsDef.hxx.