|
Open CASCADE Technology
6.7.1
|
This class computes a distribution of points on a
curve. The points may respect the deflection. The algorithm
is not based on the classical prediction (with second
derivative of curve), but either on the evaluation of
the distance between the mid point and the point of
mid parameter of the two points, or the distance
between the mid point and the point at parameter 0.5
on the cubic interpolation of the two points and their
tangents.
Note: this algorithm is faster than a
GCPnts_UniformDeflection algorithm, and is
able to work with non-"C2" continuous curves.
However, it generates more points in the distribution.
More...
#include <GCPnts_QuasiUniformDeflection.hxx>
Public Member Functions | |
| GCPnts_QuasiUniformDeflection () | |
Constructs an empty algorithm. To define the problem <br> to be solved, use the function Initialize. | |
| GCPnts_QuasiUniformDeflection (Adaptor3d_Curve &C, const Standard_Real Deflection, const GeomAbs_Shape Continuity=GeomAbs_C1) | |
Computes a QuasiUniform Deflection distribution <br> of points on the Curve | |
| GCPnts_QuasiUniformDeflection (Adaptor2d_Curve2d &C, const Standard_Real Deflection, const GeomAbs_Shape Continuity=GeomAbs_C1) | |
Computes a QuasiUniform Deflection distribution <br> of points on the Curve | |
| GCPnts_QuasiUniformDeflection (Adaptor3d_Curve &C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const GeomAbs_Shape Continuity=GeomAbs_C1) | |
Computes a QuasiUniform Deflection distribution <br> of points on a part of the Curve | |
| GCPnts_QuasiUniformDeflection (Adaptor2d_Curve2d &C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const GeomAbs_Shape Continuity=GeomAbs_C1) | |
Computes a QuasiUniform Deflection distribution <br> of points on a part of the Curve | |
| void | Initialize (Adaptor3d_Curve &C, const Standard_Real Deflection, const GeomAbs_Shape Continuity=GeomAbs_C1) |
Initialize the algoritms with , <Deflection> More... | |
| void | Initialize (Adaptor2d_Curve2d &C, const Standard_Real Deflection, const GeomAbs_Shape Continuity=GeomAbs_C1) |
Initialize the algoritms with , <Deflection> More... | |
| void | Initialize (Adaptor3d_Curve &C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const GeomAbs_Shape Continuity=GeomAbs_C1) |
Initialize the algoritms with , <Deflection>, More... | |
| void | Initialize (Adaptor2d_Curve2d &C, const Standard_Real Deflection, const Standard_Real U1, const Standard_Real U2, const GeomAbs_Shape Continuity=GeomAbs_C1) |
Initialize the algoritms with , <Deflection>, More... | |
| Standard_Boolean | IsDone () const |
| Returns true if the computation was successful. IsDone is a protection against: More... | |
| 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. More... | |
| Standard_Real | Parameter (const Standard_Integer Index) const |
Returns the parameter of the point of index Index in <br> the distribution computed by this algorithm. | |
| gp_Pnt | Value (const Standard_Integer Index) const |
Returns the point of index Index in the distribution <br> computed by this algorithm. | |
| Standard_Real | Deflection () const |
Returns the deflection between the curve and the <br> polygon resulting from the points of the distribution | |
This class computes a distribution of points on a
curve. The points may respect the deflection. The algorithm
is not based on the classical prediction (with second
derivative of curve), but either on the evaluation of
the distance between the mid point and the point of
mid parameter of the two points, or the distance
between the mid point and the point at parameter 0.5
on the cubic interpolation of the two points and their
tangents.
Note: this algorithm is faster than a
GCPnts_UniformDeflection algorithm, and is
able to work with non-"C2" continuous curves.
However, it generates more points in the distribution.
| GCPnts_QuasiUniformDeflection::GCPnts_QuasiUniformDeflection | ( | ) |
Constructs an empty algorithm. To define the problem <br>
to be solved, use the function Initialize.
| GCPnts_QuasiUniformDeflection::GCPnts_QuasiUniformDeflection | ( | Adaptor3d_Curve & | C, |
| const Standard_Real | Deflection, | ||
| const GeomAbs_Shape | Continuity = GeomAbs_C1 |
||
| ) |
Computes a QuasiUniform Deflection distribution <br>
of points on the Curve .
| GCPnts_QuasiUniformDeflection::GCPnts_QuasiUniformDeflection | ( | Adaptor2d_Curve2d & | C, |
| const Standard_Real | Deflection, | ||
| const GeomAbs_Shape | Continuity = GeomAbs_C1 |
||
| ) |
Computes a QuasiUniform Deflection distribution <br>
of points on the Curve .
| GCPnts_QuasiUniformDeflection::GCPnts_QuasiUniformDeflection | ( | Adaptor3d_Curve & | C, |
| const Standard_Real | Deflection, | ||
| const Standard_Real | U1, | ||
| const Standard_Real | U2, | ||
| const GeomAbs_Shape | Continuity = GeomAbs_C1 |
||
| ) |
Computes a QuasiUniform Deflection distribution <br>
of points on a part of the Curve .
| GCPnts_QuasiUniformDeflection::GCPnts_QuasiUniformDeflection | ( | Adaptor2d_Curve2d & | C, |
| const Standard_Real | Deflection, | ||
| const Standard_Real | U1, | ||
| const Standard_Real | U2, | ||
| const GeomAbs_Shape | Continuity = GeomAbs_C1 |
||
| ) |
Computes a QuasiUniform Deflection distribution <br>
of points on a part of the Curve .
This and the above algorithms compute a distribution of points:
| Standard_Real GCPnts_QuasiUniformDeflection::Deflection | ( | ) | const |
Returns the deflection between the curve and the <br>
polygon resulting from the points of the distribution
computed by this algorithm.
This is the value 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.
| void GCPnts_QuasiUniformDeflection::Initialize | ( | Adaptor3d_Curve & | C, |
| const Standard_Real | Deflection, | ||
| const GeomAbs_Shape | Continuity = GeomAbs_C1 |
||
| ) |
Initialize the algoritms with , <Deflection>
| void GCPnts_QuasiUniformDeflection::Initialize | ( | Adaptor2d_Curve2d & | C, |
| const Standard_Real | Deflection, | ||
| const GeomAbs_Shape | Continuity = GeomAbs_C1 |
||
| ) |
Initialize the algoritms with , <Deflection>
| void GCPnts_QuasiUniformDeflection::Initialize | ( | Adaptor3d_Curve & | C, |
| const Standard_Real | Deflection, | ||
| const Standard_Real | U1, | ||
| const Standard_Real | U2, | ||
| const GeomAbs_Shape | Continuity = GeomAbs_C1 |
||
| ) |
Initialize the algoritms with , <Deflection>,
<U1>,<U2>
| void GCPnts_QuasiUniformDeflection::Initialize | ( | Adaptor2d_Curve2d & | C, |
| const Standard_Real | Deflection, | ||
| const Standard_Real | U1, | ||
| const Standard_Real | U2, | ||
| const GeomAbs_Shape | Continuity = GeomAbs_C1 |
||
| ) |
Initialize the algoritms with , <Deflection>,
– <U1>,<U2>
This and the above algorithms initialize (or reinitialize)
this algorithm and compute a distribution of points:
| Standard_Boolean GCPnts_QuasiUniformDeflection::IsDone | ( | ) | const |
Returns true if the computation was successful.
IsDone is a protection against:
| Standard_Integer GCPnts_QuasiUniformDeflection::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 GCPnts_QuasiUniformDeflection::Parameter | ( | const Standard_Integer | Index | ) | const |
Returns the parameter of the point of index Index in <br>
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.
| gp_Pnt GCPnts_QuasiUniformDeflection::Value | ( | const Standard_Integer | Index | ) | const |
Returns the point of index Index in the distribution <br>
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.
1.8.5