23#ifndef _SMESH_CONTROLSCLASSIFIER_HXX_
24#define _SMESH_CONTROLSCLASSIFIER_HXX_
28#include <TopoDS_Shape.hxx>
31class BRepClass3d_SolidClassifier;
32class GeomAPI_ProjectPointOnSurf;
33class GeomAPI_ProjectPointOnCurve;
41 Classifier(): mySolidClfr(0), myProjFace(0), myProjEdge(0), myFlags(0) { myU = myV = 1e100; }
43 void Init(
const TopoDS_Shape& s,
double tol,
const Bnd_B3d* box = 0 );
44 bool IsOut(
const gp_Pnt& p) {
return SetChecked(
true ), (this->*myIsOutFun)( p ); }
45 TopAbs_ShapeEnum
ShapeType()
const {
return myShape.ShapeType(); }
46 const TopoDS_Shape&
Shape()
const {
return myShape; }
47 const Bnd_B3d*
GetBndBox()
const {
return & myBox; }
49 bool IsChecked() {
return myFlags & theIsCheckedFlag; }
50 bool IsSetFlag(
int flag )
const {
return myFlags & flag; }
51 void SetChecked(
bool is ) { is ? SetFlag( theIsCheckedFlag ) : UnsetFlag( theIsCheckedFlag ); }
52 void SetFlag (
int flag ) { myFlags |= flag; }
54 void GetParams(
double & u,
double & v )
const { u = myU; v = myV; }
57 bool isOutOfSolid (
const gp_Pnt& p);
58 bool isOutOfBox (
const gp_Pnt& p);
59 bool isOutOfFace (
const gp_Pnt& p);
60 bool isOutOfEdge (
const gp_Pnt& p);
61 bool isOutOfVertex(
const gp_Pnt& p);
63 bool isBox (
const TopoDS_Shape& s);
65 TopoDS_Shape prepareSolid(
const TopoDS_Shape& theSolid );
78 static const int theIsCheckedFlag = 0x0000100;
#define SMESHCONTROLS_EXPORT
Definition: SMESH_Controls.hxx:41
Definition: SMESH_ControlsClassifier.cxx:39
Definition: SMESH_ControlsClassifier.hxx:40
bool IsSetFlag(int flag) const
Definition: SMESH_ControlsClassifier.hxx:50
void SetChecked(bool is)
Definition: SMESH_ControlsClassifier.hxx:51
const TopoDS_Shape & Shape() const
Definition: SMESH_ControlsClassifier.hxx:46
GeomAPI_ProjectPointOnCurve * myProjEdge
Definition: SMESH_ControlsClassifier.hxx:71
void SetFlag(int flag)
Definition: SMESH_ControlsClassifier.hxx:52
bool isOutOfNone(const gp_Pnt &)
Definition: SMESH_ControlsClassifier.hxx:62
void UnsetFlag(int flag)
Definition: SMESH_ControlsClassifier.hxx:53
gp_Pnt myVertexXYZ
Definition: SMESH_ControlsClassifier.hxx:72
BRepClass3d_SolidClassifier * mySolidClfr
Definition: SMESH_ControlsClassifier.hxx:68
Classifier()
Definition: SMESH_ControlsClassifier.hxx:41
double myTol
Definition: SMESH_ControlsClassifier.hxx:74
TopAbs_ShapeEnum ShapeType() const
Definition: SMESH_ControlsClassifier.hxx:45
int myFlags
Definition: SMESH_ControlsClassifier.hxx:76
TopoDS_Shape myShape
Definition: SMESH_ControlsClassifier.hxx:73
bool IsOut(const gp_Pnt &p)
Definition: SMESH_ControlsClassifier.hxx:44
const Bnd_B3d * GetBndBox() const
Definition: SMESH_ControlsClassifier.hxx:47
double Tolerance() const
Definition: SMESH_ControlsClassifier.hxx:48
bool IsChecked()
Definition: SMESH_ControlsClassifier.hxx:49
void GetParams(double &u, double &v) const
Definition: SMESH_ControlsClassifier.hxx:54
GeomAPI_ProjectPointOnSurf * myProjFace
Definition: SMESH_ControlsClassifier.hxx:70
Bnd_B3d myBox
Definition: SMESH_ControlsClassifier.hxx:69
double myU
Definition: SMESH_ControlsClassifier.hxx:75