Open CASCADE Technology 7.8.0
Public Member Functions
ShapeAnalysis_CanonicalRecognition Class Reference

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.
 
 ShapeAnalysis_CanonicalRecognition (const TopoDS_Shape &theShape)
 constructor with shape initialisation
 
void SetShape (const TopoDS_Shape &theShape)
 Sets shape.
 
const TopoDS_ShapeGetShape () const
 Returns input shape.
 
Standard_Real GetGap () const
 Returns deviation between input geometry entity and analytical entity.
 
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.
 
void ClearStatus ()
 Returns status to be equal 0.
 
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.

 
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.

 
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.

 
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.

 
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.

 
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.

 
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.

 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ShapeAnalysis_CanonicalRecognition() [1/2]

ShapeAnalysis_CanonicalRecognition::ShapeAnalysis_CanonicalRecognition ( )

Empty constructor.

◆ ShapeAnalysis_CanonicalRecognition() [2/2]

ShapeAnalysis_CanonicalRecognition::ShapeAnalysis_CanonicalRecognition ( const TopoDS_Shape theShape)

constructor with shape initialisation

Member Function Documentation

◆ ClearStatus()

void ShapeAnalysis_CanonicalRecognition::ClearStatus ( )
inline

Returns status to be equal 0.

◆ GetGap()

Standard_Real ShapeAnalysis_CanonicalRecognition::GetGap ( ) const
inline

Returns deviation between input geometry entity and analytical entity.

◆ GetShape()

const TopoDS_Shape & ShapeAnalysis_CanonicalRecognition::GetShape ( ) const
inline

Returns input shape.

◆ GetStatus()

Standard_Integer ShapeAnalysis_CanonicalRecognition::GetStatus ( ) const
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.

◆ IsCircle()

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.

◆ IsCone()

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.

◆ IsCylinder()

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.

◆ IsEllipse()

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.

◆ IsLine()

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.

◆ IsPlane()

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.

◆ IsSphere()

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.

◆ SetShape()

void ShapeAnalysis_CanonicalRecognition::SetShape ( const TopoDS_Shape theShape)

Sets shape.


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