Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions
Geom_BezierCurve Class Reference

Describes a rational or non-rational Bezier curve. More...

#include <Geom_BezierCurve.hxx>

Inheritance diagram for Geom_BezierCurve:
Inheritance graph
[legend]

Public Member Functions

 Geom_BezierCurve (const NCollection_Array1< gp_Pnt > &CurvePoles)
 Creates a non rational Bezier curve with a set of poles CurvePoles. The weights are defaulted to all being 1. Raises ConstructionError if the number of poles is greater than MaxDegree + 1 or lower than 2.
 
 Geom_BezierCurve (const NCollection_Array1< gp_Pnt > &CurvePoles, const NCollection_Array1< double > &PoleWeights)
 Creates a rational Bezier curve with the set of poles CurvePoles and the set of weights PoleWeights. If all the weights are identical the curve is considered as non rational. Raises ConstructionError if the number of poles is greater than MaxDegree + 1 or lower than 2 or CurvePoles and CurveWeights have not the same length or one weight value is lower or equal to Resolution from package gp.
 
 Geom_BezierCurve (const Geom_BezierCurve &theOther)
 Copy constructor for optimized copying without validation.
 
bool HasEvalRepresentation () const
 Returns true if an evaluation representation is attached.
 
const occ::handle< GeomEval_RepCurveDesc::Base > & EvalRepresentation () const
 Returns the current evaluation representation descriptor (may be null).
 
void SetEvalRepresentation (const occ::handle< GeomEval_RepCurveDesc::Base > &theDesc)
 Sets a new evaluation representation. Validates descriptor data and ensures no circular references.
 
void ClearEvalRepresentation ()
 Removes the evaluation representation.
 
void Increase (const int Degree)
 Increases the degree of a bezier curve. Degree is the new degree of <me>. Raises ConstructionError if Degree is greater than MaxDegree or lower than 2 or lower than the initial degree of <me>.
 
void InsertPoleAfter (const int Index, const gp_Pnt &P)
 Inserts a pole P after the pole of range Index. If the curve <me> is rational the weight value for the new pole of range Index is 1.0. raised if Index is not in the range [1, NbPoles].
 
void InsertPoleAfter (const int Index, const gp_Pnt &P, const double Weight)
 Inserts a pole with its weight in the set of poles after the pole of range Index. If the curve was non rational it can become rational if all the weights are not identical. Raised if Index is not in the range [1, NbPoles].
 
void InsertPoleBefore (const int Index, const gp_Pnt &P)
 Inserts a pole P before the pole of range Index. If the curve <me> is rational the weight value for the new pole of range Index is 1.0. Raised if Index is not in the range [1, NbPoles].
 
void InsertPoleBefore (const int Index, const gp_Pnt &P, const double Weight)
 Inserts a pole with its weight in the set of poles after the pole of range Index. If the curve was non rational it can become rational if all the weights are not identical. Raised if Index is not in the range [1, NbPoles].
 
void RemovePole (const int Index)
 Removes the pole of range Index. If the curve was rational it can become non rational. Raised if Index is not in the range [1, NbPoles] Raised if Degree is lower than 2.
 
void Reverse () final
 Reverses the direction of parametrization of <me> Value (NewU) = Value (1 - OldU)
 
double ReversedParameter (const double U) const final
 Returns the parameter on the reversed curve for the point of parameter U on <me>.
 
void Segment (const double U1, const double U2)
 Segments the curve between U1 and U2 which can be out of the bounds of the curve. The curve is oriented from U1 to U2. The control points are modified, the first and the last point are not the same but the parametrization range is [0, 1] else it could not be a Bezier curve. Warnings : Even if <me> is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the curve <me> or if the curve makes loop. After the segmentation the length of a curve can be null.
 
void SetPole (const int Index, const gp_Pnt &P)
 Substitutes the pole of range index with P. If the curve <me> is rational the weight of range Index is not modified. raiseD if Index is not in the range [1, NbPoles].
 
void SetPole (const int Index, const gp_Pnt &P, const double Weight)
 Substitutes the pole and the weights of range Index. If the curve <me> is not rational it can become rational if all the weights are not identical. If the curve was rational it can become non rational if all the weights are identical. Raised if Index is not in the range [1, NbPoles] Raised if Weight <= Resolution from package gp.
 
void SetWeight (const int Index, const double Weight)
 Changes the weight of the pole of range Index. If the curve <me> is not rational it can become rational if all the weights are not identical. If the curve was rational it can become non rational if all the weights are identical. Raised if Index is not in the range [1, NbPoles] Raised if Weight <= Resolution from package gp.
 
