mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-05 06:10:33 +05:00
PAL16202,16203 (Propagation 1D on edges group)
- * * theNumber - Number of subshapes. Object is selected if it contains theNumber of - * theSubShapeType sub-shapes + * * theNumber - Number of subshapes. Object is selected if it contains + * theNumber of theSubShapeType sub-shapes, or at least + * one theSubShapeType, provided that theNumber==0
This commit is contained in:
parent
9ebce0b2a6
commit
fddc257b55
@ -35,8 +35,9 @@
|
|||||||
#include "SALOMEDSClient_SObject.hxx"
|
#include "SALOMEDSClient_SObject.hxx"
|
||||||
#include "SALOMEDS_SObject.hxx"
|
#include "SALOMEDS_SObject.hxx"
|
||||||
|
|
||||||
#include <TopTools_MapOfShape.hxx>
|
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
|
#include <TopTools_IndexedMapOfShape.hxx>
|
||||||
|
#include <TopExp.hxx>
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Class : SMESH_NumberFilter
|
* Class : SMESH_NumberFilter
|
||||||
@ -135,12 +136,13 @@ bool SMESH_NumberFilter::isOk (const SUIT_DataOwner* theDataOwner) const
|
|||||||
if (mySubShapeType == TopAbs_SHAPE);
|
if (mySubShapeType == TopAbs_SHAPE);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
TopExp_Explorer anExp2 (aShape, mySubShapeType);
|
TopTools_IndexedMapOfShape aMap;
|
||||||
TopTools_MapOfShape aMap;
|
TopExp::MapShapes(aShape, mySubShapeType, aMap);
|
||||||
for (; anExp2.More(); anExp2.Next())
|
|
||||||
aMap.Add(anExp2.Current());
|
|
||||||
|
|
||||||
return myNumber == aMap.Extent();
|
if ( myNumber )
|
||||||
|
return myNumber == aMap.Extent(); // given number
|
||||||
|
|
||||||
|
return aMap.Extent(); // at least one?
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -43,8 +43,9 @@ class SUIT_DataOwner;
|
|||||||
* Filter geom objects by number of subshapes of the given type
|
* Filter geom objects by number of subshapes of the given type
|
||||||
* Parameters of constructor:
|
* Parameters of constructor:
|
||||||
* * theSubShapeType - Type of subshape
|
* * theSubShapeType - Type of subshape
|
||||||
* * theNumber - Number of subshapes. Object is selected if it contains theNumber of
|
* * theNumber - Number of subshapes. Object is selected if it contains
|
||||||
* theSubShapeType sub-shapes
|
* theNumber of theSubShapeType sub-shapes, or at least
|
||||||
|
* one theSubShapeType, provided that theNumber==0
|
||||||
* * theShapeType - This map specifies types of object to be selected
|
* * theShapeType - This map specifies types of object to be selected
|
||||||
* * theMainObject - Sub-shapes of this object is selected only
|
* * theMainObject - Sub-shapes of this object is selected only
|
||||||
* * theIsClosedOnly - Closed shapes is selected if this parameter is true
|
* * theIsClosedOnly - Closed shapes is selected if this parameter is true
|
||||||
|
Loading…
Reference in New Issue
Block a user