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

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

#include <Geom2d_BezierCurve.hxx>

Inheritance diagram for Geom2d_BezierCurve:
Inheritance graph
[legend]

Public Member Functions

 Geom2d_BezierCurve (const NCollection_Array1< gp_Pnt2d > &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.
 
 Geom2d_BezierCurve (const NCollection_Array1< gp_Pnt2d > &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.
 
 Geom2d_BezierCurve (const Geom2d_BezierCurve &theOther)
 Copy constructor for optimized copying without validation.
 
bool HasEvalRepresentation () const
 Returns true if an evaluation representation is attached.
 
const occ::handle< Geom2dEval_RepCurveDesc::Base > & EvalRepresentation () const
 Returns the current evaluation representation descriptor (may be null).
 
void SetEvalRepresentation (const occ::handle< Geom2dEval_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_Pnt2d &P, const double Weight=1.0)
 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 [0, NbPoles].
 
void InsertPoleBefore (const int Index, const gp_Pnt2d &P, const double Weight=1.0)
 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+1].
 
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].
 
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_Pnt2d &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_Pnt2d &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 False. A BezierCurve cannot be periodic in this package.
 
bool IsRational () const
 Returns false if all the weights are identical. The tolerance criterion is Resolution from package gp.
 
GeomAbs_Shape Continuity () const final
 Returns GeomAbs_CN, which is the continuity of any Bezier curve.
 
int Degree () const
 Returns the polynomial degree of the curve. It is the number of poles less one. In this package the Degree of a Bezier curve cannot be greater than "MaxDegree".
 
gp_Pnt2d EvalD0 (const double U) const final
 Computes the point of parameter U. Raises an exception on failure.
 
Geom2d_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.
 
Geom2d_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.
 
Geom2d_Curve::ResD3 EvalD3 (const double U) const final
 Computes the point and first three derivatives at parameter U. Raises an exception if the curve continuity is not C3.
 
gp_Vec2d EvalDN (const double U, const int N) const final
 For this Bezier curve, computes.
 
gp_Pnt2d EndPoint () const final
 Returns the end point or start point of this 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 for this Bezier curve.
 
const gp_Pnt2dPole (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_Pnt2d > &P) const
 Returns all the poles of the curve.
 
const NCollection_Array1< gp_Pnt2d > & Poles () const
 Returns all the poles of the curve.
 
gp_Pnt2d StartPoint () const final
 Returns Value (U=1), it is the first control point 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_Trsf2d &T) final
 Applies the transformation T to this Bezier curve.
 
void Resolution (const double ToleranceUV, double &UTolerance)
 Computes for this Bezier curve the parametric tolerance UTolerance for a given tolerance Tolerance3D (relative to dimensions in the plane). If f(t) is the equation of this Bezier curve, UTolerance ensures that | t1 - t0| < Utolerance ===> |f(t1) - f(t0)| < ToleranceUV.
 
occ::handle< Geom2d_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 Geom2d_BoundedCurve
void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const override
 Dumps the content of me into the stream.
 
- Public Member Functions inherited from Geom2d_Curve
virtual double TransformedParameter (const double U, const gp_Trsf2d &T) const
 Computes the parameter on the curve transformed by T for the point of parameter U on this curve. Note: this function generally returns U but it can be redefined (for example, on a line).
 
virtual double ParametricTransformation (const gp_Trsf2d &T) const
 Returns the coefficient required to compute the parametric transformation of this curve when transformation T is applied. This coefficient is the ratio between the parameter of a point on this curve and the parameter of the transformed point on the new curve transformed by T. Note: this function generally returns 1. but it can be redefined (for example, on a line).
 
occ::handle< Geom2d_CurveReversed () const
 Creates a reversed duplicate Changes the orientation of this curve. The first and last parameters are not changed, but the parametric direction of the curve is reversed. If the curve is bounded:
 
virtual double Period () const
 Returns the period of this curve. raises if the curve is not periodic.
 
void D0 (const double U, gp_Pnt2d &P) const
 Returns in P the point of parameter U.
 
void D1 (const double U, gp_Pnt2d &P, gp_Vec2d &V1) const
 Returns the point P of parameter U and the first derivative V1.
 
void D2 (const double U, gp_Pnt2d &P, gp_Vec2d &V1, gp_Vec2d &V2) const
 Returns the point P of parameter U, the first and second derivatives V1 and V2.
 
