OCC Main Page | ModelingData | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

ModelingData
TKGeomBase
GCPnts


GCPnts_UniformDeflection Class Reference

Provides an algorithm to compute a distribution of
points on a 'C2' continuous curve. The algorithm
respects a criterion of maximum deflection between
the curve and the polygon that results from the computed points.
Note: This algorithm is relatively time consuming. A
GCPnts_QuasiUniformDeflection algorithm is
quicker; it can also work with non-'C2' continuous
curves, but it generates more points in the distribution.
.

#include <GCPnts_UniformDeflection.hxx>


Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
Standard_EXPORT GCPnts_UniformDeflection ()
 Constructs an empty algorithm. To define the problem
to be solved, use the function Initialize.
.
Standard_EXPORT GCPnts_UniformDeflection (Adaptor3d_Curve &C, const Standard_Real Deflection, const Standard_Boolean WithControl=Standard_True)
 Computes a uniform Deflection distribution of points on
the Curve <c>.
if <withcontrol> is True,the algorithm controls the estimate
deflection
.
Standard_EXPORT GCPnts_UniformDeflection (Adaptor2d_Curve2d &C, const Standard_Real Deflection, const Standard_Boolean WithControl=Standard_True)
 Computes a uniform Deflection distribution of points on
the Curve <c>.
if <withcontrol> is True,the algorithm controls the estimate
deflection
.
Standard_EXPORT GCPnts_UniformDeflection (Adaptor3d_Curve &C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Boolean WithControl=Standard_True)
 Computes a Uniform Deflection distribution of points
on a part of the Curve <c>.
if <withcontrol> is True,the algorithm controls the estimate
deflection
.
Standard_EXPORT GCPnts_UniformDeflection (Adaptor2d_Curve2d &C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Boolean WithControl=Standard_True)
 Computes a Uniform Deflection distribution of points
on a part of the Curve <c>.
if <withcontrol> is True,the algorithm controls the estimate
deflection
.
Standard_EXPORT void Initialize (Adaptor3d_Curve &C, const Standard_Real Deflection, const Standard_Boolean WithControl=Standard_True)
 Initialize the algoritms with <c>, <deflection>
.
Standard_EXPORT void Initialize (Adaptor2d_Curve2d &C, const Standard_Real Deflection, const Standard_Boolean WithControl=Standard_True)
 Initialize the algoritms with <c>, <deflection>
.
Standard_EXPORT void Initialize (Adaptor3d_Curve &C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Boolean WithControl=Standard_True)
 Initialize the algoritms with <c>, <deflection>,
<u1>,<u2>
.
Standard_EXPORT void Initialize (Adaptor2d_Curve2d &C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const Standard_Boolean WithControl=Standard_True)
 Initialize the algoritms with <c>, <deflection>,
<u1>,<u2>
This and the above methods initialize (or reinitialize) this algorithm and
compute a distribution of points:
- on the curve C, or
- on the part of curve C limited by the two
parameter values U1 and U2,
where the maximum distance between C and the
polygon that results from the points of the
distribution is not greater than Deflection.
The first point of the distribution is either the origin
of curve C or the point of parameter U1. The last
point of the distribution is either the end point of
curve C or the point of parameter U2. Intermediate
points of the distribution are built using
interpolations of segments of the curve limited at
the 2nd degree. The construction ensures, in a first
step, that the chordal deviation for this
interpolation of the curve is less than or equal to
Deflection. However, it does not ensure that the
chordal deviation for the curve itself is less than or
equal to Deflection. To do this a check is
necessary, which may generate (second step)
additional intermediate points. This check is time
consuming, and can be avoided by setting
WithControl to false. Note that by default
WithControl is true and check is performed.
Use the function IsDone to verify that the
computation was successful, the function NbPoints
to obtain the number of points of the computed
distribution, and the function Parameter to read
the parameter of each point.
Warning
- C is necessary, 'C2' continuous. This property is
not checked at construction time.
- The roles of U1 and U2 are inverted if U1 > U2.
Warning
C is an adapted curve, i.e. an object which is an interface between:
- the services provided by either a 2D curve from
the package Geom2d (in the case of an
Adaptor2d_Curve2d curve) or a 3D curve from
the package Geom (in the case of an Adaptor3d_Curve curve),
- and those required on the curve by the computation algorithm.
.
Standard_Boolean IsDone () const
 Returns true if the computation was successful.
IsDone is a protection against:
- non-convergence of the algorithm
- querying the results before computation.
.
Standard_Integer NbPoints () const
 Returns the number of points of the distribution
