Open CASCADE Technology
7.7.0

This class provides operators for analysis surfaces and curves of shapes in order to find out more simple geometry entities, which could replace existing complex (for exampe, BSpline) geometry objects with given tolerance. More...
#include <ShapeAnalysis_CanonicalRecognition.hxx>
Public Member Functions  
ShapeAnalysis_CanonicalRecognition ()  
Empty constructor. More...  
ShapeAnalysis_CanonicalRecognition (const TopoDS_Shape &theShape)  
constructor with shape initialisation More...  
void  SetShape (const TopoDS_Shape &theShape) 
Sets shape. More...  
const TopoDS_Shape &  GetShape () const 
Returns input shape. More...  
Standard_Real  GetGap () const 
Returns deviation between input geometry entity and analytical entity. More...  
Standard_Integer  GetStatus () const 
Returns status of operation. Current meaning of possible values of status: 1  algorithm is not initalazed by shape 0  no errors 1  error during any operation (usually  because of wrong input data) Any operation (calling any methods like IsPlane(...), ...) can be performed when current staue is equal 0. If after any operation status != 0, it is necessary to set it 0 by method ClearStatus() before calling other operation. More...  
void  ClearStatus () 
Returns status to be equal 0. More...  
Standard_Boolean  IsPlane (const Standard_Real theTol, gp_Pln &thePln) 
Returns true if the underlined surface can be represent by plane with tolerance theTol and sets in thePln the result plane. More...  
Standard_Boolean  IsCylinder (const Standard_Real theTol, gp_Cylinder &theCyl) 
Returns true if the underlined surface can be represent by cylindrical one with tolerance theTol and sets in theCyl the result cylinrical surface. More...  
Standard_Boolean  IsCone (const Standard_Real theTol, gp_Cone &theCone) 
Returns true if the underlined surface can be represent by conical one with tolerance theTol and sets in theCone the result conical surface. More...  
Standard_Boolean  IsSphere (const Standard_Real theTol, gp_Sphere &theSphere) 
Returns true if the underlined surface can be represent by spherical one with tolerance theTol and sets in theSphere the result spherical surface. More...  
Standard_Boolean  IsLine (const Standard_Real theTol, gp_Lin &theLin) 
Returns true if the underlined curve can be represent by line with tolerance theTol and sets in theLin the result line. More...  
Standard_Boolean  IsCircle (const Standard_Real theTol, gp_Circ &theCirc) 
Returns true if the underlined curve can be represent by circle with tolerance theTol and sets in theCirc the result circle. More...  
Standard_Boolean  IsEllipse (const Standard_Real theTol, gp_Elips &theElips) 
Returns true if the underlined curve can be represent by ellipse with tolerance theTol and sets in theCirc the result ellipse. More...  
This class provides operators for analysis surfaces and curves of shapes in order to find out more simple geometry entities, which could replace existing complex (for exampe, BSpline) geometry objects with given tolerance.
ShapeAnalysis_CanonicalRecognition::ShapeAnalysis_CanonicalRecognition  (  ) 
Empty constructor.
ShapeAnalysis_CanonicalRecognition::ShapeAnalysis_CanonicalRecognition  (  const TopoDS_Shape &  theShape  ) 
constructor with shape initialisation

inline 
Returns status to be equal 0.

inline 
Returns deviation between input geometry entity and analytical entity.

inline 
Returns input shape.

inline 
Returns status of operation. Current meaning of possible values of status: 1  algorithm is not initalazed by shape 0  no errors 1  error during any operation (usually  because of wrong input data) Any operation (calling any methods like IsPlane(...), ...) can be performed when current staue is equal 0. If after any operation status != 0, it is necessary to set it 0 by method ClearStatus() before calling other operation.
Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsCircle  (  const Standard_Real  theTol, 
gp_Circ &  theCirc  
) 
Returns true if the underlined curve can be represent by circle with tolerance theTol and sets in theCirc the result circle.
Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsCone  (  const Standard_Real  theTol, 
gp_Cone &  theCone  
) 
Returns true if the underlined surface can be represent by conical one with tolerance theTol and sets in theCone the result conical surface.
Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsCylinder  (  const Standard_Real  theTol, 
gp_Cylinder &  theCyl  
) 
Returns true if the underlined surface can be represent by cylindrical one with tolerance theTol and sets in theCyl the result cylinrical surface.
Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsEllipse  (  const Standard_Real  theTol, 
gp_Elips &  theElips  
) 
Returns true if the underlined curve can be represent by ellipse with tolerance theTol and sets in theCirc the result ellipse.
Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsLine  (  const Standard_Real  theTol, 
gp_Lin &  theLin  
) 
Returns true if the underlined curve can be represent by line with tolerance theTol and sets in theLin the result line.
Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsPlane  (  const Standard_Real  theTol, 
gp_Pln &  thePln  
) 
Returns true if the underlined surface can be represent by plane with tolerance theTol and sets in thePln the result plane.
Standard_Boolean ShapeAnalysis_CanonicalRecognition::IsSphere  (  const Standard_Real  theTol, 
gp_Sphere &  theSphere  
) 
Returns true if the underlined surface can be represent by spherical one with tolerance theTol and sets in theSphere the result spherical surface.
void ShapeAnalysis_CanonicalRecognition::SetShape  (  const TopoDS_Shape &  theShape  ) 
Sets shape.