bool IsClosed () const final
 Returns True if the distance between the first point and the last point of the curve is lower or equal to the Resolution from package gp.
 
bool IsCN (const int N) const final
 Continuity of the curve, returns True.
 
bool IsPeriodic () const final
 Returns True if the parametrization of a curve is periodic. (P(u) = P(u + T) T = constante)
 
bool IsRational () const
 Returns false if all the weights are identical. The tolerance criterion is Resolution from package gp.
 
GeomAbs_Shape Continuity () const final
 a Bezier curve is CN
 
int Degree () const
 Returns the polynomial degree of the curve. it is the number of poles - 1 point P and derivatives (V1, V2, V3) computation The Bezier Curve has a Polynomial representation so the parameter U can be out of the bounds of the curve.
 
gp_Pnt EvalD0 (const double U) const final
 Computes the point of parameter U. Raises an exception on failure (e.g. OffsetCurve at singular point).
 
Geom_Curve::ResD1 EvalD1 (const double U) const final
 Computes the point and first derivative at parameter U. Raises an exception if the curve continuity is not C1.
 
Geom_Curve::ResD2 EvalD2 (const double U) const final
 Computes the point and first two derivatives at parameter U. Raises an exception if the curve continuity is not C2.
 
Geom_Curve::ResD3 EvalD3 (const double U) const final
 For this Bezier curve, computes.
 
gp_Vec EvalDN (const double U, const int N) const final
 For the point of parameter U of this Bezier curve, computes the vector corresponding to the Nth derivative. Note: the parameter U can be outside the bounds of the curve. Exceptions Standard_RangeError if N is less than 1.
 
gp_Pnt StartPoint () const final
 Returns Value (U=0.), it is the first control point of the curve.
 
gp_Pnt EndPoint () const final
 Returns Value (U=1.), it is the last control point of the Bezier curve.
 
double FirstParameter () const final
 Returns the value of the first parameter of this Bezier curve. This is 0.0, which gives the start point of this Bezier curve.
 
double LastParameter () const final
 Returns the value of the last parameter of this Bezier curve. This is 1.0, which gives the end point of this Bezier curve.
 
int NbPoles () const
 Returns the number of poles of this Bezier curve.
 
const gp_PntPole (const int Index) const
 Returns the pole of range Index. Raised if Index is not in the range [1, NbPoles].
 
void Poles (NCollection_Array1< gp_Pnt > &P) const
 Returns all the poles of the curve.
 
const NCollection_Array1< gp_Pnt > & Poles () const
 Returns all the poles of the curve.
 
double Weight (const int Index) const
 Returns the weight of range Index. Raised if Index is not in the range [1, NbPoles].
 
void Weights (NCollection_Array1< double > &W) const
 Returns all the weights of the curve.
 
const NCollection_Array1< double > * Weights () const
 Returns all the weights of the curve.
 
const NCollection_Array1< double > & WeightsArray () const
 Returns a const reference to the weights array. For rational curves: the internal owning weights array. For non-rational curves: a non-owning view of unit weights from BSplCLib. The array is always sized to match NbPoles().
 
void Transform (const gp_Trsf &T) final
 Applies the transformation T to this Bezier curve.
 
void Resolution (const double Tolerance3D, double &UTolerance)
 Computes for this Bezier curve the parametric tolerance UTolerance for a given 3D tolerance Tolerance3D. If f(t) is the equation of this Bezier curve, UTolerance ensures that: |t1-t0| < UTolerance ===> |f(t1)-f(t0)| < Tolerance3D.
 
occ::handle< Geom_GeometryCopy () const final
 Creates a new object which is a copy of this Bezier curve.
 
void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const final
 Dumps the content of me into the stream.
 
const NCollection_Array1< double > & Knots () const
 Returns Bezier knots {0.0, 1.0} as a static array.
 
const NCollection_Array1< int > & Multiplicities () const
 Returns Bezier multiplicities for the current degree.
 
const NCollection_Array1< double > & KnotSequence () const
 Returns Bezier flat knots for the current degree.
 
- Public Member Functions inherited from Geom_BoundedCurve
void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const override
 Dumps the content of me into the stream.
 
- Public Member Functions inherited from Geom_Curve
virtual double TransformedParameter (const double U, const gp_Trsf &T) const
 Returns the parameter on the transformed curve for the transform of the point of parameter U on <me>.
 