computed by this algorithm.
Exceptions
StdFail_NotDone if this algorithm has not been
initialized, or if the computation was not successful.
.
Standard_Real Parameter (const Standard_Integer Index) const
 Returns the parameter of the point of index Index in
the distribution computed by this algorithm.
Warning
Index must be greater than or equal to 1, and less
than or equal to the number of points of the
distribution. However, pay particular attention as this
condition is not checked by this function.
Exceptions
StdFail_NotDone if this algorithm has not been
initialized, or if the computation was not successful.
.
Standard_EXPORT gp_Pnt Value (const Standard_Integer Index) const
 Returns the point of index Index in the distribution
computed by this algorithm.
Warning
Index must be greater than or equal to 1, and less
than or equal to the number of points of the
distribution. However, pay particular attention as this
condition is not checked by this function.
Exceptions
StdFAil_NotDone if this algorithm has not been
initialized, or if the computation was not successful.
.
Standard_Real Deflection () const
 Returns the deflection between the curve and the
polygon resulting from the points of the distribution
computed by this algorithm.
This value is the one given to the algorithm at the
time of construction (or initialization).
Exceptions
StdFail_NotDone if this algorithm has not been
initialized, or if the computation was not successful.
.

Private Attributes

Standard_Boolean myDone
Standard_Real myDeflection
TColStd_SequenceOfReal myParams
TColgp_SequenceOfPnt myPoints


Constructor & Destructor Documentation

Standard_EXPORT GCPnts_UniformDeflection::GCPnts_UniformDeflection  ) 
 

Standard_EXPORT GCPnts_UniformDeflection::GCPnts_UniformDeflection Adaptor3d_Curve C,
const Standard_Real  Deflection,
const Standard_Boolean  WithControl = Standard_True
 

Standard_EXPORT GCPnts_UniformDeflection::GCPnts_UniformDeflection Adaptor2d_Curve2d C,
const Standard_Real  Deflection,
const Standard_Boolean  WithControl = Standard_True
 

Standard_EXPORT GCPnts_UniformDeflection::GCPnts_UniformDeflection Adaptor3d_Curve C,
const Standard_Real  Deflection,
const Standard_Real  U1,
const Standard_Real  U2,
const Standard_Boolean  WithControl = Standard_True
 

Standard_EXPORT GCPnts_UniformDeflection::GCPnts_UniformDeflection Adaptor2d_Curve2d C,
const Standard_Real  Deflection,
const Standard_Real  U1,
const Standard_Real  U2,
const Standard_Boolean  WithControl = Standard_True
 


Member Function Documentation

Standard_Real GCPnts_UniformDeflection::Deflection  )  const [inline]
 

Standard_EXPORT void GCPnts_UniformDeflection::Initialize Adaptor2d_Curve2d C,
const Standard_Real  Deflection,
const Standard_Real  U1,
const Standard_Real  U2,
const Standard_Boolean  WithControl = Standard_True
 

Standard_EXPORT void GCPnts_UniformDeflection::Initialize Adaptor3d_Curve C,
const Standard_Real  Deflection,
const Standard_Real  U1,
const Standard_Real  U2,
const Standard_Boolean  WithControl = Standard_True
 

Standard_EXPORT void GCPnts_UniformDeflection::Initialize Adaptor2d_Curve2d C,
const Standard_Real  Deflection,
const Standard_Boolean  WithControl = Standard_True
 

Standard_EXPORT void GCPnts_UniformDeflection::Initialize Adaptor3d_Curve C,
const Standard_Real  Deflection,
const Standard_Boolean  WithControl = Standard_True
 

Standard_Boolean GCPnts_UniformDeflection::IsDone  )  const [inline]
 

Standard_Integer GCPnts_UniformDeflection::NbPoints  )  const [inline]
 

void GCPnts_UniformDeflection::operator delete void *  anAddress  )  [inline]
 

void* GCPnts_UniformDeflection::operator new size_t  size  )  [inline]
 

void* GCPnts_UniformDeflection::operator new size_t  ,
void *  anAddress
[inline]
 

Standard_Real GCPnts_UniformDeflection::Parameter const Standard_Integer  Index  )  const [inline]
 

Standard_EXPORT gp_Pnt GCPnts_UniformDeflection::Value const Standard_Integer  Index  )  const
 


Field Documentation

Standard_Real GCPnts_UniformDeflection::myDeflection [private]
 

Standard_Boolean GCPnts_UniformDeflection::myDone [private]
 

TColStd_SequenceOfReal GCPnts_UniformDeflection::myParams [private]
 

TColgp_SequenceOfPnt GCPnts_UniformDeflection::myPoints [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 13:22:45 2008 for OpenCASCADE by  doxygen 1.4.1