// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
return SMESH_subMesh::IsApplicableHypotesis( aHyp, (TopAbs_ShapeEnum)_shapeType );
};
+//=======================================================================
+//function : IsAuxiliaryPredicate::IsOk
+//purpose :
+//=======================================================================
+
+bool SMESH_HypoFilter::IsAuxiliaryPredicate::IsOk(const SMESH_Hypothesis* aHyp,
+ const TopoDS_Shape& /*aShape*/) const
+{
+ return aHyp->IsAuxiliary();
+};
+
//=======================================================================
//function : ApplicablePredicate::ApplicablePredicate
//purpose :
}
//=======================================================================
-//function : IsGlobalPredicate::IsOk
+//function : IsAssignedToPredicate::IsOk
//purpose :
//=======================================================================
-bool SMESH_HypoFilter::IsGlobalPredicate::IsOk(const SMESH_Hypothesis* aHyp,
+bool SMESH_HypoFilter::IsAssignedToPredicate::IsOk(const SMESH_Hypothesis* aHyp,
const TopoDS_Shape& aShape) const
{
return ( !_mainShape.IsNull() && !aShape.IsNull() && _mainShape.IsSame( aShape ));
//purpose :
//=======================================================================
-void SMESH_HypoFilter::And( SMESH_HypoPredicate* aPredicate )
+SMESH_HypoFilter & SMESH_HypoFilter::And( SMESH_HypoPredicate* aPredicate )
{
add( AND, aPredicate );
+ return *this;
}
//=======================================================================
//purpose :
//=======================================================================
-void SMESH_HypoFilter::AndNot( SMESH_HypoPredicate* aPredicate )
+SMESH_HypoFilter & SMESH_HypoFilter::AndNot( SMESH_HypoPredicate* aPredicate )
{
add( AND_NOT, aPredicate );
+ return *this;
}
//=======================================================================
//purpose :
//=======================================================================
-void SMESH_HypoFilter::Or( SMESH_HypoPredicate* aPredicate )
+SMESH_HypoFilter & SMESH_HypoFilter::Or( SMESH_HypoPredicate* aPredicate )
{
add( OR, aPredicate );
+ return *this;
}
//=======================================================================
//purpose : Return predicates
//=======================================================================
-void SMESH_HypoFilter::OrNot( SMESH_HypoPredicate* aPredicate )
+SMESH_HypoFilter & SMESH_HypoFilter::OrNot( SMESH_HypoPredicate* aPredicate )
{
add( OR_NOT, aPredicate );
+ return *this;
}
//=======================================================================
return new TypePredicate( MORE, SMESHDS_Hypothesis::PARAM_ALGO );
}
+//=======================================================================
+//function : IsAuxiliary
+//purpose :
+//=======================================================================
+
+SMESH_HypoPredicate* SMESH_HypoFilter::IsAuxiliary()
+{
+ return new IsAuxiliaryPredicate();
+}
+
+
//=======================================================================
//function : IsGlobal
//purpose :
SMESH_HypoPredicate* SMESH_HypoFilter::IsGlobal(const TopoDS_Shape& theMainShape)
{
- return new IsGlobalPredicate( theMainShape );
+ return new IsAssignedToPredicate( theMainShape );
+}
+
+//=======================================================================
+//function : IsAssignedTo
+//purpose :
+//=======================================================================
+
+ SMESH_HypoPredicate* SMESH_HypoFilter::IsAssignedTo(const TopoDS_Shape& theShape)
+{
+ return new IsAssignedToPredicate( theShape );
}
//=======================================================================
//purpose :
//=======================================================================
-void SMESH_HypoFilter::Init ( SMESH_HypoPredicate* aPredicate, bool notNagate )
+SMESH_HypoFilter & SMESH_HypoFilter::Init ( SMESH_HypoPredicate* aPredicate, bool notNagate )
{
list<SMESH_HypoPredicate*>::const_iterator pred = myPredicates.begin();
for ( ; pred != myPredicates.end(); ++pred )
delete *pred;
+ myPredicates.clear();
add( notNagate ? AND : AND_NOT, aPredicate );
+ return *this;
}