virtual double ParametricTransformation (const gp_Trsf &T) const
 Returns a coefficient to compute the parameter on the transformed curve for the transform of the point on <me>.
 
occ::handle< Geom_CurveReversed () const
 Returns a copy of <me> reversed.
 
virtual double Period () const
 Returns the period of this curve. Exceptions Standard_NoSuchObject if this curve is not periodic.
 
void D0 (const double U, gp_Pnt &P) const
 Returns in P the point of parameter U.
 
void D1 (const double U, gp_Pnt &P, gp_Vec &V1) const
 Returns the point P of parameter U and the first derivative V1.
 
void D2 (const double U, gp_Pnt &P, gp_Vec &V1, gp_Vec &V2) const
 Returns the point P of parameter U, the first and second derivatives V1 and V2.
 
void D3 (const double U, gp_Pnt &P, gp_Vec &V1, gp_Vec &V2, gp_Vec &V3) const
 Returns the point P of parameter U, the first, the second and the third derivative.
 
gp_Vec DN (const double U, const int N) const
 The returned vector gives the value of the derivative for the order of derivation N.
 
gp_Pnt Value (const double U) const
 Computes the point of parameter U on <me>.
 
void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const override
 Dumps the content of me into the stream.
 
- Public Member Functions inherited from Geom_Geometry
void Mirror (const gp_Pnt &P)
 Performs the symmetrical transformation of a Geometry with respect to the point P which is the center of the symmetry.
 
void Mirror (const gp_Ax1 &A1)
 Performs the symmetrical transformation of a Geometry with respect to an axis placement which is the axis of the symmetry.
 
void Mirror (const gp_Ax2 &A2)
 Performs the symmetrical transformation of a Geometry with respect to a plane. The axis placement A2 locates the plane of the symmetry : (Location, XDirection, YDirection).
 
void Rotate (const gp_Ax1 &A1, const double Ang)
 Rotates a Geometry. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
 
void Scale (const gp_Pnt &P, const double S)
 Scales a Geometry. S is the scaling value.
 
void Translate (const gp_Vec &V)
 Translates a Geometry. V is the vector of the translation.
 
void Translate (const gp_Pnt &P1, const gp_Pnt &P2)
 Translates a Geometry from the point P1 to the point P2.
 
occ::handle< Geom_GeometryMirrored (const gp_Pnt &P) const
 
occ::handle< Geom_GeometryMirrored (const gp_Ax1 &A1) const
 
occ::handle< Geom_GeometryMirrored (const gp_Ax2 &A2) const
 
occ::handle< Geom_GeometryRotated (const gp_Ax1 &A1, const double Ang) const
 
occ::handle< Geom_GeometryScaled (const gp_Pnt &P, const double S) const
 
occ::handle< Geom_GeometryTransformed (const gp_Trsf &T) const
 
occ::handle< Geom_GeometryTranslated (const gp_Vec &V) const
 
