// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _ShapeAnalysis_ShapeTolerance_HeaderFile #define _ShapeAnalysis_ShapeTolerance_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _TopAbs_ShapeEnum_HeaderFile #include #endif #ifndef _Handle_TopTools_HSequenceOfShape_HeaderFile #include #endif class TopoDS_Shape; class TopTools_HSequenceOfShape; //! Tool for computing shape tolerances (minimal, maximal, average),
//! finding shape with tolerance matching given criteria,
//! setting or limitating tolerances.
class ShapeAnalysis_ShapeTolerance { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } //! Empty constructor
Standard_EXPORT ShapeAnalysis_ShapeTolerance(); //! Determines a tolerance from the ones stored in a shape
//! Remark : calls InitTolerance and AddTolerance,
//! hence, can be used to start a series for cumulating tolerance
//! = 0 : returns the average value between sub-shapes,
//! > 0 : returns the maximal found,
//! < 0 : returns the minimal found.
//! defines what kinds of sub-shapes to consider:
//! SHAPE (default) : all : VERTEX, EDGE, FACE,
//! VERTEX : only vertices,
//! EDGE : only edges,
//! FACE : only faces,
//! SHELL : combined SHELL + FACE, for each face (and containing
//! shell), also checks EDGE and VERTEX
Standard_EXPORT Standard_Real Tolerance(const TopoDS_Shape& shape,const Standard_Integer mode,const TopAbs_ShapeEnum type = TopAbs_SHAPE) ; //! Determines which shapes have a tolerance over the given value
//! is interpreted as in the method Tolerance
Standard_EXPORT Handle_TopTools_HSequenceOfShape OverTolerance(const TopoDS_Shape& shape,const Standard_Real value,const TopAbs_ShapeEnum type = TopAbs_SHAPE) const; //! Determines which shapes have a tolerance within a given interval
//! is interpreted as in the method Tolerance
Standard_EXPORT Handle_TopTools_HSequenceOfShape InTolerance(const TopoDS_Shape& shape,const Standard_Real valmin,const Standard_Real valmax,const TopAbs_ShapeEnum type = TopAbs_SHAPE) const; //! Initializes computation of cumulated tolerance
Standard_EXPORT void InitTolerance() ; //! Adds data on new Shape to compute Cumulated Tolerance
//! (prepares three computations : maximal, average, minimal)
Standard_EXPORT void AddTolerance(const TopoDS_Shape& shape,const TopAbs_ShapeEnum type = TopAbs_SHAPE) ; //! Returns the computed tolerance according to the
//! = 0 : average
//! > 0 : maximal
//! < 0 : minimal
Standard_EXPORT Standard_Real GlobalTolerance(const Standard_Integer mode) const; protected: private: Standard_Real myTols[3]; Standard_Integer myNbTol; }; // other Inline functions and methods (like "C++: function call" methods) #endif