void D3 (const double U, gp_Pnt2d &P, gp_Vec2d &V1, gp_Vec2d &V2, gp_Vec2d &V3) const
 Returns the point P of parameter U, the first, the second and the third derivative.
 
gp_Vec2d DN (const double U, const int N) const
 Computes the Nth derivative vector.
 
gp_Pnt2d Value (const double U) const
 Computes the point of parameter U on <me>. Implemented with D0.
 
void DumpJson (Standard_OStream &theOStream, int theDepth=-1) const override
 Dumps the content of me into the stream.
 
- Public Member Functions inherited from Geom2d_Geometry
void Mirror (const gp_Pnt2d &P)
 Performs the symmetrical transformation of a Geometry with respect to the point P which is the center of the symmetry and assigns the result to this geometric object.
 
void Mirror (const gp_Ax2d &A)
 Performs the symmetrical transformation of a Geometry with respect to an axis placement which is the axis of the symmetry.
 
void Rotate (const gp_Pnt2d &P, const double Ang)
 Rotates a Geometry. P is the center of the rotation. Ang is the angular value of the rotation in radians.
 
void Scale (const gp_Pnt2d &P, const double S)
 Scales a Geometry. S is the scaling value.
 
void Translate (const gp_Vec2d &V)
 Translates a Geometry. V is the vector of the translation.
 
void Translate (const gp_Pnt2d &P1, const gp_Pnt2d &P2)
 Translates a Geometry from the point P1 to the point P2.
 
occ::handle< Geom2d_GeometryMirrored (const gp_Pnt2d &P) const
 
occ::handle< Geom2d_GeometryMirrored (const gp_Ax2d &A) const
 
occ::handle< Geom2d_GeometryRotated (const gp_Pnt2d &P, const double Ang) const
 
occ::handle< Geom2d_GeometryScaled (const gp_Pnt2d &P, const double S) const
 
occ::handle< Geom2d_GeometryTransformed (const gp_Trsf2d &T) const
 
occ::handle< Geom2d_GeometryTranslated (const gp_Vec2d &V) const
 
