mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-12 17:50:34 +05:00
PAL7358. Add BadOrientedVolume predicate
This commit is contained in:
parent
283a9b4f5a
commit
c21a157b9d
@ -62,6 +62,7 @@ module SMESH
|
|||||||
FT_BelongToCylinder,
|
FT_BelongToCylinder,
|
||||||
FT_LyingOnGeom,
|
FT_LyingOnGeom,
|
||||||
FT_RangeOfIds,
|
FT_RangeOfIds,
|
||||||
|
FT_BadOrientedVolume,
|
||||||
FT_LessThan,
|
FT_LessThan,
|
||||||
FT_MoreThan,
|
FT_MoreThan,
|
||||||
FT_EqualTo,
|
FT_EqualTo,
|
||||||
@ -137,6 +138,13 @@ module SMESH
|
|||||||
boolean IsSatisfy( in long thEntityId );
|
boolean IsSatisfy( in long thEntityId );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Logical functor (predicate) "Bad Oriented Volume".
|
||||||
|
* Verify whether a mesh volume is incorrectly oriented from
|
||||||
|
* the point of view of MED convention
|
||||||
|
*/
|
||||||
|
interface BadOrientedVolume: Predicate {};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Logical functor (predicate) "Belong To Geometry".
|
* Logical functor (predicate) "Belong To Geometry".
|
||||||
* Verify whether mesh element or node belong to pointed Geom Object
|
* Verify whether mesh element or node belong to pointed Geom Object
|
||||||
@ -383,6 +391,8 @@ module SMESH
|
|||||||
|
|
||||||
RangeOfIds CreateRangeOfIds();
|
RangeOfIds CreateRangeOfIds();
|
||||||
|
|
||||||
|
BadOrientedVolume CreateBadOrientedVolume();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Create comparators ( predicates )
|
* Create comparators ( predicates )
|
||||||
*/
|
*/
|
||||||
|
@ -668,6 +668,21 @@ Controls::PredicatePtr Predicate_i::GetPredicate()
|
|||||||
return myPredicatePtr;
|
return myPredicatePtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Class : BadOrientedVolume_i
|
||||||
|
Description : Verify whether a mesh volume is incorrectly oriented from
|
||||||
|
the point of view of MED convention
|
||||||
|
*/
|
||||||
|
BadOrientedVolume_i::BadOrientedVolume_i()
|
||||||
|
{
|
||||||
|
Controls::PredicatePtr control( new Controls::BadOrientedVolume() );
|
||||||
|
myFunctorPtr = myPredicatePtr = control;
|
||||||
|
};
|
||||||
|
|
||||||
|
FunctorType BadOrientedVolume_i::GetFunctorType()
|
||||||
|
{
|
||||||
|
return SMESH::FT_BadOrientedVolume;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Class : BelongToGeom_i
|
Class : BelongToGeom_i
|
||||||
@ -1363,6 +1378,13 @@ RangeOfIds_ptr FilterManager_i::CreateRangeOfIds()
|
|||||||
return anObj._retn();
|
return anObj._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BadOrientedVolume_ptr FilterManager_i::CreateBadOrientedVolume()
|
||||||
|
{
|
||||||
|
SMESH::BadOrientedVolume_i* aServant = new SMESH::BadOrientedVolume_i();
|
||||||
|
SMESH::BadOrientedVolume_var anObj = aServant->_this();
|
||||||
|
return anObj._retn();
|
||||||
|
}
|
||||||
|
|
||||||
LessThan_ptr FilterManager_i::CreateLessThan()
|
LessThan_ptr FilterManager_i::CreateLessThan()
|
||||||
{
|
{
|
||||||
SMESH::LessThan_i* aServant = new SMESH::LessThan_i();
|
SMESH::LessThan_i* aServant = new SMESH::LessThan_i();
|
||||||
@ -1612,6 +1634,20 @@ static inline bool getCriteria( Predicate_i* thePred,
|
|||||||
theCriteria[ i ].ThresholdStr = aPred->GetRangeStr();
|
theCriteria[ i ].ThresholdStr = aPred->GetRangeStr();
|
||||||
theCriteria[ i ].TypeOfElement = aPred->GetElementType();
|
theCriteria[ i ].TypeOfElement = aPred->GetElementType();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
case FT_BadOrientedVolume:
|
||||||
|
{
|
||||||
|
BadOrientedVolume_i* aPred = dynamic_cast<BadOrientedVolume_i*>( thePred );
|
||||||
|
|
||||||
|
CORBA::ULong i = theCriteria->length();
|
||||||
|
theCriteria->length( i + 1 );
|
||||||
|
|
||||||
|
theCriteria[ i ] = createCriterion();
|
||||||
|
|
||||||
|
theCriteria[ i ].Type = FT_BadOrientedVolume;
|
||||||
|
theCriteria[ i ].TypeOfElement = aPred->GetElementType();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case FT_LessThan:
|
case FT_LessThan:
|
||||||
@ -1789,6 +1825,11 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria
|
|||||||
aPredicate = tmpPred;
|
aPredicate = tmpPred;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case SMESH::FT_BadOrientedVolume:
|
||||||
|
{
|
||||||
|
aPredicate = aFilterMgr->CreateBadOrientedVolume();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
@ -1992,6 +2033,7 @@ static inline LDOMString toString( const long theType )
|
|||||||
case FT_BelongToPlane : return "Belong to Plane";
|
case FT_BelongToPlane : return "Belong to Plane";
|
||||||
case FT_BelongToCylinder: return "Belong to Cylinder";
|
case FT_BelongToCylinder: return "Belong to Cylinder";
|
||||||
case FT_LyingOnGeom : return "Lying on Geom";
|
case FT_LyingOnGeom : return "Lying on Geom";
|
||||||
|
case FT_BadOrientedVolume: return "Bad Oriented Volume";
|
||||||
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";
|
||||||
@ -2033,6 +2075,7 @@ static inline SMESH::FunctorType toFunctorType( const LDOMString& theStr )
|
|||||||
else if ( theStr.equals( "Length" ) ) return FT_Length;
|
else if ( theStr.equals( "Length" ) ) return FT_Length;
|
||||||
// else if ( theStr.equals( "Length2D" ) ) return FT_Length2D;
|
// else if ( theStr.equals( "Length2D" ) ) return FT_Length2D;
|
||||||
else if ( theStr.equals( "Range of IDs" ) ) return FT_RangeOfIds;
|
else if ( theStr.equals( "Range of IDs" ) ) return FT_RangeOfIds;
|
||||||
|
else if ( theStr.equals( "Bad Oriented Volume" ) ) return FT_BadOrientedVolume;
|
||||||
else if ( theStr.equals( "Less than" ) ) return FT_LessThan;
|
else if ( theStr.equals( "Less than" ) ) return FT_LessThan;
|
||||||
else if ( theStr.equals( "More than" ) ) return FT_MoreThan;
|
else if ( theStr.equals( "More than" ) ) return FT_MoreThan;
|
||||||
else if ( theStr.equals( "Equal to" ) ) return FT_EqualTo;
|
else if ( theStr.equals( "Equal to" ) ) return FT_EqualTo;
|
||||||
|
@ -316,6 +316,19 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Class : BadOrientedVolume_i
|
||||||
|
Description : Verify whether a mesh volume is incorrectly oriented from
|
||||||
|
the point of view of MED convention
|
||||||
|
*/
|
||||||
|
class BadOrientedVolume_i: public virtual POA_SMESH::BadOrientedVolume,
|
||||||
|
public virtual Predicate_i
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
BadOrientedVolume_i();
|
||||||
|
FunctorType GetFunctorType();
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Class : BelongToGeom_i
|
Class : BelongToGeom_i
|
||||||
Description : Predicate for selection on geometrical support
|
Description : Predicate for selection on geometrical support
|
||||||
@ -706,6 +719,8 @@ public:
|
|||||||
|
|
||||||
RangeOfIds_ptr CreateRangeOfIds();
|
RangeOfIds_ptr CreateRangeOfIds();
|
||||||
|
|
||||||
|
BadOrientedVolume_ptr CreateBadOrientedVolume();
|
||||||
|
|
||||||
LessThan_ptr CreateLessThan();
|
LessThan_ptr CreateLessThan();
|
||||||
MoreThan_ptr CreateMoreThan();
|
MoreThan_ptr CreateMoreThan();
|
||||||
EqualTo_ptr CreateEqualTo();
|
EqualTo_ptr CreateEqualTo();
|
||||||
|
Loading…
Reference in New Issue
Block a user