Back to index

salome-geom  6.5.0
Public Member Functions | Protected Attributes
GEOMAlgo_ClsfSolid Class Reference

#include <GEOMAlgo_ClsfSolid.hxx>

Inheritance diagram for GEOMAlgo_ClsfSolid:
Inheritance graph
[legend]
Collaboration diagram for GEOMAlgo_ClsfSolid:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Standard_EXPORT GEOMAlgo_ClsfSolid ()
virtual Standard_EXPORT ~GEOMAlgo_ClsfSolid ()
Standard_EXPORT void SetShape (const TopoDS_Shape &aS)
Standard_EXPORT const
TopoDS_Shape & 
Shape () const
virtual Standard_EXPORT void Perform ()
virtual Standard_EXPORT void CheckData ()
Standard_EXPORT void SetPnt (const gp_Pnt &aP)
Standard_EXPORT const gp_Pnt & Pnt () const
Standard_EXPORT void SetTolerance (const Standard_Real aT)
Standard_EXPORT Standard_Real Tolerance () const
Standard_EXPORT TopAbs_State State () const
virtual Standard_EXPORT
Standard_Boolean 
CanBeON (const Handle(Geom_Curve)&aCT) const
virtual Standard_EXPORT
Standard_Boolean 
CanBeON (const Handle(Geom_Surface)&aST) const
 DEFINE_STANDARD_RTTI (GEOMAlgo_Clsf)
 DEFINE_STANDARD_RTTI (GEOMAlgo_HAlgo)
virtual Standard_EXPORT void CheckResult ()
Standard_EXPORT Standard_Integer ErrorStatus () const
Standard_EXPORT Standard_Integer WarningStatus () const

Protected Attributes

TopoDS_Shape myShape
Standard_Address myPClsf
TopAbs_State myState
gp_Pnt myPnt
Standard_Real myTolerance
Standard_Integer myErrorStatus
Standard_Integer myWarningStatus

Detailed Description

Definition at line 41 of file GEOMAlgo_ClsfSolid.hxx.


Constructor & Destructor Documentation

Definition at line 40 of file GEOMAlgo_ClsfSolid.cxx.

:
  GEOMAlgo_Clsf()
{
  myPClsf=NULL;
}

Definition at line 50 of file GEOMAlgo_ClsfSolid.cxx.

{
  if (myPClsf) {
    BRepClass3d_SolidClassifier* pSC;
    //
    pSC=(BRepClass3d_SolidClassifier*)myPClsf;
    delete pSC;
  }
}

Member Function Documentation

Standard_Boolean GEOMAlgo_Clsf::CanBeON ( const Handle(Geom_Curve)&  aCT) const [virtual, inherited]

Reimplemented in GEOMAlgo_ClsfBox, and GEOMAlgo_ClsfSurf.

Definition at line 96 of file GEOMAlgo_Clsf.cxx.

{
  return Standard_True;
}
Standard_Boolean GEOMAlgo_Clsf::CanBeON ( const Handle(Geom_Surface)&  aST) const [virtual, inherited]

Reimplemented in GEOMAlgo_ClsfBox, and GEOMAlgo_ClsfSurf.

Definition at line 104 of file GEOMAlgo_Clsf.cxx.

{
  return Standard_True;
}
void GEOMAlgo_ClsfSolid::CheckData ( ) [virtual]

Reimplemented from GEOMAlgo_HAlgo.

Definition at line 79 of file GEOMAlgo_ClsfSolid.cxx.

{
  myErrorStatus=0;
  //
  BRepClass3d_SolidClassifier* pSC;
  TopAbs_ShapeEnum aType;
  BRep_Builder aBB;
  TopoDS_Solid aS;
  //
  if (myShape.IsNull()) {
    myErrorStatus=10; // mySolid=NULL
    return;
  }
  //
  aType=myShape.ShapeType();
  if (!(aType==TopAbs_SOLID || aType==TopAbs_SHELL)) {
    myErrorStatus=12;
    return;
  }
  //
  //===
  if (aType==TopAbs_SOLID) {
    aS=TopoDS::Solid(myShape);
  }
  else {
    aBB.MakeSolid(aS);
    aBB.Add(aS, myShape);
  }
  //
  if (myPClsf) {
    pSC=(BRepClass3d_SolidClassifier*)myPClsf;
    delete pSC;
  }
  //
  pSC=new BRepClass3d_SolidClassifier(aS);
  myPClsf=pSC;
}
void GEOMAlgo_HAlgo::CheckResult ( ) [virtual, inherited]