occ::handle< Geom2d_GeometryTranslated (const gp_Pnt2d &P1, const gp_Pnt2d &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 a BezierCurve. 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_Pnt2d > &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.

Constructor & Destructor Documentation

◆ Geom2d_BezierCurve() [1/3]

Geom2d_BezierCurve::Geom2d_BezierCurve ( const NCollection_Array1< gp_Pnt2d > & 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.

◆ Geom2d_BezierCurve() [2/3]

Geom2d_BezierCurve::Geom2d_BezierCurve ( const NCollection_Array1< gp_Pnt2d > & 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.

◆ Geom2d_BezierCurve() [3/3]

Geom2d_BezierCurve::Geom2d_BezierCurve ( const Geom2d_BezierCurve & theOther)

Copy constructor for optimized copying without validation.

Member Function Documentation

◆ ClearEvalRepresentation()

void Geom2d_BezierCurve::ClearEvalRepresentation ( )
inline

Removes the evaluation representation.

◆ Continuity()

GeomAbs_Shape Geom2d_BezierCurve::Continuity ( ) const
finalvirtual

Returns GeomAbs_CN, which is the continuity of any Bezier curve.

Implements Geom2d_Curve.

◆ Copy()

occ::handle< Geom2d_Geometry > Geom2d_BezierCurve::Copy ( ) const
finalvirtual

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

Implements Geom2d_Geometry.

◆ Degree()

int Geom2d_BezierCurve::Degree ( ) const

Returns the polynomial degree of the curve. It is the number of poles less one. In this package the Degree of a Bezier curve cannot be greater than "MaxDegree".

◆ DumpJson()

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

Dumps the content of me into the stream.

Reimplemented from Geom2d_Geometry.

◆ EndPoint()

gp_Pnt2d Geom2d_BezierCurve::EndPoint ( ) const
finalvirtual

Returns the end point or start point of this Bezier curve.

Implements Geom2d_BoundedCurve.

◆ EvalD0()

gp_Pnt2d Geom2d_BezierCurve::EvalD0 ( const double U) const
finalvirtual

Computes the point of parameter U. Raises an exception on failure.

Implements Geom2d_Curve.

◆ EvalD1()

Geom2d_Curve::ResD1 Geom2d_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 Geom2d_Curve.

◆ EvalD2()

Geom2d_Curve::ResD2 Geom2d_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 Geom2d_Curve.

◆ EvalD3()

Geom2d_Curve::ResD3 Geom2d_BezierCurve::EvalD3 ( const double U) const
finalvirtual

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

Implements Geom2d_Curve.

◆ EvalDN()

gp_Vec2d Geom2d_BezierCurve::EvalDN ( const double U,
const int N ) 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. Raises RangeError if N < 1.

Implements Geom2d_Curve.

◆ EvalRepresentation()

const occ::handle< Geom2dEval_RepCurveDesc::Base > & Geom2d_BezierCurve::EvalRepresentation ( ) const
inline

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

◆ FirstParameter()

double Geom2d_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 Geom2d_Curve.

◆ HasEvalRepresentation()

bool Geom2d_BezierCurve::HasEvalRepresentation ( ) const
inline

Returns true if an evaluation representation is attached.

◆ Increase()

void Geom2d_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 Geom2d_BezierCurve::init ( const NCollection_Array1< gp_Pnt2d > & 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()

void Geom2d_BezierCurve::InsertPoleAfter ( const int Index,
const gp_Pnt2d & P,
const double Weight = 1.0 )

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 [0, NbPoles].

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

◆ InsertPoleBefore()

void Geom2d_BezierCurve::InsertPoleBefore ( const int Index,
const gp_Pnt2d & P,
const double Weight = 1.0 )

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+1].

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

◆ IsClosed()

bool Geom2d_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 Geom2d_Curve.

◆ IsCN()

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

Continuity of the curve, returns True.

Implements Geom2d_Curve.

◆ IsPeriodic()

bool Geom2d_BezierCurve::IsPeriodic ( ) const
finalvirtual

Returns False. A BezierCurve cannot be periodic in this package.

Implements Geom2d_Curve.

◆ IsRational()

bool Geom2d_BezierCurve::IsRational ( ) const

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

◆ Knots()

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

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

◆ KnotSequence()

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

Returns Bezier flat knots for the current degree.

◆ LastParameter()

double Geom2d_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 Geom2d_Curve.

◆ MaxDegree()

static int Geom2d_BezierCurve::MaxDegree ( )
static

Returns the value of the maximum polynomial degree of a BezierCurve. This value is 25.

◆ Multiplicities()

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

Returns Bezier multiplicities for the current degree.

◆ NbPoles()

int Geom2d_BezierCurve::NbPoles ( ) const

Returns the number of poles for this Bezier curve.

◆ Pole()

const gp_Pnt2d & Geom2d_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_Pnt2d > & Geom2d_BezierCurve::Poles ( ) const
inline

Returns all the poles of the curve.

◆ Poles() [2/2]

void Geom2d_BezierCurve::Poles ( NCollection_Array1< gp_Pnt2d > & 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 Geom2d_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].

◆ Resolution()

void Geom2d_BezierCurve::Resolution ( const double ToleranceUV,
double & UTolerance )

Computes for this Bezier curve the parametric tolerance UTolerance for a given tolerance Tolerance3D (relative to dimensions in the plane). If f(t) is the equation of this Bezier curve, UTolerance ensures that | t1 - t0| < Utolerance ===> |f(t1) - f(t0)| < ToleranceUV.

◆ Reverse()

void Geom2d_BezierCurve::Reverse ( )
finalvirtual

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

Implements Geom2d_Curve.

◆ ReversedParameter()

double Geom2d_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 Geom2d_Curve.

◆ Segment()

void Geom2d_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 Geom2d_BezierCurve::SetEvalRepresentation ( const occ::handle< Geom2dEval_RepCurveDesc::Base > & theDesc)

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

◆ SetPole() [1/2]

void Geom2d_BezierCurve::SetPole ( const int Index,
const gp_Pnt2d & 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 Geom2d_BezierCurve::SetPole ( const int Index,
const gp_Pnt2d & 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 Geom2d_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_Pnt2d Geom2d_BezierCurve::StartPoint ( ) const
finalvirtual

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

Implements Geom2d_BoundedCurve.

◆ Transform()

void Geom2d_BezierCurve::Transform ( const gp_Trsf2d & T)
finalvirtual

Applies the transformation T to this Bezier curve.

Implements Geom2d_Geometry.

◆ Weight()

double Geom2d_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 > * Geom2d_BezierCurve::Weights ( ) const
inline

Returns all the weights of the curve.

◆ Weights() [2/2]

void Geom2d_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 > & Geom2d_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: