FT_FreeBorders,
FT_FreeEdges,
FT_MultiConnection,
+ FT_MultiConnection2D,
FT_Length,
FT_Length2D,
FT_BelongToGeom,
struct Value
{
double myLength;
- long myElemId;
long myPnt1, myPnt2;
};
typedef sequence<Value> Values;
Values GetValues();
};
- interface MultiConnection : NumericalFunctor{};
+ interface MultiConnection : NumericalFunctor{};
+ interface MultiConnection2D : NumericalFunctor
+ {
+ struct Value
+ {
+ long myNbConnects;
+ long myPnt1, myPnt2;
+ };
+
+ typedef sequence<Value> Values;
+ Values GetValues();
+ };
/*!
* Predicates are intended for verification of criteria,
Length CreateLength();
Length2D CreateLength2D();
MultiConnection CreateMultiConnection();
+ MultiConnection2D CreateMultiConnection2D();
/*!
* Create logical functors ( predicates )
<separator pos-id=""/>
<popup-item item-id="6002" pos-id="" label-id="Free Edges" icon-id="mesh_free_edges_2d.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6018" pos-id="" label-id="Length 2D" icon-id="mesh_length_2d.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+ <popup-item item-id="6019" pos-id="" label-id="Borders at Multi-Connection 2D" icon-id="mesh_multi_edges_2d.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6011" pos-id="" label-id="Area" icon-id="mesh_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6012" pos-id="" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6013" pos-id="" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="6002" pos-id="" label-id="Free Edges" icon-id="mesh_free_edges_2d.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6018" pos-id="" label-id="Length 2D" icon-id="mesh_length_2d.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+ <popup-item item-id="6019" pos-id="" label-id="Borders at Multi-Connection 2D" icon-id="mesh_multi_edges_2d.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6011" pos-id="" label-id="Area" icon-id="mesh_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6012" pos-id="" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6013" pos-id="" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="6002" pos-id="" label-id="Free Edges" icon-id="mesh_free_edges_2d.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6018" pos-id="" label-id="Length 2D" icon-id="mesh_length_2d.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+ <popup-item item-id="6019" pos-id="" label-id="Borders at Multi-Connection 2D" icon-id="mesh_multi_edges_2d.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6011" pos-id="" label-id="Area" icon-id="mesh_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6012" pos-id="" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6013" pos-id="" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separator pos-id=""/>
<popup-item item-id="6002" pos-id="" label-id="Free Edges" icon-id="mesh_free_edges_2d.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6018" pos-id="" label-id="Length 2D" icon-id="mesh_length_2d.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+ <popup-item item-id="6019" pos-id="" label-id="Borders at Multi-Connection 2D" icon-id="mesh_multi_edges_2d.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6011" pos-id="" label-id="Area" icon-id="mesh_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6012" pos-id="" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<popup-item item-id="6013" pos-id="" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
<separatorTB/>
<toolbutton-item item-id="6002" label-id="Free Edges" icon-id="mesh_free_edges_2d.png" tooltip-id="Free edges" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6018" label-id="Length 2D" icon-id="mesh_length_2d.png" tooltip-id="Length2D" accel-id="" toggle-id="" execute-action=""/>
+ <toolbutton-item item-id="6019" label-id="Borders at Multi-Connection 2D" icon-id="mesh_multi_edges_2d.png" tooltip-id="Multiconnection 2D" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6011" label-id="Area" icon-id="mesh_area.png" tooltip-id="Area" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6012" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="Taper" accel-id="" toggle-id="" execute-action=""/>
<toolbutton-item item-id="6013" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="Aspect Ratio" accel-id="" toggle-id="" execute-action=""/>
new Skew();
new Area();
new Length();
+ // new Length2D();
new MultiConnection();
+ // new MultiConnection2D();
new FreeBorders();
new LessThan();
new MoreThan();
return SMDSAbs_Edge;
}
+/*
+ Class : MultiConnection2D
+ Description : Functor for calculating number of faces conneted to the edge
+*/
+double MultiConnection2D::GetValue( const TSequenceOfXYZ& P )
+{
+ return 0;
+}
+
+double MultiConnection2D::GetValue( long theElementId )
+{
+ TSequenceOfXYZ P;
+ int aResult = 0;
+
+ if (GetPoints(theElementId,P)){
+ double aVal;
+ const SMDS_MeshElement* anFaceElem = myMesh->FindElement( theElementId );
+ SMDSAbs_ElementType aType = anFaceElem->GetType();
+
+ int len = P.size();
+
+ TColStd_MapOfInteger aMap;
+ int aResult = 0;
+
+ switch (aType){
+ case SMDSAbs_All:
+ case SMDSAbs_Node:
+ case SMDSAbs_Edge:
+ case SMDSAbs_Face:
+ if (len == 3){ // triangles
+ int Nb[3] = {0,0,0};
+
+ int i=0;
+ SMDS_ElemIteratorPtr anIter = anFaceElem->nodesIterator();
+ if ( anIter != 0 ) {
+ while( anIter->more() ) {
+ const SMDS_MeshNode* aNode = (SMDS_MeshNode*)anIter->next();
+ if ( aNode == 0 ){
+ break;
+ }
+ SMDS_ElemIteratorPtr anElemIter = aNode->GetInverseElementIterator();
+ while( anElemIter->more() ) {
+ const SMDS_MeshElement* anElem = anElemIter->next();
+ if ( anElem != 0 && anElem->GetType() != SMDSAbs_Edge ) {
+ int anId = anElem->GetID();
+
+ if ( anIter->more() ) // i.e. first node
+ aMap.Add( anId );
+ else if ( aMap.Contains( anId ) ){
+ Nb[i]++;
+ }
+ }
+ else if ( anElem != 0 && anElem->GetType() == SMDSAbs_Edge ) i++;
+ }
+ }
+ }
+
+ aResult = Max(Max(Nb[0],Nb[1]),Nb[2]);
+ }
+ break;
+ case SMDSAbs_Volume:
+ default: aResult=0;
+ }
+
+ }
+ return aResult;//getNbMultiConnection( myMesh, theId );
+}
+
+double MultiConnection2D::GetBadRate( double Value, int /*nbNodes*/ ) const
+{
+ return Value;
+}
+
+SMDSAbs_ElementType MultiConnection2D::GetType() const
+{
+ return SMDSAbs_Face;
+}
+
+MultiConnection2D::Value::Value(long thePntId1, long thePntId2)
+{
+ myPntId[0] = thePntId1; myPntId[1] = thePntId2;
+ if(thePntId1 > thePntId2){
+ myPntId[1] = thePntId1; myPntId[0] = thePntId2;
+ }
+}
+
+bool MultiConnection2D::Value::operator<(const MultiConnection2D::Value& x) const{
+ if(myPntId[0] < x.myPntId[0]) return true;
+ if(myPntId[0] == x.myPntId[0])
+ if(myPntId[1] < x.myPntId[1]) return true;
+ return false;
+}
+
+void MultiConnection2D::GetValues(MValues& theValues){
+ SMDS_FaceIteratorPtr anIter = myMesh->facesIterator();
+ for(; anIter->more(); ){
+ const SMDS_MeshFace* anElem = anIter->next();
+ long anElemId = anElem->GetID();
+ SMDS_ElemIteratorPtr aNodesIter = anElem->nodesIterator();
+ long aNodeId[3];
+
+ //int aNbConnects=0;
+ const SMDS_MeshNode* aNode0;
+ const SMDS_MeshNode* aNode1;
+ const SMDS_MeshNode* aNode2;
+ if(aNodesIter->more()){
+ aNode0 = (SMDS_MeshNode*) aNodesIter->next();
+ aNode1 = aNode0;
+ const SMDS_MeshNode* aNodes = (SMDS_MeshNode*) aNode1;
+ aNodeId[0] = aNodeId[1] = aNodes->GetID();
+ }
+ for(; aNodesIter->more(); ){
+ aNode2 = (SMDS_MeshNode*) aNodesIter->next();
+ long anId = aNode2->GetID();
+ aNodeId[2] = anId;
+
+ Value aValue(aNodeId[1],aNodeId[2]);
+ MValues::iterator aItr = theValues.find(aValue);
+ if (aItr != theValues.end()){
+ aItr->second += 1;
+ //aNbConnects = nb;
+ } else {
+ theValues[aValue] = 1;
+ //aNbConnects = 1;
+ }
+ //cout << "NodeIds: "<<aNodeId[1]<<","<<aNodeId[2]<<" nbconn="<<aNbConnects<<endl;
+ aNodeId[1] = aNodeId[2];
+ aNode1 = aNode2;
+ }
+ Value aValue(aNodeId[0],aNodeId[2]);
+ MValues::iterator aItr = theValues.find(aValue);
+ if (aItr != theValues.end()){
+ aItr->second += 1;
+ //aNbConnects = nb;
+ } else {
+ theValues[aValue] = 1;
+ //aNbConnects = 1;
+ }
+ //cout << "NodeIds: "<<aNodeId[0]<<","<<aNodeId[2]<<" nbconn="<<aNbConnects<<endl;
+ }
+
+}
/*
PREDICATES
virtual SMDSAbs_ElementType GetType() const;
};
+ /*
+ Class : MultiConnection2D
+ Description : Functor for calculating number of faces conneted to the edge
+ */
+ class MultiConnection2D: public virtual NumericalFunctor{
+ public:
+ virtual double GetValue( long theElementId );
+ virtual double GetValue( const TSequenceOfXYZ& thePoints );
+ virtual double GetBadRate( double Value, int nbNodes ) const;
+ virtual SMDSAbs_ElementType GetType() const;
+ struct Value{
+ long myPntId[2];
+ Value(long thePntId1, long thePntId2);
+ bool operator<(const Value& x) const;
+ };
+ typedef std::map<Value,int> MValues;
+
+ void GetValues(MValues& theValues);
+ };
+ typedef boost::shared_ptr<MultiConnection2D> MultiConnection2DPtr;
/*
PREDICATES
*/
aFunctor.reset(new SMESH::Controls::MultiConnection());
myControlActor = my1DActor;
break;
+ case eMultiConnection2D:
+ aFunctor.reset(new SMESH::Controls::MultiConnection2D());
+ myControlActor = my2DActor;
+ break;
case eArea:
{
SMESH::Controls::Area* aControl = new SMESH::Controls::Area();
case eLength2D:
my1DExtActor->SetExtControlMode(aFunctor,myControlActor,myScalarBarActor,myLookupTable);
break;
+ case eMultiConnection2D:
+ my1DExtActor->SetExtControlMode(aFunctor,myControlActor,myScalarBarActor,myLookupTable);
+ break;
default:
myControlActor->SetControlMode(aFunctor,myScalarBarActor,myLookupTable);
}
break;
case eLength2D:
my1DExtActor->VisibilityOn();
+ case eMultiConnection2D:
+ my1DExtActor->VisibilityOn();
default:
if(myControlActor->GetUnstructuredGrid()->GetNumberOfCells())
myScalarBarActor->VisibilityOn();
enum eControl{eNone, eLength, eLength2D, eFreeBorders, eFreeEdges, eMultiConnection,
eArea, eTaper, eAspectRatio, eMinimumAngle, eWarping, eSkew,
- eAspectRatio3D};
+ eAspectRatio3D, eMultiConnection2D};
virtual void SetControlMode(eControl theMode) = 0;
virtual eControl GetControlMode() = 0;
// File : SMESH_Actor.cxx
// Author : Nicolas REJNERI
// Module : SMESH
-// $Header$Header$
+// $Header$Header: /home/server/cvs/SMESH/SMESH_SRC/src/OBJECT/SMESH_DeviceActor.cxx,v 1.5.2.4 2004/12/27 12:49:55 apo Exp $
#include "SMESH_DeviceActor.h"
theLookupTable->SetRange(aScalars->GetRange());
theLookupTable->Build();
+ myMergeFilter->SetScalars(aDataSet);
+ aDataSet->Delete();
+ }
+ else if (MultiConnection2D* aMultiConnection2D = dynamic_cast<MultiConnection2D*>(theFunctor.get())){
+ SMESH::Controls::MultiConnection2D::MValues aValues;
+
+ myVisualObj->UpdateFunctor(theFunctor);
+
+ aMultiConnection2D->GetValues(aValues);
+ vtkUnstructuredGrid* aDataSet = vtkUnstructuredGrid::New();
+ vtkUnstructuredGrid* aGrid = myVisualObj->GetUnstructuredGrid();
+ aDataSet->SetPoints(aGrid->GetPoints());
+
+ vtkIdType aNbCells = aValues.size();
+ vtkDoubleArray *aScalars = vtkDoubleArray::New();
+ aScalars->SetNumberOfComponents(1);
+ aScalars->SetNumberOfTuples(aNbCells);
+
+ vtkIdType aCellsSize = 3*aNbCells;
+ vtkCellArray* aConnectivity = vtkCellArray::New();
+ aConnectivity->Allocate( aCellsSize, 0 );
+
+ vtkUnsignedCharArray* aCellTypesArray = vtkUnsignedCharArray::New();
+ aCellTypesArray->SetNumberOfComponents( 1 );
+ aCellTypesArray->Allocate( aNbCells * aCellTypesArray->GetNumberOfComponents() );
+
+ vtkIdList *anIdList = vtkIdList::New();
+ anIdList->SetNumberOfIds(2);
+
+ MultiConnection2D::MValues::const_iterator anIter = aValues.begin();
+ int i = 0;
+ for(vtkIdType aVtkId; anIter != aValues.end(); anIter++,i++){
+ const MultiConnection2D::Value& aValue = (*anIter).first;
+ int aNode[2] = {
+ myVisualObj->GetNodeVTKId(aValue.myPntId[0]),
+ myVisualObj->GetNodeVTKId(aValue.myPntId[1])
+ };
+ if(aNode[0] >= 0 && aNode[1] >= 0){
+ anIdList->SetId( 0, aNode[0] );
+ anIdList->SetId( 1, aNode[1] );
+ aConnectivity->InsertNextCell( anIdList );
+ aCellTypesArray->InsertNextValue( VTK_LINE );
+ aScalars->SetValue(i,(*anIter).second);
+ }
+ }
+
+ vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+ aCellLocationsArray->SetNumberOfComponents( 1 );
+ aCellLocationsArray->SetNumberOfTuples( aNbCells );
+
+ aConnectivity->InitTraversal();
+ for( vtkIdType idType = 0, *pts, npts; aConnectivity->GetNextCell( npts, pts ); idType++ )
+ aCellLocationsArray->SetValue( idType, aConnectivity->GetTraversalLocation( npts ) );
+
+ aDataSet->SetCells( aCellTypesArray, aCellLocationsArray,aConnectivity );
+ SetUnstructuredGrid(aDataSet);
+
+ aDataSet->GetCellData()->SetScalars(aScalars);
+ aScalars->Delete();
+
+ theLookupTable->SetRange(aScalars->GetRange());
+ theLookupTable->Build();
+
myMergeFilter->SetScalars(aDataSet);
aDataSet->Delete();
}
aTitle = QObject::tr( "MULTI_BORDERS" );
aControl = SMESH_Actor::eMultiConnection;
break;
+ case 6019:
+ aTitle = QObject::tr( "MULTI2D_BORDERS" );
+ aControl = SMESH_Actor::eMultiConnection2D;
+ break;
case 6011:
aTitle = QObject::tr( "AREA_ELEMENTS" );
aControl = SMESH_Actor::eArea;
case 6011:
case 6001:
case 6018:
+ case 6019:
case 6002:
case 6003:
case 6004:
// Display Entity
mi = popup->findItem( 1135 );
- if ( mi && mi->popup() ) {
+ int aIsSomething=0;
+ if (aNbVolumes>0) aIsSomething++;
+ if (aNbFaces>0) aIsSomething++;
+ if (aNbEdges>0) aIsSomething++;
+ if ( mi && (aIsSomething <= 1)){
+ popup->removeItem(1135);
+ }else if ( mi && mi->popup() ) {
QPopupMenu* aPopup = mi->popup();
unsigned int aMode = anActor->GetEntityMode();
-
+
+ bool aIsVolumesMode = aMode & SMESH_Actor::eVolumes;
+ bool aIsFacesMode = aMode & SMESH_Actor::eFaces;
+ bool aIsEdgesMode = aMode & SMESH_Actor::eEdges;
+
if(aNbVolumes == 0)
aPopup->removeItem( 219 );
else
- aPopup->setItemChecked( 219, aMode & SMESH_Actor::eVolumes );
+ aPopup->setItemChecked( 219, aIsVolumesMode );
if(aNbFaces == 0)
aPopup->removeItem( 218 );
else
- aPopup->setItemChecked( 218, aMode & SMESH_Actor::eFaces );
+ aPopup->setItemChecked( 218, aIsFacesMode );
if(aNbEdges == 0)
aPopup->removeItem( 217 );
else
- aPopup->setItemChecked( 217, aMode & SMESH_Actor::eEdges );
+ aPopup->setItemChecked( 217, aIsEdgesMode );
- bool aIsRemove = (aNbVolumes == 0 || aMode & SMESH_Actor::eVolumes);
- aIsRemove &= (aNbFaces == 0 || aMode & SMESH_Actor::eFaces);
- aIsRemove &= (aNbEdges == 0 || aMode & SMESH_Actor::eEdges);
+ bool aIsRemove = (aNbVolumes == 0 || aIsVolumesMode);
+ aIsRemove &= (aNbFaces == 0 || aIsFacesMode);
+ aIsRemove &= (aNbEdges == 0 || aIsEdgesMode);
if(aIsRemove)
aPopup->removeItem( 220 );
break;
case SMESH_Actor::eMultiConnection:
mi->popup()->setItemChecked( 6004, true ); break;
+ case SMESH_Actor::eMultiConnection2D:
+ mi->popup()->setItemChecked( 6019, true ); break;
case SMESH_Actor::eArea:
mi->popup()->setItemChecked( 6011, true ); break;
case SMESH_Actor::eTaper:
mi->popup()->removeItem( 6014 );
mi->popup()->removeItem( 6015 );
mi->popup()->removeItem( 6016 );
+ mi->popup()->removeItem( 6019 );
}
if(aNbVolumes == 0){
mi->popup()->removeItem( 6017 );
aCriteria[ SMESH::FT_BelongToPlane ] = tr( "BELONG_TO_PLANE" );
aCriteria[ SMESH::FT_BelongToCylinder ] = tr( "BELONG_TO_CYLINDER" );
aCriteria[ SMESH::FT_Length2D ] = tr( "LENGTH2D" );
+ aCriteria[ SMESH::FT_MultiConnection2D] = tr( "MULTI2D_BORDERS" );
}
return aCriteria;
}
msgid "SMESHGUI_FilterTable::MULTI_BORDERS"
msgstr "Borders at multi-connections"
+#msgid "SMESHGUI_FilterTable::MULTI2D_BORDERS"
+#msgstr "Borders at multi-connections 2D"
+
msgid "SMESHGUI_FilterTable::LENGTH"
msgstr "Length"
+#msgid "SMESHGUI_FilterTable::LENGTH2D"
+#msgstr "Length2D"
+
msgid "SMESHGUI_FilterTable::ASPECT_RATIO"
msgstr "Aspect ratio"
msgstr "Length"
msgid "LENGTH2D_EDGES"
-msgstr "Length2D"
+msgstr "Length 2D"
msgid "FREE_BORDERS"
-msgstr "Free borders"
+msgstr "Free Borders"
msgid "MULTI_BORDERS"
-msgstr "Borders at multi-connections"
+msgstr "Borders at Multi-Connections"
+
+msgid "MULTI2D_BORDERS"
+msgstr "Borders at Multi-Connections 2D"
msgid "AREA_ELEMENTS"
msgstr "Area"
return SMESH::FT_MultiConnection;
}
+/*
+ Class : MultiConnection2D_i
+ Description : Functor for calculating number of faces conneted to the edge
+*/
+MultiConnection2D_i::MultiConnection2D_i()
+{
+ myNumericalFunctorPtr.reset( new Controls::MultiConnection2D() );
+ myFunctorPtr = myNumericalFunctorPtr;
+}
+
+FunctorType MultiConnection2D_i::GetFunctorType()
+{
+ return SMESH::FT_MultiConnection2D;
+}
+
+SMESH::MultiConnection2D::Values* MultiConnection2D_i::GetValues()
+{
+ INFOS("MultiConnection2D_i::GetValues");
+ SMESH::Controls::MultiConnection2D::MValues aValues;
+ myMulticonnection2DPtr->GetValues( aValues );
+
+ long i = 0, iEnd = aValues.size();
+
+ SMESH::MultiConnection2D::Values_var aResult = new SMESH::MultiConnection2D::Values(iEnd);
+
+ SMESH::Controls::MultiConnection2D::MValues::const_iterator anIter;
+ for ( anIter = aValues.begin() ; anIter != aValues.end(); anIter++, i++ )
+ {
+ const SMESH::Controls::MultiConnection2D::Value& aVal = (*anIter).first;
+ SMESH::MultiConnection2D::Value &aValue = aResult[ i ];
+
+ aValue.myPnt1 = aVal.myPntId[ 0 ];
+ aValue.myPnt2 = aVal.myPntId[ 1 ];
+ aValue.myNbConnects = (*anIter).second;
+
+ }
+
+ INFOS("Multiconnection2D_i::GetValuess~");
+ return aResult._retn();
+}
/*
PREDICATES
return anObj._retn();
}
+MultiConnection2D_ptr FilterManager_i::CreateMultiConnection2D()
+{
+ SMESH::MultiConnection2D_i* aServant = new SMESH::MultiConnection2D_i();
+ SMESH::MultiConnection2D_var anObj = aServant->_this();
+ return anObj._retn();
+}
BelongToGeom_ptr FilterManager_i::CreateBelongToGeom()
{
case SMESH::FT_MultiConnection:
aFunctor = aFilterMgr->CreateMultiConnection();
break;
+ case SMESH::FT_MultiConnection2D:
+ aFunctor = aFilterMgr->CreateMultiConnection2D();
+ break;
case SMESH::FT_Length:
aFunctor = aFilterMgr->CreateLength();
break;
case FT_FreeBorders : return "Free borders";
case FT_FreeEdges : return "Free edges";
case FT_MultiConnection : return "Borders at multi-connections";
+ case FT_MultiConnection2D: return "Borders at multi-connections 2D";
case FT_Length : return "Length";
case FT_Length2D : return "Length2D";
case FT_LessThan : return "Less than";
else if ( theStr.equals( "Free borders" ) ) return FT_FreeBorders;
else if ( theStr.equals( "Free edges" ) ) return FT_FreeEdges;
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;
+ // else if ( theStr.equals( "Length2D" ) ) return FT_Length2D;
else if ( theStr.equals( "Range of IDs" ) ) return FT_RangeOfIds;
else if ( theStr.equals( "Less than" ) ) return FT_LessThan;
else if ( theStr.equals( "More than" ) ) return FT_MoreThan;
FunctorType GetFunctorType();
};
+/*
+ Class : MultiConnection2D_i
+ Description : Functor for calculating number of faces conneted to the edge
+*/
+class MultiConnection2D_i: public virtual POA_SMESH::MultiConnection2D,
+ public virtual NumericalFunctor_i
+{
+public:
+ MultiConnection2D_i();
+ SMESH::MultiConnection2D::Values* GetValues();
+ FunctorType GetFunctorType();
+
+protected:
+ Controls::MultiConnection2DPtr myMulticonnection2DPtr;
+};
+
/*
PREDICATES
Length_ptr CreateLength();
Length2D_ptr CreateLength2D();
MultiConnection_ptr CreateMultiConnection();
+ MultiConnection2D_ptr CreateMultiConnection2D();
BelongToGeom_ptr CreateBelongToGeom();
BelongToPlane_ptr CreateBelongToPlane();