Definition at line 61 of file GEOMAlgo_HAlgo.cxx.

Standard_Integer GEOMAlgo_HAlgo::ErrorStatus ( ) const [inherited]

Definition at line 69 of file GEOMAlgo_HAlgo.cxx.

{
  return myErrorStatus;
}
void GEOMAlgo_ClsfSolid::Perform ( ) [virtual]

Implements GEOMAlgo_HAlgo.

Definition at line 120 of file GEOMAlgo_ClsfSolid.cxx.

{
  myErrorStatus=0;
  //
  if (!myPClsf) {
    myErrorStatus=11;
    return;
  }
  //
  BRepClass3d_SolidClassifier* pSC;
  //
  pSC=(BRepClass3d_SolidClassifier*)myPClsf;
  pSC->Perform(myPnt, myTolerance);
  myState=pSC->State();
}
const gp_Pnt & GEOMAlgo_Clsf::Pnt ( ) const [inherited]

Definition at line 80 of file GEOMAlgo_Clsf.cxx.

{
  return myPnt;
}
void GEOMAlgo_Clsf::SetPnt ( const gp_Pnt &  aP) [inherited]

Definition at line 72 of file GEOMAlgo_Clsf.cxx.

{
  myPnt=aP;
}
void GEOMAlgo_ClsfSolid::SetShape ( const TopoDS_Shape &  aS)

Definition at line 63 of file GEOMAlgo_ClsfSolid.cxx.

{
  myShape=aS;
}
void GEOMAlgo_Clsf::SetTolerance ( const Standard_Real  aT) [inherited]

Definition at line 56 of file GEOMAlgo_Clsf.cxx.

{
  myTolerance=aT;
}
const TopoDS_Shape & GEOMAlgo_ClsfSolid::Shape ( ) const

Definition at line 71 of file GEOMAlgo_ClsfSolid.cxx.

{
  return myShape;
}
TopAbs_State GEOMAlgo_Clsf::State ( ) const [inherited]

Definition at line 88 of file GEOMAlgo_Clsf.cxx.

{
  return myState;
}
Standard_Real GEOMAlgo_Clsf::Tolerance ( ) const [inherited]

Definition at line 64 of file GEOMAlgo_Clsf.cxx.

{
  return myTolerance;
}
Standard_Integer GEOMAlgo_HAlgo::WarningStatus ( ) const [inherited]

Definition at line 77 of file GEOMAlgo_HAlgo.cxx.

{
  return myWarningStatus;
}

Member Data Documentation

Standard_Integer GEOMAlgo_HAlgo::myErrorStatus [protected, inherited]

Definition at line 71 of file GEOMAlgo_HAlgo.hxx.

Standard_Address GEOMAlgo_ClsfSolid::myPClsf [protected]

Definition at line 66 of file GEOMAlgo_ClsfSolid.hxx.

gp_Pnt GEOMAlgo_Clsf::myPnt [protected, inherited]

Definition at line 84 of file GEOMAlgo_Clsf.hxx.

TopoDS_Shape GEOMAlgo_ClsfSolid::myShape [protected]

Definition at line 65 of file GEOMAlgo_ClsfSolid.hxx.

TopAbs_State GEOMAlgo_Clsf::myState [protected, inherited]

Definition at line 83 of file GEOMAlgo_Clsf.hxx.

Standard_Real GEOMAlgo_Clsf::myTolerance [protected, inherited]

Definition at line 85 of file GEOMAlgo_Clsf.hxx.

Standard_Integer GEOMAlgo_HAlgo::myWarningStatus [protected, inherited]

Definition at line 72 of file GEOMAlgo_HAlgo.hxx.


The documentation for this class was generated from the following files: