blob: 18fa02bbc461435074dd445f9d05d4a1e0c29f53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
//Copyright: Matra Datavision 1996
// File: StdSelect_ShapeTypeFilter.cxx
// Created: Tue Sep 17 10:02:44 1996
// Author: Odile Olivier
// <g_design@robox.paris1.matra-dtv.fr>
#include <StdSelect_ShapeTypeFilter.ixx>
#include <StdSelect_BRepOwner.hxx>
//==================================================
// Function: StdSelect_ShapeTypeFilter
// Purpose : Constructeur
//==================================================
StdSelect_ShapeTypeFilter::StdSelect_ShapeTypeFilter(const TopAbs_ShapeEnum aType):
myType(aType){}
//==================================================
// Function: IsOk
// Purpose : Renvoie True si la shape est du type defini a la construction
//==================================================
Standard_Boolean StdSelect_ShapeTypeFilter::IsOk(const Handle(SelectMgr_EntityOwner)& EO) const
{
Handle(StdSelect_BRepOwner) BRO = Handle(StdSelect_BRepOwner)::DownCast( EO );
if( BRO.IsNull() || !BRO->HasShape() ) return Standard_False;
const TopoDS_Shape& anobj= BRO->Shape();
return anobj.ShapeType() == myType;
}
Standard_Boolean StdSelect_ShapeTypeFilter::ActsOn(const TopAbs_ShapeEnum aStandardMode) const
{return aStandardMode==myType;}
|