mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-10 19:33:08 +05:00
Fix for improvement 0019927 (EDF770 SMESH: Analyzing the Mesh Quality: Orphan nodes).
This commit is contained in:
parent
69980b70a2
commit
01e646e9da
@ -1691,6 +1691,37 @@ void FreeEdges::GetBoreders(TBorders& theBorders)
|
|||||||
//std::cout<<"theBorders.size() = "<<theBorders.size()<<endl;
|
//std::cout<<"theBorders.size() = "<<theBorders.size()<<endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Class : FreeNodes
|
||||||
|
Description : Predicate for free nodes
|
||||||
|
*/
|
||||||
|
|
||||||
|
FreeNodes::FreeNodes()
|
||||||
|
{
|
||||||
|
myMesh = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeNodes::SetMesh( const SMDS_Mesh* theMesh )
|
||||||
|
{
|
||||||
|
myMesh = theMesh;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FreeNodes::IsSatisfy( long theNodeId )
|
||||||
|
{
|
||||||
|
const SMDS_MeshNode* aNode = myMesh->FindNode( theNodeId );
|
||||||
|
if (!aNode)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return (aNode->NbInverseElements() < 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
SMDSAbs_ElementType FreeNodes::GetType() const
|
||||||
|
{
|
||||||
|
return SMDSAbs_Node;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Class : RangeOfIds
|
Class : RangeOfIds
|
||||||
Description : Predicate for Range of Ids.
|
Description : Predicate for Range of Ids.
|
||||||
|
@ -382,6 +382,22 @@ namespace SMESH{
|
|||||||
typedef boost::shared_ptr<FreeEdges> FreeEdgesPtr;
|
typedef boost::shared_ptr<FreeEdges> FreeEdgesPtr;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Class : FreeNodes
|
||||||
|
Description : Predicate for free nodes
|
||||||
|
*/
|
||||||
|
class SMESHCONTROLS_EXPORT FreeNodes: public virtual Predicate{
|
||||||
|
public:
|
||||||
|
FreeNodes();
|
||||||
|
virtual void SetMesh( const SMDS_Mesh* theMesh );
|
||||||
|
virtual bool IsSatisfy( long theNodeId );
|
||||||
|
virtual SMDSAbs_ElementType GetType() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
const SMDS_Mesh* myMesh;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Class : RangeOfIds
|
Class : RangeOfIds
|
||||||
Description : Predicate for Range of Ids.
|
Description : Predicate for Range of Ids.
|
||||||
|
@ -224,6 +224,7 @@ namespace SMESH
|
|||||||
case FT_Area: myStream<< "aArea"; break;
|
case FT_Area: myStream<< "aArea"; break;
|
||||||
case FT_FreeBorders: myStream<< "aFreeBorders"; break;
|
case FT_FreeBorders: myStream<< "aFreeBorders"; break;
|
||||||
case FT_FreeEdges: myStream<< "aFreeEdges"; break;
|
case FT_FreeEdges: myStream<< "aFreeEdges"; break;
|
||||||
|
case FT_FreeNodes: myStream<< "aFreeNodes"; break;
|
||||||
case FT_MultiConnection: myStream<< "aMultiConnection"; break;
|
case FT_MultiConnection: myStream<< "aMultiConnection"; break;
|
||||||
case FT_MultiConnection2D:myStream<< "aMultiConnection2D";break;
|
case FT_MultiConnection2D:myStream<< "aMultiConnection2D";break;
|
||||||
case FT_Length: myStream<< "aLength"; break;
|
case FT_Length: myStream<< "aLength"; break;
|
||||||
|
@ -1283,6 +1283,21 @@ FunctorType FreeEdges_i::GetFunctorType()
|
|||||||
return SMESH::FT_FreeEdges;
|
return SMESH::FT_FreeEdges;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Class : FreeNodes_i
|
||||||
|
Description : Predicate for free nodes
|
||||||
|
*/
|
||||||
|
FreeNodes_i::FreeNodes_i()
|
||||||
|
{
|
||||||
|
myPredicatePtr.reset(new Controls::FreeNodes());
|
||||||
|
myFunctorPtr = myPredicatePtr;
|
||||||
|
}
|
||||||
|
|
||||||
|
FunctorType FreeNodes_i::GetFunctorType()
|
||||||
|
{
|
||||||
|
return SMESH::FT_FreeNodes;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Class : RangeOfIds_i
|
Class : RangeOfIds_i
|
||||||
Description : Predicate for Range of Ids.
|
Description : Predicate for Range of Ids.
|
||||||
@ -1763,6 +1778,14 @@ FreeEdges_ptr FilterManager_i::CreateFreeEdges()
|
|||||||
return anObj._retn();
|
return anObj._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FreeNodes_ptr FilterManager_i::CreateFreeNodes()
|
||||||
|
{
|
||||||
|
SMESH::FreeNodes_i* aServant = new SMESH::FreeNodes_i();
|
||||||
|
SMESH::FreeNodes_var anObj = aServant->_this();
|
||||||
|
TPythonDump()<<aServant<<" = "<<this<<".CreateFreeNodes()";
|
||||||
|
return anObj._retn();
|
||||||
|
}
|
||||||
|
|
||||||
RangeOfIds_ptr FilterManager_i::CreateRangeOfIds()
|
RangeOfIds_ptr FilterManager_i::CreateRangeOfIds()
|
||||||
{
|
{
|
||||||
SMESH::RangeOfIds_i* aServant = new SMESH::RangeOfIds_i();
|
SMESH::RangeOfIds_i* aServant = new SMESH::RangeOfIds_i();
|
||||||
@ -2011,6 +2034,7 @@ static inline bool getCriteria( Predicate_i* thePred,
|
|||||||
{
|
{
|
||||||
case FT_FreeBorders:
|
case FT_FreeBorders:
|
||||||
case FT_FreeEdges:
|
case FT_FreeEdges:
|
||||||
|
case FT_FreeNodes:
|
||||||
{
|
{
|
||||||
CORBA::ULong i = theCriteria->length();
|
CORBA::ULong i = theCriteria->length();
|
||||||
theCriteria->length( i + 1 );
|
theCriteria->length( i + 1 );
|
||||||
@ -2257,6 +2281,9 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria
|
|||||||
case SMESH::FT_FreeEdges:
|
case SMESH::FT_FreeEdges:
|
||||||
aPredicate = aFilterMgr->CreateFreeEdges();
|
aPredicate = aFilterMgr->CreateFreeEdges();
|
||||||
break;
|
break;
|
||||||
|
case SMESH::FT_FreeNodes:
|
||||||
|
aPredicate = aFilterMgr->CreateFreeNodes();
|
||||||
|
break;
|
||||||
case SMESH::FT_BelongToGeom:
|
case SMESH::FT_BelongToGeom:
|
||||||
{
|
{
|
||||||
SMESH::BelongToGeom_ptr tmpPred = aFilterMgr->CreateBelongToGeom();
|
SMESH::BelongToGeom_ptr tmpPred = aFilterMgr->CreateBelongToGeom();
|
||||||
@ -2515,6 +2542,7 @@ static inline LDOMString toString( CORBA::Long theType )
|
|||||||
case FT_RangeOfIds : return "Range of IDs";
|
case FT_RangeOfIds : return "Range of IDs";
|
||||||
case FT_FreeBorders : return "Free borders";
|
case FT_FreeBorders : return "Free borders";
|
||||||
case FT_FreeEdges : return "Free edges";
|
case FT_FreeEdges : return "Free edges";
|
||||||
|
case FT_FreeNodes : return "Free nodes";
|
||||||
case FT_MultiConnection : return "Borders at multi-connections";
|
case FT_MultiConnection : return "Borders at multi-connections";
|
||||||
case FT_MultiConnection2D: return "Borders at multi-connections 2D";
|
case FT_MultiConnection2D: return "Borders at multi-connections 2D";
|
||||||
case FT_Length : return "Length";
|
case FT_Length : return "Length";
|
||||||
@ -2550,6 +2578,7 @@ static inline SMESH::FunctorType toFunctorType( const LDOMString& theStr )
|
|||||||
else if ( theStr.equals( "Lying on Geom" ) ) return FT_LyingOnGeom;
|
else if ( theStr.equals( "Lying on Geom" ) ) return FT_LyingOnGeom;
|
||||||
else if ( theStr.equals( "Free borders" ) ) return FT_FreeBorders;
|
else if ( theStr.equals( "Free borders" ) ) return FT_FreeBorders;
|
||||||
else if ( theStr.equals( "Free edges" ) ) return FT_FreeEdges;
|
else if ( theStr.equals( "Free edges" ) ) return FT_FreeEdges;
|
||||||
|
else if ( theStr.equals( "Free nodes" ) ) return FT_FreeNodes;
|
||||||
else if ( theStr.equals( "Borders at multi-connections" ) ) return FT_MultiConnection;
|
else if ( theStr.equals( "Borders at multi-connections" ) ) return FT_MultiConnection;
|
||||||
// else if ( theStr.equals( "Borders at multi-connections 2D" ) ) return FT_MultiConnection2D;
|
// else if ( theStr.equals( "Borders at multi-connections 2D" ) ) return FT_MultiConnection2D;
|
||||||
else if ( theStr.equals( "Length" ) ) return FT_Length;
|
else if ( theStr.equals( "Length" ) ) return FT_Length;
|
||||||
|
@ -522,6 +522,19 @@ namespace SMESH
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Class : FreeNodes_i
|
||||||
|
Description : Predicate for free nodes
|
||||||
|
*/
|
||||||
|
class SMESH_I_EXPORT FreeNodes_i: public virtual POA_SMESH::FreeNodes,
|
||||||
|
public virtual Predicate_i
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
FreeNodes_i();
|
||||||
|
FunctorType GetFunctorType();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Class : RangeOfIds_i
|
Class : RangeOfIds_i
|
||||||
Description : Predicate for Range of Ids
|
Description : Predicate for Range of Ids
|
||||||
@ -816,6 +829,7 @@ namespace SMESH
|
|||||||
|
|
||||||
FreeBorders_ptr CreateFreeBorders();
|
FreeBorders_ptr CreateFreeBorders();
|
||||||
FreeEdges_ptr CreateFreeEdges();
|
FreeEdges_ptr CreateFreeEdges();
|
||||||
|
FreeNodes_ptr CreateFreeNodes();
|
||||||
|
|
||||||
RangeOfIds_ptr CreateRangeOfIds();
|
RangeOfIds_ptr CreateRangeOfIds();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user