occ::handle< Geom_GeometryTranslated (const gp_Pnt &P1, const gp_Pnt &P2) const
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()=default
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
bool IsInstance (const char *const theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
bool IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
bool IsKind (const char *const theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
 
int GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
 
int DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

Static Public Member Functions

static int MaxDegree ()
 Returns the value of the maximum polynomial degree of any Geom_BezierCurve curve. This value is 25.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const charget_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 

Protected Member Functions

void init (const NCollection_Array1< gp_Pnt > &thePoles, const NCollection_Array1< double > *theWeights)
 Set poles to thePoles, weights to theWeights. If theWeights is null the curve is non rational. Update rational and closed.
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 

Detailed Description

Describes a rational or non-rational Bezier curve.

  1. However, the degree of a Geom_BezierCurve curve is limited to a value (25) which is defined and controlled by the system. This value is returned by the function MaxDegree. The parameter range for a Bezier curve is [ 0, 1 ]. If the first and last control points of the Bezier curve are the same point then the curve is closed. For example, to create a closed Bezier curve with four control points, you have to give the set of control points P1, P2, P3 and P1. The continuity of a Bezier curve is infinite. It is not possible to build a Bezier curve with negative weights. We consider that a weight value is zero if it is less than or equal to gp::Resolution(). We also consider that two weight values W1 and W2 are equal if: |W2 - W1| <= gp::Resolution(). Warning

Constructor & Destructor Documentation

◆ Geom_BezierCurve() [1/3]

Geom_BezierCurve::Geom_BezierCurve ( const NCollection_Array1< gp_Pnt > & CurvePoles)

Creates a non rational Bezier curve with a set of poles CurvePoles. The weights are defaulted to all being 1. Raises ConstructionError if the number of poles is greater than MaxDegree + 1 or lower than 2.

◆ Geom_BezierCurve() [2/3]

Geom_BezierCurve::Geom_BezierCurve ( const NCollection_Array1< gp_Pnt > & CurvePoles,
const NCollection_Array1< double > & PoleWeights )

Creates a rational Bezier curve with the set of poles CurvePoles and the set of weights PoleWeights. If all the weights are identical the curve is considered as non rational. Raises ConstructionError if the number of poles is greater than MaxDegree + 1 or lower than 2 or CurvePoles and CurveWeights have not the same length or one weight value is lower or equal to Resolution from package gp.

◆ Geom_BezierCurve() [3/3]

Geom_BezierCurve::Geom_BezierCurve ( const Geom_BezierCurve & theOther)

Copy constructor for optimized copying without validation.

Parameters
[in]theOtherthe Bezier curve to copy from

Member Function Documentation

◆ ClearEvalRepresentation()

void Geom_BezierCurve::ClearEvalRepresentation ( )
inline

Removes the evaluation representation.

◆ Continuity()

GeomAbs_Shape Geom_BezierCurve::Continuity ( ) const
finalvirtual

a Bezier curve is CN

Implements Geom_Curve.

◆ Copy()

occ::handle< Geom_Geometry > Geom_BezierCurve::Copy ( ) const
finalvirtual

Creates a new object which is a copy of this Bezier curve.

Implements Geom_Geometry.

◆ Degree()

int Geom_BezierCurve::Degree ( ) const

Returns the polynomial degree of the curve. it is the number of poles - 1 point P and derivatives (V1, V2, V3) computation The Bezier Curve has a Polynomial representation so the parameter U can be out of the bounds of the curve.

◆ DumpJson()

void Geom_BezierCurve::DumpJson ( Standard_OStream & theOStream,
int theDepth = -1 ) const
finalvirtual

Dumps the content of me into the stream.

Reimplemented from Geom_Geometry.

◆ EndPoint()

gp_Pnt Geom_BezierCurve::EndPoint ( ) const
finalvirtual

Returns Value (U=1.), it is the last control point of the Bezier curve.

Implements Geom_BoundedCurve.

◆ EvalD0()

gp_Pnt Geom_BezierCurve::EvalD0 ( const double U) const
finalvirtual

Computes the point of parameter U. Raises an exception on failure (e.g. OffsetCurve at singular point).

Implements Geom_Curve.

◆ EvalD1()

Geom_Curve::ResD1 Geom_BezierCurve::EvalD1 ( const double U) const
finalvirtual

Computes the point and first derivative at parameter U. Raises an exception if the curve continuity is not C1.

Implements Geom_Curve.

◆ EvalD2()

Geom_Curve::ResD2 Geom_BezierCurve::EvalD2 ( const double U) const
finalvirtual

Computes the point and first two derivatives at parameter U. Raises an exception if the curve continuity is not C2.

Implements Geom_Curve.

◆ EvalD3()

Geom_Curve::ResD3 Geom_BezierCurve::EvalD3 ( const double U) const
finalvirtual

For this Bezier curve, computes.

  • the point P of parameter U, or
  • the point P and one or more of the following values:
  • V1, the first derivative vector,
  • V2, the second derivative vector,
  • V3, the third derivative vector. Note: the parameter U can be outside the bounds of the curve.

Implements Geom_Curve.

◆ EvalDN()

gp_Vec Geom_BezierCurve::EvalDN ( const double U,
const int N ) const
finalvirtual

For the point of parameter U of this Bezier curve, computes the vector corresponding to the Nth derivative. Note: the parameter U can be outside the bounds of the curve. Exceptions Standard_RangeError if N is less than 1.

Implements Geom_Curve.

◆ EvalRepresentation()

const occ::handle< GeomEval_RepCurveDesc::Base > & Geom_BezierCurve::EvalRepresentation ( ) const
inline

Returns the current evaluation representation descriptor (may be null).

◆ FirstParameter()

double Geom_BezierCurve::FirstParameter ( ) const
finalvirtual

Returns the value of the first parameter of this Bezier curve. This is 0.0, which gives the start point of this Bezier curve.

Implements Geom_Curve.

◆ HasEvalRepresentation()

bool Geom_BezierCurve::HasEvalRepresentation ( ) const
inline

Returns true if an evaluation representation is attached.

◆ Increase()

void Geom_BezierCurve::Increase ( const int Degree)

Increases the degree of a bezier curve. Degree is the new degree of <me>. Raises ConstructionError if Degree is greater than MaxDegree or lower than 2 or lower than the initial degree of <me>.

◆ init()

void Geom_BezierCurve::init ( const NCollection_Array1< gp_Pnt > & thePoles,
const NCollection_Array1< double > * theWeights )
protected

Set poles to thePoles, weights to theWeights. If theWeights is null the curve is non rational. Update rational and closed.

◆ InsertPoleAfter() [1/2]

void Geom_BezierCurve::InsertPoleAfter ( const int Index,
const gp_Pnt & P )

Inserts a pole P after the pole of range Index. If the curve <me> is rational the weight value for the new pole of range Index is 1.0. raised if Index is not in the range [1, NbPoles].

raised if the resulting number of poles is greater than MaxDegree + 1.

◆ InsertPoleAfter() [2/2]

void Geom_BezierCurve::InsertPoleAfter ( const int Index,
const gp_Pnt & P,
const double Weight )

Inserts a pole with its weight in the set of poles after the pole of range Index. If the curve was non rational it can become rational if all the weights are not identical. Raised if Index is not in the range [1, NbPoles].

Raised if the resulting number of poles is greater than MaxDegree + 1. Raised if Weight is lower or equal to Resolution from package gp.

◆ InsertPoleBefore() [1/2]

void Geom_BezierCurve::InsertPoleBefore ( const int Index,
const gp_Pnt & P )

Inserts a pole P before the pole of range Index. If the curve <me> is rational the weight value for the new pole of range Index is 1.0. Raised if Index is not in the range [1, NbPoles].

Raised if the resulting number of poles is greater than MaxDegree + 1.

◆ InsertPoleBefore() [2/2]

void Geom_BezierCurve::InsertPoleBefore ( const int Index,
const gp_Pnt & P,
const double Weight )

Inserts a pole with its weight in the set of poles after the pole of range Index. If the curve was non rational it can become rational if all the weights are not identical. Raised if Index is not in the range [1, NbPoles].

Raised if the resulting number of poles is greater than MaxDegree + 1. Raised if Weight is lower or equal to Resolution from package gp.

◆ IsClosed()

bool Geom_BezierCurve::IsClosed ( ) const
finalvirtual

Returns True if the distance between the first point and the last point of the curve is lower or equal to the Resolution from package gp.

Implements Geom_Curve.

◆ IsCN()

bool Geom_BezierCurve::IsCN ( const int N) const
finalvirtual

Continuity of the curve, returns True.

Implements Geom_Curve.

◆ IsPeriodic()

bool Geom_BezierCurve::IsPeriodic ( ) const
finalvirtual

Returns True if the parametrization of a curve is periodic. (P(u) = P(u + T) T = constante)

Implements Geom_Curve.

◆ IsRational()

bool Geom_BezierCurve::IsRational ( ) const

Returns false if all the weights are identical. The tolerance criterion is Resolution from package gp.

◆ Knots()

const NCollection_Array1< double > & Geom_BezierCurve::Knots ( ) const

Returns Bezier knots {0.0, 1.0} as a static array.

◆ KnotSequence()

const NCollection_Array1< double > & Geom_BezierCurve::KnotSequence ( ) const

Returns Bezier flat knots for the current degree.

◆ LastParameter()

double Geom_BezierCurve::LastParameter ( ) const
finalvirtual

Returns the value of the last parameter of this Bezier curve. This is 1.0, which gives the end point of this Bezier curve.

Implements Geom_Curve.

◆ MaxDegree()

static int Geom_BezierCurve::MaxDegree ( )
static

Returns the value of the maximum polynomial degree of any Geom_BezierCurve curve. This value is 25.

◆ Multiplicities()

const NCollection_Array1< int > & Geom_BezierCurve::Multiplicities ( ) const

Returns Bezier multiplicities for the current degree.

◆ NbPoles()

int Geom_BezierCurve::NbPoles ( ) const

Returns the number of poles of this Bezier curve.

◆ Pole()

const gp_Pnt & Geom_BezierCurve::Pole ( const int Index) const

Returns the pole of range Index. Raised if Index is not in the range [1, NbPoles].

◆ Poles() [1/2]

const NCollection_Array1< gp_Pnt > & Geom_BezierCurve::Poles ( ) const

Returns all the poles of the curve.

◆ Poles() [2/2]

void Geom_BezierCurve::Poles ( NCollection_Array1< gp_Pnt > & P) const

Returns all the poles of the curve.

Raised if the length of P is not equal to the number of poles.

Deprecated
("use Poles() returning const reference instead")

◆ RemovePole()

void Geom_BezierCurve::RemovePole ( const int Index)

Removes the pole of range Index. If the curve was rational it can become non rational. Raised if Index is not in the range [1, NbPoles] Raised if Degree is lower than 2.

◆ Resolution()

void Geom_BezierCurve::Resolution ( const double Tolerance3D,
double & UTolerance )

Computes for this Bezier curve the parametric tolerance UTolerance for a given 3D tolerance Tolerance3D. If f(t) is the equation of this Bezier curve, UTolerance ensures that: |t1-t0| < UTolerance ===> |f(t1)-f(t0)| < Tolerance3D.

◆ Reverse()

void Geom_BezierCurve::Reverse ( )
finalvirtual

Reverses the direction of parametrization of <me> Value (NewU) = Value (1 - OldU)

Implements Geom_Curve.

◆ ReversedParameter()

double Geom_BezierCurve::ReversedParameter ( const double U) const
finalvirtual

Returns the parameter on the reversed curve for the point of parameter U on <me>.

returns 1-U

Implements Geom_Curve.

◆ Segment()

void Geom_BezierCurve::Segment ( const double U1,
const double U2 )

Segments the curve between U1 and U2 which can be out of the bounds of the curve. The curve is oriented from U1 to U2. The control points are modified, the first and the last point are not the same but the parametrization range is [0, 1] else it could not be a Bezier curve. Warnings : Even if <me> is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the curve <me> or if the curve makes loop. After the segmentation the length of a curve can be null.

◆ SetEvalRepresentation()

void Geom_BezierCurve::SetEvalRepresentation ( const occ::handle< GeomEval_RepCurveDesc::Base > & theDesc)

Sets a new evaluation representation. Validates descriptor data and ensures no circular references.

◆ SetPole() [1/2]

void Geom_BezierCurve::SetPole ( const int Index,
const gp_Pnt & P )

Substitutes the pole of range index with P. If the curve <me> is rational the weight of range Index is not modified. raiseD if Index is not in the range [1, NbPoles].

◆ SetPole() [2/2]

void Geom_BezierCurve::SetPole ( const int Index,
const gp_Pnt & P,
const double Weight )

Substitutes the pole and the weights of range Index. If the curve <me> is not rational it can become rational if all the weights are not identical. If the curve was rational it can become non rational if all the weights are identical. Raised if Index is not in the range [1, NbPoles] Raised if Weight <= Resolution from package gp.

◆ SetWeight()

void Geom_BezierCurve::SetWeight ( const int Index,
const double Weight )

Changes the weight of the pole of range Index. If the curve <me> is not rational it can become rational if all the weights are not identical. If the curve was rational it can become non rational if all the weights are identical. Raised if Index is not in the range [1, NbPoles] Raised if Weight <= Resolution from package gp.

◆ StartPoint()

gp_Pnt Geom_BezierCurve::StartPoint ( ) const
finalvirtual

Returns Value (U=0.), it is the first control point of the curve.

Implements Geom_BoundedCurve.

◆ Transform()

void Geom_BezierCurve::Transform ( const gp_Trsf & T)
finalvirtual

Applies the transformation T to this Bezier curve.

Implements Geom_Geometry.

◆ Weight()

double Geom_BezierCurve::Weight ( const int Index) const

Returns the weight of range Index. Raised if Index is not in the range [1, NbPoles].

◆ Weights() [1/2]

const NCollection_Array1< double > * Geom_BezierCurve::Weights ( ) const
inline

Returns all the weights of the curve.

◆ Weights() [2/2]

void Geom_BezierCurve::Weights ( NCollection_Array1< double > & W) const

Returns all the weights of the curve.

Raised if the length of W is not equal to the number of poles.

Deprecated
("use Weights() returning const pointer instead")

◆ WeightsArray()

const NCollection_Array1< double > & Geom_BezierCurve::WeightsArray ( ) const
inline

Returns a const reference to the weights array. For rational curves: the internal owning weights array. For non-rational curves: a non-owning view of unit weights from BSplCLib. The array is always sized to match NbPoles().

Warning
Do NOT modify elements through the returned reference.

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