X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FControls%2FSMESH_Controls.cxx;h=6e80cc77ad1a53324ea380b885c3cc6eb78c1a8b;hb=6ac07fd349b8cf998281f81919138c83e512bd13;hp=9a8589d9251f3b39c29ebc533cbe55b06a259901;hpb=386c76ea033aef391a39dfc3b015ed081ed49fd5;p=modules%2Fsmesh.git diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index 9a8589d92..6e80cc77a 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -134,7 +134,7 @@ namespace { // +-----+------+ +-----+------+ // | | | | // | | | | - // result sould be 2 in both cases + // result should be 2 in both cases // int aResult0 = 0, aResult1 = 0; // last node, it is a medium one in a quadratic edge @@ -2116,6 +2116,42 @@ SMDSAbs_ElementType BallDiameter::GetType() const return SMDSAbs_Ball; } +//================================================================================ +/* + Class : NodeConnectivityNumber + Description : Functor returning number of elements connected to a node +*/ +//================================================================================ + +double NodeConnectivityNumber::GetValue( long theId ) +{ + double nb = 0; + + if ( const SMDS_MeshNode* node = myMesh->FindNode( theId )) + { + SMDSAbs_ElementType type; + if ( myMesh->NbVolumes() > 0 ) + type = SMDSAbs_Volume; + else if ( myMesh->NbFaces() > 0 ) + type = SMDSAbs_Face; + else if ( myMesh->NbEdges() > 0 ) + type = SMDSAbs_Edge; + else + return 0; + nb = node->NbInverseElements( type ); + } + return nb; +} + +double NodeConnectivityNumber::GetBadRate( double Value, int /*nbNodes*/ ) const +{ + return Value; +} + +SMDSAbs_ElementType NodeConnectivityNumber::GetType() const +{ + return SMDSAbs_Node; +} /* PREDICATES @@ -2614,7 +2650,7 @@ bool FreeFaces::IsSatisfy( long theId ) for ( ; volItr != volEnd; ++volItr ) if ( (*volItr).second >= nbNode ) nbVol++; - // face is not free if number of volumes constructed on thier nodes more than one + // face is not free if number of volumes constructed on their nodes more than one return (nbVol < 2); } @@ -2662,7 +2698,7 @@ SMDSAbs_ElementType LinearOrQuadratic::GetType() const //================================================================================ /* Class : GroupColor - Description : Functor for check color of group to whic mesh element belongs to + Description : Functor for check color of group to which mesh element belongs to */ //================================================================================