//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
Description : Predicate for Range of Ids.
const SMDS_Mesh* myMesh;
};
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
case FT_Area: myStream<< "aArea"; break;
case FT_FreeBorders: myStream<< "aFreeBorders"; break;
case FT_FreeEdges: myStream<< "aFreeEdges"; break;
+ case FT_FreeNodes: myStream<< "aFreeNodes"; break;
case FT_MultiConnection: myStream<< "aMultiConnection"; break;
case FT_MultiConnection2D:myStream<< "aMultiConnection2D";break;
case FT_Length: myStream<< "aLength"; break;
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
Description : Predicate for Range of Ids.
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()
{
SMESH::RangeOfIds_i* aServant = new SMESH::RangeOfIds_i();
{
case FT_FreeBorders:
case FT_FreeEdges:
+ case FT_FreeNodes:
{
CORBA::ULong i = theCriteria->length();
theCriteria->length( i + 1 );
case SMESH::FT_FreeEdges:
aPredicate = aFilterMgr->CreateFreeEdges();
break;
+ case SMESH::FT_FreeNodes:
+ aPredicate = aFilterMgr->CreateFreeNodes();
+ break;
case SMESH::FT_BelongToGeom:
{
SMESH::BelongToGeom_ptr tmpPred = aFilterMgr->CreateBelongToGeom();
case FT_RangeOfIds : return "Range of IDs";
case FT_FreeBorders : return "Free borders";
case FT_FreeEdges : return "Free edges";
+ case FT_FreeNodes : return "Free nodes";
case FT_MultiConnection : return "Borders at multi-connections";
case FT_MultiConnection2D: return "Borders at multi-connections 2D";
case FT_Length : return "Length";
else if ( theStr.equals( "Lying on Geom" ) ) return FT_LyingOnGeom;
else if ( theStr.equals( "Free borders" ) ) return FT_FreeBorders;
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 2D" ) ) return FT_MultiConnection2D;
else if ( theStr.equals( "Length" ) ) return FT_Length;
Controls::FreeEdgesPtr myFreeEdgesPtr;
};
+
+ /*
+ 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
FreeBorders_ptr CreateFreeBorders();
FreeEdges_ptr CreateFreeEdges();
+ FreeNodes_ptr CreateFreeNodes();
RangeOfIds_ptr CreateRangeOfIds();